Commit f028ee54 by 高淑倩

modify: relogin判断baseUserInfo

parent 03efe0c3
......@@ -4,7 +4,7 @@
.integral-vip-rules{
width:140rpx;
height:35rpx;
line-height: 40rpx;
line-height: 35rpx;
text-align: center;
color: rgb(64, 205, 147);
font-size: 28rpx;
......
......@@ -61,11 +61,11 @@ wxService.page({
title: `${res.desc}`,
icon: 'none'
})
wxService.router(`/pages/userCenter/userCenter`)
wxService.router(`/pages/userCenter/userCenter`).replace()
}
}).finally(() => {
wx.hideLoading()
wxService.router(`/pages/userCenter/userCenter`)
wxService.router(`/pages/userCenter/userCenter`).replace()
})
},
handelReLogin(){
......@@ -91,7 +91,7 @@ wxService.page({
reject(res)
}
},()=>{
wxService.router(`/pages/userCenter/userCenter`)
wxService.router(`/pages/userCenter/userCenter`).replace()
})
},
/**
......
......@@ -48,6 +48,9 @@ class WXService extends Http {
wx.hideLoading()
}).catch(res => {
if (res.msg && res.msg.indexOf('未登录') > -1) {
// 判断是否登陆过 登陆过 重新登陆 未登陆 跳转首页
const baseUserInfo = this.getBaseUserInfo()
if(!baseUserInfo) wxService.router('/pages/userCenter/userCenter').replace()
// 重新登陆 更新缓存
this.reLogin()
setTimeout(()=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment