From 043265de0da38fcc727bcc60d7c88da4c3c3513f Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期二, 28 六月 2022 18:50:14 +0800
Subject: [PATCH] '菜单'

---
 src/router/index.ts |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/router/index.ts b/src/router/index.ts
index 1554262..112fa0f 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -10,6 +10,7 @@
 import { staticRoutes } from '/@/router/route';
 import { initFrontEndControlRoutes } from '/@/router/frontEnd';
 import { initBackEndControlRoutes } from '/@/router/backEnd';
+import {useUserInfo} from "/@/stores/userInfo";
 
 
 
@@ -87,13 +88,11 @@
 			const storesRoutesList = useRoutesList(pinia);
 			const { routesList } = storeToRefs(storesRoutesList);
 			if (routesList.value.length === 0) {
-				if (isRequestRoutes) {
 					// 后端控制路由:路由数据初始化,防止刷新时丢失
-					await initBackEndControlRoutes();
+				await initBackEndControlRoutes();
 					// 动态添加路由:防止非首页刷新时跳转回首页的问题
 					// 确保 addRoute() 时动态添加的路由已经被完全加载上去
-					next({ ...to, replace: true });
-				}
+				next({ ...to, replace: true });
 			} else {
 				next();
 			}

--
Gitblit v1.9.2