From 3d99dba28c6ddc012bf54e9d11927e0e89313e36 Mon Sep 17 00:00:00 2001 From: huxuejian Date: Mon, 11 May 2026 11:37:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=A4=96=E9=83=A8=E8=81=94=E7=B3=BB=E4=BA=BA=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/customer-archive.vue | 4 +--- store/account.js | 7 +++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue index 64be6b5..e62ff57 100644 --- a/pages/home/customer-archive.vue +++ b/pages/home/customer-archive.vue @@ -206,9 +206,7 @@ async function getCustomers() { } async function getResponsiblePerson() { - if (!externalUserId.value) { - await getExternalUserId(props.corpId) - } + await getExternalUserId(props.corpId) const corpUserId = props.corpUserIds && props.corpUserIds[props.team.teamId] ? props.corpUserIds[props.team.teamId] : ""; const res = await api('getResponsiblePerson', { corpId: props.corpId, teamId: props.team.teamId, corpUserId, externalUserId: externalUserId.value }); return res && res.data ? res.data : '' diff --git a/store/account.js b/store/account.js index 303e8de..e567b5b 100644 --- a/store/account.js +++ b/store/account.js @@ -141,11 +141,10 @@ export default defineStore("accountStore", () => { async function getExternalUserId(corpId) { const unionid = account.value?.unionid; const openid = account.value?.openid; - if (!(corpId && unionid && openid) || externalUserId.value) return; + if (!(corpId && unionid && openid)) return; const res = await api('getUnionidToExternalUserid', { unionid, openid, corpId }, false); - if (res && res.success && typeof res.data === 'string' && res.data.trim()) { - externalUserId.value = res.data.trim(); - } + const id = res && res.success && typeof res.data === 'string' && res.data.trim() ? res.data.trim() : ''; + externalUserId.value = id; } watch(hasImCorpId, n => {