Bläddra i källkod

Merge branch 'master' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager

魏熙美 5 år sedan
förälder
incheckning
7cadd36024

+ 1
- 2
config/config.js Visa fil

328
 
328
 
329
   proxy: {
329
   proxy: {
330
     '/api/': {
330
     '/api/': {
331
-      target: 'http://localhost:8080/',
331
+      target: 'http://192.168.0.84:8080/',
332
       changeOrigin: true,
332
       changeOrigin: true,
333
       // pathRewrite: { '^/server': '' },
333
       // pathRewrite: { '^/server': '' },
334
     },
334
     },
335
   },
335
   },
336
-
337
 };
336
 };

+ 40
- 0
src/components/SelectButton/BuildSelect.jsx Visa fil

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 Visa fil

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
   )

+ 2
- 2
src/global.less Visa fil

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
 }

+ 1
- 9
src/layouts/UserLayout.less Visa fil

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 Visa fil

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 Visa fil

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 Visa fil

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
   );

+ 47
- 25
src/pages/channel/addChannel.jsx Visa fil

1
-import React from 'react';
2
-import { Form, Select, Input, Button } from 'antd';
1
+import React, { useState, useEffect } from 'react';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Form, Alert } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import channels from './channelList.less';
4
 import channels from './channelList.less';
5
+import router from 'umi/router';
6
+import request from '../../utils/request'
4
 
7
 
5
 const { TextArea } = Input;
8
 const { TextArea } = Input;
6
 const { Option } = Select;
9
 const { Option } = Select;
7
 
10
 
8
-class App extends React.Component {
9
-  handleSubmit = e => {
11
+const header = props => {
12
+  // eslint-disable-next-line react-hooks/rules-of-hooks
13
+  const [data, setData] = useState({ channelNmae: [], result: [] })
14
+  // eslint-disable-next-line react-hooks/rules-of-hooks
15
+
16
+  // useEffect(() => {
17
+  //   addChannel({ pageNum: 1, pageSize: 10 })
18
+  // }, [])
19
+
20
+  function addChannel(params) {
21
+      request({
22
+        url: '/api/admin/channel',
23
+        method: 'POST',
24
+        data: { ...params },
25
+    // eslint-disable-next-line no-shadow
26
+    }).then(data => {
27
+        console.log(data)
28
+        setData(data)
29
+         // eslint-disable-next-line no-unused-expressions
30
+         router.go(-1)
31
+    })
32
+  }
33
+
34
+  function handleSubmit(e) {
10
     e.preventDefault();
35
     e.preventDefault();
11
-    this.props.form.validateFields((err, values) => {
12
-      console.log('Form.Item', values.note)
36
+    props.form.validateFields((err, values) => {
13
       if (!err) {
37
       if (!err) {
14
-       alert('Received values of form: ', values);
38
+        console.log('Received values of form: ', values);
39
+        // eslint-disable-next-line max-len
40
+        addChannel({ channelName: values.channelName, channelContact: values.channelContact, contactTel: values.contactTel })
15
       }
41
       }
16
     });
42
     });
17
-  };
43
+  }
44
+
45
+  const { getFieldDecorator } = props.form;
18
 
46
 
19
-  render() {
20
-    const { getFieldDecorator } = this.props.form;
21
-    return (
22
-      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={this.handleSubmit}>
47
+  return (
48
+  <>
49
+        <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
23
         <Form.Item label="渠道名称">
50
         <Form.Item label="渠道名称">
24
-          {getFieldDecorator('note', {
51
+          {getFieldDecorator('channelName', {
25
             rules: [{ required: true, message: '请输入渠道名称' }],
52
             rules: [{ required: true, message: '请输入渠道名称' }],
26
           })(<Input className={channels.inpuit} / >)}
53
           })(<Input className={channels.inpuit} / >)}
27
         </Form.Item>
54
         </Form.Item>
28
         <Form.Item label="联系人">
55
         <Form.Item label="联系人">
29
-          {getFieldDecorator('note2', {
56
+          {getFieldDecorator('channelContact', {
30
             rules: [{ required: true, message: ' 请输入联系人' }],
57
             rules: [{ required: true, message: ' 请输入联系人' }],
31
           })(<Input className={channels.inpuit} />)}
58
           })(<Input className={channels.inpuit} />)}
32
         </Form.Item>
59
         </Form.Item>
33
         <Form.Item label="联系电话">
60
         <Form.Item label="联系电话">
34
-          {getFieldDecorator('note3', {
61
+          {getFieldDecorator('contactTel', {
35
             rules: [{ required: true, message: '请输入联系电话' }],
62
             rules: [{ required: true, message: '请输入联系电话' }],
36
           })(<Input className={channels.inpuit} />)}
63
           })(<Input className={channels.inpuit} />)}
37
         </Form.Item>
64
         </Form.Item>
42
           <Button type="primary" htmlType="submit">
69
           <Button type="primary" htmlType="submit">
43
             保存
70
             保存
44
           </Button>
71
           </Button>
45
-          <Button className={channels.formButton} type="primary" htmlType="submit">
72
+          <Button className={channels.formButton} onClick = {() => router.go(-1)} type="primary" htmlType="submit">
46
             取消
73
             取消
47
           </Button>
74
           </Button>
48
         </Form.Item>
75
         </Form.Item>
49
       </Form>
76
       </Form>
50
-    );
51
-  }
77
+  </>
78
+)
52
 }
79
 }
