dingxin 5 年前
父节点
当前提交
13f82525de

+ 12
- 3
config/config.js 查看文件

144
                   name: '商品列表',
144
                   name: '商品列表',
145
                   component: './integralMall/GoodsList',
145
                   component: './integralMall/GoodsList',
146
                 },
146
                 },
147
+                {
148
+                  path: '/integralMall/achieve',
149
+                  name: '积分获取',
150
+                  component: './integralMall/achieve',
151
+                },
147
                 {
152
                 {
148
                   path: '/integralMall/editGoods',
153
                   path: '/integralMall/editGoods',
149
                   name: '',
154
                   name: '',
154
                   name: '兑换记录',
159
                   name: '兑换记录',
155
                   component: './integralMall/exchangeRecords',
160
                   component: './integralMall/exchangeRecords',
156
                 },
161
                 },
162
+                {
163
+                  path: '/integralMall/writeOff',
164
+                  name: '商品核销',
165
+                  component: './integralMall/writeOff',
166
+                },
157
               ],
167
               ],
158
             },
168
             },
159
             {
169
             {
283
     basePath: '/',
293
     basePath: '/',
284
   },
294
   },
285
   chainWebpack: webpackPlugin,
295
   chainWebpack: webpackPlugin,
286
-  
296
+
287
   proxy: {
297
   proxy: {
288
     '/api/': {
298
     '/api/': {
289
-      target: 'http://localhost:8080/',
299
+      target: 'http://192.168.0.84:8080/',
290
       changeOrigin: true,
300
       changeOrigin: true,
291
       // pathRewrite: { '^/server': '' },
301
       // pathRewrite: { '^/server': '' },
292
     },
302
     },
293
   },
303
   },
294
-  
295
 };
304
 };

二进制
src/assets/erweima.png 查看文件


二进制
src/assets/list.png 查看文件


二进制
src/assets/saoma.png 查看文件


+ 40
- 0
src/components/SelectButton/BuildSelect.jsx 查看文件

1
+import React, { useState, useEffect } from 'react';
2
+import { Select } from 'antd';
3
+
4
+import request from '../../utils/request'
5
+
6
+const { Option } = Select;
7
+
8
+/**
9
+ *
10
+ *
11
+ * @param {*} props
12
+ * @returns
13
+ */
14
+const BuildingSelect = (props) => {
15
+  const [ data, setData ] = useState([])
16
+
17
+  useEffect(() => {
18
+    getCityList();
19
+  },[])
20
+
21
+  const getCityList = (e) => {
22
+    request({
23
+        url: '/api/admin/buildinglist/select',
24
+        method: 'GET',
25
+        params: {pageNum: 1,pageSize: 999},
26
+    }).then((data) => {
27
+        setData(data.records)
28
+    })
29
+  }
30
+
31
+  return (
32
+      <Select value={props.value} style={{ width: '180px' }} placeholder="请选择项目" onChange={props.onChange}>
33
+          {data.map(building => (
34
+            <Option key={building.buildingId}>{building.buildingName}</Option>
35
+          ))}
36
+      </Select>
37
+  )
38
+}
39
+export default BuildingSelect
40
+

+ 4
- 4
src/components/SelectButton/CitySelect.jsx 查看文件

20
 
20
 
21
   const getCityList = (e) => {
21
   const getCityList = (e) => {
22
     request({
22
     request({
23
-        url: '/api/admin/buildinglist/select',
23
+        url: '/api/admin/tdCity',
24
         method: 'GET',
24
         method: 'GET',
25
-        params: {pageNum: 1,pageSize: 999},
25
+        params: {leveltype: 2, pageNum: 1,pageSize: 999},
26
     }).then((data) => {
26
     }).then((data) => {
27
-        setData(data.records)
27
+        setData(data)
28
     })
28
     })
29
   }
29
   }
30
 
30
 
31
   return (
31
   return (
32
       <Select value={props.value} style={{ width: '180px' }} placeholder="请选择城市" onChange={props.onChange}>
32
       <Select value={props.value} style={{ width: '180px' }} placeholder="请选择城市" onChange={props.onChange}>
33
           {data.map(city => (
33
           {data.map(city => (
34
-            <Option key={city.buildingId}>{city.buildingName}</Option>
34
+            <Option key={city.id}>{city.name}</Option>
35
           ))}
35
           ))}
36
       </Select>
36
       </Select>
37
   )
37
   )

+ 8
- 2
src/global.less 查看文件

48
 }
48
 }
49
 
49
 
50
 .ant-pro-global-header{
50
 .ant-pro-global-header{
51
-  background:linear-gradient(180deg,rgba(107,192,216,1) 0%,rgba(54,141,212,1) 100%);
51
+  background:#393C39;
52
 }
52
 }
53
 .ant-pro-sider-menu-sider.light .ant-pro-sider-menu-logo{
53
 .ant-pro-sider-menu-sider.light .ant-pro-sider-menu-logo{
54
-  background:linear-gradient(180deg,rgba(107,192,216,1) 0%,rgba(54,141,212,1) 100%);
54
+  background:#EF273A;
55
   box-shadow: none;
55
   box-shadow: none;
56
   border: none;
56
   border: none;
57
 }
57
 }
99
 }
99
 }
100
 .ant-pro-sider-menu-logo img{
100
 .ant-pro-sider-menu-logo img{
101
   height: 41px;
101
   height: 41px;
102
+}
103
+.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
104
+  color: #FF7E48;
105
+}
106
+.ant-table{
107
+  line-height: 3;
102
 }
108
 }

+ 1
- 9
src/layouts/UserLayout.less 查看文件

20
 
20
 
21
 .content {
21
 .content {
22
   flex: 1;
22
   flex: 1;
23
-  padding: 32px 0;
24
-
25
 }
23
 }
26
 
24
 
27
 @media (min-width: @screen-md-min) {
25
 @media (min-width: @screen-md-min) {
28
   .container {
26
   .container {
29
-    background-image: url('../assets/bg.jpg');
30
-    background-repeat: no-repeat;
31
-    background-position: center;
32
-    background-size: 100% 100%;
27
+    background-color: #fff;
33
   }
28
   }
34
 
29
 
35
-  .content {
36
-    padding: 32px 0 24px;
37
-  }
38
 }
30
 }
39
 
31
 
