From 5a0ec3c66bb3ca7143bcb4f6adc8f9cb5dbc3e37 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Mon, 1 Sep 2025 10:46:23 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9Bfix:=20=E5=8F=82=E6=95=B0=E5=90=8D?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/AuthStore.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/stores/AuthStore.js b/src/stores/AuthStore.js index 665586b..a70b85b 100644 --- a/src/stores/AuthStore.js +++ b/src/stores/AuthStore.js @@ -143,17 +143,16 @@ const useAuthStore = create(devtools((set, get) => ({ return parsedUser } else { return null } }, - // 钉钉免登后获取用户信息 loginByJSAuth: async (authCode) => { - const { saveUserSession, setLoginStatus } = get() + const { saveUserSession, setLoginStatus, parseLoginJson } = get() + setLoginStatus(200) const json = await fetchJSON( 'https://p9axztuwd7x8a7.mycht.cn/dingtalk/dingtalkwork/Getusers_auth_wa', - { authCode }, + { code: authCode }, ) - const parsedUser = parseLoginJson(json) if (parsedUser) { @@ -165,6 +164,8 @@ const useAuthStore = create(devtools((set, get) => ({ } else { setLoginStatus(403) } + + }, getPrimaryEmail: () => {