|
@@ -25,18 +25,18 @@ export const $http = (url, method, data, json, isloading=true) => {
|
|
}
|
|
}
|
|
|
|
|
|
if (response?.data?.code === 401 || response?.data?.msg.indexOf('未授权') > -1 || response?.data?.msg.indexOf('重新登录') > -1) {
|
|
if (response?.data?.code === 401 || response?.data?.msg.indexOf('未授权') > -1 || response?.data?.msg.indexOf('重新登录') > -1) {
|
|
- // return uni.showModal({
|
|
|
|
- // title: '温馨提示',
|
|
|
|
- // content:'当前登录已失效,是否返回重新登录',
|
|
|
|
- // success: (res) => {
|
|
|
|
- // if (res.confirm) {
|
|
|
|
- // uni.clearStorageSync();
|
|
|
|
- // uni.reLaunch({
|
|
|
|
- // url: '/pages/login'
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
|
|
+ return uni.showModal({
|
|
|
|
+ title: '温馨提示',
|
|
|
|
+ content:'当前登录已失效,是否重新登录',
|
|
|
|
+ success: (res) => {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ uni.clearStorageSync();
|
|
|
|
+ uni.reLaunch({
|
|
|
|
+ url: '/pages/login'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
// 请根据后端规定的状态码判定
|
|
// 请根据后端规定的状态码判定
|