53
 
80
 
54
-const WrappedApp = Form.create({ name: 'coordinated' })(App);
55
-
56
-export default () => (
57
-  <>
58
-    <WrappedApp />
59
-  </>
60
-);
81
+const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);
82
+export default WrappedNormalLoginForm

+ 60
- 29
src/pages/channel/brokerList.jsx Visa fil

1
-import React from 'react';
1
+import React, { useState, useEffect } from 'react';
2
 import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
2
 import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import channels from './channelList.less';
4
 import channels from './channelList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
+import request from '../../utils/request'
6
 
7
 
7
 const { Option } = Select;
8
 const { Option } = Select;
8
 function handleChange(value) {
9
 function handleChange(value) {
26
     </Menu.Item>
27
     </Menu.Item>
27
   </Menu>
28
   </Menu>
28
 );
29
 );
29
-const dataSource = [
30
-  {
31
-    key: '1',
32
-    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
33
-    name: '123',
34
-    age: 32,
35
-    address: '西湖区湖底公园1号',
36
-  },
37
-  {
38
-    key: '2',
39
-    img: '',
40
-    age: 42,
41
-    address: '西湖区湖底公园1号',
42
-  },
43
-];
30
+// const dataSource = [
31
+//   {
32
+//     key: '1',
33
+//     img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
34
+//     name: '123',
35
+//     age: 32,
36
+//     address: '西湖区湖底公园1号',
37
+//   },
38
+//   {
39
+//     key: '2',
40
+//     img: '',
41
+//     age: 42,
42
+//     address: '西湖区湖底公园1号',
43
+//   },
44
+// ];
44
 
45
 
