用户端(四面9分批次): 三条全局错误出口、URL 白名单收口、令牌键单点、uid 短路进门禁

- 此前全树 0 处全局错误处理器:装 app.config.errorHandler + window error + unhandledrejection,
  每条都留可诊断记录、界面只出中文、处理器自身异常不重抛也不白屏(9 例判据)。
- safeHttpUrl 未覆盖的 3 处(两个品牌 Tab 与 useVersionUpdate 直装服务端 file_url)收口;
  令牌键 aiimage_auth_token 由 4 处各自定义 + 2 处内联收成唯一定义点。
- 「localStorage 有 uid 就免校验」改走 auth-gate 单点,剩余例外台账化且同口径必须能抓到
  评审点名的原写法(6 例);卸载配对 3 处补齐 + 全树判据(7 例)。
- task-status-text 把 CANCELLED 显示成"执行中"改对,CANCELED/CANCELLED 两拼写都映射(4 例)。
- 主审计补的四处修复:新判据里两处拿数组和 0 比(怎么写都红);静默 catch 的"用户可见出口"
  符号表认不出本仓 userNotice 与注入式 notify,把真报了用户的 catch 判成静默;
  新错误出口带来的 2 个 try/catch 按棘轮合同写理由进基线(296→298,silent 一格没涨)。
- 验收:node --test 820 例 0 红、npx vue-tsc --noEmit rc=0。
This commit is contained in:
2026-10-09 23:09:37 +08:00
parent 8776a9bf1e
commit 3987b8d7fe
27 changed files with 1701 additions and 49 deletions
@@ -117,6 +117,7 @@ import { loginWithDevice } from '@/shared/api/user'
import { ACCOUNT_DELETED_NOTICE_KEY, ACCOUNT_DISABLED_NOTICE_KEY, KICK_NOTICE_KEY, SESSION_EXPIRED_NOTICE_KEY } from '@/shared/auth/kick-handler'
import { COMPANY_NAME_STORAGE_KEY, writeCompanyIdentity } from '@/shared/auth/company-identity'
import { clearAccountExpiry, writeAccountExpiry } from '@/shared/auth/account-expiry'
import { AUTH_TOKEN_KEY } from '@/shared/auth/session-keys'
import { useVersionUpdate } from '@/shared/composables/useVersionUpdate'
import { clearApiSecretCache } from '@/shared/utils/api-secret-store'
import UpdateProgressBar from '@/shared/components/UpdateProgressBar.vue'
@@ -125,7 +126,6 @@ import VersionPicker from '@/shared/components/VersionPicker.vue'
const router = useRouter()
const AUTH_TOKEN_KEY = 'aiimage_auth_token'
const DEVICE_ID_KEY = 'aiimage_device_id'
const REMEMBER_USER_KEY = 'aiimage_remember_user'