86 lines
1.9 KiB
Vue
86 lines
1.9 KiB
Vue
<template>
|
|
|
|
<view class="commonPage commonPageBox bg" @click="navigateTo">
|
|
<view class="">{{ content }}</view>
|
|
<public-module></public-module>
|
|
<!-- <z-nav-bar title="设置" bgColor="#3AB3AE" fontColor="#fff"></z-nav-bar> -->
|
|
|
|
<view class="contentBox commonPageContentBox"></view>
|
|
<!-- 右上角跳过按钮 -->
|
|
<!-- <view class="passbtn" @click.stop="launchApp">跳过</view> -->
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
content: "",
|
|
totalTime: 10,
|
|
clock: null,
|
|
};
|
|
},
|
|
onLoad() {
|
|
this.getData();
|
|
},
|
|
onHide() {
|
|
clearInterval(this.clock);
|
|
},
|
|
methods: {
|
|
navigateTo() {
|
|
// clearInterval(this.clock);
|
|
},
|
|
getData() {
|
|
this.clock = setInterval(() => {
|
|
this.totalTime--;
|
|
this.content = this.totalTime + "s后跳转";
|
|
// if (this.totalTime == 0) {
|
|
// this.launchApp()
|
|
// }
|
|
}, 1000);
|
|
console.log(this.clock);
|
|
},
|
|
launchApp() {
|
|
//跳过引导页,储存本地值,下次进入直接跳过
|
|
// clearInterval(this.clock);
|
|
// this.$mRouter.push('/pages/index/index')
|
|
uni.switchTab({
|
|
url: "/pages/homePage/index/index",
|
|
success: function () {
|
|
let page = getCurrentPages()[0];
|
|
console.log(page);
|
|
page.$vm.requestAll();
|
|
},
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@import "@/static/customicons.css";
|
|
@import "@/style/common.scss";
|
|
|
|
.bg {
|
|
}
|
|
|
|
// .passbtn {
|
|
// width: 130rpx;
|
|
// height: 60rpx;
|
|
// line-height: 60rpx;
|
|
// position: fixed;
|
|
// z-index: 999;
|
|
// bottom: 50rpx;
|
|
// right: 50rpx;
|
|
// color: #838892;
|
|
// text-align: center;
|
|
// border-width: 1rpx;
|
|
// border-color: rgba(0, 0, 0, 0.5);
|
|
// border-style: solid;
|
|
// border-radius: 30rpx;
|
|
// font-size: 28rpx;
|
|
// padding-left: 25rpx;
|
|
// padding-right: 25rpx;
|
|
// }
|
|
</style>
|