45
 const columns = [
46
 const columns = [
46
   {
47
   {
47
     title: '头像',
48
     title: '头像',
48
-    dataIndex: 'img',
49
-    key: 'img',
49
+    dataIndex: 'avatarurl',
50
+    key: 'avatarurl',
50
     align: 'center',
51
     align: 'center',
51
 
52
 
52
-    render: (text, record) => <img src={record.img} className={channels.touxiang} />,
53
+    // eslint-disable-next-line jsx-a11y/alt-text
54
+    render: (text, record) => <img src={record.avatarurl }/>,
53
   },
55
   },
54
   {
56
   {
55
     title: '用户姓名',
57
     title: '用户姓名',
56
     dataIndex: 'name',
58
     dataIndex: 'name',
57
     key: 'name',
59
     key: 'name',
58
     align: 'center',
60
     align: 'center',
59
-    render: text => <a>{text}</a>,
60
   },
61
   },
61
   {
62
   {
62
     title: '电话',
63
     title: '电话',
63
-    dataIndex: 'integral',
64
-    key: 'integral',
64
+    dataIndex: 'tel',
65
+    key: 'tel',
65
     align: 'center',
66
     align: 'center',
66
   },
67
   },
67
   {
68
   {
68
     title: '性别',
69
     title: '性别',
69
-    dataIndex: 'total',
70
-    key: 'total',
70
+    dataIndex: 'sex',
71
+    key: 'sex',
71
     align: 'center',
72
     align: 'center',
72
   },
73
   },
73
   {
74
   {
74
     title: '推荐客户',
75
     title: '推荐客户',
75
-    dataIndex: 'exchanged',
76
-    key: 'exchanged',
76
+    dataIndex: 'recommendCount',
77
+    key: 'recommendCount',
77
     align: 'center',
78
     align: 'center',
78
   },
79
   },
79
   {
80
   {
93
     },
94
     },
94
   });
95
   });
95
 }
96
 }
96
-export default () => (
97
+const header = props => {
98
+  // eslint-disable-next-line react-hooks/rules-of-hooks
99
+  const [data, setData] = useState({})
100
+//   const [page, changePage] = useState({})
101
+  // eslint-disable-next-line react-hooks/rules-of-hooks
102
+  useEffect(() => {
103
+    request({
104
+        url: '/api/admin/channel/broker',
105
+        method: 'GET',
106
+        params: { pageNum: 1, pageSize: 10 },
107
+    // eslint-disable-next-line no-shadow
108
+    }).then(data => {
109
+        console.log(data)
110
+        setData(data)
111
+    })
112
+  }, [])
113
+
114
+  const getList = e => {
115
+    request({
116
+        url: '/api/xxx',
117
+        method: 'GET',
118
+        params: {},
119
+    // eslint-disable-next-line no-shadow
120
+    }).then(data => {
121
+        setData(data)
122
+    })
123
+  }
124
+
125
+return (
97
   <>
126
   <>
98
     <div className={ channels.searchBox }>
127
     <div className={ channels.searchBox }>
99
       <div>
128
       <div>
104
       </div>
133
       </div>
105
       <Button className={channels.about}>查询</Button>
134
       <Button className={channels.about}>查询</Button>
106
     </div>
135
     </div>
107
-    <Table dataSource={dataSource} columns={columns} />
136
+    <Table dataSource={data.records} columns={columns} />
108
   </>
137
   </>
109
-);
138
+)
139
+}
110
 
140
 
111
 function handleMenuClick(e) {
141
 function handleMenuClick(e) {
112
   message.info('Click on menu item.');
142
   message.info('Click on menu item.');
113
   console.log('click', e);
143
   console.log('click', e);
114
 }
144
 }
145
+export default header

+ 96
- 77
src/pages/channel/channelList.jsx Visa fil

1
-import React from 'react';
1
+import React, { useState, useEffect } from 'react';
2
 import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
2
 import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import channels from './channelList.less';
4
 import channels from './channelList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
+import request from '../../utils/request'
6
 
7
 
7
 const { Option } = Select;
8
 const { Option } = Select;
8
-function handleChange(value) {
9
-  console.log(`selected ${value}`);
10
-}
11
-
12
 
9
 
