fix: portal端token过期后自动跳转登录页,避免显示空数据

- portalAxios 401 响应拦截器:清除 token 并跳转 /portal/login
- PortalLayoutWrapper:检查 token 是否存在,不存在则跳转登录页
- 排除 /portal/login 和 /portal/auto-login 页面避免重复跳转

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
selfrelease
2026-08-17 15:06:46 +08:00
parent c66ea290eb
commit 5196d7c80a
23 changed files with 812 additions and 74 deletions
@@ -16,7 +16,7 @@ import {
ChevronDown, ChevronRight,
Building2, CalendarDays, ClipboardList, Heart, CalendarClock,
Gift, PenTool, Umbrella, GraduationCap, TrendingUp, AlertTriangle,
DollarSign,
DollarSign, Clock,
} from 'lucide-react'
import { settingsApi } from '../../lib/api-services'
@@ -64,6 +64,7 @@ const navGroups: NavGroup[] = [
items: [
{ path: '/money', label: '薪税管理', icon: Calculator },
{ path: '/social', label: '社保公积金', icon: Shield },
{ path: '/overtime', label: '加班费计算', icon: Clock },
{ path: '/commission-bonus', label: '提成奖金', icon: DollarSign },
{ path: '/salary-dashboard', label: '薪酬分析', icon: BarChart3 },
],