31 lines
520 B
JavaScript
31 lines
520 B
JavaScript
Page({
|
|
data: {
|
|
timeNumber: 3
|
|
},
|
|
onShow(){
|
|
setTimeout(() => {
|
|
this.setData({
|
|
timeNumber:2
|
|
})
|
|
}, 1000);
|
|
setTimeout(() => {
|
|
this.setData({
|
|
timeNumber:1
|
|
})
|
|
}, 2000);
|
|
setTimeout(() => {
|
|
if(dd.$toolAll.getCache('userData')){
|
|
// 前往首页
|
|
dd.redirectTo({url:'/pages/home/home'});
|
|
}else{
|
|
// 前往登录页
|
|
dd.redirectTo({url:'/pages/login/login'});
|
|
}
|
|
|
|
}, 3000);
|
|
},
|
|
onLoad() {
|
|
|
|
},
|
|
});
|