修改错误提示
This commit is contained in:
1 parent
4ba2ed6e54
commit
00c0ca7642
2 files changed
+10
-2
No files matched your search
@@ -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
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user