全局登录调整
This commit is contained in:
@@ -27,7 +27,7 @@ Page({
|
||||
{'taskId':'13','title':'我去哦额陪娃欧美大片请我们','note':'2022-11-11','complete':true,'notification':true},
|
||||
{'taskId':'14','title':'请问哦气雾剂群殴','note':'2022-11-11','complete':true,'notification':true}
|
||||
],
|
||||
duration: 300, // swiper-item 切换过渡时间
|
||||
duration: 100, // swiper-item 切换过渡时间
|
||||
categoryCur: 0, // 当前数据列索引
|
||||
categoryMenu: ['任务清单','收藏任务','延期任务'], // 分类菜单数据, 字符串数组格式
|
||||
categoryData: [], // 所有数据列
|
||||
@@ -86,7 +86,7 @@ Page({
|
||||
// 页面滑动切换事件
|
||||
animationFinish(e) {
|
||||
this.setData({
|
||||
duration: 300
|
||||
duration: 100
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
@@ -178,6 +178,14 @@ Page({
|
||||
this.data.tapCheckHandle.close();
|
||||
},
|
||||
onLoad() {
|
||||
let userInfo = wx.getStorageSync('userInfo');
|
||||
let token = wx.getStorageSync('userToken');
|
||||
console.log('userInfo===' + userInfo);
|
||||
console.log('token===' + token);
|
||||
if (!userInfo || !token){
|
||||
wx.redirectTo({url:"/pages/login/index"});
|
||||
return;
|
||||
}
|
||||
let categoryData = [];
|
||||
this.data.categoryMenu.forEach(index =>{
|
||||
categoryData.push({
|
||||
@@ -195,12 +203,12 @@ Page({
|
||||
// 第一次加载延迟 350 毫秒 防止第一次动画效果不能完全体验
|
||||
setTimeout(() => {
|
||||
this.refresh();
|
||||
}, 350);
|
||||
}, 100);
|
||||
},
|
||||
|
||||
handleClick(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/taskDetail/index'
|
||||
url: '/pages/task/taskDetail/index'
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user