소스 검색

城市体检-bug修改

zhiyuan-007 1 개월 전
부모
커밋
0dd33c79c6
2개의 변경된 파일7개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 2
      src/layout/components/Sidebar/index.vue
  2. 6 3
      src/views/error/401.vue

+ 1 - 2
src/layout/components/Sidebar/index.vue

@@ -33,7 +33,6 @@ const route = useRoute();
 const appStore = useAppStore();
 const settingsStore = useSettingsStore();
 const permissionStore = usePermissionStore();
-debugger
 const sidebarRouters = computed<RouteRecordRaw[]>(() => permissionStore.getSidebarRoutes());
 const sideTheme = computed(() => settingsStore.sideTheme);
 const theme = computed(() => settingsStore.theme);
@@ -48,7 +47,7 @@ const activeMenu = computed(() => {
   }
   return path;
 });
-debugger
+ //筛选掉不是这个系统的路由
 const selfSidebarRouters = computed(() => sidebarRouters.value.filter((r) => !r.homePage || r.redirect == systemIndex.value));
 
 

+ 6 - 3
src/views/error/401.vue

@@ -8,7 +8,7 @@
         <h6>对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面</h6>
         <ul class="list-unstyled">
           <li class="link-type">
-            <router-link to="/"> 回首页 </router-link>
+            <router-link :to="systemIndex"> 回首页 </router-link>
           </li>
         </ul>
       </el-col>
@@ -25,10 +25,13 @@ import errImage from '@/assets/401_images/401.gif';
 let { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
 const errGif = ref(errImage + '?' + +new Date());
-
+import useSettingsStore from "@/store/modules/settings";
+const settingsStore = useSettingsStore();
+const systemIndex = computed(() => settingsStore.systemIndex);
 function back() {
   if (proxy?.$route.query.noGoBack) {
-    proxy.$router.push({ path: '/' });
+    //proxy.$router.push({ path: '/' });
+    proxy.$router.push({ path: systemIndex });
   } else {
     proxy?.$router.go(-1);
   }