|
@@ -31,27 +31,32 @@ function request(options,hasNoToken) {
|
|
|
console.log(res.data)
|
|
|
const isCloseUser = res.data.status == 500&&(res.data.message == 0||res.data.message == -1)
|
|
|
const closeMsg = res.data.message == 0 ? '用户已停用' : '用户已注销'
|
|
|
- console.log(isCloseUser)
|
|
|
+ const showCommonTips = uni.getStorageSync('showCommonTips')
|
|
|
+
|
|
|
if (_obj.url.indexOf('checkLogin') > -1) {
|
|
|
resolve(res.data);
|
|
|
} else if (res.data.status === '900010' || isCloseUser) {
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: isCloseUser ? closeMsg : '登录已过期,请重新登录',
|
|
|
- confirmText: '知道了',
|
|
|
- showCancel: false,
|
|
|
- success(res) {
|
|
|
- if(res.confirm){
|
|
|
- uni.removeStorageSync('token')
|
|
|
- uni.removeStorageSync('userInfo')
|
|
|
- uni.removeStorageSync('permCodes')
|
|
|
- uni.removeStorageSync('userPhoto')
|
|
|
- uni.reLaunch({
|
|
|
- url: `/pages/login/login`
|
|
|
- })
|
|
|
+ if(!showCommonTips==1){
|
|
|
+ uni.setStorageSync('showCommonTips',1)
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: isCloseUser ? closeMsg : '登录已过期,请重新登录',
|
|
|
+ confirmText: '知道了',
|
|
|
+ showCancel: false,
|
|
|
+ success(res) {
|
|
|
+ if(res.confirm){
|
|
|
+ uni.removeStorageSync('token')
|
|
|
+ uni.removeStorageSync('userInfo')
|
|
|
+ uni.removeStorageSync('permCodes')
|
|
|
+ uni.removeStorageSync('userPhoto')
|
|
|
+ uni.removeStorageSync('showCommonTips')
|
|
|
+ uni.reLaunch({
|
|
|
+ url: `/pages/login/login`
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
resolve(res.data);
|
|
|
}
|