修改错误提示

This commit is contained in:
weiwei committed 2025-04-09 15:11:54 +08:00
1 parent 4ba2ed6e54
commit 00c0ca7642
2 files changed
+10 -2

No files matched your search

+5 -1
View File
@@ -182,7 +182,11 @@ const login = {
} else {
uni.hideLoading()
storage.clearUserStorage()
uni.showToast({ title: "登录失败", icon: "none" })
if (response.msg == "token已失效") {
uni.showToast({ title: "用户凭证已失效,请退出并重新进入智慧后勤应用", icon: "none", duration: 6000 })
} else {
uni.showToast({ title: response.msg || "登录失败", icon: "none" })
}
}
break
+5 -1
View File
@@ -94,9 +94,13 @@ async function handleShLogin(): Promise<boolean> {
uni.showToast({ title: "登录成功", icon: "none" })
return true
} else {
uni.showToast({ title: "获取用户信息失败", icon: "none" })
uni.removeStorageSync(TOKEN_KEY)
uni.removeStorageSync(USER_INFO_KEY)
if (response.msg == "token已失效") {
uni.showToast({ title: "用户凭证已失效,请退出并重新进入智慧后勤应用", icon: "none", duration: 6000 })
} else {
uni.showToast({ title: response.msg || "登录失败", icon: "none" })
}
return false
}
} catch (error) {