Commit 76e9b200 by 高淑倩

add: 添加登录限制_getUserInfoLimitCount:重试次数

parent 6d786a86
...@@ -54,8 +54,22 @@ class WXService extends Http { ...@@ -54,8 +54,22 @@ class WXService extends Http {
wxService.router('/pages/userCenter/userCenter').replace() wxService.router('/pages/userCenter/userCenter').replace()
return false return false
} }
// 重新登陆 更新缓存 // 条件限制 getUserInfoLimitCount:重试次数
this.reLogin() if (!this.getUserInfoLimitCount) {
this.getUserInfoLimitCount = 1
} else {
this.getUserInfoLimitCount++
}
if (this.getUserInfoLimitCount > 3) {
wx.showToast({
title: '登录超出重试次数!',
icon: 'none'
})
} else {
// 重新登陆 更新缓存
this.reLogin()
}
setTimeout(()=>{ setTimeout(()=>{
const pages = getCurrentPages() const pages = getCurrentPages()
const perpage = pages[pages.length - 1] const perpage = pages[pages.length - 1]
......
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