This commit is contained in:
ctw committed 2025-01-19 16:52:43 +08:00
commit 4f32e351da
2 files changed
+9 -6

No files matched your search

+7 -2
View File
@@ -145,8 +145,13 @@ http.interceptors.response.use(
return Promise.resolve(response.data)
},
(error) => {
console.log(error)
if (error.statusCode == 424) {
const tokenKey = constant.storageConstant.TOKEN
uni.removeStorageSync(tokenKey)
uni.showToast({ title: "登录已过期,请重新登录", icon: "none" })
router.jump("/pages/test/login")
return false
}
let errorMessage = error.data.msg
if (error !== undefined) {
uni.showToast({