全局登录调整

This commit is contained in:
2022-12-16 21:52:41 +08:00
parent 654f71789a
commit f9eb77079b
19 changed files with 92 additions and 279 deletions

View File

@@ -10,6 +10,18 @@ Component({
}
},
lifetimes: {
created() {
},
attached: function () {
// 在组件实例进入页面节点树时执行
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的初始数据
*/
@@ -65,8 +77,8 @@ Component({
checkLogin(){
let userInfo = wx.getStorageSync('userInfo');
let token = wx.getStorageSync('userToken');
console.log('userInfo===' + userInfo);
console.log('token===' + token);
console.log('components userInfo===' + userInfo);
console.log('components token===' + token);
if (userInfo && token){
return true;
}else {