zhoulisen 5 years ago
parent
commit
932ac88a6e
4 changed files with 49 additions and 2 deletions
  1. 1
    1
      config/config.js
  2. 16
    1
      config/routes.js
  3. 13
    0
      src/pages/Welcome.jsx
  4. 19
    0
      src/pages/resource/index.jsx

+ 1
- 1
config/config.js View File

133
 
133
 
134
   proxy: {
134
   proxy: {
135
     '/api': {
135
     '/api': {
136
-      target: 'http://localhost:8080/',
136
+      target: 'https://dev.pawoma.cn',
137
       changeOrigin: true,
137
       changeOrigin: true,
138
       // pathRewrite: { '^/server': '' },
138
       // pathRewrite: { '^/server': '' },
139
     },
139
     },

+ 16
- 1
config/routes.js View File

21
         routes: [
21
         routes: [
22
           {
22
           {
23
             path: '/',
23
             path: '/',
24
-            redirect: '/channel',
24
+            redirect: '/welcome',
25
+          },
26
+          {
27
+            path: '/welcome',
28
+            name: '首页',
29
+            component: './Welcome',
25
           },
30
           },
26
           {
31
           {
27
             path: '/channel',
32
             path: '/channel',
33
             name: '渠道列表',
38
             name: '渠道列表',
34
             component: './channel/edit',
39
             component: './channel/edit',
35
           },
40
           },
41
+          {
42
+            path: '/resource',
43
+            name: '资源管理',
44
+            component: './resource',
45
+          },
46
+          // {
47
+          //   path: '/channel/edit',
48
+          //   name: '渠道列表',
49
+          //   component: './channel/edit',
50
+          // },
36
           {
51
           {
37
             component: './404',
52
             component: './404',
38
           },
53
           },

+ 13
- 0
src/pages/Welcome.jsx View File

1
+import React from 'react';
2
+
3
+
4
+const welcome = (props) => {
5
+
6
+  return (
7
+    <>
8
+   <div>欢迎</div>
9
+    </>
10
+  )
11
+
12
+}
13
+export default welcome

+ 19
- 0
src/pages/resource/index.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
+import router from 'umi/router';
4
+
5
+function WrappedHeader(props) {
6
+
7
+
8
+
9
+  
10
+  return (
11
+
12
+    <>
13
+   <div>123</div>
14
+    </>
15
+  )
16
+}
17
+
18
+
19
+export default WrappedHeader