Merge branch 'dev-260810' into dev-ticket
This commit is contained in:
commit
2ac04ba97e
@ -10,12 +10,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<button-footer :showCancel="customerId ? true : false" cancelText="删除" :confirmText="healthTypes.length?'下一步':'保存'" @cancel="unBindArchive()"
|
<button-footer :showCancel="customerId ? true : false" cancelText="删除"
|
||||||
@confirm="confirm()" />
|
:confirmText="healthTypes.length ? '下一步' : '保存'" @cancel="unBindArchive()" @confirm="confirm()" />
|
||||||
</template>
|
</template>
|
||||||
</full-page>
|
</full-page>
|
||||||
<bind-popup :customers="customers" :corpName="corpName" :enableHis="enableHis" :visible="visible" @close="visible = false"
|
<bind-popup :customers="customers" :corpName="corpName" :enableHis="enableHis" :visible="visible"
|
||||||
@confirm="bindArchive($event)" />
|
@close="visible = false" @confirm="bindArchive($event)" />
|
||||||
<verify-popup :visible="verifyVisible" @close="verifyVisible = false" />
|
<verify-popup :visible="verifyVisible" @close="verifyVisible = false" />
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -209,11 +209,11 @@ async function init() {
|
|||||||
if (customerId.value) {
|
if (customerId.value) {
|
||||||
await getCustomer();
|
await getCustomer();
|
||||||
} else {
|
} else {
|
||||||
|
await getExternalUserId(corpId.value);
|
||||||
const res = await getArchives();
|
const res = await getArchives();
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
}
|
}
|
||||||
getExternalUserId(corpId.value);
|
|
||||||
getTeam(corpId.value, teamId.value)
|
getTeam(corpId.value, teamId.value)
|
||||||
}
|
}
|
||||||
await getBaseForm();
|
await getBaseForm();
|
||||||
@ -224,7 +224,7 @@ async function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getArchives() {
|
async function getArchives() {
|
||||||
const res = await api('getUnbindMiniAppCustomers', { corpId: corpId.value, mobile: account.value?.mobile || '' });
|
const res = await api('getUnbindMiniAppCustomers', { corpId: corpId.value, mobile: account.value?.mobile || '', externalUserId: externalUserId.value });
|
||||||
customers.value = res && Array.isArray(res.data) ? res.data : [];
|
customers.value = res && Array.isArray(res.data) ? res.data : [];
|
||||||
corpName.value = res && res.corpName ? res.corpName : '';
|
corpName.value = res && res.corpName ? res.corpName : '';
|
||||||
enableHis.value = res && res.enableHis ? res.enableHis : false;
|
enableHis.value = res && res.enableHis ? res.enableHis : false;
|
||||||
|
|||||||
@ -159,11 +159,12 @@ export default defineStore("accountStore", () => {
|
|||||||
const normalizedCorpId = normalizeCorpId(corpId);
|
const normalizedCorpId = normalizeCorpId(corpId);
|
||||||
const unionid = account.value?.unionid;
|
const unionid = account.value?.unionid;
|
||||||
const openid = account.value?.openid;
|
const openid = account.value?.openid;
|
||||||
|
const miniAppId = account.value?.openid;
|
||||||
if (!(normalizedCorpId && unionid && openid)) {
|
if (!(normalizedCorpId && unionid && openid)) {
|
||||||
externalUserId.value = '';
|
externalUserId.value = '';
|
||||||
return
|
return
|
||||||
};
|
};
|
||||||
const res = await api('getUnionidToExternalUserid', { unionid, openid, corpId: normalizedCorpId }, false);
|
const res = await api('getUnionidToExternalUserid', { unionid, openid, corpId: normalizedCorpId, miniAppId }, false);
|
||||||
const id = res && res.success && typeof res.data === 'string' && res.data.trim() ? res.data.trim() : '';
|
const id = res && res.success && typeof res.data === 'string' && res.data.trim() ? res.data.trim() : '';
|
||||||
externalUserId.value = id;
|
externalUserId.value = id;
|
||||||
return id;
|
return id;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user