refactor(router): 移除空转的 uni-mini-router
- 删除路由模块与全局守卫,无页面声明 requireAuth,守卫从未生效 - 菜单与登录跳转统一为 uni API,字典标题按约定编码解码 - 依赖、自动导入与类型声明一并清理
This commit is contained in:
1 parent
2700b60a31
commit
54e9ab2761
6 files changed
+6
-122
No files matched your search
@@ -6,7 +6,6 @@ import "@/styles/index.scss";
|
||||
|
||||
import { setupPinia, useUserStore } from "@/store";
|
||||
import { setUnauthorizedHandler } from "@/utils/request";
|
||||
import router from "./router";
|
||||
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App);
|
||||
@@ -14,7 +13,6 @@ export function createApp() {
|
||||
setupPinia(app);
|
||||
// 注册会话失效回调:401 时由 store 统一清理内存与持久化登录态
|
||||
setUnauthorizedHandler(() => useUserStore().resetSession());
|
||||
app.use(router);
|
||||
|
||||
return {
|
||||
app,
|
||||
|
||||
Reference in new issue
Block a user