fangmingyue 1 jaar geleden
bovenliggende
commit
fbee26f95d
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3
    3
      src/routes/routes.jsx

+ 3
- 3
src/routes/routes.jsx Bestand weergeven

@@ -29,7 +29,7 @@ import UserEdit from "@/pages/user/Edit";
29 29
 export const authRoutes = [
30 30
   {
31 31
     index: true,
32
-    element: <Navigate to="/login" replace={true} />,
32
+    element: <Navigate to="/custom" replace={true} />,
33 33
   },
34 34
   {
35 35
     path: "custom",
@@ -102,7 +102,7 @@ export const defaultRoutes = [
102 102
   },
103 103
 ];
104 104
 
105
-export function mergeAuthRoutes(r1, r2) {
105
+export function mergeAuthRoutes (r1, r2) {
106 106
   const r = r1.slice();
107 107
   const children = r1[0].children.slice();
108 108
   r[0].children = children.concat(r2);
@@ -112,7 +112,7 @@ export function mergeAuthRoutes(r1, r2) {
112 112
 
113 113
 // 全部路由
114 114
 export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
115
-function getPath(parent = "/", current = "") {
115
+function getPath (parent = "/", current = "") {
116 116
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
117 117
     return current;
118 118
   return `${parent}/${current}`.replace(/\/\//g, "/");