13
-const menu = (
14
-  <Menu onClick={handleMenuClick}>
15
-    <Menu.Item key="1">
16
-      <Icon type="user" />
17
-      1st menu item
18
-    </Menu.Item>
19
-    <Menu.Item key="2">
20
-      <Icon type="user" />
21
-      2nd menu item
22
-    </Menu.Item>
23
-    <Menu.Item key="3">
24
-      <Icon type="user" />
25
-      3rd item
26
-    </Menu.Item>
27
-  </Menu>
28
-);
29
-const dataSource = [
30
-  {
31
-    key: '1',
32
-    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
33
-    name: '123',
34
-    age: 32,
35
-    address: '西湖区湖底公园1号',
36
-  },
37
-  {
38
-    key: '2',
39
-    img: '',
40
-    age: 42,
41
-    address: '西湖区湖底公园1号',
42
-  },
43
-];
10
+// const dataSource = [
11
+//   {
12
+//     key: '1',
13
+//     img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
14
+//     name: '123',
15
+//     age: 32,
16
+//     address: '西湖区湖底公园1号',
17
+//   },
18
+//   {
19
+//     key: '2',
20
+//     img: '',
21
+//     age: 42,
22
+//     address: '西湖区湖底公园1号',
23
+//   },
24
+// ];
44
 
25
 
45
 const columns = [
26
 const columns = [
46
   // {
27
   // {
53
   // },
34
   // },
54
   {
35
   {
55
     title: '渠道代码',
36
     title: '渠道代码',
56
-    dataIndex: 'name',
57
-    key: 'name',
37
+    dataIndex: 'channelCode',
38
+    key: 'channelCode',
58
     align: 'center',
39
     align: 'center',
59
     render: text => <a>{text}</a>,
40
     render: text => <a>{text}</a>,
60
   },
41
   },
61
   {
42
   {
62
     title: '渠道名称',
43
     title: '渠道名称',
63
-    dataIndex: 'integral',
64
-    key: 'integral',
44
+    dataIndex: 'channelName',
45
+    key: 'channelName',
65
     align: 'center',
46
     align: 'center',
66
   },
47
   },
67
   {
48
   {
68
     title: '联系人',
49
     title: '联系人',
69
-    dataIndex: 'total',
70
-    key: 'total',
50
+    dataIndex: 'channelContact',
51
+    key: 'channelContact',
71
     align: 'center',
52
     align: 'center',
72
   },
53
   },
73
   {
54
   {
74
     title: '联系电话',
55
     title: '联系电话',
75
-    dataIndex: 'exchanged',
76
-    key: 'exchanged',
56
+    dataIndex: 'contactTel',
57
+    key: 'contactTel',
77
     align: 'center',
58
     align: 'center',
78
   },
59
   },
79
   {
60
   {
80
-    title: '经纪人',
81
-    dataIndex: 'rest',
82
-    key: 'rest',
61
+    title: '经纪人',
62
+    dataIndex: 'agentsNum',
63
+    key: 'agentsNum',
83
     align: 'center',
64
     align: 'center',
84
   },
65
   },
85
   {
66
   {
86
     title: '推荐客户有效',
67
     title: '推荐客户有效',
87
-    dataIndex: 'state',
88
-    key: 'state',
68
+    dataIndex: 'recommendEffective',
69
+    key: 'recommendEffective',
89
     align: 'center',
70
     align: 'center',
90
   },
71
   },
91
   {
72
   {
92
     title: '邀请经济人',
73
     title: '邀请经济人',
93
-    dataIndex: 'handle',
94
-    key: 'handle',
74
+    dataIndex: 'agentsInvite',
75
+    key: 'agentsInvite',
95
     align: 'center',
76
     align: 'center',
96
-    render: () => <a>Delete</a>,
77
+    // render: () => <a>Delete</a>,
97
   },
78
   },
98
   {
79
   {
99
     title: '操作',
80
     title: '操作',
100
-    dataIndex: 'handle',
101
-    key: 'handle',
81
+    dataIndex: '',
82
+    key: '',
102
     align: 'center',
83
     align: 'center',
103
     render: () => <a style={ { color: '#66B3FF' } }>编辑</a>,
84
     render: () => <a style={ { color: '#66B3FF' } }>编辑</a>,
104
   },
85
   },
113
     },
94
     },
114
   });
95
   });
115
 }
96
 }
