微信小程序优化
parent
a8c61a6ae4
commit
b8db892c22
|
|
@ -559,24 +559,16 @@ App({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 登录校验
|
/**
|
||||||
is_login_check(res) {
|
* 登录校验
|
||||||
|
* object 回调操作对象
|
||||||
|
* method 回调操作对象的函数
|
||||||
|
*/
|
||||||
|
is_login_check(res, object, method) {
|
||||||
if(res.code == -400)
|
if(res.code == -400)
|
||||||
{
|
{
|
||||||
wx.clearStorage();
|
wx.clearStorage();
|
||||||
wx.showModal({
|
this.get_user_info(object, method);
|
||||||
title: '温馨提示',
|
|
||||||
content: '授权用户信息',
|
|
||||||
confirmText: '确认',
|
|
||||||
cancelText: '暂不',
|
|
||||||
success: (result) => {
|
|
||||||
if (result.confirm) {
|
|
||||||
wx.navigateTo({
|
|
||||||
url: "/pages/login/login?event_callback=init"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue