123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <template>
- <view class="launch-bg" :style="[background]" @tap="launchApp()">
- <image class="launch-img" mode="widthFix" :src="appConfig.mobile_start_page"></image>
- <view class="img-datu">
- <view class="jishi" :style="{ top: (sysInfo.statusBarHeight + 60) + 'px' }">
- <text>跳过</text>
- <text>{{countDownNum}}秒</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapGetters
- } from 'vuex'
- const app = getApp()
- const homeItem = {
- name: '启动页'
- }
- export default {
- data() {
- return {
- countDownNum: 5,
- timer: null,
- }
- },
- onLoad(options) {
- console.log('token' + this.appConfig.token)
- this.timer = setInterval(() => {
- if (this.countDownNum == 0) {
- clearInterval(this.timer)
- this.launchApp()
- } else {
- this.countDownNum = this.countDownNum - 1;
- }
- }, 1000)
- },
- onUnload() {},
- onShow() {
- },
- onHide() {},
- methods: {
- launchApp() {
-
- if (this.timer) {
- clearInterval(this.timer)
- }
- uni.switchTab({
- url: '/pages/index/index'
- })
- },
- },
- computed: {
- ...mapGetters(['sysInfo', 'inviteCode', 'appConfig']),
- background() {
- const {
- mobile_start_bg
- } = this.appConfig
- return mobile_start_bg ? {
- 'background-image': `url(${mobile_start_bg})`,
- 'background-size': 'cover'
- } : {}
- },
- }
- }
- </script>
- <style lang="scss">
- page {
- padding: 0;
- height: 100%;
- }
- .launch-bg {
- height: 100%;
- }
- .launch-img {
- width: 100%;
- }
- .img-datu .jishi {
- background-color: rgba(0, 0, 0, 0.4);
- position: fixed;
- top: 200rpx;
- right: 50rpx;
- border-radius: 50%;
- width: 100rpx;
- height: 100rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- .img-datu .jishi text {
- color: #fff;
- font-size: 24rpx;
- }
- </style>
|