fix:优化提示
This commit is contained in:
parent
e37c2b1089
commit
18eac05df9
@ -223,6 +223,18 @@ function getTeamId() {
|
|||||||
return String(currentTeam.value?.teamId || '') || '';
|
return String(currentTeam.value?.teamId || '') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hasCompleteUserInfo() {
|
||||||
|
const userId = getUserId();
|
||||||
|
const corpId = String(account.value?.corpId || doctorInfo.value?.corpId || '') || '';
|
||||||
|
return Boolean(corpId && userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ensureUserInfoForFeature() {
|
||||||
|
if (hasCompleteUserInfo()) return true;
|
||||||
|
toast('请先完善个人信息再使用该功能');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
async function loadTeamMembers() {
|
async function loadTeamMembers() {
|
||||||
const corpId = getCorpId();
|
const corpId = getCorpId();
|
||||||
const teamId = getTeamId();
|
const teamId = getTeamId();
|
||||||
@ -628,6 +640,7 @@ const goToSearch = () => {
|
|||||||
|
|
||||||
const goToGroupManage = () => {
|
const goToGroupManage = () => {
|
||||||
if (checkBatchMode()) return;
|
if (checkBatchMode()) return;
|
||||||
|
if (!ensureUserInfoForFeature()) return;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/case/group-manage'
|
url: '/pages/case/group-manage'
|
||||||
});
|
});
|
||||||
@ -942,6 +955,8 @@ function onTabClick(tab) {
|
|||||||
if (checkBatchMode()) return;
|
if (checkBatchMode()) return;
|
||||||
if (!tab || !tab.key) return;
|
if (!tab || !tab.key) return;
|
||||||
if (currentTabKey.value === tab.key) return;
|
if (currentTabKey.value === tab.key) return;
|
||||||
|
|
||||||
|
if (tab.kind === 'group' && !ensureUserInfoForFeature()) return;
|
||||||
currentTabKey.value = tab.key;
|
currentTabKey.value = tab.key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user