修改提示
This commit is contained in:
1 parent
709ec56703
commit
67a220b60b
1 file changed
+3
-2
@@ -50,7 +50,7 @@ async function handleZzdLogin(): Promise<boolean> {
|
||||
if (!token) return false
|
||||
|
||||
const res = await userApi.auth(token)
|
||||
if (res?.code === 0) {
|
||||
if (res?.code == 0) {
|
||||
uni.setStorageSync(TOKEN_KEY, res.data)
|
||||
const { data: userData } = await userApi.userInfo()
|
||||
uni.setStorageSync(USER_INFO_KEY, userData)
|
||||
@@ -58,7 +58,8 @@ async function handleZzdLogin(): Promise<boolean> {
|
||||
} else {
|
||||
uni.removeStorageSync(TOKEN_KEY)
|
||||
uni.removeStorageSync(USER_INFO_KEY)
|
||||
uni.showToast({ title: res.msg || "登录失败", icon: "none" })
|
||||
// uni.showToast({ title: res.msg || "登录失败", icon: "none" })
|
||||
uni.showToast({ title: "用户信息获取失败,请退出然后重新进入智慧后勤应用", icon: "none", duration: 5000 })
|
||||
return false
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user