wujingjing
2024-07-08 bb37b51088dffdfb493906de541b5251e1d969d1
src/router/backEnd.ts
@@ -40,7 +40,7 @@
   // 界面 loading 动画开始执行
   if (window.nextLoading === undefined) NextLoading.start();
   // 无 token 停止执行下一步
   if (!Local.get(accessTokenKey)) return false;
   // if (!Local.get(accessTokenKey)) return false;
   // 触发初始化用户信息 pinia
   // https://gitee.com/lyt-top/vue-next-admin/issues/I5F1HP
   // await useUserInfo().setUserInfos();
@@ -127,14 +127,8 @@
 */
export async function getBackEndControlRoutes() {
   // 模拟 admin 与 test
   const stores = useUserInfo();
   let userInfo = (await stores.getUserInfo()) as any;
   const {
      SoftWare: { ID: SoftwareID },
      User: { ID: UserID },
   } = userInfo;
   const params = { SoftwareID, UserID };
   return menuApi.getAdminMenu(params);
   return menuApi.getAdminMenu();
   // const auth = userInfos.value.roles[0];
   // 管理员 admin
   // if (auth === 'admin') return menuApi.getAdminMenu();