Commit 26fe3218 authored by xiangzj's avatar xiangzj

登出问题

parent 7875b2fe
......@@ -179,7 +179,7 @@
logOut() {
apiLogOut().then((res) => {
uni.setStorageSync('lifeData', {});
uni.navigateTo({
uni.redirectTo({
url: "/pages/login/login"
})
}).catch(() => {
......
......@@ -94,8 +94,7 @@ class Request {
duration: 2000,
icon: 'none'
})
}
if (response.statusCode == 401) {
}else if (response.statusCode == 401) {
uni.showToast({
title: '登录已失效',
duration: 2000,
......@@ -104,13 +103,14 @@ class Request {
uni.navigateTo({
url: "/pages/login/login"
})
}else{
uni.showToast({
title: '服务器异常',
duration: 2000,
icon: 'none'
})
reject(response)
}
uni.showToast({
title: '服务器异常',
duration: 2000,
icon: 'none'
})
reject(response)
}
}
}
......
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