40
 .top {
32
 .top {

+ 192
- 191
src/pages/activity/ActivityList.jsx 查看文件

5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
+import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 
9
 
9
 import request from '../../utils/request'
10
 import request from '../../utils/request'
10
 
11
 
11
 const { Option } = Select;
12
 const { Option } = Select;
12
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
-// 提交事件
14
-function handleSubmit(e, props) {
15
-  e.preventDefault();
16
-  props.form.validateFields((err, values) => {
17
-    if (!err) {
18
-      console.log('提交数据: ', values)
19
-    }
20
-  });
21
-}
22
-// Change 事件
23
-function handleSelectChange(props) {
24
-  console.log(props)
25
-}
26
-
27
-// 分页
28
-function onChange(pageNumber) {
29
-  console.log('Page: ', pageNumber);
30
-}
31
-// 跳转到编辑商品
32
-function toEditGoods() {
33
-  router.push({
34
-    pathname: '/activity/editActivity',
35
-    query: {
36
-      a: 'b',
37
-    },
38
-  });
39
-}
40
-
41
-/**
42
- *
43
- *
44
- * @param {*} props
45
- * @returns
46
- */
47
-
48
-const columns = [
49
-  {
50
-    title: '活动标题',
51
-    dataIndex: 'title',
52
-    key: 'title',
53
-    align: 'center',
54
-  },
55
-  {
56
-    title: '活动时间',
57
-    dataIndex: 'startDate',
58
-    key: 'startDate',
59
-    align: 'center',
60
-    render: (x, row) => <><span>{`${moment(row.startDate).format('YYYY-MM-DD')} —— ${moment(row.endDate).format('YYYY-MM-DD')}`}</span></>
61
-  },
62
-  {
63
-    title: '已参加人数',
64
-    dataIndex: 'count',
65
-    key: 'count',
66
-    align: 'center',
67
-  },
68
-  {
69
-    title: '阅读量',
70
-    dataIndex: 'pvNum',
71
-    key: 'pvNum',
72
-    align: 'center',
73
-  },
74
-  {
75
-    title: '转发量',
76
-    dataIndex: 'shareNum',
77
-    key: 'shareNum',
78
-    align: 'center',
79
-  },
80
-  {
81
-    title: '收藏数',
82
-    dataIndex: 'saveNum',
83
-    key: 'saveNum',
84
-    align: 'center',
85
-  },
86
-  {
87
-    title: '状态',
88
-    dataIndex: 'isEnlist',
89
-    key: 'isEnlist',
90
-    align: 'center',
91
-    render: (isEnlist)=> <><span>{isEnlist == 0 ?"未开始" : isEnlist==1 ? "进行中" : "已结束"}</span></>
92
-  },
93
-  {
94
-    title: '操作',
95
-    dataIndex: 'handle',
96
-    key: 'handle',
97
-    align: 'center',
98
-    render: (x,row) => <><span style={{ color: '#1990FF'}} onClick={getSignList.bind(this, row.dynamicId)}>{row.isEnlist == '1' || row.isEnlist == '2' ? "报名记录" : ""}<Icon type="snippets" className={styles.shoppingCart} /></span>
99
-                         <span style={{ color: '#1990FF' }} onClick={sendOrPublicDynamic.bind(this,row)}>{ row.status === 1 ? '取消发布' : '发布' }<Icon type="close-circle" className={styles.edit} /></span>
100
-                         <span style={{ color: '#1990FF' }} onClick={finishDynamic.bind(this,row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
101
-                         <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={topDynamic.bind(this,row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
102
-                         <span style={{ color: '#FF925C' }}>编辑<Icon type="form" className={styles.edit} /></span>
103
-                       </>
104
-  },
105
-];
106
-
107
-const getSignList = (dynamicId) => {
108
-    router.push({
109
-        pathname: '/activity/SignList',
110
-        query: {
111
-            dynamicId
112
-        },
113
-      });
114
-}
115
-
116
-const finishDynamic = (row) => {
117
-    Modal.confirm({
118
-        title: '结束以后将无法编辑, 是否继续?',
119
-        okText: '确定',
120
-        cancelText: '取消',
121
-        onOk() {
122
-            request({
123
-                url: '/api/admin/buildingDynamic/finish',
124
-                method: 'PUT',
125
-                data: {dynamicId: row.dynamicId, top: ""},
126
-            }).then((data) => {
127
-                console.log(data)
128
-                message.info('操作成功!')
129
-                // getList()
130
-            }).catch((err) => {
131
-                console.log(err)
132
-                message.info(err.msg || err.message)
133
-            })
134
-        },
135
-      });
136
-}
137
-
138
-const topDynamic = (row) => {
139
-    const weight = Math.abs(row.weight - 1)
140
-    request({
141
-        url: '/api/admin/buildingDynamic/weight',
142
-        method: 'PUT',
143
-        params: {dynamicId: row.dynamicId, weight},
144
-    }).then((data) => {
145
-        console.log(data)
146
-        message.info('操作成功!')
147
-        // getList()
148
-    }).catch((err) => {
149
-        console.log(err)
150
-        message.info(err.msg || err.message)
151
-    })
152
-}
153
-
154
-const sendOrPublicDynamic = (row) => {
155
-    if (row.status === 1) {
156
-        cancelDynamic(row)
157
-    } else {
158
-        sendDynamic(row)
159
-    }
160
-}
161
-
162
-// 取消活动
163
-const cancelDynamic = (row) => {
164
-    request({
165
-        url: '/api/admin/buildingDynamic/cancel/'+row.dynamicId,
166
-        method: 'PUT',
167
-    }).then((data) => {
168
-        message.info('操作成功!')
169
-        // getList()
170
-    }).catch((err) => {
171
-        console.log(err)
172
-        message.info(err.msg || err.message)
173
-    })
174
-}
175
-
176
-//发布活动
177
-const sendDynamic = (row) => {
178
-    request({
179
-        url: '/api/admin/buildingDynamic/send/'+row.dynamicId,
180
-        method: 'PUT',
181
-    }).then((data) => {
182
-        message.info('操作成功!')
183
-        // getList()
184
-    }).catch((err) => {
185
-        console.log(err)
186
-        message.info(err.msg || err.message)
187
-    })
188
-}
189
 
14
 
190
 const header = (props) => {
15
 const header = (props) => {
191
   const [ data, setData ] = useState({})
16
   const [ data, setData ] = useState({})
192
 //   const [page, changePage] = useState({})
17
 //   const [page, changePage] = useState({})
193
 
18
 
194
   useEffect(() => {
19
   useEffect(() => {
195
-    getList();
20
+    getList({ pageNum: 1, pageSize: 10 });
196
   },[])
21
   },[])
197
 
22
 
198
   // 查询列表
23
   // 查询列表
199
-  const getList = (e) => {
24
+  const getList = (params) => {
200
     request({
25
     request({
201
         url: '/api/admin/iBuildingDynamicList',
26
         url: '/api/admin/iBuildingDynamicList',
202
         method: 'GET',
27
         method: 'GET',
203
-        params: {pageNum: 1,pageSize: 10},
28
+        params: { ...params },
204
     }).then((data) => {
29
     }).then((data) => {
205
         console.log(data)
30
         console.log(data)
206
         setData(data)
31
         setData(data)
207
     })
32
     })
208
   }
33
   }
209
 
34
 
35
+  
36
+// 跳转到编辑商品
37
+const toEditGoods = (dynamicId) => () => {
38
+    router.push({
39
+      pathname: '/activity/editActivity',
40
+      query: {
41
+        dynamicId
42
+      },
43
+    });
44
+  }
45
+  
46
+  /**
47
+   *
48
+   *
49
+   * @param {*} props
50
+   * @returns
51
+   */
52
+  
53
+  const columns = [
54
+    {
55
+      title: '活动标题',
56
+      dataIndex: 'title',
57
+      key: 'title',
58
+      align: 'center',
59
+    },
60
+    {
61
+      title: '活动时间',
62
+      dataIndex: 'startDate',
63
+      key: 'startDate',
64
+      align: 'center',
65
+      render: (x, row) => <><span>{`${moment(row.startDate).format('YYYY-MM-DD')} —— ${moment(row.endDate).format('YYYY-MM-DD')}`}</span></>
66
+    },
67
+    {
68
+      title: '已参加人数',
69
+      dataIndex: 'count',
70
+      key: 'count',
71
+      align: 'center',
72
+    },
73
+    {
74
+      title: '阅读量',
75
+      dataIndex: 'pvNum',
76
+      key: 'pvNum',
77
+      align: 'center',
78
+    },
79
+    {
80
+      title: '转发量',
81
+      dataIndex: 'shareNum',
82
+      key: 'shareNum',
83
+      align: 'center',
84
+    },
85
+    {
86
+      title: '收藏数',
87
+      dataIndex: 'saveNum',
88
+      key: 'saveNum',
89
+      align: 'center',
90
+    },
91
+    {
92
+      title: '状态',
93
+      dataIndex: 'isEnlist',
94
+      key: 'isEnlist',
95
+      align: 'center',
96
+      render: (isEnlist)=> <><span>{isEnlist == 0 ?"未开始" : isEnlist==1 ? "进行中" : "已结束"}</span></>
97
+    },
98
+    {
99
+      title: '操作',
100
+      dataIndex: 'handle',
101
+      key: 'handle',
102
+      align: 'center',
103
+      render: (x,row) => <><span style={{ color: '#1990FF'}} onClick={getSignList.bind(this, row.dynamicId)}>{row.isEnlist == '1' || row.isEnlist == '2' ? "报名记录" : ""}<Icon type="snippets" className={styles.shoppingCart} /></span>
104
+                           <span style={{ color: '#1990FF' }} onClick={sendOrPublicDynamic.bind(this,row)}>{ row.status === 1 ? '取消发布' : '发布' }<Icon type="close-circle" className={styles.edit} /></span>
105
+                           <span style={{ color: '#1990FF' }} onClick={finishDynamic.bind(this,row)}>结束活动<Icon type="poweroff" className={styles.edit} /></span>
106
+                           <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={topDynamic(row)}>{ row.weight === 1 ? '取消置顶' : '置顶' }<Icon type="vertical-align-top" className={styles.edit} /></span>
107
+                           <span style={{ color: '#FF925C' }} onClick={toEditGoods(row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>
108
+                         </>
109
+    },
110
+  ];
111
+  
112
+  const getSignList = (dynamicId) => {
113
+      router.push({
114
+          pathname: '/activity/SignList',
115
+          query: {
116
+              dynamicId
117
+          },
118
+        });
119
+  }
120
+  
121
+  const finishDynamic = (row) => {
122
+      Modal.confirm({
123
+          title: '结束以后将无法编辑, 是否继续?',
124
+          okText: '确定',
125
+          cancelText: '取消',
126
+          onOk() {
127
+              request({
128
+                  url: '/api/admin/buildingDynamic/finish',
129
+                  method: 'PUT',
130
+                  data: {dynamicId: row.dynamicId, top: ""},
131
+              }).then((data) => {
132
+                  console.log(data)
133
+                  message.info('操作成功!')
134
+                  getList({ pageNum: 1, pageSize: 10 })
135
+              }).catch((err) => {
136
+                  console.log(err)
137
+                  message.info(err.msg || err.message)
138
+              })
139
+          },
140
+        });
141
+  }
142
+  
143
+//   置顶
144
+  const topDynamic = (row) => () => {
145
+      const weight = Math.abs(row.weight - 1)
146
+      request({
147
+          url: '/api/admin/buildingDynamic/weight',
148
+          method: 'PUT',
149
+          params: {dynamicId: row.dynamicId, weight},
150
+      }).then((data) => {
151
+          console.log(data)
152
+          message.info('操作成功!')
153
+          getList({ pageNum: 1, pageSize: 10 })
154
+      }).catch((err) => {
155
+          console.log(err)
156
+          message.info(err.msg || err.message)
157
+      })
158
+  }
159
+  
160
+  const sendOrPublicDynamic = (row) => {
161
+      if (row.status === 1) {
162
+          cancelDynamic(row)
163
+      } else {
164
+          sendDynamic(row)
165
+      }
166
+  }
167
+  
168
+  // 取消活动
169
+  const cancelDynamic = (row) => {
170
+      request({
171
+          url: '/api/admin/buildingDynamic/cancel/'+row.dynamicId,
172
+          method: 'PUT',
173
+      }).then((data) => {
174
+          message.info('操作成功!')
175
+          getList({ pageNum: 1, pageSize: 10 })
176
+      }).catch((err) => {
177
+          console.log(err)
178
+          message.info(err.msg || err.message)
179
+      })
180
+  }
181
+  
182
+  //发布活动
183
+  const sendDynamic = (row) => {
184
+      request({
185
+          url: '/api/admin/buildingDynamic/send/'+row.dynamicId,
186
+          method: 'PUT',
187
+      }).then((data) => {
188
+          message.info('操作成功!')
189
+          getList({ pageNum: 1, pageSize: 10 });
190
+      }).catch((err) => {
191
+          console.log(err)
192
+          message.info(err.msg || err.message)
193
+      })
194
+  }
195
+  
196
+  const changePageNum = (pageNumber) => {
197
+      getList({ pageNum: pageNumber, pageSize: 10 })
198
+  }
199
+
200
+  // 提交事件
201
+const handleSubmit = (e, props) => {
202
+    e.preventDefault();
203
+    props.form.validateFields((err, values) => {
204
+      if (!err) {
205
+        console.log('提交数据: ', values)
206
+        getList({ pageNum: 1, pageSize: 10, ...values })
207
+      }
208
+    });
209
+  }
210
+
210
   const { getFieldDecorator } = props.form
211
   const { getFieldDecorator } = props.form
211
   return (
212
   return (
212
 
213
 
213
     <>
214
     <>
214
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
215
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
215
         <Form.Item>
216
         <Form.Item>
216
-          {getFieldDecorator('goodState')(
217
+          {getFieldDecorator('cityId')(
217
             <SelectCity />,
218
             <SelectCity />,
218
           )}
219
           )}
219
         </Form.Item>
220
         </Form.Item>
220
         <Form.Item>
221
         <Form.Item>
221
-          {getFieldDecorator('isMain')(
222
-            <Select style={{ width: '180px' }} placeholder="请选择项目" onChange={handleSelectChange}>
223
-              <Option value="1">首页推荐</Option>
224
-              <Option value="0">首页未推荐</Option>
225
-            </Select>,
222
+          {getFieldDecorator('buildingId')(
223
+            <BuildSelect />,
226
           )}
224
           )}
227
         </Form.Item>
225
         </Form.Item>
228
         <Form.Item>
226
         <Form.Item>
229
-          {getFieldDecorator('name')(
227
+          {getFieldDecorator('title')(
230
             <Input
228
             <Input
231
               prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
229
               prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
232
               placeholder="请输入标题"
230
               placeholder="请输入标题"
234
           )}
232
           )}
235
         </Form.Item>
233
         </Form.Item>
236
         <Form.Item>
234
         <Form.Item>
237
-          {getFieldDecorator('min')(
235
+          {getFieldDecorator('time')(
238
             <DatePicker />
236
             <DatePicker />
239
           )}
237
           )}
240
         </Form.Item>
238
         </Form.Item>
241
         <Form.Item>
239
         <Form.Item>
242
-          {getFieldDecorator('goodState')(
243
-            <Select style={{ width: '180px' }} placeholder="是否报名" onChange={handleSelectChange}>
240
+          {getFieldDecorator('isEnlist')(
241
+            <Select style={{ width: '180px' }} placeholder="是否报名">
244
               <Option value="1">已报名</Option>
242
               <Option value="1">已报名</Option>
245
               <Option value="0">未报名</Option>
243
               <Option value="0">未报名</Option>
246
             </Select>,
244
             </Select>,
252
           </Button>
250
           </Button>
253
         </Form.Item>
251
         </Form.Item>
254
       </Form>
252
       </Form>
255
-      <Button type="primary" className={styles.addBtn} onClick={toEditGoods}>新增</Button>
256
-      <Table dataSource={data.list} columns={columns} />
253
+      <Button type="primary" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
254
+      <Table dataSource={data.list} columns={columns} pagination={false}/>
255
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
256
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
257
+      </div>
257
     </>
258
     </>
258
   )
259
   )
259
 }
260
 }

+ 29
- 24
src/pages/activity/SignList.jsx 查看文件

10
 const { Option } = Select;
10
 const { Option } = Select;
11
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
11
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
12
 
12
 
13
-
14
-
15
-// 分页
16
-function onChange(pageNumber) {
17
-  console.log('Page: ', pageNumber);
18
-}
19
-
20
-
21
 /**
13
 /**
22
  *
14
  *
23
  *
15
  *
27
 
19
 
28
 const columns = [
20
 const columns = [
29
   {
21
   {
30
-    title: '活动标题',
31
-    dataIndex: 'title',
32
-    key: 'title',
22
+    title: '用户姓名',
23
+    dataIndex: 'name',
24
+    key: 'name',
33
     align: 'center',
25
     align: 'center',
34
   },
26
   },
35
   {
27
   {
36
-    title: '活动时间',
37
-    dataIndex: 'startDate',
38
-    key: 'startDate',
28
+    title: '手机号',
29
+    dataIndex: 'phone',
30
+    key: 'phone',
39
     align: 'center',
31
     align: 'center',
40
-    render: (x, row) => <><span>{`${moment(row.startDate).format('YYYY-MM-DD')} —— ${moment(row.endDate).format('YYYY-MM-DD')}`}</span></>
41
   },
32
   },
42
   {
33
   {
43
-    title: '已参加人数',
44
-    dataIndex: 'count',
45
-    key: 'count',
34
+    title: '报名时间',
35
+    dataIndex: 'createDate',
36
+    key: 'createDate',
46
     align: 'center',
37
     align: 'center',
38
+    render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD')}`}</span></>
47
   }
39
   }
48
 ];
40
 ];
49
 
41
 
50
 
42
 
51
 
43
 
52
 const header = (props) => {
44
 const header = (props) => {
53
-  const [ data, setData ] = useState({})
45
+  const [ data, setData ] = useState({list: {}})
54
 //   const [page, changePage] = useState({})
46
 //   const [page, changePage] = useState({})
55
   useEffect(() => {
47
   useEffect(() => {
56
-    getSignList();
48
+    getSignList({pageNum: 1,pageSize: 10, dynamicId: props.location.query.dynamicId });
57
   },[])
49
   },[])
58
 
50
 
59
   // 查询列表
51
   // 查询列表
60
-  const getSignList = (e) => {
52
+  const getSignList = (params) => {
61
     request({
53
     request({
62
         url: '/api/admin/SignList',
54
         url: '/api/admin/SignList',
63
         method: 'GET',
55
         method: 'GET',
64
-        params: {pageNum: 1,pageSize: 10, dynamicId: props.location.query.dynamicId },
56
+        params: { ...params },
65
     }).then((data) => {
57
     }).then((data) => {
66
         console.log(data)
58
         console.log(data)
67
         setData(data)
59
         setData(data)
68
     })
60
     })
69
   }
61
   }
70
 
62
 
63
+  const changePageNum = (pageNumber) => {
64
+    getList({ pageNum: pageNumber, pageSize: 10, dynamicId: props.location.query.dynamicId })
65
+  }
66
+
67
+  const toActivityList = () => {
68
+    router.push({
69
+      pathname: '/activity/ActivityList',
70
+    });
71
+  }
72
+
71
   return (
73
   return (
72
     <>
74
     <>
73
-      <Button type="primary" className={styles.addBtn}>返回</Button>
74
-      <Table dataSource={data} columns={columns} />
75
+      <Button type="primary" className={styles.addBtn} onClick={toActivityList}>返回</Button>
76
+      <Table dataSource={data.list.data} columns={columns} pagination={false} />
77
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
78
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
79
+      </div>
75
     </>
80
     </>
76
   )
81
   )
77
 }
82
 }

+ 21
- 24
src/pages/activity/editActivity.jsx 查看文件

3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import styles from '../style/GoodsList.less';
4
 import styles from '../style/GoodsList.less';
5
 
5
 
6
-
7
-
8
 /**
6
 /**
9
  *
7
  *
10
  *
8
  *
11
  * @param {*} props
9
  * @param {*} props
12
  * @returns
10
  * @returns
13
  */
11
  */
14
-
15
-
16
- const Basic = (props) => {
17
-   return <div>Basic</div>
18
- }
19
- 
20
- const Poster = (props) => {
21
-  return <div>Poster</div>
22
-}
23
-
24
-const Share = (props) => {
25
-  return <div>Share</div>
26
-}
27
-
28
  const Edit = (props) => {
12
  const Edit = (props) => {
29
-   const [ tab, changeTab ] = useState('a');
30
-
13
+  const [ tab, changeTab ] = useState('basic');
14
+  const dynamicId = props.location.query.dynamicId
15
+  console.log(dynamicId)
16
+
17
+  const Basic = (props) => {
18
+  return <div>Basic</div>
19
+  }
20
+  
21
+  const Poster = (props) => {
22
+   return <div>Poster</div>
23
+  }
24
+ 
25
+  const Share = (props) => {
26
+    return <div>Share</div>
27
+  }
31
 
28
 
32
   return (
29
   return (
33
     <div>
30
     <div>
34
       <div>
31
       <div>
35
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
32
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
36
-          <Radio.Button value="a">基本信息</Radio.Button>
37
-          <Radio.Button value="b">海报图片</Radio.Button>
38
-          <Radio.Button value="c">分享设置</Radio.Button>
33
+          <Radio.Button value="basic">基本信息</Radio.Button>
34
+          <Radio.Button value="poster">海报图片</Radio.Button>
35
+          <Radio.Button value="share">分享设置</Radio.Button>
39
         </Radio.Group>
36
         </Radio.Group>
40
       </div>
37
       </div>
41
       <div>
38
       <div>
42
-        { tab === 'a' && <Basic /> }
43
-        { tab === 'b' && <Poster /> }
44
-        { tab === 'c' && <Share /> }
39
+        { tab === 'basic' && <Basic /> }
40
+        { tab === 'poster' && <Poster /> }
41
+        { tab === 'share' && <Share /> }
45
       </div>
42
       </div>
46
     </div>
43
     </div>
47
   );
44
   );

+ 49
- 6
src/pages/building/type/edi.jsx 查看文件

1
-import React from 'react';
1
+import React, { useState, useEffect } from 'react';
2
 import { Input, Button, Row, Col, Form, Alert } from 'antd';
2
 import { Input, Button, Row, Col, Form, Alert } from 'antd';
3
 import router from 'umi/router';
3
 import router from 'umi/router';
4
 import Styles from './style.less';
4
 import Styles from './style.less';
8
 function body(props) {
8
 function body(props) {
9
   const { getFieldDecorator } = props.form;
9
   const { getFieldDecorator } = props.form;
10
 
10
 
11
-  console.log('id: ', props.location.query.id)
11
+  // eslint-disable-next-line react-hooks/rules-of-hooks
12
+  let data = {}
13
+  const { id } = props.location.query;
14
+
15
+  if (id !== '') {
16
+    // eslint-disable-next-line react-hooks/rules-of-hooks
17
+    useEffect(() => {
18
+      getById(id)
19
+    }, [])
20
+  }
12
 
21
 
13
   function handleSubmit(e) {
22
   function handleSubmit(e) {
14
     e.preventDefault();
23
     e.preventDefault();
15
     props.form.validateFields((err, values) => {
24
     props.form.validateFields((err, values) => {
16
       if (!err) {
25
       if (!err) {
17
         // 提交数据
26
         // 提交数据
18
-        values.status = 1
19
-        values.createDate = new Date()
20
         submitData(values)
27
         submitData(values)
21
       }
28
       }
22
     });
29
     });
23
   }
30
   }
24
 
31
 
25
-  function submitData(data) {
26
-    request({ ...apis.buildingType.add, data: { ...data } }).then(() => {
32
+  // 获取详情信息
33
+  function getById(currentId) {
34
+    const { url, method } = apis.buildingType.getById
35
+    const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(currentId)
36
+
37
+    request({ url: tempUrl, method }).then(res => {
38
+      data = res
39
+      props.form.setFieldsValue(res)
40
+    })
41
+  }
42
+
43
+  function submitData(dataSources) {
44
+    if (id !== '') {
45
+      // 修改
46
+      updateType(dataSources)
47
+      return
48
+    }
49
+
50
+    dataSources.status = 1
51
+    dataSources.createDate = new Date()
52
+    request({ ...apis.buildingType.add, data: { ...dataSources } }).then(() => {
27
       // eslint-disable-next-line no-unused-expressions
53
       // eslint-disable-next-line no-unused-expressions
28
       <Alert
54
       <Alert
29
         style={{
55
         style={{
47
     })
73
     })
48
   }
74
   }
49
 
75
 
76
+    // 修改
77
+    function updateType(row) {
78
+      const { url, method } = apis.buildingType.update
79
+      const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(row.buildingTypeId)
80
+
81
+      request({ url: tempUrl, method, data: { ...row } }).then(() => {
82
+        router.go(-1)
83
+      })
84
+    }
85
+
50
   return (
86
   return (
51
     <>
87
     <>
52
         <Form onSubmit={handleSubmit} style={{ width: '500px', margin: 'auto' }}>
88
         <Form onSubmit={handleSubmit} style={{ width: '500px', margin: 'auto' }}>
89
+          <Form.Item style={{ display: 'none' }}>
90
+            {getFieldDecorator('buildingTypeId')(
91
+              <Input
92
+                placeholder="buildingTtypeId"
93
+              />,
94
+            )}
95
+          </Form.Item>
53
           <Form.Item>
96
           <Form.Item>
54
             {getFieldDecorator('buildingTypeName', {
97
             {getFieldDecorator('buildingTypeName', {
55
               rules: [{ required: true, message: '请输入名称' }],
98
               rules: [{ required: true, message: '请输入名称' }],

+ 3
- 3
src/pages/building/type/index.jsx 查看文件

85
   }
85
   }
86
 
86
 
87
   // 跳转修改页
87
   // 跳转修改页
88
-  function toEdi(id) {
88
+  function toEdi(currentId) {
89
     router.push({
89
     router.push({
90
       pathname: '/building/type/edi',
90
       pathname: '/building/type/edi',
91
       query: {
91
       query: {
92
-        id,
92
+        id: currentId || '',
93
       },
93
       },
94
     });
94
     });
95
   }
95
   }
96
 
96
 
97
   return (
97
   return (
98
     <>
98
     <>
99
-      <Button type="primary" className={Styles.addButton} onClick={toEdi}>新增类型</Button>
99
+      <Button type="primary" className={Styles.addButton} onClick={() => toEdi()}>新增类型</Button>
100
       <Table dataSource={data.records} columns={columns} pagination={false}/>
100
       <Table dataSource={data.records} columns={columns} pagination={false}/>
101
       {/* 分页 */}
101
       {/* 分页 */}
102
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
102
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>

+ 1
- 1
src/pages/integralMall/GoodsList.jsx 查看文件

103
     dataIndex: 'handle',
103
     dataIndex: 'handle',
104
     key: 'handle',
104
     key: 'handle',
105
     align: 'center',
105
     align: 'center',
106
-    render: () => <><span style={{ color: '#1990FF', marginRight: '20px' }} onClick={confirm}>下架<Icon type="shopping-cart" className={styles.shoppingCart} /></span><span style={{ color: '#FF925C' }} onClick={toEditGoods}>编辑<Icon type="form" className={styles.edit} /></span></>,
106
+    render: () => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={confirm}>下架<Icon type="shopping-cart" className={styles.shoppingCart} /></span><span style={{ color: '#FF925C' }} onClick={toEditGoods}>编辑<Icon type="form" className={styles.edit} /></span></>,
107
   },
107
   },
108
 ];
108
 ];
109
 function confirm() {
109
 function confirm() {

+ 91
- 0
src/pages/integralMall/achieve.jsx 查看文件

1
+import React from 'react';
2
+import { Form, Input, Button, Icon, Tabs, Row, Col, Table } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../style/GoodsList.less';
5
+import router from 'umi/router';
6
+
7
+
8
+const { TabPane } = Tabs;
9
+function callback(key) {
10
+  console.log(key);
11
+}
12
+
13
+/**
14
+ *
15
+ *
16
+ * @param {*} props
17
+ * @returns
18
+ */
19
+const dataSource = [
20
+  {
21
+    key: '1',
22
+    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
23
+    name: '华为P30 Pro',
24
+  },
25
+  {
26
+    key: '2',
27
+    img: '',
28
+    name: '大米',
29
+  },
30
+];
31
+
32
+const columns = [
33
+  {
34
+    title: '类型',
35
+    dataIndex: 'type',
36
+    key: 'type',
37
+    align: 'center',
38
+  },
39
+  {
40
+    title: '获取积分',
41
+    dataIndex: 'intergral',
42
+    key: 'intergral',
43
+    align: 'center',
44
+  },
45
+  {
46
+    title: '状态',
47
+    dataIndex: 'state',
48
+    key: 'state',
49
+    align: 'center',
50
+  },
51
+  {
52
+    title: '说明',
53
+    dataIndex: 'desc',
54
+    key: 'desc',
55
+    align: 'center',
56
+  },
57
+  {
58
+    title: '操作时间',
59
+    dataIndex: 'time',
60
+    key: 'time',
61
+    align: 'center',
62
+  },
63
+  {
64
+    title: '操作',
65
+    dataIndex: 'handle',
66
+    key: 'handle',
67
+    align: 'center',
68
+    render: () => <><span style={{ color: '#EF273A', marginRight: '20px' }} >停用<Icon type="stop" className={styles.shoppingCart} /></span><span style={{ color: '#EF273A', marginRight: '20px' }} >启用<Icon type="check-circle" className={styles.shoppingCart} /></span><span style={{ color: '#FF925C' }}>编辑<Icon type="form" className={styles.edit} /></span></>,
69
+  },
70
+
71
+];
72
+
73
+
74
+function header(props) {
75
+  const { getFieldDecorator } = props.form
76
+  return (
77
+    <>
78
+      <Tabs onChange={callback} type="card">
79
+        <TabPane tab="平台积分" key="1">
80
+          <Table style={{ marginTop: '40px' }} dataSource={dataSource} columns={columns} />
81
+        </TabPane>
82
+        <TabPane tab="项目积分" key="2">
83
+          <Table style={{ marginTop: '40px' }} dataSource={dataSource} columns={columns} />
84
+        </TabPane>
85
+      </Tabs>,
86
+    </>
87
+  )
88
+}
89
+const WrappedHeader = Form.create({ name: 'header' })(header);
90
+
91
+export default WrappedHeader

+ 68
- 2
src/pages/integralMall/exchangeRecords.jsx 查看文件

1
 import React from 'react';
1
 import React from 'react';
2
-import { Form, Input, Button, Icon, Select, DatePicker } from 'antd';
2
+import { Form, Input, Button, Icon, Select, DatePicker, Table } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import styles from '../style/GoodsList.less';
4
 import styles from '../style/GoodsList.less';
5
 
5
 
172
   }
172
   }
173
 }
173
 }
174
 // 领取时间 组件  end
174
 // 领取时间 组件  end
175
+const dataSource = [
176
+  {
177
+    key: '1',
178
+    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
179
+    name: '华为P30 Pro',
180
+  },
181
+  {
182
+    key: '2',
183
+    img: '',
184
+    name: '大米',
185
+  },
186
+];
187
+
188
+const columns = [
189
+
190
+  {
191
+    title: '用户姓名',
192
+    dataIndex: 'name',
193
+    key: 'name',
194
+    align: 'center',
195
+
196
+  },
197
+  {
198
+    title: '用户类型',
199
+    dataIndex: 'type',
200
+    key: 'type',
201
+    align: 'center',
202
+  },
203
+  {
204
+    title: '手机号',
205
+    dataIndex: 'phone',
206
+    key: 'phone',
207
+    align: 'center',
208
+  },
209
+  {
210
+    title: '商品图片',
211
+    dataIndex: 'img',
212
+    key: 'img',
213
+    align: 'center',
214
+    render: (text, record) => <img src={record.img} className={styles.touxiang} />,
215
+  },
216
+  {
217
+    title: '商品名称',
218
+    dataIndex: 'goodName',
219
+    key: 'goodName',
220
+    align: 'center',
221
+  },
222
+  {
223
+    title: '兑换时间',
224
+    dataIndex: 'time',
225
+    key: 'time',
226
+    align: 'center',
227
+  },
228
+  {
229
+    title: '领取时间',
230
+    dataIndex: 'time2',
231
+    key: 'time2',
232
+    align: 'center',
233
+  },
234
+  {
235
+    title: '状态',
236
+    dataIndex: 'state',
237
+    key: 'state',
238
+    align: 'center',
239
+  },
240
+];
175
 
241
 
176
 function record(props) {
242
 function record(props) {
177
   const { getFieldDecorator } = props.form
243
   const { getFieldDecorator } = props.form
221
             </Select>,
287
             </Select>,
222
           )}
288
           )}
223
         </Form.Item>
289
         </Form.Item>
224
-
225
         <Form.Item>
290
         <Form.Item>
226
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
291
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
227
             搜索
292
             搜索
234
           <DateRange2 />
299
           <DateRange2 />
235
         </Form.Item>
300
         </Form.Item>
236
       </Form>
301
       </Form>
302
+      <Table style={{ marginTop: '40px' }} dataSource={dataSource} columns={columns} />
237
     </>
303
     </>
238
   )
304
   )
239
 }
305
 }

+ 73
- 0
src/pages/integralMall/writeOff.jsx 查看文件

1
+import React from 'react';
2
+import { Form, Input, Button, Icon, Tabs, Row, Col } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../style/GoodsList.less';
5
+import router from 'umi/router';
6
+import erweima from '../../assets/erweima.png';
7
+import saoma from '../../assets/saoma.png';
8
+import list from '../../assets/list.png';
9
+
10
+const { TabPane } = Tabs;
11
+function callback(key) {
12
+  console.log(key);
13
+}
14
+
15
+/**
16
+ *
17
+ *
18
+ * @param {*} props
19
+ * @returns
20
+ */
21
+
22
+function header(props) {
23
+  const { getFieldDecorator } = props.form
24
+  return (
25
+    <>
26
+      <Tabs onChange={callback} type="card">
27
+        <TabPane tab="扫码核销" key="1">
28
+          <Row>
29
+            <Col span={8} style={{ textAlign: 'center' }}>
30
+              <img src={erweima} style={{ width: '50px', height: '50px', margin: '30px auto' }} />
31
+              <p>1</p>
32
+              <p>请用户出示核销的二维码</p>
33
+              <p>请将网页输入法切换成英文</p>
34
+            </Col>
35
+            <Col span={8} style={{ textAlign: 'center' }}>
36
+              <img src={saoma} style={{ width: '50px', height: '50px', margin: '30px auto' }} />
37
+              <p>2</p>
38
+              <p>点击“立即核销”按钮</p>
39
+              <p>使用扫码枪扫描客户二维码</p>
40
+            </Col>
41
+            <Col span={8} style={{ textAlign: 'center' }}>
42
+              <img src={list} style={{ width: '50px', height: '50px', margin: '30px auto' }} />
43
+              <p>3</p>
44
+              <p style={{ margin: '44px auto' }}>根据提示进行核销操作</p>
45
+            </Col>
46
+          </Row>
47
+          <Button type="primary" style={{ margin: '80px auto', display: 'block', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }}>立即核销</Button>
48
+        </TabPane>
49
+        <TabPane tab="手机号核销" key="2">
50
+          <Row>
51
+            <Col span={12} style={{ textAlign: 'center' }}>
52
+              <img src={erweima} style={{ width: '50px', height: '50px', margin: '30px auto' }} />
53
+              <p>1</p>
54
+              <p>请输入用户的手机号</p>
55
+            </Col>
56
+            <Col span={12} style={{ textAlign: 'center' }}>
57
+              <img src={list} style={{ width: '50px', height: '50px', margin: '30px auto' }} />
58
+              <p>2</p>
59
+              <p>点击“立即核销”按钮</p>
60
+            </Col>
61
+          </Row>
62
+          <div style={{ margin: '110px auto', display: 'block',textAlign:'center' }}>
63
+            <Input placeholder="请输入手机号" style={{width:'200px'}} />
64
+            <Button type="primary" style={{marginLeft:'10px', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }}>立即核销</Button>
65
+          </div>
66
+        </TabPane>
67
+      </Tabs>,
68
+    </>
69
+  )
70
+}
71
+const WrappedHeader = Form.create({ name: 'header' })(header);
72
+
73
+export default WrappedHeader

+ 9
- 9
src/pages/style/GoodsList.less 查看文件

1
 .addBtn {
1
 .addBtn {
2
   padding: 0 30px;
2
   padding: 0 30px;
3
   height: 36px;
3
   height: 36px;
4
-  background-color: #50be00;
4
+  background-color: #FF7E48;
5
   color: #fff;
5
   color: #fff;
6
   margin: 30px 0;
6
   margin: 30px 0;
7
-  border-color: #50be00;
7
+  border-color: #FF7E48;
8
 }
8
 }
9
 .addBtn:focus {
9
 .addBtn:focus {
10
   color: #fff;
10
   color: #fff;
11
-  background-color: #50be00;
12
-  border-color: #50be00;
11
+  background-color: #FF7E48;
12
+  border-color: #FF7E48;
13
 }
13
 }
14
 .searchBtn{
14
 .searchBtn{
15
- background-color: #3A91D5;
16
- border-color: #3A91D5;
15
+ background-color: #EF273A;
16
+ border-color: #EF273A;
17
 }
17
 }
18
 .searchBtn:focus {
18
 .searchBtn:focus {
19
   color: #fff;
19
   color: #fff;
20
-  background-color: #3A91D5;
21
-  border-color: #3A91D5;
20
+  background-color: #EF273A;
21
+  border-color: #EF273A;
22
 }
22
 }
23
 .touxiang {
23
 .touxiang {
24
   width: 93px;
24
   width: 93px;
36
   color: #dcdcdc;
36
   color: #dcdcdc;
37
   margin-left: 6px;
37
   margin-left: 6px;
38
   font-size: 15px;
38
   font-size: 15px;
39
-}
39
+}

+ 1
- 1
src/pages/user/login/components/Login/LoginSubmit.jsx 查看文件

9
   const clsString = classNames(styles.submit, className);
9
   const clsString = classNames(styles.submit, className);
10
   return (
10
   return (
11
     <FormItem>
11
     <FormItem>
12
-      <Button size="large" className={clsString} type="primary" htmlType="submit" {...rest} style={{ background: 'linear-gradient(270deg,rgba(43,112,192,1) 0%,rgba(6,185,209,1) 100%)', borderRadius: '7px', border: 'none' }} />
12
+      <Button size="large" className={clsString} type="primary" htmlType="submit" {...rest} style={{ backgroundColor: '#DB3C4B', borderRadius: '4px', border: 'none' }} />
13
     </FormItem>
13
     </FormItem>
14
   );
14
   );
15
 };
15
 };

+ 18
- 10
src/pages/user/login/components/Login/index.jsx 查看文件

14
     className: '',
14
     className: '',
15
     defaultActiveKey: '',
15
     defaultActiveKey: '',
16
     onTabChange: () => { },
16
     onTabChange: () => { },
17
-    onSubmit: () => {},
17
+    onSubmit: () => { },
18
   };
18
   };
19
 
19
 
20
   constructor(props) {
20
   constructor(props) {
113
 
113
 
114
     });
114
     });
115
     return (
115
     return (
116
-      <div  className={styles.loginBox}>
117
-      <div className={styles.leftBox}></div>
118
-      <LoginContext.Provider value={this.getContext()}>
119
-        <div className={styles.login}>
120
-          <Form onSubmit={this.handleSubmit}>
121
-            {children}
122
-          </Form>
116
+      <>
117
+        <div className={styles.topBox}>
118
+          <div className={styles.con}>
119
+            <p className={styles.welcome}>Welcome</p>
120
+            <div className={styles.title}>
121
+              <span style={{fontSize:'18px'}}>ying xiao yun</span>
122
+              <p className={styles.name}>营销云·系统</p>
123
+            </div>
124
+          </div>
123
         </div>
125
         </div>
124
-      </LoginContext.Provider>
125
-      </div>
126
+        <LoginContext.Provider value={this.getContext()}>
127
+          <div className={styles.login}>
128
+            <Form onSubmit={this.handleSubmit}>
129
+              {children}
130
+            </Form>
131
+          </div>
132
+        </LoginContext.Provider>
133
+      </>
126
     );
134
     );
127
   }
135
   }
128
 }
136
 }

+ 37
- 17
src/pages/user/login/components/Login/index.less 查看文件

1
 @import '~antd/es/style/themes/default.less';
1
 @import '~antd/es/style/themes/default.less';
2
-.loginBox{
3
-  width:880px;
4
-height:480px;
5
-background:rgba(255,255,255,1);
6
-box-shadow:0px 2px 14px 4px rgba(0,0,0,0.12);
7
-border-radius:30px;
8
-margin: 16vh auto;
9
-.leftBox{
10
-  width:440px;
11
-height:480px;
12
-background:linear-gradient(180deg,rgba(108,193,216,1) 0%,rgba(54,141,212,1) 100%);
13
-border-radius:30px 0px 0px 30px;
14
-display: inline-block;
15
-}
2
+
3
+.topBox{
4
+height:42vh;
5
+background-color: #DB3C4B;
6
+position: relative;
7
+  .con{
8
+    position: absolute;
9
+    left:50%;
10
+    top:50%;
11
+    margin-top: -100px;
12
+    margin-left: -136px;
13
+    text-align: center;
14
+    height: 200px;
15
+    width: 272px;
16
+    overflow: hidden;
17
+    .welcome{
18
+      color: #fff;
19
+      font-size: 60px;
20
+      font-style: italic;
21
+      margin-bottom: 0;
22
+    }
23
+    .title{
24
+      width: 260px;
25
+      height: 102px;
26
+      border:1px solid #fff;
27
+      text-align: left;
28
+      color:#fff;
29
+      padding: 14px  20px;
30
+      margin:  0 auto;
31
+      .name{
32
+        font-size: 40px;
33
+        margin:0; 
34
+      }
35
+    }
36
+    }
16
 }
37
 }
17
 .login {
38
 .login {
18
   background-color: #fff;
39
   background-color: #fff;
19
-  width:440px;
40
+  width:580px;
20
   height:480px;
41
   height:480px;
21
   padding:120px 50px;
42
   padding:120px 50px;
22
   border-radius:0px 30px 30px 0px;
43
   border-radius:0px 30px 30px 0px;
23
- float: right;
44
+  margin: 0 auto;
24
   :global {
45
   :global {
25
     .ant-tabs .ant-tabs-bar {
46
     .ant-tabs .ant-tabs-bar {
26
       margin-bottom: 24px;
47
       margin-bottom: 24px;
27
       text-align: center;
48
       text-align: center;
28
       border-bottom: 0;
49
       border-bottom: 0;
29
     }
50
     }
30
-
31
     .ant-form-item {
51
     .ant-form-item {
32
       margin: 0 2px 24px;
52
       margin: 0 2px 24px;
33
     }
53
     }

+ 4
- 0
src/services/apis.js 查看文件

34
       method: 'POST',
34
       method: 'POST',
35
       url: `${prefix}/tdBuildingType`,
35
       url: `${prefix}/tdBuildingType`,
36
     },
36
     },
37
+    getById: {
38
+      method: 'GET',
39
+      url: `${prefix}/tdBuildingType/id`,
40
+    },
37
   },
41
   },
38
 }
42
 }