gyh change
This commit is contained in:
@@ -1,45 +1,76 @@
|
||||
<template>
|
||||
<view class="welcome">
|
||||
<!-- 倒计时(跳过) -->
|
||||
<remaining></remaining>
|
||||
<remaining v-if="guidePages"></remaining>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex';
|
||||
import remaining from '@/components/remaining/remaining';
|
||||
export default {
|
||||
computed: {
|
||||
...mapState(['hasLogin', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
guidePages: true
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onLoad() {
|
||||
this.loadExecution();
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
components:{}
|
||||
loadExecution() {
|
||||
/**
|
||||
* 获取本地存储中launchFlag的值
|
||||
* 若存在,说明不是首次启动,直接进入首页;
|
||||
* 若不存在,说明是首次启动,进入引导页;
|
||||
*/
|
||||
// 获取本地存储中launchFlag标识
|
||||
const value = uni.getStorageSync('launchFlag') || "";
|
||||
// console.log(value, this.hasLogin);
|
||||
if (value) {
|
||||
this.guidePages = false;
|
||||
if (this.hasLogin) {
|
||||
uni.switchTab({
|
||||
url: '../../pages/index/index'
|
||||
});
|
||||
} else {
|
||||
// launchFlag=true直接跳转到首页
|
||||
uni.navigateTo({
|
||||
url: '../../pageA/login/login'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// launchFlag!=true显示引导页
|
||||
this.guidePages = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.welcome {}
|
||||
.welcome_jumpes{
|
||||
|
||||
.welcome_jumpes {
|
||||
width: 90rpx;
|
||||
height: 35rpx;
|
||||
opacity:0.5;
|
||||
border-radius:18rpx;
|
||||
opacity: 0.5;
|
||||
border-radius: 18rpx;
|
||||
position: absolute;
|
||||
right: 37rpx;
|
||||
top: 34rpx;
|
||||
font-size:20rpx;
|
||||
font-size: 20rpx;
|
||||
text-align: center;
|
||||
line-height: 35rpx;
|
||||
color: #fff;
|
||||
background: #C4CAC6;
|
||||
}
|
||||
|
||||
.welcome_images {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
|
||||
Reference in New Issue
Block a user