Przeglądaj źródła

修改 base路由

dengrui 1 miesiąc temu
rodzic
commit
10c858535d
1 zmienionych plików z 12 dodań i 1 usunięć
  1. 12 1
      src/plugins/permission.ts

+ 12 - 1
src/plugins/permission.ts

@@ -51,7 +51,18 @@ export function setupPermission() {
                 router.addRoute(route);
               });
 
-              next({ path: to.fullPath });
+              // if (to.fullPath.split("/")[1] == "base") {
+              //   console.log(to.fullPath.split("/")[1]);
+              //   (
+              //     "/base/craftManagement/defectMana"
+              //   );
+              // }
+              next({
+                path:
+                  to.fullPath.split("/")[1] == "base"
+                    ? "/base/craftManagement/defectMana"
+                    : to.fullPath,
+              });
             } catch (error) {
               console.error("beforeEach error", error);
               // 移除 token 并跳转登录页