diff --git a/pages/home/case-home.vue b/pages/home/case-home.vue index a2dfac4..a715296 100644 --- a/pages/home/case-home.vue +++ b/pages/home/case-home.vue @@ -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; }