116
-export default () => (
117
-  <>
118
-    <div className={channels.searchBox}>
119
-      <dvi>
120
-        <span className={channels.selectName}>渠道名称</span>
121
-        <Select defaultValue="lucy" style={{ width: 180 }} onChange={handleChange}>
122
-          <Option value="jack">Jack</Option>
123
-          <Option value="lucy">Lucy</Option>
124
-          <Option value="disabled" disabled>
125
-            Disabled
126
-          </Option>
127
-          <Option value="Yiminghe">yiminghe</Option>
128
-        </Select>
129
-      </dvi>
130
-      <Button className={channels.about}>查询</Button>
131
-    </div>
132
-    <Button className={channels.addBtn} onClick={toEditGoods}>新增</Button>
133
-    <Table dataSource={dataSource} columns={columns} />
134
-  </>
135
-);
136
 
97
 
137
-function handleMenuClick(e) {
138
-  message.info('Click on menu item.');
139
-  console.log('click', e);
98
+const header = props => {
99
+  // eslint-disable-next-line react-hooks/rules-of-hooks
100
+  const [data, setData] = useState({ channelNmae: [], result: [] })
101
+  // eslint-disable-next-line react-hooks/rules-of-hooks
102
+  // const [queryData, setQueryData] = useState({ pageNum: 1, pageSize: 10 })
103
+  //   const [page, changePage] = useState({})
104
+  // eslint-disable-next-line react-hooks/rules-of-hooks
105
+  useEffect(() => {
106
+    getList({ pageNum: 1, pageSize: 10 })
107
+  }, [])
108
+
109
+  function getList(params) {
110
+    request({
111
+      url: '/api/admin/channel',
112
+      method: 'GET',
113
+      params: { ...params },
114
+  // eslint-disable-next-line no-shadow
115
+  }).then(data => {
116
+      console.log(data)
117
+      setData(data)
118
+  })
119
+  }
120
+  // value 的值
121
+  function handleChange(value) {
122
+    // setQueryData({ ...queryData, channelId: value });
123
+    localStorage.setItem('value', value);
124
+  }
125
+  // 查询
126
+  function queryList() {
127
+    getList({ pageNum: 1, pageSize: 10, channelId: localStorage.getItem('value') })
128
+  }
129
+ // 重置
130
+ function reset() {
131
+  getList({ pageNum: 1, pageSize: 10 })
132
+ }
133
+  return (
134
+    <>
135
+      <div className={channels.searchBox}>
136
+        <dvi>
137
+          <span className={channels.selectName}>渠道名称</span>
138
+          <Select defaultValue="请选择" style={{ width: 180 }} onChange={handleChange}>
139
+          <option value="">全部</option>
140
+              {data.channelNmae.map(Item =>
141
+                <Option value={ Item.channelId }> { Item.channelName } </Option>,
142
+              )}
143
+              {/* {listItems} */}
144
+          </Select>
145
+
146
+        </dvi>
147
+        <div >
148
+        <Button style ={{ backgroundColor: '#00bfff' } } onClick={() => queryList() }>查询</Button>
149
+        <Button onClick={() => reset() }>重置</Button>
150
+        </div>
151
+      </div>
152
+      <Button className={channels.addBtn} onClick={toEditGoods}>新增</Button>
153
+      <Table dataSource={data.result.records} columns={columns} />
154
+  </>
155
+  )
140
 }
156
 }
157
+
158
+
159
+export default header

+ 50
- 17
src/pages/channel/recommendClients.jsx Visa fil

1
-import React from 'react';
1
+import React, { useState, useEffect } from 'react';
2
 import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
2
 import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import channels from './channelList.less';
4
 import channels from './channelList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
+import request from '../../utils/request'
6
 
7
 
7
 const { Option } = Select;
8
 const { Option } = Select;
