shjn
This commit is contained in:
1 parent
d7f5f1a656
commit
fd068aeaf2
2 files changed
+5
-2
No files matched your search
@@ -233,6 +233,9 @@ const login = {
|
||||
if (response.msg == "token已失效") {
|
||||
uni.showToast({ title: "用户凭证已失效,请退出并重新进入智慧后勤应用", icon: "none", duration: 6000 })
|
||||
} else {
|
||||
if (response.code == -1) {
|
||||
storage.saveToken({ data: -1 })
|
||||
}
|
||||
uni.showToast({ title: response.msg || "登录失败", icon: "none" })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,8 +351,8 @@ async function loginBySh(): Promise<boolean> {
|
||||
return false
|
||||
}
|
||||
|
||||
// 如果是设备未验证,保存响应数据
|
||||
if (response.data == -1) {
|
||||
// 设备未信任:后端 R.failed(-1, msg) 业务码在 code,data 为 null
|
||||
if (response.code == -1) {
|
||||
uni.setStorageSync(TOKEN_KEY, { data: -1 })
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user