fix:优化提示

This commit is contained in:
Jafeng 2026-02-08 11:21:52 +08:00
parent e37c2b1089
commit 18eac05df9

View File

@ -223,6 +223,18 @@ function getTeamId() {
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() {
const corpId = getCorpId();
const teamId = getTeamId();
@ -628,6 +640,7 @@ const goToSearch = () => {
const goToGroupManage = () => {
if (checkBatchMode()) return;
if (!ensureUserInfoForFeature()) return;
uni.navigateTo({
url: '/pages/case/group-manage'
});
@ -942,6 +955,8 @@ function onTabClick(tab) {
if (checkBatchMode()) return;
if (!tab || !tab.key) return;
if (currentTabKey.value === tab.key) return;
if (tab.kind === 'group' && !ensureUserInfoForFeature()) return;
currentTabKey.value = tab.key;
}