8
 function handleChange(value) {
9
 function handleChange(value) {
45
 const columns = [
46
 const columns = [
46
   {
47
   {
47
     title: '头像',
48
     title: '头像',
48
-    dataIndex: 'img',
49
-    key: 'img',
49
+    // dataIndex: 'img',
50
+    // key: 'img',
50
     align: 'center',
51
     align: 'center',
51
 
52
 
52
-    render: (text, record) => <img src={record.img} className={channels.touxiang} />,
53
+    render: (text, record) => <img src={record.picture} className={channels.touxiang} />,
53
   },
54
   },
54
   {
55
   {
55
     title: '用户姓名',
56
     title: '用户姓名',
60
   },
61
   },
61
   {
62
   {
62
     title: '电话',
63
     title: '电话',
63
-    dataIndex: 'integral',
64
-    key: 'integral',
64
+    dataIndex: 'recommendTel',
65
+    key: 'recommendTel',
65
     align: 'center',
66
     align: 'center',
66
   },
67
   },
67
   {
68
   {
68
     title: '性别',
69
     title: '性别',
69
-    dataIndex: 'total',
70
-    key: 'total',
70
+    dataIndex: 'sex',
71
+    key: 'sex',
71
     align: 'center',
72
     align: 'center',
72
   },
73
   },
73
   {
74
   {
74
     title: '意向项目',
75
     title: '意向项目',
75
-    dataIndex: 'exchanged',
76
-    key: 'exchanged',
76
+    dataIndex: 'intention',
77
+    key: 'intention',
77
     align: 'center',
78
     align: 'center',
78
   },
79
   },
79
   {
80
   {
80
     title: '推荐时间',
81
     title: '推荐时间',
81
-    dataIndex: 'rest',
82
-    key: 'rest',
82
+    dataIndex: 'createDate',
83
+    key: 'createDate',
83
     align: 'center',
84
     align: 'center',
84
   },
85
   },
85
   {
86
   {
86
     title: '状态',
87
     title: '状态',
87
-    dataIndex: 'rest',
88
-    key: 'rest',
88
+    dataIndex: 'status',
89
+    key: 'status',
89
     align: 'center',
90
     align: 'center',
90
   },
91
   },
91
 ];
92
 ];
99
     },
100
     },
100
   });
101
   });
101
 }
102
 }
102
-export default () => (
103
-    <Table dataSource={dataSource} columns={columns} />
104
-);
103
+const header = props => {
104
+  // eslint-disable-next-line react-hooks/rules-of-hooks
105
+  const [data, setData] = useState({})
106
+//   const [page, changePage] = useState({})
107
+  // eslint-disable-next-line react-hooks/rules-of-hooks
108
+  useEffect(() => {
109
+    request({
110
+        url: '/api/admin/customer/recommend/recommender',
111
+        method: 'GET',
112
+        params: { pageNum: 1, pageSize: 10 },
113
+    // eslint-disable-next-line no-shadow
114
+    }).then(data => {
115
+        console.log(data)
116
+        setData(data)
117
+    })
118
+  }, [])
119
+
120
+  const getList = e => {
121
+    request({
122
+        url: '/api/xxx',
123
+        method: 'GET',
124
+        params: {},
125
+    // eslint-disable-next-line no-shadow
126
+    }).then(data => {
127
+        setData(data)
128
+    })
129
+  }
130
+
131
+return (
132
+  <>
133
+    <Table dataSource={data.records} columns={columns} />
134
+  </>
135
+)
136
+}
105
 
137
 
106
 function handleMenuClick(e) {
138
 function handleMenuClick(e) {
107
   message.info('Click on menu item.');
139
   message.info('Click on menu item.');
108
   console.log('click', e);
140
   console.log('click', e);
109
 }
141
 }
142
+export default header

+ 1
- 1
src/pages/integralMall/GoodsList.jsx Visa fil

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() {

+ 8
- 8
src/pages/style/GoodsList.less Visa fil

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;

+ 1
- 1
src/pages/user/login/components/Login/LoginSubmit.jsx Visa fil

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 Visa fil

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 Visa fil

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
     }