Commit ba99fdf7 by zhangxw

登录超时ios端不弹窗问题处理

1 parent 4d24627c
...@@ -122,7 +122,7 @@ App({ ...@@ -122,7 +122,7 @@ App({
res && this.login(true, res); res && this.login(true, res);
} }
}, },
login(relogin, context) { login(relogin, context, RequestMethods) {
let that = this; let that = this;
// 清空多账号信息 // 清空多账号信息
if (relogin) { if (relogin) {
...@@ -153,6 +153,9 @@ App({ ...@@ -153,6 +153,9 @@ App({
// }) // })
// }, 500, true) // }, 500, true)
} else { } else {
let thisPage = wx.$router.getPageInstance()
// 启动页loading中的埋点接口 在触发登录超时后 ios端wx.showModal会被页面跳转截断,导致无弹窗,将loading页面这个埋点接口的登录超时不做弹窗处理
if (thisPage.route == 'pages/loading/loading' && RequestMethods.includes('dj.api.smartcarlife.staff.login.record.save')) return
// 标志位 解决安卓查复弹框问题 // 标志位 解决安卓查复弹框问题
if (wx.__HAS_NOTLOGIN_MODAL) return false; if (wx.__HAS_NOTLOGIN_MODAL) return false;
wx.__HAS_NOTLOGIN_MODAL = true; wx.__HAS_NOTLOGIN_MODAL = true;
......
...@@ -64,7 +64,7 @@ class Request { ...@@ -64,7 +64,7 @@ class Request {
// console.log(thisPage); // console.log(thisPage);
wx.hideLoading() wx.hideLoading()
if (thisPage.route != 'pages/wxLogin/wxLogin') { if (thisPage.route != 'pages/wxLogin/wxLogin') {
getApp().login(true) getApp().login(true, '', url)
} }
} else if (code == -1) { } else if (code == -1) {
wx.showToast({ wx.showToast({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!