许静 5 years ago
parent
commit
17208e1b2f
2 changed files with 29 additions and 19 deletions
  1. 17
    18
      config/config.js
  2. 12
    1
      src/layouts/BlankLayout.jsx

+ 17
- 18
config/config.js View File

@@ -30,11 +30,11 @@ const plugins = [
30 30
       // },
31 31
       pwa: pwa
32 32
         ? {
33
-          workboxPluginMode: 'InjectManifest',
34
-          workboxOptions: {
35
-            importWorkboxFrom: 'local',
36
-          },
37
-        }
33
+            workboxPluginMode: 'InjectManifest',
34
+            workboxOptions: {
35
+              importWorkboxFrom: 'local',
36
+            },
37
+          }
38 38
         : false, // default close dll, because issue https://github.com/ant-design/ant-design-pro/issues/4665
39 39
       // dll features https://webpack.js.org/plugins/dll-plugin/
40 40
       // dll: {
@@ -112,18 +112,18 @@ export default {
112 112
               name: '首页',
113 113
               component: './Welcome',
114 114
             },
115
-            // {
116
-            //   path: '/welcome2',
117
-            //   name: '首页2',
118
-            //   component: '../layouts/BlankLayout',
119
-            //   routes:[
120
-            //     {
121
-            //       path: '/welcome3',
122
-            //       name: '首页3',
123
-            //       component: './Welcome',
124
-            //     },
125
-            //   ]
126
-            // },
115
+            {
116
+              path: '/integralMall',
117
+              name: '积分商城',
118
+              component: '../layouts/BlankLayout',
119
+              routes: [
120
+                {
121
+                  path: '/integralMall/GoodsList',
122
+                  name: '商品列表',
123
+                  component: './integralMall/GoodsList',
124
+                },
125
+              ],
126
+            },
127 127
             {
128 128
               component: './404',
129 129
             },
@@ -141,7 +141,6 @@ export default {
141 141
   // Theme for antd: https://ant.design/docs/react/customize-theme-cn
142 142
   theme: {
143 143
     'primary-color': primaryColor,
144
-
145 144
   },
146 145
   define: {
147 146
     ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION:

+ 12
- 1
src/layouts/BlankLayout.jsx View File

@@ -1,5 +1,16 @@
1 1
 import React from 'react';
2 2
 
3
-const Layout = ({ children }) => <div>{children}</div>;
3
+const Layout = ({ children }) => (
4
+  <div
5
+    style={{
6
+      backgroundColor: '#fff',
7
+      padding: '32PX 28px',
8
+      boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)',
9
+      borderRadius: '12px',
10
+    }}
11
+  >
12
+    {children}
13
+  </div>
14
+);
4 15
 
5 16
 export default Layout;