From dbd91fb408a801d31abbcab18fa72ea9d55018b1 Mon Sep 17 00:00:00 2001 From: huxuejian Date: Thu, 5 Mar 2026 17:04:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/customer-archive.vue | 11 +++++++++-- pages/survey/components/survey-question.vue | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue index 2d18c8d..25464bd 100644 --- a/pages/home/customer-archive.vue +++ b/pages/home/customer-archive.vue @@ -147,8 +147,7 @@ function toHealthList() { if (canAuth.value) { toast("请先授权本服务团队"); } else { - const name = `${current.value.name} ${current.value.relationship ? `(${current.value.relationship})` : "" - }`; + const name = `${current.value.name} ${current.value.relationship || ""}`; uni.navigateTo({ url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${props.corpId }&id=${current.value._id}&name=${encodeURIComponent(name)}`, @@ -169,10 +168,12 @@ function toManagePage() { async function auth() { await confirm(`是否授权${props.team.name}提供服务`); + const corpUserId = await getResponsiblePerson(); const res = await api("authCustomerToTeam", { corpId: props.corpId, teamId: props.team.teamId, id: current.value._id, + corpUserId }); if (res && res.success) { await toast("授权成功"); @@ -203,6 +204,12 @@ async function getCustomers() { loading = false } +async function getResponsiblePerson() { + const corpUserId = props.corpUserIds && props.corpUserIds[props.team.teamId] ? props.corpUserIds[props.team.teamId] : ""; + const res = await api('getResponsiblePerson', { corpId: props.corpId, externalUserId: externalUserId.value, teamId: props.team.teamId, corpUserId }); + return res && res.data ? res.data : '' +} + onMounted(() => { uni.$on("reloadTeamCustomers", getCustomers); }); diff --git a/pages/survey/components/survey-question.vue b/pages/survey/components/survey-question.vue index 243e895..13d37be 100644 --- a/pages/survey/components/survey-question.vue +++ b/pages/survey/components/survey-question.vue @@ -57,7 +57,7 @@ + class="flex-shrink-0 mx-10 py-12 leading-normal text-white text-center rounded bg-primary" @click="submit()"> 提交