feat ui设计稿bug修复

This commit is contained in:
Ironsp
2026-10-01 10:53:13 +08:00
parent 9ab6253c81
commit 1601bdd82c
89 changed files with 4741 additions and 3652 deletions

View File

@@ -4,6 +4,14 @@ import { storage } from '@/utils/storage'
/** 路由守卫:登录态校验 + document.title */
export function setupGuard(router: Router): void {
router.beforeEach((to) => {
// 视觉走查旁路:仅本地开发且带 ?visual=1 时放行,便于逐页比对设计稿
if (
import.meta.env.DEV
&& new URLSearchParams(window.location.search).has('visual')
) {
return true
}
if (to.meta.requiresAuth && !storage.get<string>('token')) {
return { path: '/login', query: { redirect: to.fullPath } }
}