Merge branch 'bd-dev' of 47.94.45.65:angelo/web-base-h5 into bd-test
This commit is contained in:
commit
b011045709
|
@ -57,6 +57,7 @@ module.exports = vm => {
|
|||
// 响应拦截
|
||||
uni.$u.http.interceptors.response.use(
|
||||
response => {
|
||||
console.log(response, '......response')
|
||||
const data = response.data
|
||||
// uni.$u.toast(data.msg)
|
||||
// if (data.code == 200) {
|
||||
|
@ -77,6 +78,20 @@ module.exports = vm => {
|
|||
})
|
||||
}, 1500)
|
||||
} else if (data.code == 500) {
|
||||
if (['/member/api/member/get-info'].includes(response?.config?.url)) {
|
||||
uni.showToast({
|
||||
title: '登录失败',
|
||||
icon: 'none',
|
||||
duration: 800,
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/index',
|
||||
})
|
||||
}, 800)
|
||||
removeToken()
|
||||
return data
|
||||
}
|
||||
uni.$u.toast(data.msg)
|
||||
return data
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue