launch.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="launch-bg" :style="[background]">
  3. <!-- <image class="launch-img" mode="widthFix" :src="appConfig.mobile_start_page"></image> -->
  4. <view class="w-full" style="height: 100%; position: absolute; top: 0">
  5. <view class="flex-col col-center row-center w-full " style="height: 100%">
  6. <image src="/static/images/map_bg.png" mode="widthFix" @tap="launchApp('/pages/index/index', 'map')">
  7. </image>
  8. <image src="/static/images/policy_bg.png" mode="widthFix" style="margin-top: 100rpx;"
  9. @tap="launchApp('/pages/policy/index', 'policy')"></image>
  10. </view>
  11. </view>
  12. <!-- <view class="img-datu">
  13. <view class="jishi" :style="{ top: (sysInfo.statusBarHeight + 60) + 'px' }">
  14. <text>跳过</text>
  15. <text>{{countDownNum}}秒</text>
  16. </view>
  17. </view> -->
  18. </view>
  19. </template>
  20. <script>
  21. import {
  22. mapGetters
  23. } from 'vuex'
  24. const app = getApp()
  25. const homeItem = {
  26. name: '启动页'
  27. }
  28. export default {
  29. data() {
  30. return {
  31. countDownNum: 5,
  32. timer: null,
  33. }
  34. },
  35. onLoad(options) {
  36. // console.log('token' + this.appConfig.token)
  37. // this.timer = setInterval(() => {
  38. // if (this.countDownNum == 0) {
  39. // clearInterval(this.timer)
  40. // this.launchApp()
  41. // } else {
  42. // this.countDownNum = this.countDownNum - 1;
  43. // }
  44. // }, 1000)
  45. },
  46. onUnload() {},
  47. onShow() {},
  48. onHide() {},
  49. methods: {
  50. launchApp(url, type) {
  51. // if (this.timer) {
  52. // clearInterval(this.timer)
  53. // }
  54. uni.setStorageSync('TABBAR_TYPE', type);
  55. uni.switchTab({
  56. url: url
  57. })
  58. },
  59. },
  60. computed: {
  61. ...mapGetters(['sysInfo', 'inviteCode', 'appConfig']),
  62. background() {
  63. const {
  64. mobile_start_page
  65. } = this.appConfig
  66. return mobile_start_page ? {
  67. 'background-image': `url(${mobile_start_page})`,
  68. 'background-size': 'cover'
  69. } : {}
  70. },
  71. }
  72. }
  73. </script>
  74. <style lang="scss">
  75. page {
  76. padding: 0;
  77. height: 100%;
  78. }
  79. .fixed {
  80. position: fixed;
  81. top: 660rpx;
  82. image {
  83. border-radius: 10px 10px 10px 10px;
  84. }
  85. }
  86. .launch-bg {
  87. height: 100%;
  88. }
  89. .launch-img {
  90. width: 100%;
  91. }
  92. .img-datu .jishi {
  93. background-color: rgba(0, 0, 0, 0.4);
  94. position: fixed;
  95. top: 200rpx;
  96. right: 50rpx;
  97. border-radius: 50%;
  98. width: 100rpx;
  99. height: 100rpx;
  100. display: flex;
  101. flex-direction: column;
  102. justify-content: center;
  103. align-items: center;
  104. }
  105. .img-datu .jishi text {
  106. color: #fff;
  107. font-size: 24rpx;
  108. }
  109. </style>