From 67a220b60bae043d1d087c57857acbb189c0a34e Mon Sep 17 00:00:00 2001 From: weiwei Date: Thu, 3 Apr 2025 15:33:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sheep/utils/request.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sheep/utils/request.ts b/src/sheep/utils/request.ts index 4b98e7e..3f13d58 100644 --- a/src/sheep/utils/request.ts +++ b/src/sheep/utils/request.ts @@ -50,7 +50,7 @@ async function handleZzdLogin(): Promise { 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 { } 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) {