Compare commits
No commits in common. "76a7bcbb19e6be187e1a2897aea3657dcd2fcfe4" and "e6cdad5cded06a895cba00e9ea7791da5b094b48" have entirely different histories.
76a7bcbb19
...
e6cdad5cde
@ -206,7 +206,9 @@ async function getCustomers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getResponsiblePerson() {
|
async function getResponsiblePerson() {
|
||||||
await getExternalUserId(props.corpId)
|
if (!externalUserId.value) {
|
||||||
|
await getExternalUserId(props.corpId)
|
||||||
|
}
|
||||||
const corpUserId = props.corpUserIds && props.corpUserIds[props.team.teamId] ? props.corpUserIds[props.team.teamId] : "";
|
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 });
|
const res = await api('getResponsiblePerson', { corpId: props.corpId, teamId: props.team.teamId, corpUserId, externalUserId: externalUserId.value });
|
||||||
return res && res.data ? res.data : ''
|
return res && res.data ? res.data : ''
|
||||||
|
|||||||
@ -141,10 +141,11 @@ export default defineStore("accountStore", () => {
|
|||||||
async function getExternalUserId(corpId) {
|
async function getExternalUserId(corpId) {
|
||||||
const unionid = account.value?.unionid;
|
const unionid = account.value?.unionid;
|
||||||
const openid = account.value?.openid;
|
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 res = await api('getUnionidToExternalUserid', { unionid, openid, corpId }, false);
|
||||||
const id = res && res.success && typeof res.data === 'string' && res.data.trim() ? res.data.trim() : '';
|
if (res && res.success && typeof res.data === 'string' && res.data.trim()) {
|
||||||
externalUserId.value = id;
|
externalUserId.value = res.data.trim();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(hasImCorpId, n => {
|
watch(hasImCorpId, n => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user