index.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="start-page">
  3. <image
  4. class="img"
  5. mode="aspectFill"
  6. src=""
  7. alt=""
  8. />
  9. <!-- 别删 预加载用 -->
  10. <iframe
  11. v-if="show"
  12. :src="
  13. app.mobile +
  14. '/static/chart_main/static/bundles/library.21c43e3cd2e427bd8522.js'
  15. "
  16. style="width: 0; height: 0"
  17. frameborder="0"
  18. ></iframe>
  19. </view>
  20. </template>
  21. <script>
  22. import upgrade from "@/plugins/upgrade.js";
  23. import app from "@/app";
  24. export default {
  25. name: "startPage",
  26. data() {
  27. return {
  28. app,
  29. show:false
  30. };
  31. },
  32. onLoad() {
  33. let dtime = setTimeout(() => {
  34. uni.reLaunch({
  35. url: "/pages/base/index",
  36. });
  37. upgrade.isUpdate(() => {
  38. // 前往升级
  39. uni.reLaunch({
  40. url: "/pages/upgrade/index",
  41. });
  42. });
  43. }, 0);
  44. // #ifdef H5
  45. uni.reLaunch({
  46. url: "/pages/base/index",
  47. });
  48. clearTimeout(dtime);
  49. // #endif
  50. setTimeout(()=>{
  51. this.show = true
  52. },4500)
  53. },
  54. methods: {},
  55. };
  56. </script>
  57. <style lang="scss" scoped>
  58. .start-page {
  59. height: 100vh;
  60. .img {
  61. width: 100vw;
  62. height: 100vh;
  63. object-fit: cover;
  64. }
  65. }
  66. </style>