From e8c25009d5bfefbdc156b0de7571e473ebc5545d Mon Sep 17 00:00:00 2001 From: huxuejian Date: Mon, 11 May 2026 14:25:24 +0800 Subject: [PATCH] Update account.js --- store/account.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/store/account.js b/store/account.js index e567b5b..ef4fa29 100644 --- a/store/account.js +++ b/store/account.js @@ -141,7 +141,10 @@ export default defineStore("accountStore", () => { async function getExternalUserId(corpId) { const unionid = account.value?.unionid; const openid = account.value?.openid; - if (!(corpId && unionid && openid)) return; + if (!(corpId && unionid && openid)) { + externalUserId.value = ''; + return + }; const res = await api('getUnionidToExternalUserid', { unionid, openid, corpId }, false); const id = res && res.success && typeof res.data === 'string' && res.data.trim() ? res.data.trim() : ''; externalUserId.value = id;