Просмотр исходного кода

Merge branch 'dev' of http://git.ycjcjy.com/jgz/admin into dev

Yansen 2 лет назад
Родитель
Сommit
566ae5e377

+ 4
- 13
src/components/Wangeditor/index.jsx Просмотреть файл

7
 
7
 
8
 function MyEditor(props) {
8
 function MyEditor(props) {
9
   const {
9
   const {
10
-    value,
10
+    value = "",
11
     onChange = (e) => {
11
     onChange = (e) => {
12
       setHtml(e);
12
       setHtml(e);
13
     },
13
     },
14
     toolbarConfig = {
14
     toolbarConfig = {
15
-      excludeKeys: [
16
-
17
-        "group-image",
18
-        "group-video",
19
-      ],
15
+      excludeKeys: ["group-image", "group-video"],
20
     },
16
     },
21
     editorConfig = {
17
     editorConfig = {
22
       placeholder: "请输入内容...",
18
       placeholder: "请输入内容...",
25
   } = props;
21
   } = props;
26
   const [editor, setEditor] = useState(null); // 存储 editor 实例
22
   const [editor, setEditor] = useState(null); // 存储 editor 实例
27
   const [html, setHtml] = useState("");
23
   const [html, setHtml] = useState("");
28
-  console.log(props, "MyEditor");
24
+ 
29
   // 模拟 ajax 请求,异步设置 html
25
   // 模拟 ajax 请求,异步设置 html
30
   useEffect(() => {
26
   useEffect(() => {
31
-    if(editor){
32
-      console.log(editor,editor.getConfig(),editor.getAllMenuKeys(),editor.getMenuConfig('image')) ;
33
-    }
34
-   
35
-
36
-    setHtml(value);
27
+    setHtml(value || "");
37
   }, [value]);
28
   }, [value]);
38
 
29
 
39
   // 及时销毁 editor
30
   // 及时销毁 editor

+ 51
- 0
src/pages/rotationChart/detail/index.jsx Просмотреть файл

1
+import { savePosts, getPostsDetail, updatePosts } from "@/services/posts";
2
+import {
3
+  addBanner,
4
+  getBannerdById,
5
+  updataBanner,
6
+} from "@/services/rotationChart";
7
+import { useNavigate, useSearchParams } from "react-router-dom";
8
+import { Card, Typography, message, Row, Button, Space } from "antd";
9
+import { useEffect, useRef, useState } from "react";
10
+
11
+const { Title } = Typography;
12
+export default (props) => {
13
+  const [searchParams] = useSearchParams();
14
+  const id = searchParams.get("id");
15
+  const [data, setData] = useState({});
16
+  // const [url, setUrl] = useState("");
17
+  const navigate = useNavigate();
18
+
19
+  const formRef = useRef();
20
+
21
+  useEffect(() => {
22
+    if (id) {
23
+      getBannerdById(id).then((res) => {
24
+        setData(res);
25
+        // setUrl(res.filesList[0]?.fileAddr);
26
+      });
27
+    }
28
+  }, [id]);
29
+
30
+  return (
31
+    <Card title={<Button onClick={() => navigate(-1)}> 返回</Button>}>
32
+      <div dangerouslySetInnerHTML={{ __html: data?.desc }}></div>
33
+      {data?.type === "1" && data?.image && (
34
+        <img src={data?.image} alt=""></img>
35
+      )}
36
+      {data?.type === "2" && data?.video && (
37
+        <video src={data?.video} autoPlay={false} controls="controls"></video>
38
+      )}
39
+      {/* {url && (
40
+        <div style={{marginTop:"2em"}}>
41
+          <a
42
+            href={`${url}`}
43
+            download
44
+          >
45
+            {url?.substring(url?.lastIndexOf("/") + 1)}
46
+          </a>
47
+        </div>
48
+      )} */}
49
+    </Card>
50
+  );
51
+};

+ 48
- 27
src/pages/rotationChart/edit/index.jsx Просмотреть файл

1
-import UploadImage from '@/components/UploadImage';
2
-import UploadVideo from '@/components/UploadVideo';
3
-import UploadFile from '@/components/UploadFile';
4
-import { addBanner, getBannerdById, updataBanner } from '@/services/rotationChart';
1
+
2
+import UploadFile from "@/components/UploadFile";
3
+import {
4
+  addBanner,
5
+  getBannerdById,
6
+  updataBanner,
7
+} from "@/services/rotationChart";
5
 import {
8
 import {
6
   PageContainer,
9
   PageContainer,
7
   ProForm,
10
   ProForm,
9
   ProFormRadio,
12
   ProFormRadio,
10
   ProFormSelect,
13
   ProFormSelect,
11
   ProFormTextArea,
14
   ProFormTextArea,
12
-} from '@ant-design/pro-components';
13
-import { useNavigate, useSearchParams } from 'react-router-dom';
14
-import { Card, Col, message, Row, Space, Image } from 'antd';
15
-import { useEffect, useRef, useState } from 'react';
15
+} from "@ant-design/pro-components";
16
+import { useNavigate, useSearchParams } from "react-router-dom";
17
+import { Card, Col, message, Row, Space, Image } from "antd";
18
+import { useEffect, useRef, useState } from "react";
19
+import Wangeditor from "@/components/Wangeditor";
16
 
20
 
17
 export default (props) => {
21
 export default (props) => {
18
   const [searchParams, setSearchParams] = useSearchParams();
22
   const [searchParams, setSearchParams] = useSearchParams();
19
-  const id = searchParams.get('id');
23
+  const id = searchParams.get("id");
20
   const [data, setData] = useState({});
24
   const [data, setData] = useState({});
21
-  const [imgLabel, setImgLabel] = useState('图片');
25
+  const [imgLabel, setImgLabel] = useState("图片");
22
   const formRef = useRef();
26
   const formRef = useRef();
23
   const navigate = useNavigate();
27
   const navigate = useNavigate();
24
 
28
 
36
     if (id) {
40
     if (id) {
37
       // 修改
41
       // 修改
38
       updataBanner(id, { ...values }).then((res) => {
42
       updataBanner(id, { ...values }).then((res) => {
39
-        message.success('修改成功');
43
+        message.success("修改成功");
40
         navigate(-1);
44
         navigate(-1);
41
       });
45
       });
42
     } else {
46
     } else {
43
       // 新增
47
       // 新增
44
       addBanner({ ...values }).then((res) => {
48
       addBanner({ ...values }).then((res) => {
45
-        message.success('添加成功');
49
+        message.success("添加成功");
46
         navigate(-1);
50
         navigate(-1);
47
       });
51
       });
48
     }
52
     }
55
       <Card>
59
       <Card>
56
         <ProForm
60
         <ProForm
57
           formRef={formRef}
61
           formRef={formRef}
58
-          layout={'horizontal'}
62
+          layout={"horizontal"}
59
           labelCol={{ span: 8 }}
63
           labelCol={{ span: 8 }}
60
           wrapperCol={{ span: 16 }}
64
           wrapperCol={{ span: 16 }}
61
           onFinish={onFinish}
65
           onFinish={onFinish}
62
-          initialValues={{ type: '1', state: '1' }}
66
+          initialValues={{ type: "1", state: "1" }}
63
           submitter={{
67
           submitter={{
64
             searchConfig: {
68
             searchConfig: {
65
-              resetText: '返回',
69
+              resetText: "返回",
66
             },
70
             },
67
             onReset: () => navigate(-1),
71
             onReset: () => navigate(-1),
68
             render: (props, doms) => {
72
             render: (props, doms) => {
81
             width="md"
85
             width="md"
82
             label="轮播图类型"
86
             label="轮播图类型"
83
             valueEnum={{
87
             valueEnum={{
84
-              1: '图片',
85
-              2: '视频',
88
+              1: "图片",
89
+              2: "视频",
86
             }}
90
             }}
87
             placeholder="轮播图类型"
91
             placeholder="轮播图类型"
88
-            rules={[{ required: true, message: 'Please select your country!' }]}
89
-            onChange={({ value }) =>  setImgLabel(value === '1' ? '图片' : '封面')}
92
+            rules={[{ required: true, message: "Please select your country!" }]}
93
+            onChange={({ value }) =>
94
+              setImgLabel(value === "1" ? "图片" : "封面")
95
+            }
90
           />
96
           />
91
           <ProForm.Item
97
           <ProForm.Item
92
             width="md"
98
             width="md"
97
           >
103
           >
98
             <UploadFile
104
             <UploadFile
99
               accept="image/*"
105
               accept="image/*"
100
-              preview={src => <div style={{ marginTop: '2em' }}><Image width={200} src={src} /></div>}
106
+              preview={(src) => (
107
+                <div style={{ marginTop: "2em" }}>
108
+                  <Image width={200} src={src} />
109
+                </div>
110
+              )}
101
             />
111
             />
102
           </ProForm.Item>
112
           </ProForm.Item>
103
           <ProForm.Item noStyle shouldUpdate>
113
           <ProForm.Item noStyle shouldUpdate>
104
             {(form) => {
114
             {(form) => {
105
-              return form.getFieldValue('type') == '1' ? null : (
115
+              return form.getFieldValue("type") == "1" ? null : (
106
                 <ProForm.Item
116
                 <ProForm.Item
107
                   width="md"
117
                   width="md"
108
                   name="video"
118
                   name="video"
112
                 >
122
                 >
113
                   <UploadFile
123
                   <UploadFile
114
                     accept="video/*"
124
                     accept="video/*"
115
-                    preview={src => <div style={{ marginTop: '6px' }}><video height={360} width={480} src={src} controls /></div>}
125
+                    preview={(src) => (
126
+                      <div style={{ marginTop: "6px" }}>
127
+                        <video height={360} width={480} src={src} controls />
128
+                      </div>
129
+                    )}
116
                   />
130
                   />
117
                 </ProForm.Item>
131
                 </ProForm.Item>
118
               );
132
               );
124
             radioType="button"
138
             radioType="button"
125
             options={[
139
             options={[
126
               {
140
               {
127
-                label: '上架',
128
-                value: '1',
141
+                label: "上架",
142
+                value: "1",
129
               },
143
               },
130
               {
144
               {
131
-                label: '下架',
132
-                value: '2',
145
+                label: "下架",
146
+                value: "2",
133
               },
147
               },
134
             ]}
148
             ]}
135
           />
149
           />
136
           <ProFormDigit name="qz" label="权重" width="md" />
150
           <ProFormDigit name="qz" label="权重" width="md" />
137
-          <ProFormTextArea width="md" name="desc" label="描述" placeholder="请输入描述" />
151
+          <ProForm.Item
152
+            name="desc"
153
+            label="详情"
154
+            placeholder="请输入详情"
155
+            // rules={[{ required: true, message: "请输入详情" }]}
156
+          >
157
+            <Wangeditor></Wangeditor>
158
+          </ProForm.Item>
138
         </ProForm>
159
         </ProForm>
139
       </Card>
160
       </Card>
140
     </PageContainer>
161
     </PageContainer>

+ 12
- 1
src/pages/rotationChart/list/index.jsx Просмотреть файл

92
         >
92
         >
93
           {record.state === '1' ? '下架' : '上架'}
93
           {record.state === '1' ? '下架' : '上架'}
94
         </Button>,
94
         </Button>,
95
+         <Button
96
+         key={4}
97
+         style={{ padding: 0 }}
98
+         type="link"
99
+         onClick={() => {
100
+      
101
+           navigate(`/cms/rotationChart/detail?id=${record.id}`);
102
+         }}
103
+       >
104
+         详情
105
+       </Button>,
95
         <Button
106
         <Button
96
           key={2}
107
           key={2}
97
           style={{ padding: 0 }}
108
           style={{ padding: 0 }}
98
           type="link"
109
           type="link"
99
           onClick={() => {
110
           onClick={() => {
100
-            console.log(record, ']]');
111
+            
101
             navigate(`/cms/rotationChart/add?id=${record.id}`);
112
             navigate(`/cms/rotationChart/add?id=${record.id}`);
102
           }}
113
           }}
103
         >
114
         >

+ 34
- 25
src/pages/sample/home/index.jsx Просмотреть файл

3
 import { getBannerList } from "@/services/rotationChart";
3
 import { getBannerList } from "@/services/rotationChart";
4
 
4
 
5
 import VideoPlay from "./components/VideoPlay";
5
 import VideoPlay from "./components/VideoPlay";
6
-
6
+import { useNavigate } from "react-router-dom";
7
 const height = "100%";
7
 const height = "100%";
8
 const contentStyle = {
8
 const contentStyle = {
9
   height,
9
   height,
12
 };
12
 };
13
 
13
 
14
 export default (props) => {
14
 export default (props) => {
15
-  const [height, setHeight] = useState('100%');
15
+  const navigate = useNavigate();
16
+  const [height, setHeight] = useState("100%");
16
   const [current, setCurrent] = useState(0);
17
   const [current, setCurrent] = useState(0);
17
   const [mouse, setMouse] = useState(false);
18
   const [mouse, setMouse] = useState(false);
18
   const [mediaList, setMediaList] = useState([]);
19
   const [mediaList, setMediaList] = useState([]);
23
   const isVideoRef = useRef(false);
24
   const isVideoRef = useRef(false);
24
   const isVideoPlayRef = useRef(false);
25
   const isVideoPlayRef = useRef(false);
25
 
26
 
26
-  const itemStyle = useMemo(() => ({
27
-    height,
28
-    overflow: 'hidden',
29
-    width: '100%',
30
-    objectFit: 'contain',
31
-  }), [height]);
27
+  const itemStyle = useMemo(
28
+    () => ({
29
+      height,
30
+      overflow: "hidden",
31
+      width: "100%",
32
+      objectFit: "contain",
33
+    }),
34
+    [height]
35
+  );
32
 
36
 
33
   useEffect(() => {
37
   useEffect(() => {
34
     getBannerList().then((res) => {
38
     getBannerList().then((res) => {
53
     handNext();
57
     handNext();
54
 
58
 
55
     const boxHeight = boxRef.current.offsetHeight;
59
     const boxHeight = boxRef.current.offsetHeight;
56
-    setHeight(boxHeight ? `${boxHeight}px` : '100%');
60
+    setHeight(boxHeight ? `${boxHeight}px` : "100%");
57
   }, []);
61
   }, []);
58
 
62
 
59
   const handNext = () => {
63
   const handNext = () => {
66
   };
70
   };
67
 
71
 
68
   const onMouseEnter = () => {
72
   const onMouseEnter = () => {
69
-   
70
     mouseRef.current = true;
73
     mouseRef.current = true;
71
   };
74
   };
72
   const onMouseLeave = () => {
75
   const onMouseLeave = () => {
73
     mouseRef.current = false;
76
     mouseRef.current = false;
74
   };
77
   };
75
 
78
 
79
+  const onClick = (row) => {
80
+    if (row.id) {
81
+      navigate(`/cms/rotationChart/detail?id=${row.id}`);
82
+    }
83
+  };
84
+
76
   return (
85
   return (
77
     <div
86
     <div
78
       onMouseEnter={onMouseEnter}
87
       onMouseEnter={onMouseEnter}
79
       onMouseLeave={onMouseLeave}
88
       onMouseLeave={onMouseLeave}
80
-      style={{ height, overflow: "hidden", background: '#081A48' }}
89
+      style={{ height, overflow: "hidden", background: "#081A48" }}
81
       ref={boxRef}
90
       ref={boxRef}
82
     >
91
     >
83
       <Carousel
92
       <Carousel
86
           setCurrent(cur);
95
           setCurrent(cur);
87
         }}
96
         }}
88
       >
97
       >
89
-          {mediaList?.map((x, index) => (
90
-            <div key={index}>
91
-              { x.type === "image" && <img src={x.url} style={itemStyle}></img> }
92
-              { x.type === "video" && (
93
-                <VideoPlay
94
-                  url={x.url}
95
-                  isVideoPlayRef={isVideoPlayRef}
96
-                  index={index}
97
-                  current={current}
98
-                  style={itemStyle}
99
-                />
100
-              )}
101
-            </div>
102
-          ))}
98
+        {mediaList?.map((x, index) => (
99
+          <div key={index} onClick={()=>onClick(x)}>
100
+            {x.type === "image" && <img src={x.url} style={itemStyle}></img>}
101
+            {x.type === "video" && (
102
+              <VideoPlay
103
+                url={x.url}
104
+                isVideoPlayRef={isVideoPlayRef}
105
+                index={index}
106
+                current={current}
107
+                style={itemStyle}
108
+              />
109
+            )}
110
+          </div>
111
+        ))}
103
       </Carousel>
112
       </Carousel>
104
     </div>
113
     </div>
105
   );
114
   );

+ 51
- 42
src/routes/routes.jsx Просмотреть файл

6
   MenuFoldOutlined,
6
   MenuFoldOutlined,
7
   MenuUnfoldOutlined,
7
   MenuUnfoldOutlined,
8
   PieChartOutlined,
8
   PieChartOutlined,
9
-} from '@ant-design/icons';
10
-import { Navigate } from 'react-router-dom';
11
-import AuthLayout from '@/layouts/AuthLayout';
12
-import Container from '@/layouts/Container';
13
-import Login from '@/pages/login';
14
-import Page404 from '@/pages/404';
15
-import Home from '@/pages/sample/home';
16
-import BasicForm from '@/pages/sample/form';
17
-import BasicTable from '@/pages/sample/table';
18
-import GuaranteeTaskList from '@/pages/guaranteeTask';
19
-import GuaranteeTaskEdit from '@/pages/guaranteeTask/Edit';
20
-import GuaranteeTaskPrint from '@/pages/guaranteeTask/print';
9
+} from "@ant-design/icons";
10
+import { Navigate } from "react-router-dom";
11
+import AuthLayout from "@/layouts/AuthLayout";
12
+import Container from "@/layouts/Container";
13
+import Login from "@/pages/login";
14
+import Page404 from "@/pages/404";
15
+import Home from "@/pages/sample/home";
16
+import BasicForm from "@/pages/sample/form";
17
+import BasicTable from "@/pages/sample/table";
18
+import GuaranteeTaskList from "@/pages/guaranteeTask";
19
+import GuaranteeTaskEdit from "@/pages/guaranteeTask/Edit";
20
+import GuaranteeTaskPrint from "@/pages/guaranteeTask/print";
21
 import GuaranteeTaskEvaluate from "@/pages/evaluate";
21
 import GuaranteeTaskEvaluate from "@/pages/evaluate";
22
 import GuaranteeTaskEvaluateList from "@/pages/evaluate/evaluateList";
22
 import GuaranteeTaskEvaluateList from "@/pages/evaluate/evaluateList";
23
-import DishList from '@/pages/dish/list';
24
-import DishEdit from '@/pages/dish/edit';
25
-import PackageList from '@/pages/package';
26
-import StockList from '@/pages/stock/list';
27
-import StockEdit from '@/pages/stock/edit';
28
-import StockInOut from '@/pages/stock/outAndIn';
29
-import StockLog from '@/pages/stock/stockLog';
30
-import StockClassificationList from '@/pages/stockClassification/list';
31
-import StockClassificationEdit from '@/pages/stockClassification/edit';
32
-import RotationChartList from '@/pages/rotationChart/list';
33
-import RotationChartEdit from '@/pages/rotationChart/edit';
34
-import RotationChartIntroduction from '@/pages/rotationChart/introduction';
35
-import RotationChartIntroductionEdit from '@/pages/rotationChart/introduction/edit';
36
-import Roles from '@/pages/roles/index';
37
-import RegulationList from '@/regulation';
38
-import RegulationEdit from '@/regulation/edit';
39
-import UserList from '@/pages/user';
40
-import UserEdit from '@/pages/user/Edit';
23
+import DishList from "@/pages/dish/list";
24
+import DishEdit from "@/pages/dish/edit";
25
+import PackageList from "@/pages/package";
26
+import StockList from "@/pages/stock/list";
27
+import StockEdit from "@/pages/stock/edit";
28
+import StockInOut from "@/pages/stock/outAndIn";
29
+import StockLog from "@/pages/stock/stockLog";
30
+import StockClassificationList from "@/pages/stockClassification/list";
31
+import StockClassificationEdit from "@/pages/stockClassification/edit";
32
+import RotationChartList from "@/pages/rotationChart/list";
33
+import RotationChartEdit from "@/pages/rotationChart/edit";
34
+import RotationChartIntroduction from "@/pages/rotationChart/introduction";
35
+import RotationChartIntroductionEdit from "@/pages/rotationChart/introduction/edit";
36
+import RotationChartDetail from "@/pages/rotationChart/detail";
37
+import Roles from "@/pages/roles/index";
38
+import RegulationList from "@/regulation";
39
+import RegulationEdit from "@/regulation/edit";
40
+import UserList from "@/pages/user";
41
+import UserEdit from "@/pages/user/Edit";
41
 import PurchasePlanList from "@/pages/purchase/plan/list";
42
 import PurchasePlanList from "@/pages/purchase/plan/list";
42
 import PurchasePlanEdit from "@/pages/purchase/plan/edit";
43
 import PurchasePlanEdit from "@/pages/purchase/plan/edit";
43
 import PurchaseBillEdit from "@/pages/purchase/bill/edit";
44
 import PurchaseBillEdit from "@/pages/purchase/bill/edit";
46
 import EmergencyPlanEdit from "@/pages/cms/emergencyPlan/edit";
47
 import EmergencyPlanEdit from "@/pages/cms/emergencyPlan/edit";
47
 import EmergencyPlanDetail from "@/pages/cms/emergencyPlan/detail";
48
 import EmergencyPlanDetail from "@/pages/cms/emergencyPlan/detail";
48
 import FilesList from "@/pages/cms/files/list";
49
 import FilesList from "@/pages/cms/files/list";
49
-import MessageList from '@/pages/message';
50
-import MessageDetail from '@/pages/message/detail';
51
-import StatisCharts from '@/pages/statis/charts';
50
+import MessageList from "@/pages/message";
51
+import MessageDetail from "@/pages/message/detail";
52
+import StatisCharts from "@/pages/statis/charts";
52
 
53
 
53
 /**
54
 /**
54
  * meta 用来扩展自定义数据数据
55
  * meta 用来扩展自定义数据数据
57
  *    hideInMenu: 布尔值, 如果为 false, 菜单不会显示
58
  *    hideInMenu: 布尔值, 如果为 false, 菜单不会显示
58
  *    noLayout: 布尔值, 如果为 true, 将不会使用默认布局
59
  *    noLayout: 布尔值, 如果为 true, 将不会使用默认布局
59
  *    noSiderBar: 布尔值, 如果为 true, 将没有左侧菜单栏
60
  *    noSiderBar: 布尔值, 如果为 true, 将没有左侧菜单栏
60
- *    noFooter: 布尔值, 如果为 true, 将没有底部 footer 
61
+ *    noFooter: 布尔值, 如果为 true, 将没有底部 footer
61
  *    target: 字符串, 如果为 _blank, 将在新窗口打开
62
  *    target: 字符串, 如果为 _blank, 将在新窗口打开
62
  * }
63
  * }
63
  */
64
  */
197
           hideInMenu: true,
198
           hideInMenu: true,
198
         },
199
         },
199
       },
200
       },
201
+      {
202
+        path: "rotationChart/detail",
203
+        element: <RotationChartDetail />,
204
+        meta: {
205
+          title: "公告详情",
206
+          hideInMenu: true,
207
+        },
208
+      },
200
       {
209
       {
201
         path: "rotationChart/introduction",
210
         path: "rotationChart/introduction",
202
         element: <RotationChartIntroduction />,
211
         element: <RotationChartIntroduction />,
213
         },
222
         },
214
       },
223
       },
215
       {
224
       {
216
-        path: 'regulation',
225
+        path: "regulation",
217
         element: <RegulationList />,
226
         element: <RegulationList />,
218
         meta: {
227
         meta: {
219
           title: "规章制度",
228
           title: "规章制度",
220
         },
229
         },
221
       },
230
       },
222
       {
231
       {
223
-        path: 'regulation/add',
232
+        path: "regulation/add",
224
         element: <RegulationEdit />,
233
         element: <RegulationEdit />,
225
         meta: {
234
         meta: {
226
           hideInMenu: true,
235
           hideInMenu: true,
227
-          title: '规章制度维护',
236
+          title: "规章制度维护",
228
         },
237
         },
229
       },
238
       },
230
       {
239
       {
261
     ],
270
     ],
262
   },
271
   },
263
   {
272
   {
264
-    path: 'static',
273
+    path: "static",
265
     element: <StatisCharts />,
274
     element: <StatisCharts />,
266
     meta: {
275
     meta: {
267
-      title: '数据分析',
276
+      title: "数据分析",
268
       noSiderBar: true,
277
       noSiderBar: true,
269
       noFooter: true,
278
       noFooter: true,
270
     },
279
     },
417
         meta: {
426
         meta: {
418
           title: "操作手册",
427
           title: "操作手册",
419
         },
428
         },
420
-      }
429
+      },
421
     ],
430
     ],
422
   },
431
   },
423
 ];
432
 ];
457
   },
466
   },
458
 ];
467
 ];
459
 
468
 
460
-export function mergeAuthRoutes (r1, r2) {
469
+export function mergeAuthRoutes(r1, r2) {
461
   const r = r1.slice();
470
   const r = r1.slice();
462
   const children = r1[0].children.slice();
471
   const children = r1[0].children.slice();
463
   r[0].children = children.concat(r2);
472
   r[0].children = children.concat(r2);
466
 
475
 
467
 // 全部路由
476
 // 全部路由
468
 export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
477
 export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
469
-function getPath (parent = "/", current = "") {
478
+function getPath(parent = "/", current = "") {
470
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
479
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
471
     return current;
480
     return current;
472
   return `${parent}/${current}`.replace(/\/\//g, "/");
481
   return `${parent}/${current}`.replace(/\/\//g, "/");