feat: 病例列表联调

This commit is contained in:
王天骄
2026-06-13 06:05:37 +08:00
parent 37716f200b
commit bc2e03920e
13 changed files with 1518 additions and 258 deletions
+18 -2
View File
@@ -293,8 +293,16 @@ function handleLogin() {
uni.setStorageSync('clinical-thinking-access-token', result.tokens.access)
uni.setStorageSync('clinical-thinking-refresh-token', result.tokens.refresh)
showToast(result.message || '正在进入系统...')
uni.redirectTo({
url: '/pages/config/config'
if (isFirstProfileSetup(backendUser.department)) {
uni.redirectTo({
url: '/pages/config/config'
})
return
}
uni.reLaunch({
url: '/pages/home/home'
})
}).catch(error => {
showToast(error instanceof Error ? error.message : '登录失败,请稍后重试')
@@ -322,6 +330,14 @@ function validatePhone() {
return true
}
function isFirstProfileSetup(department: unknown) {
if (department === null || department === undefined) return true
if (typeof department === 'string') return department.trim() === ''
if (Array.isArray(department)) return department.length === 0
if (typeof department === 'object') return Object.keys(department).length === 0
return false
}
function openAgreement(type: 'service' | 'privacy') {
uni.showModal({
title: type === 'service' ? '用户服务协议' : '隐私保护政策',