fangmingyue 1 year ago
parent
commit
fbee26f95d
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/routes/routes.jsx

+ 3
- 3
src/routes/routes.jsx View File

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