魏熙美 5 years ago
parent
commit
4b888aa5d8

+ 40
- 4
config/config.js View File

149
                   name: '客户列表',
149
                   name: '客户列表',
150
                   component: './customer/customerlist/index',
150
                   component: './customer/customerlist/index',
151
                 },
151
                 },
152
+                {
153
+                  path: '/customer/customerlist/customerDetail',
154
+                  name: '',
155
+                  component: './customer/customerlist/customerDetail',
156
+                },
152
                 {
157
                 {
153
                   path: '/customer/drift/list',
158
                   path: '/customer/drift/list',
154
                   name: '游客列表',
159
                   name: '游客列表',
270
                   name: '资讯列表',
275
                   name: '资讯列表',
271
                   component: './news/list/NewsList',
276
                   component: './news/list/NewsList',
272
                 },
277
                 },
278
+                {
279
+                  path: '/news/list/editNewsList',
280
+                  name: '',
281
+                  component: './news/list/editNewsList',
282
+                },
273
               ],
283
               ],
274
             },
284
             },
275
             {
285
             {
294
                 },
304
                 },
295
               ],
305
               ],
296
             },
306
             },
297
-
298
             {
307
             {
299
               path: '/staff',
308
               path: '/staff',
300
               name: '员工管理',
309
               name: '员工管理',
310
                   name: '',
319
                   name: '',
311
                   component: './staff/list/editStaff',
320
                   component: './staff/list/editStaff',
312
                 },
321
                 },
313
-             
322
+
314
                 {
323
                 {
315
                   path: '/staff/RoleList',
324
                   path: '/staff/RoleList',
316
                   name: '角色管理',
325
                   name: '角色管理',
321
                   name: '',
330
                   name: '',
322
                   component: './staff/list/editRole',
331
                   component: './staff/list/editRole',
323
                 },
332
                 },
324
-             
333
+
334
+              ],
335
+            },
336
+            {
337
+              path: '/carouselFigure',
338
+              name: '轮播图管理',
339
+              component: '../layouts/BlankLayout',
340
+              routes: [
341
+                {
342
+                  path: '/carouselFigure/carouselFigureList',
343
+                  name: '轮播图列表',
344
+                  component: './carouselFigure/carouselFigureList',
345
+                },
346
+                {
347
+                  path: '/carouselFigure/editCarousel',
348
+                  name: '',
349
+                  component: './carouselFigure/editCarousel',
350
+                },
351
+                {
352
+                  path: '/carouselFigure/advertisingList',
353
+                  name: '开屏广告',
354
+                  component: './carouselFigure/advertisingList',
355
+                },
356
+                {
357
+                  path: '/carouselFigure/editAdvertising',
358
+                  name: '',
359
+                  component: './carouselFigure/editAdvertising',
360
+                },
325
               ],
361
               ],
326
             },
362
             },
327
             {
363
             {
387
 
423
 
388
   proxy: {
424
   proxy: {
389
     '/api/': {
425
     '/api/': {
390
-      target: 'http://192.168.0.11:8080/',
426
+      target: 'http://127.0.0.1:8080/',
391
       changeOrigin: true,
427
       changeOrigin: true,
392
       // pathRewrite: { '^/server': '' },
428
       // pathRewrite: { '^/server': '' },
393
     },
429
     },

+ 4
- 4
src/components/EchartsTest/index.jsx View File

3
 // 引入 ECharts 主模块
3
 // 引入 ECharts 主模块
4
 import echarts from 'echarts/lib/echarts';
4
 import echarts from 'echarts/lib/echarts';
5
 // 引入柱状图
5
 // 引入柱状图
6
-import  'echarts/lib/chart/bar';
6
+import 'echarts/lib/chart/bar';
7
 // 引入提示框和标题组件
7
 // 引入提示框和标题组件
8
 import 'echarts/lib/component/tooltip';
8
 import 'echarts/lib/component/tooltip';
9
 import 'echarts/lib/component/title';
9
 import 'echarts/lib/component/title';
10
 class Chart extends Component {
10
 class Chart extends Component {
11
 
11
 
12
-  render() { 
13
-    return ( <div></div> );
12
+  render() {
13
+    return (<div></div>);
14
   }
14
   }
15
 }
15
 }
16
- 
16
+
17
 export default Chart;
17
 export default Chart;

+ 40
- 0
src/components/SelectButton/NewTypeSelect.jsx View File

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 NewsTypeSelect = (props) => {
15
+  const [ data, setData ] = useState([])
16
+
17
+  useEffect(() => {
18
+    getCityList();
19
+  },[])
20
+
21
+  const getCityList = (e) => {
22
+    request({
23
+        url: '/api/admin/taNewsType',
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(type => (
34
+            <Option key={type.newsTypeId}>{type.newsTypeName}</Option>
35
+          ))}
36
+      </Select>
37
+  )
38
+}
39
+export default NewsTypeSelect
40
+

+ 1
- 0
src/components/Wangedit/Wangedit.jsx View File

32
         this.props.onChange(html)
32
         this.props.onChange(html)
33
       }
33
       }
34
     }
34
     }
35
+    this.editor.customConfig.zIndex = 100
35
     this.editor.create()
36
     this.editor.create()
36
     this.editor.txt.html(this.props.value)
37
     this.editor.txt.html(this.props.value)
37
   }
38
   }

+ 10
- 0
src/global.less View File

110
 }
110
 }
111
 .ant-table{
111
 .ant-table{
112
   line-height: 3;
112
   line-height: 3;
113
+}
114
+.ant-modal-header{
115
+  border-bottom: none;
116
+  .ant-modal-title{
117
+    font-size: 24px;
118
+    line-height: 50px;
119
+  }
120
+}
121
+.ant-modal-footer{
122
+  border-top:none;
113
 }
123
 }

+ 230
- 0
src/pages/carouselFigure/advertisingList.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } 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 moment from 'moment';
7
+import SelectCity from '../../components/SelectButton/CitySelect'
8
+import BuildSelect from '../../components/SelectButton/BuildSelect'
9
+
10
+import request from '../../utils/request'
11
+
12
+const { Option } = Select;
13
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
+
15
+const header = (props) => {
16
+  const [ data, setData ] = useState({})
17
+//   const [page, changePage] = useState({})
18
+
19
+  useEffect(() => {
20
+    getList({ pageNum: 1, pageSize: 10, showType: 'screen' });
21
+  },[])
22
+
23
+  // 查询列表
24
+  const getList = (params) => {
25
+    request({
26
+        url: '/api/admin/extendContent',
27
+        method: 'GET',
28
+        params: { ...params },
29
+    }).then((data) => {
30
+        console.log(data)
31
+        setData(data)
32
+    })
33
+  }
34
+
35
+  
36
+// 跳转到编辑商品
37
+const toEdit = (contentId) => () => {
38
+    router.push({
39
+      pathname: '/carouselFigure/editAdvertising',
40
+      query: {
41
+        contentId
42
+      },
43
+    });
44
+  }
45
+  
46
+  const columns = [
47
+    {
48
+      title: '主图',
49
+      dataIndex: 'image',
50
+      key: 'image',
51
+      align: 'center',
52
+      render: (image) => <img src={image} className={styles.touxiang} />,
53
+    },
54
+    {
55
+      title: '类型',
56
+      dataIndex: 'contentType',
57
+      key: 'contentType',
58
+      align: 'center',
59
+      render: (contentType) => <span>{ contentType === 'project' ? '项目' : contentType === 'activity' ? '活动' : contentType === 'news' ? '资讯' : contentType === 'other' ? '其他' : '' }</span>
60
+    },
61
+    {
62
+      title: '发布位置',
63
+      dataIndex: 'showPosition',
64
+      key: 'showPosition',
65
+      align: 'center',
66
+      render: (showPosition) => <span>{ showPosition === 'index' ? '首页' : showPosition === 'mall' ? '商城' : '' }</span>
67
+    },
68
+    {
69
+      title: '发布时间',
70
+      dataIndex: 'createDate',
71
+      key: 'createDate',
72
+      align: 'center',
73
+      render: (x, row) => <><span>{moment(row.createDate).format('YYYY-MM-DD')}</span></>
74
+    },
75
+    {
76
+      title: '状态',
77
+      dataIndex: 'status',
78
+      key: 'status',
79
+      align: 'center',
80
+      render: (status)=> <><span>{status == 1 ? '启用' : '停用'}</span></>
81
+    },
82
+    {
83
+      title: '操作',
84
+      dataIndex: 'handle',
85
+      key: 'handle',
86
+      align: 'center',
87
+      render: (x,row) => <>
88
+                           <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={changeStatus(row)}>{ row.status === 1 ? '禁用' : '启用' }<Icon type="vertical-align-top" className={styles.edit} /></span>
89
+                           <span style={{ color: '#FF925C' }} onClick={toEdit(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
90
+                         </>
91
+    },
92
+  ];
93
+  
94
+  const finishDynamic = (row) => {
95
+      Modal.confirm({
96
+          title: '结束以后将无法编辑, 是否继续?',
97
+          okText: '确定',
98
+          cancelText: '取消',
99
+          onOk() {
100
+              request({
101
+                  url: '/api/admin/buildingDynamic/finish',
102
+                  method: 'PUT',
103
+                  data: {dynamicId: row.dynamicId, top: ""},
104
+              }).then((data) => {
105
+                  console.log(data)
106
+                  message.info('操作成功!')
107
+                  getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
108
+              }).catch((err) => {
109
+                  console.log(err)
110
+                  message.info(err.msg || err.message)
111
+              })
112
+          },
113
+        });
114
+  }
115
+  
116
+//   停用启用
117
+  const changeStatus = (row) => () => {
118
+      console.log(row)
119
+      if(row.status === 0) {
120
+        row.status = 1
121
+        Modal.confirm({
122
+          title: '确认发布此数据?',
123
+          okText: '确定',
124
+          cancelText: '取消',
125
+          onOk() {
126
+              request({
127
+                  url: '/api/admin/extendContent/'+row.contentId,
128
+                  method: 'PUT',
129
+                  data: row,
130
+              }).then((data) => {
131
+                  message.info('操作成功!')
132
+                  getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
133
+              }).catch((err) => {
134
+                  console.log(err)
135
+                  message.info(err.msg || err.message)
136
+              })
137
+          },
138
+        });
139
+      }else if(row.status === 1){
140
+        row.status = 0
141
+        Modal.confirm({
142
+          title: '确认停用此轮播图?',
143
+          okText: '确定',
144
+          cancelText: '取消',
145
+          onOk() {
146
+              request({
147
+                  url: '/api/admin/extendContent/'+row.contentId,
148
+                  method: 'PUT',
149
+                  data: row,
150
+              }).then((data) => {
151
+                  message.info('操作成功!')
152
+                  getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
153
+              }).catch((err) => {
154
+                  console.log(err)
155
+                  message.info(err.msg || err.message)
156
+              })
157
+          },
158
+        });
159
+      }
160
+
161
+  }
162
+  
163
+  const changePageNum = (pageNumber) => {
164
+      getList({ pageNum: pageNumber, pageSize: 10, showType: 'screen' })
165
+  }
166
+
167
+  // 提交事件
168
+const handleSubmit = (e, props) => {
169
+    e.preventDefault();
170
+    props.form.validateFields((err, values) => {
171
+      if (!err) {
172
+        console.log('提交数据: ', values)
173
+        getList({ pageNum: 1, pageSize: 10, ...values, showType: 'screen' })
174
+      }
175
+    });
176
+  }
177
+
178
+  const { getFieldDecorator } = props.form
179
+  return (
180
+
181
+    <>
182
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
183
+        <Form.Item>
184
+          {getFieldDecorator('buildingId')(
185
+            <BuildSelect />,
186
+          )}
187
+        </Form.Item>
188
+        <Form.Item>
189
+          {getFieldDecorator('contentType')(
190
+            <Select style={{ width: '180px' }} placeholder="类型">
191
+              <Option value="activity">活动</Option>
192
+              <Option value="project">项目</Option>
193
+              <Option value="news">资讯</Option>
194
+              <Option value="other">其他</Option>
195
+            </Select>,
196
+          )}
197
+        </Form.Item>
198
+        <Form.Item>
199
+          {getFieldDecorator('showPosition')(
200
+            <Select style={{ width: '180px' }} placeholder="发布位置">
201
+              <Option value="mall">商城</Option>
202
+              <Option value="index">首页</Option>
203
+            </Select>,
204
+          )}
205
+        </Form.Item>
206
+        <Form.Item>
207
+          {getFieldDecorator('status')(
208
+            <Select style={{ width: '180px' }} placeholder="状态">
209
+              <Option value="1">启用</Option>
210
+              <Option value="0">停用</Option>
211
+            </Select>,
212
+          )}
213
+        </Form.Item>
214
+        <Form.Item>
215
+          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
216
+            搜索
217
+          </Button>
218
+        </Form.Item>
219
+      </Form>
220
+      <Button type="primary" className={styles.addBtn} onClick={toEdit()}>新增</Button>
221
+      <Table dataSource={data.records} columns={columns} pagination={false}/>
222
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
223
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
224
+      </div>
225
+    </>
226
+  )
227
+}
228
+const WrappedHeader = Form.create({ name: 'header' })(header);
229
+
230
+export default WrappedHeader

+ 230
- 0
src/pages/carouselFigure/carouselFigureList.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } 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 moment from 'moment';
7
+import SelectCity from '../../components/SelectButton/CitySelect'
8
+import BuildSelect from '../../components/SelectButton/BuildSelect'
9
+
10
+import request from '../../utils/request'
11
+
12
+const { Option } = Select;
13
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
+
15
+const header = (props) => {
16
+  const [ data, setData ] = useState({})
17
+//   const [page, changePage] = useState({})
18
+
19
+  useEffect(() => {
20
+    getList({ pageNum: 1, pageSize: 10, showType: 'banner' });
21
+  },[])
22
+
23
+  // 查询列表
24
+  const getList = (params) => {
25
+    request({
26
+        url: '/api/admin/extendContent',
27
+        method: 'GET',
28
+        params: { ...params },
29
+    }).then((data) => {
30
+        console.log(data)
31
+        setData(data)
32
+    })
33
+  }
34
+
35
+  
36
+// 跳转到编辑页面
37
+const toEditCarouse = (contentId) => () => {
38
+    router.push({
39
+      pathname: '/carouselFigure/editCarousel',
40
+      query: {
41
+        contentId
42
+      },
43
+    });
44
+  }
45
+  
46
+  const columns = [
47
+    {
48
+      title: '主图',
49
+      dataIndex: 'image',
50
+      key: 'image',
51
+      align: 'center',
52
+      render: (image) => <img src={image} className={styles.touxiang} />,
53
+    },
54
+    {
55
+      title: '类型',
56
+      dataIndex: 'contentType',
57
+      key: 'contentType',
58
+      align: 'center',
59
+      render: (contentType) => <span>{ contentType === 'project' ? '项目' : contentType === 'activity' ? '活动' : contentType === 'news' ? '资讯' : contentType === 'other' ? '其他' : '' }</span>
60
+    },
61
+    {
62
+      title: '发布位置',
63
+      dataIndex: 'showPosition',
64
+      key: 'showPosition',
65
+      align: 'center',
66
+      render: (showPosition) => <span>{ showPosition === 'index' ? '首页' : showPosition === 'mall' ? '商城' : '' }</span>
67
+    },
68
+    {
69
+      title: '发布时间',
70
+      dataIndex: 'createDate',
71
+      key: 'createDate',
72
+      align: 'center',
73
+      render: (x, row) => <><span>{moment(row.createDate).format('YYYY-MM-DD')}</span></>
74
+    },
75
+    {
76
+      title: '状态',
77
+      dataIndex: 'status',
78
+      key: 'status',
79
+      align: 'center',
80
+      render: (status)=> <><span>{status == 1 ? '启用' : '停用'}</span></>
81
+    },
82
+    {
83
+      title: '操作',
84
+      dataIndex: 'handle',
85
+      key: 'handle',
86
+      align: 'center',
87
+      render: (x,row) => <>
88
+                           <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={changeStatus(row)}>{ row.status === 1 ? '禁用' : '启用' }<Icon type="vertical-align-top" className={styles.edit} /></span>
89
+                           <span style={{ color: '#FF925C' }} onClick={toEditCarouse(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
90
+                         </>
91
+    },
92
+  ];
93
+  
94
+  const finishDynamic = (row) => {
95
+      Modal.confirm({
96
+          title: '结束以后将无法编辑, 是否继续?',
97
+          okText: '确定',
98
+          cancelText: '取消',
99
+          onOk() {
100
+              request({
101
+                  url: '/api/admin/buildingDynamic/finish',
102
+                  method: 'PUT',
103
+                  data: {dynamicId: row.dynamicId, top: ""},
104
+              }).then((data) => {
105
+                  console.log(data)
106
+                  message.info('操作成功!')
107
+                  getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
108
+              }).catch((err) => {
109
+                  console.log(err)
110
+                  message.info(err.msg || err.message)
111
+              })
112
+          },
113
+        });
114
+  }
115
+  
116
+//   停用启用
117
+  const changeStatus = (row) => () => {
118
+      console.log(row)
119
+      if(row.status === 0) {
120
+        row.status = 1
121
+        Modal.confirm({
122
+          title: '确认发布此数据?',
123
+          okText: '确定',
124
+          cancelText: '取消',
125
+          onOk() {
126
+              request({
127
+                  url: '/api/admin/extendContent/'+row.contentId,
128
+                  method: 'PUT',
129
+                  data: row,
130
+              }).then((data) => {
131
+                  message.info('操作成功!')
132
+                  getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
133
+              }).catch((err) => {
134
+                  console.log(err)
135
+                  message.info(err.msg || err.message)
136
+              })
137
+          },
138
+        });
139
+      }else if(row.status === 1){
140
+        row.status = 0
141
+        Modal.confirm({
142
+          title: '确认停用此轮播图?',
143
+          okText: '确定',
144
+          cancelText: '取消',
145
+          onOk() {
146
+              request({
147
+                  url: '/api/admin/extendContent/'+row.contentId,
148
+                  method: 'PUT',
149
+                  data: row,
150
+              }).then((data) => {
151
+                  message.info('操作成功!')
152
+                  getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
153
+              }).catch((err) => {
154
+                  console.log(err)
155
+                  message.info(err.msg || err.message)
156
+              })
157
+          },
158
+        });
159
+      }
160
+
161
+  }
162
+  
163
+  const changePageNum = (pageNumber) => {
164
+      getList({ pageNum: pageNumber, pageSize: 10, showType: 'banner' })
165
+  }
166
+
167
+  // 提交事件
168
+const handleSubmit = (e, props) => {
169
+    e.preventDefault();
170
+    props.form.validateFields((err, values) => {
171
+      if (!err) {
172
+        console.log('提交数据: ', values)
173
+        getList({ pageNum: 1, pageSize: 10, ...values, showType: 'banner' })
174
+      }
175
+    });
176
+  }
177
+
178
+  const { getFieldDecorator } = props.form
179
+  return (
180
+
181
+    <>
182
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
183
+        <Form.Item>
184
+          {getFieldDecorator('buildingId')(
185
+            <BuildSelect />,
186
+          )}
187
+        </Form.Item>
188
+        <Form.Item>
189
+          {getFieldDecorator('contentType')(
190
+            <Select style={{ width: '180px' }} placeholder="类型">
191
+              <Option value="activity">活动</Option>
192
+              <Option value="project">项目</Option>
193
+              <Option value="news">资讯</Option>
194
+              <Option value="other">其他</Option>
195
+            </Select>,
196
+          )}
197
+        </Form.Item>
198
+        <Form.Item>
199
+          {getFieldDecorator('showPosition')(
200
+            <Select style={{ width: '180px' }} placeholder="发布位置">
201
+              <Option value="mall">商城</Option>
202
+              <Option value="index">首页</Option>
203
+            </Select>,
204
+          )}
205
+        </Form.Item>
206
+        <Form.Item>
207
+          {getFieldDecorator('status')(
208
+            <Select style={{ width: '180px' }} placeholder="状态">
209
+              <Option value="1">启用</Option>
210
+              <Option value="0">停用</Option>
211
+            </Select>,
212
+          )}
213
+        </Form.Item>
214
+        <Form.Item>
215
+          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
216
+            搜索
217
+          </Button>
218
+        </Form.Item>
219
+      </Form>
220
+      <Button type="primary" className={styles.addBtn} onClick={toEditCarouse()}>新增</Button>
221
+      <Table dataSource={data.records} columns={columns} pagination={false}/>
222
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
223
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
224
+      </div>
225
+    </>
226
+  )
227
+}
228
+const WrappedHeader = Form.create({ name: 'header' })(header);
229
+
230
+export default WrappedHeader

+ 155
- 0
src/pages/carouselFigure/editAdvertising.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker,message } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../style/GoodsList.less';
5
+import moment from 'moment';
6
+import router from 'umi/router';
7
+import BuildSelect from '../../components/SelectButton/BuildSelect'
8
+import XForm, { FieldTypes } from '../../components/XForm';
9
+import Wangedit from '../../components/Wangedit/Wangedit'
10
+import request from '../../utils/request'
11
+
12
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
+/**
14
+ *
15
+ *
16
+ * @param {*} props
17
+ * @returns
18
+ */
19
+ const Edit = (props) => {
20
+  const [ tab, changeTab ] = useState('basic')
21
+  const contentId = props.location.query.contentId
22
+  const [ data, setData ] = useState({})
23
+  if(contentId){
24
+    useEffect(() => {
25
+      getDetail(contentId);
26
+    },[])
27
+
28
+  // 查询列表
29
+  const getDetail = (contentId) => {
30
+    request({
31
+        url: '/api/admin/extendContent/' + contentId,
32
+        method: 'GET',
33
+    }).then((data) => {
34
+        console.log(data)
35
+        setData(data)
36
+    })
37
+  }
38
+  }
39
+
40
+  const cancelPage = () =>{
41
+    router.push({
42
+      pathname: '/carouselFigure/advertisingList',
43
+    });
44
+  }
45
+ 
46
+    const fields = [
47
+      {
48
+        label: '所属项目',
49
+        name: 'buildingId',
50
+        render: <BuildSelect />,
51
+        value: data.buildingId,
52
+      },
53
+      {
54
+        label: '商品图片',
55
+        name: 'image',
56
+        type: FieldTypes.ImageUploader,
57
+        value: data.image,
58
+      },
59
+      {
60
+        label: '标题',
61
+        name: 'title',
62
+        type: FieldTypes.Text,
63
+        value: data.title,
64
+      },
65
+      // {
66
+      //   label: '发布位置',
67
+      //   name: 'showPosition',
68
+      //   type: FieldTypes.Select,
69
+      //   dict: [{
70
+      //     label: '首页',
71
+      //     value: 'index'
72
+      //   },
73
+      //   {
74
+      //     label: '商城',
75
+      //     value: 'mall'
76
+      //   }],
77
+      //   value: data.showPosition,
78
+      // },
79
+      {
80
+        label: '类型',
81
+        name: 'contentType',
82
+        type: FieldTypes.Select,
83
+        dict: [{
84
+          label: '活动',
85
+          value: 'activity'
86
+        },
87
+        {
88
+          label: '项目',
89
+          value: 'project'
90
+        },
91
+        {
92
+          label: '资讯',
93
+          value: 'news'
94
+        },
95
+        {
96
+          label: '其他',
97
+          value: 'other'
98
+        }],
99
+        value: data.contentType,
100
+      },
101
+      // {
102
+      //   label: '发布内容',
103
+      //   name: 'content',
104
+      //   render: <Wangedit />,
105
+      //   value: data.content,
106
+      // },
107
+      {
108
+        label: '状态',
109
+        name: 'status',
110
+        type: FieldTypes.Select,
111
+        dict: [{
112
+          label: "启用",
113
+          value: 1
114
+        },
115
+        {
116
+          label: "停用",
117
+          value: 0
118
+        },],
119
+        value: data.status != null ? data.status : 1,
120
+      },
121
+    ]
122
+  
123
+    const handleSubmit = val => { 
124
+      val.showType = 'screen'
125
+      if(contentId){
126
+        request({
127
+          url: '/api/admin/extendContent/'+contentId,
128
+          method: 'PUT',
129
+          data: val,
130
+        }).then((data) => {
131
+          cancelPage()
132
+        }).catch((err) => {
133
+          message.info(err.msg || err.message)
134
+        })
135
+      }else{
136
+        request({
137
+          url: '/api/admin/extendContent',
138
+          method: 'POST',
139
+          data: val,
140
+        }).then((data) => {
141
+          cancelPage()
142
+        }).catch((err) => {
143
+          message.info(err.msg || err.message)
144
+        })
145
+      }
146
+    }
147
+
148
+  return (
149
+    <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
150
+  );
151
+ }
152
+
153
+
154
+
155
+export default Edit

+ 155
- 0
src/pages/carouselFigure/editCarousel.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker,message } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../style/GoodsList.less';
5
+import moment from 'moment';
6
+import router from 'umi/router';
7
+import BuildSelect from '../../components/SelectButton/BuildSelect'
8
+import XForm, { FieldTypes } from '../../components/XForm';
9
+import Wangedit from '../../components/Wangedit/Wangedit'
10
+import request from '../../utils/request'
11
+
12
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
+/**
14
+ *
15
+ *
16
+ * @param {*} props
17
+ * @returns
18
+ */
19
+ const Edit = (props) => {
20
+  const [ tab, changeTab ] = useState('basic')
21
+  const contentId = props.location.query.contentId
22
+  const [ data, setData ] = useState({})
23
+  if(contentId){
24
+    useEffect(() => {
25
+      getDetail(contentId);
26
+    },[])
27
+
28
+  // 查询列表
29
+  const getDetail = (contentId) => {
30
+    request({
31
+        url: '/api/admin/extendContent/' + contentId,
32
+        method: 'GET',
33
+    }).then((data) => {
34
+        console.log(data)
35
+        setData(data)
36
+    })
37
+  }
38
+  }
39
+
40
+  const cancelPage = () =>{
41
+    router.push({
42
+      pathname: '/carouselFigure/carouselFigureList',
43
+    });
44
+  }
45
+ 
46
+    const fields = [
47
+      {
48
+        label: '所属项目',
49
+        name: 'buildingId',
50
+        render: <BuildSelect />,
51
+        value: data.buildingId,
52
+      },
53
+      {
54
+        label: '商品图片',
55
+        name: 'image',
56
+        type: FieldTypes.ImageUploader,
57
+        value: data.image,
58
+      },
59
+      {
60
+        label: '标题',
61
+        name: 'title',
62
+        type: FieldTypes.Text,
63
+        value: data.title,
64
+      },
65
+      {
66
+        label: '发布位置',
67
+        name: 'showPosition',
68
+        type: FieldTypes.Select,
69
+        dict: [{
70
+          label: '首页',
71
+          value: 'index'
72
+        },
73
+        {
74
+          label: '商城',
75
+          value: 'mall'
76
+        }],
77
+        value: data.showPosition,
78
+      },
79
+      {
80
+        label: '类型',
81
+        name: 'contentType',
82
+        type: FieldTypes.Select,
83
+        dict: [{
84
+          label: '活动',
85
+          value: 'activity'
86
+        },
87
+        {
88
+          label: '项目',
89
+          value: 'project'
90
+        },
91
+        {
92
+          label: '资讯',
93
+          value: 'news'
94
+        },
95
+        {
96
+          label: '其他',
97
+          value: 'other'
98
+        }],
99
+        value: data.contentType,
100
+      },
101
+      {
102
+        label: '发布内容',
103
+        name: 'content',
104
+        render: <Wangedit />,
105
+        value: data.content,
106
+      },
107
+      {
108
+        label: '状态',
109
+        name: 'status',
110
+        type: FieldTypes.Select,
111
+        dict: [{
112
+          label: "启用",
113
+          value: 1
114
+        },
115
+        {
116
+          label: "停用",
117
+          value: 0
118
+        },],
119
+        value: data.status != null ? data.status : 1,
120
+      },
121
+    ]
122
+  
123
+    const handleSubmit = val => { 
124
+      val.showType = 'banner'
125
+      if(contentId){
126
+        request({
127
+          url: '/api/admin/extendContent/'+contentId,
128
+          method: 'PUT',
129
+          data: val,
130
+        }).then((data) => {
131
+          cancelPage()
132
+        }).catch((err) => {
133
+          message.info(err.msg || err.message)
134
+        })
135
+      }else{
136
+        request({
137
+          url: '/api/admin/extendContent',
138
+          method: 'POST',
139
+          data: val,
140
+        }).then((data) => {
141
+          cancelPage()
142
+        }).catch((err) => {
143
+          message.info(err.msg || err.message)
144
+        })
145
+      }
146
+    }
147
+
148
+  return (
149
+    <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
150
+  );
151
+ }
152
+
153
+
154
+
155
+export default Edit

+ 0
- 16
src/pages/channel/brokerList.jsx View File

27
     </Menu.Item>
27
     </Menu.Item>
28
   </Menu>
28
   </Menu>
29
 );
29
 );
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
-// ];
45
-
46
 const columns = [
30
 const columns = [
47
   {
31
   {
48
     title: '头像',
32
     title: '头像',

+ 0
- 1
src/pages/channel/channelList.jsx View File

74
     dataIndex: 'agentsInvite',
74
     dataIndex: 'agentsInvite',
75
     key: 'agentsInvite',
75
     key: 'agentsInvite',
76
     align: 'center',
76
     align: 'center',
77
-    // render: () => <a>Delete</a>,
78
   },
77
   },
79
   {
78
   {
80
     title: '操作',
79
     title: '操作',

+ 88
- 0
src/pages/customer/customerlist/customerDetail.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Table } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from './style.less';
5
+
6
+import router from 'umi/router';
7
+
8
+
9
+function header(props) {
10
+
11
+  /**
12
+   * @param {*} props
13
+   * @returns
14
+   */
15
+  const [data, setData] = useState([{ records: [] }])
16
+
17
+  const columns = [
18
+    {
19
+      title: '访问事件',
20
+      dataIndex: 'event',
21
+      key: 'event',
22
+      align: 'center',
23
+    },
24
+    {
25
+      title: '访问时间',
26
+      dataIndex: 'time',
27
+      key: 'time',
28
+      align: 'center',
29
+
30
+    },
31
+    {
32
+      title: '停留时间',
33
+      dataIndex: 'stayTime',
34
+      key: 'stayTime',
35
+      align: 'center',
36
+    },
37
+  ]
38
+  return (
39
+    <>
40
+      <div className={styles.cardBox}>
41
+        <div className={styles.leftBox}>
42
+          <p className={styles.tit}>置业顾问信息</p>
43
+          <img className={styles.touxiang} src="http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg" />
44
+          <p className={styles.infoItem}>姓名:赵海伟</p>
45
+          <p className={styles.infoItem}>部门:营销部</p>
46
+          <p className={styles.infoItem}>岗位:营销经理</p>
47
+          <p className={styles.infoItem}>号码:13160056061 </p>
48
+          <p className={styles.infoItem}>公司:葛洲坝·南京中国府</p>
49
+          <p className={styles.infoItem}>所属项目:葛洲坝·南京中国府</p>
50
+        </div>
51
+        <div className={styles.rightBox}>
52
+          <p className={styles.tit}>客户信息</p>
53
+          <img className={styles.touxiang} src="http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg" />
54
+          <div className={styles.right}>
55
+            <p className={styles.rightItem}>用户名称:董浩业</p>
56
+            <p className={styles.rightItem}>手机号码:15050893674</p>
57
+            <p className={styles.rightItem}>来访渠道:活动分享</p>
58
+          </div>
59
+          <p className={styles.rightItem}>访问时长:0秒</p>
60
+          <p className={styles.rightItem}>访问次数:</p>
61
+          <p className={styles.rightItem}>预约人数:</p>
62
+          <p className={styles.rightItem}>首次访问时间:</p>
63
+          <p className={styles.rightItem}>预约到访时间:</p>
64
+          <div className={styles.rightInfo}>
65
+            <p className={styles.rightItem}>国家:</p>
66
+            <p className={styles.rightItem}>省份:</p>
67
+            <p className={styles.rightItem}>城市:</p>
68
+            <p className={styles.rightItem}>详细信息:</p>
69
+            <p className={styles.rightItem}>意向项目:</p>
70
+            <p className={styles.rightItem}>价格区间:</p>
71
+            <p className={styles.rightItem}>客户说明:</p>
72
+            <p className={styles.rightItem}>客户描述:</p>
73
+            <p className={styles.rightItem}>需求类型:</p>
74
+            <p className={styles.rightItem}>物业类型:</p>
75
+          </div>
76
+        </div>
77
+      </div>
78
+      <div className={styles.recordBox}>
79
+        <p className={styles.tableName}>访问记录</p>
80
+        <Table dataSource={data.records} columns={columns} pagination={false} />
81
+      </div>
82
+
83
+    </>
84
+  )
85
+}
86
+const WrappedHeader = Form.create({ name: 'header' })(header);
87
+
88
+export default WrappedHeader

+ 31
- 25
src/pages/customer/customerlist/index.jsx View File

4
 import request from '../../../utils/request';
4
 import request from '../../../utils/request';
5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';
6
 import Styles from './style.less';
6
 import Styles from './style.less';
7
+import router from 'umi/router';
7
 
8
 
8
 import Attribution from './components/attribution'
9
 import Attribution from './components/attribution'
9
 import IntegralRecord from './components/integralRecord'
10
 import IntegralRecord from './components/integralRecord'
27
   const [dataSource, setDataSource] = useState({ records: [] })
28
   const [dataSource, setDataSource] = useState({ records: [] })
28
 
29
 
29
   // 默认私客
30
   // 默认私客
30
-    // eslint-disable-next-line react-hooks/rules-of-hooks
31
+  // eslint-disable-next-line react-hooks/rules-of-hooks
31
   const [customerType, setCustomerType] = useState('private')
32
   const [customerType, setCustomerType] = useState('private')
32
 
33
 
33
   // 调整归属 ============  start
34
   // 调整归属 ============  start
95
   // 分页
96
   // 分页
96
   function onChange(pageNum) {
97
   function onChange(pageNum) {
97
     // eslint-disable-next-line react-hooks/rules-of-hooks
98
     // eslint-disable-next-line react-hooks/rules-of-hooks
98
-      getList({ pageNumber: pageNum, pageSize: 10, customerType })
99
+    getList({ pageNumber: pageNum, pageSize: 10, customerType })
99
   }
100
   }
100
 
101
 
101
   // 私客/公客切换
102
   // 私客/公客切换
127
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '' })
128
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '' })
128
     setStatusVisibleData({ visible: true, customerId: record.customerId, status: record.status })
129
     setStatusVisibleData({ visible: true, customerId: record.customerId, status: record.status })
129
   }
130
   }
131
+  function toCustomerDateil() {
132
+    router.push({
133
+      pathname: '/customer/customerlist/customerDetail',
134
+    });
135
+  }
130
 
136
 
131
   const columns = [
137
   const columns = [
132
     {
138
     {
133
       title: '头像',
139
       title: '头像',
134
       dataIndex: 'picture',
140
       dataIndex: 'picture',
135
       key: 'picture',
141
       key: 'picture',
136
-      render: (_, record) => <Avatar shape="square" src={customerType === 'private' ? record.picture : record.avatarurl } size={64} icon="user" />,
142
+      render: (_, record) => <Avatar shape="square" src={customerType === 'private' ? record.picture : record.avatarurl} size={64} icon="user" />,
137
     },
143
     },
138
     {
144
     {
139
       title: '姓名',
145
       title: '姓名',
140
       dataIndex: 'name',
146
       dataIndex: 'name',
141
       key: 'name',
147
       key: 'name',
142
       // eslint-disable-next-line no-nested-ternary
148
       // eslint-disable-next-line no-nested-ternary
143
-      render: (_, record) => <><sapn>{ customerType === 'private' ? record.name : record.nickname }</sapn></>,
149
+      render: (_, record) => <><sapn>{customerType === 'private' ? record.name : record.nickname}</sapn></>,
144
     },
150
     },
145
     {
151
     {
146
       title: '电话',
152
       title: '电话',
152
       dataIndex: 'sex',
158
       dataIndex: 'sex',
153
       key: 'sex',
159
       key: 'sex',
154
       // eslint-disable-next-line no-nested-ternary
160
       // eslint-disable-next-line no-nested-ternary
155
-      render: (_, record) => <><sapn>{ record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知' }</sapn></>,
161
+      render: (_, record) => <><sapn>{record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知'}</sapn></>,
156
     },
162
     },
157
     {
163
     {
158
       title: '置业顾问',
164
       title: '置业顾问',
161
       // eslint-disable-next-line no-nested-ternary
167
       // eslint-disable-next-line no-nested-ternary
162
       render: (_, record) => (
168
       render: (_, record) => (
163
         <>
169
         <>
164
-          <sapn>{ record.consultantName }</sapn>
165
-          <br/>
166
-          <sapn>{ record.consultTel }</sapn>
170
+          <sapn>{record.consultantName}</sapn>
171
+          <br />
172
+          <sapn>{record.consultTel}</sapn>
167
         </>
173
         </>
168
       ),
174
       ),
169
     },
175
     },
171
       title: '客户状态',
177
       title: '客户状态',
172
       dataIndex: 'reportRecommendStatus',
178
       dataIndex: 'reportRecommendStatus',
173
       key: 'reportRecommendStatus',
179
       key: 'reportRecommendStatus',
174
-       // eslint-disable-next-line no-nested-ternary
175
-       render: (_, record) => <><sapn>{ record.reportRecommendStatus === 0 ? '为报备' : record.reportRecommendStatus === 1 ? '报备' : record.reportRecommendStatus === 2 ? '推荐' : '' }</sapn></>,
180
+      // eslint-disable-next-line no-nested-ternary
181
+      render: (_, record) => <><sapn>{record.reportRecommendStatus === 0 ? '为报备' : record.reportRecommendStatus === 1 ? '报备' : record.reportRecommendStatus === 2 ? '推荐' : ''}</sapn></>,
176
     },
182
     },
177
     {
183
     {
178
       title: '操作',
184
       title: '操作',
181
       // eslint-disable-next-line no-nested-ternary
187
       // eslint-disable-next-line no-nested-ternary
182
       render: (_, record) => (
188
       render: (_, record) => (
183
         <>
189
         <>
184
-          <Button className={ customerType === 'private' ? Styles.text : Styles.displayS } type="link" onClick={() => showStatus(record)}>变更状态</Button>
190
+          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
185
           &nbsp;&nbsp;
191
           &nbsp;&nbsp;
186
-          <Button className={ customerType === 'private' ? Styles.text : Styles.displayS } type="link" onClick={() => showGM(record)}>调整归属</Button>
187
-          <br/>
188
-          <Button className={ customerType === 'private' ? Styles.text : Styles.displayS } type="link">查看详情</Button>
192
+          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
193
+          <br />
194
+          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={toCustomerDateil}>查看详情</Button>
189
           &nbsp;&nbsp;
195
           &nbsp;&nbsp;
190
-          <Button className={ customerType === 'private' ? Styles.text : Styles.displayS } type="link" onClick={ () => showRecord(record) }>积分记录</Button>
196
+          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
191
         </>
197
         </>
192
       ),
198
       ),
193
     },
199
     },
245
         </Form.Item>
251
         </Form.Item>
246
       </Form>
252
       </Form>
247
 
253
 
248
-       <div style={{ marginTop: '20px', marginBottom: '20px' }}>
254
+      <div style={{ marginTop: '20px', marginBottom: '20px' }}>
249
         <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
255
         <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
250
-            <Radio.Button value="private">私客</Radio.Button>
251
-            <Radio.Button value="public">公客</Radio.Button>
256
+          <Radio.Button value="private">私客</Radio.Button>
257
+          <Radio.Button value="public">公客</Radio.Button>
252
         </Radio.Group>
258
         </Radio.Group>
253
-       </div>
259
+      </div>
254
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
260
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
255
 
261
 
256
-        {/* 调整归属 */}
257
-        <Attribution visibleData={gVisibleData} />
262
+      {/* 调整归属 */}
263
+      <Attribution visibleData={gVisibleData} />
258
 
264
 
259
-        {/* 积分记录 */}
260
-        <IntegralRecord visibleData={recordVisibleData} />
265
+      {/* 积分记录 */}
266
+      <IntegralRecord visibleData={recordVisibleData} />
261
 
267
 
262
-        {/* 变更状态 */}
263
-        <ChangeStatus visibleData={statusVisibleData} />
268
+      {/* 变更状态 */}
269
+      <ChangeStatus visibleData={statusVisibleData} />
264
     </>
270
     </>
265
   );
271
   );
266
 }
272
 }

+ 78
- 0
src/pages/customer/customerlist/style.less View File

70
 .displayS {
70
 .displayS {
71
   display: none;
71
   display: none;
72
 }
72
 }
73
+
74
+
75
+// 客户详情样式
76
+.cardBox{
77
+  display: flex;
78
+  .leftBox{
79
+    width:342px;
80
+    min-width:342px;
81
+    height:511px;
82
+    background:rgba(255,255,255,1);
83
+    box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
84
+    border-radius:8px;
85
+    display: inline-block;
86
+    margin-right: 30px;
87
+    padding: 30px;
88
+    overflow: hidden;
89
+  }
90
+  .rightBox{
91
+    width:-webkit-fill-available;
92
+    height:511px;
93
+    min-width: 800px;
94
+    background:rgba(255,255,255,1);
95
+    box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
96
+    border-radius:8px;
97
+    display: inline-block;
98
+    padding: 30px;
99
+    overflow: hidden;
100
+    position: relative;
101
+  }
102
+  .tit{
103
+    font-size:24px;
104
+    font-weight:600;
105
+    color:#222;
106
+    margin: 10px 0 0 0;
107
+  }
108
+  .touxiang{
109
+    width: 120px;
110
+    width: 120px;
111
+    border-radius: 6px;
112
+    margin: 30px 0 20px 0;
113
+  }
114
+  .infoItem{
115
+    color:#666;
116
+    font-size: 19px;
117
+    margin: 0 0 10px 0;
118
+    
119
+  }
120
+  .rightItem{
121
+    color:#666;
122
+    font-size: 19px;
123
+    margin: 0 0 15px 0;
124
+  }
125
+  .right{
126
+    position: absolute;
127
+    top:108px;
128
+    left:170px;
129
+  }
130
+  .rightInfo{
131
+    position: absolute;
132
+    top:50px;
133
+    left:50%;
134
+  }
135
+  
136
+}
137
+.recordBox{
138
+  width:100%;
139
+  background:rgba(255,255,255,1);
140
+  box-shadow:0px 0px 16px 2px rgba(0,0,0,0.12);
141
+  border-radius:8px;
142
+  margin-top: 30px;
143
+  padding: 30px;
144
+  .tableName{
145
+    font-size:24px;
146
+    font-weight:600;
147
+    color:#222;
148
+  }
149
+}
150
+

+ 134
- 2
src/pages/customer/independentList/index.jsx View File

11
 // eslint-disable-next-line @typescript-eslint/no-unused-vars
11
 // eslint-disable-next-line @typescript-eslint/no-unused-vars
12
 const { Meta } = Card;
12
 const { Meta } = Card;
13
 
13
 
14
+class ModalTable extends React.Component {
15
+  constructor(props) {
16
+    super(props);
17
+    this.state = {
18
+       dataSource: { records: [] },
19
+       visibleData: { visible: false, customerId: '', realtyConsultant: '' },
20
+    }
21
+  }
22
+
23
+  // 挂载之后
24
+  componentDidMount() {
25
+    this.getList({ pageNumber: 1, pageSize: 5 })
26
+  }
27
+
28
+  componentDidUpdate(preProps, preState) {
29
+    if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
30
+      this.getList({ pageNumber: 1, pageSize: 5 })
31
+      this.setState({ visibleData: this.props.visibleData });
32
+    }
33
+  }
34
+
35
+  // 弹框确定按钮
36
+  // eslint-disable-next-line react/sort-comp
37
+  handleOk() {
38
+    this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
39
+  }
40
+
41
+  // 弹框取消按钮
42
+  handleCancel() {
43
+    this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
44
+  }
45
+
46
+  getList(params) {
47
+    console.log('this.state.visibleData', this.state.visibleData)
48
+    const { customerId } = this.state.visibleData
49
+    if (customerId === '' || customerId === undefined) {
50
+      return
51
+    }
52
+    // 网路请求
53
+    const { url, method } = apis.customer.recommend
54
+    const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(customerId)
55
+    // 网路请求
56
+    request({ url: tempUrl, method, params: { ...params } }).then(res => {
57
+      this.setState({ dataSource: res })
58
+    }).catch(err => {
59
+      // eslint-disable-next-line no-unused-expressions
60
+      <Alert
61
+        style={{
62
+          marginBottom: 24,
63
+        }}
64
+        message={err}
65
+        type="error"
66
+        showIcon
67
+      />
68
+    })
69
+  }
70
+
71
+   // 分页
72
+  onChange(pageNum) {
73
+    this.getList({ pageNumber: pageNum, pageSize: 5 })
74
+  }
75
+
76
+  render() {
77
+    const columns = [
78
+      {
79
+        title: '头像',
80
+        // eslint-disable-next-line jsx-a11y/alt-text
81
+        render: (text, records) => <img src={records.picture } width={50} height={50} />,
82
+      },
83
+      {
84
+        title: '用户名',
85
+        dataIndex: 'name',
86
+        key: 'name',
87
+      },
88
+      {
89
+        title: '电话',
90
+        dataIndex: 'phone',
91
+        key: 'phone',
92
+      },
93
+      {
94
+        title: '性别',
95
+        dataIndex: 'sex',
96
+        key: 'sex',
97
+        render: (text, records) => <span>{ records.sex === 1 ? '男' : '女' }</span>,
98
+      },
99
+      {
100
+        title: '意向项目',
101
+        dataIndex: 'intention',
102
+        key: 'intention',
103
+      },
104
+      {
105
+        title: '推荐时间',
106
+        dataIndex: 'createDate',
107
+        key: 'createDate',
108
+      },
109
+      {
110
+        title: '状态',
111
+        // eslint-disable-next-line consistent-return
112
+        render: (text, records) => {
113
+                                    if (records.status === 1) { return '报备' }
114
+                                    if (records.status === 2) { return '到访' }
115
+                                    if (records.status === 3) { return '认购' }
116
+                                    if (records.status === 4) { return '签约' }
117
+                                    if (records.verifyStatus === 1) { return '待审核' }
118
+                                    if (records.verifyStatus === 2) { return '审核同意' }
119
+                                    if (records.verifyStatus === 3) { return '签约' }
120
+                                  },
121
+      },
122
+    ]
123
+    return (
124
+      <>
125
+        <Modal
126
+            title="推荐客户"
127
+            destroyOnClose="true"
128
+            width={900}
129
+            footer={null}
130
+            visible={this.state.visibleData.visible}
131
+            // onOk={() => this.handleOk()}
132
+            onCancel={(e) => this.handleCancel(e)}
133
+          >
134
+            <Table dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
135
+          </Modal>
136
+      </>
137
+    );
138
+  }
139
+}
14
 /**
140
 /**
15
  *
141
  *
16
  *
142
  *
55
       }
181
       }
56
     });
182
     });
57
   }
183
   }
58
-
184
+  // eslint-disable-next-line react-hooks/rules-of-hooks
185
+  const [gVisibleData, setGVisibleData] = useState({ visible: false, customerId: '', realtyConsultant: '' })
59
   // Change 事件
186
   // Change 事件
60
   function handleSelectChange(e) {
187
   function handleSelectChange(e) {
61
     // eslint-disable-next-line no-console
188
     // eslint-disable-next-line no-console
62
     console.log(e)
189
     console.log(e)
63
   }
190
   }
191
+  function gM(row) {
192
+    setGVisibleData({ visible: true, customerId: row.personId, realtyConsultant: row.realtyConsultant })
193
+  }
64
 
194
 
65
   // 分页
195
   // 分页
66
   function onChange(pageNum) {
196
   function onChange(pageNum) {
124
               &nbsp;&nbsp;&nbsp;&nbsp;
254
               &nbsp;&nbsp;&nbsp;&nbsp;
125
               <sapn style={{ color: 'rgba(239,39,58,1)' }}>邀请经纪人</sapn>
255
               <sapn style={{ color: 'rgba(239,39,58,1)' }}>邀请经纪人</sapn>
126
               &nbsp;&nbsp;&nbsp;&nbsp;
256
               &nbsp;&nbsp;&nbsp;&nbsp;
127
-              <sapn style={{ color: 'rgba(239,39,58,1)' }}>推荐客户</sapn>
257
+              <sapn style={{ color: 'rgba(239,39,58,1)' }} onClick={() => gM(record)}>推荐客户</sapn>
128
             </>
258
             </>
129
           }
259
           }
130
         </>
260
         </>
159
       </Form>
289
       </Form>
160
 
290
 
161
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
291
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
292
+            {/* 调整归属 */}
293
+        <ModalTable visibleData={gVisibleData} />
162
     </>
294
     </>
163
   );
295
   );
164
 }
296
 }

+ 74
- 9
src/pages/integralMall/writeOff.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Tabs, Row, Col, message } from 'antd';
2
+import { Form, Input, Button, Icon, Tabs, Row, Col, Modal, message } 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
 import router from 'umi/router';
5
 import router from 'umi/router';
13
 }
13
 }
14
 
14
 
15
 /**
15
 /**
16
- *
17
- *
18
  * @param {*} props
16
  * @param {*} props
19
  * @returns
17
  * @returns
20
  */
18
  */
19
+class Dialog extends React.Component {
20
+  state = {
21
+    visible: false,
22
+  };
23
+
24
+  showModal = () => {
25
+    this.setState({ visible: true, });
26
+  };
27
+
28
+  handleCancel = () => {
29
+    this.setState({ visible: false });
30
+  };
31
+
32
+  onKeyDown = (e) => {
33
+
34
+    if (e.keyCode == 13) {
35
+      this.setState({ visible: false });
36
+      this.props.onEnter();
37
+    }
38
+  }
39
+
40
+  render() {
41
+    const { visible, loading } = this.state;
42
+    return (
43
+      <div>
44
+        <Button type="primary" onClick={this.showModal} style={{ margin: '80px auto', display: 'block', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }}>立即核销</Button>
45
+        <Modal
46
+          style={{ marginTop: '20vh' }}
47
+          visible={visible}
48
+          title="核销数据"
49
+          onCancel={this.handleCancel}
50
+          footer={[]}
51
+        >
52
+          <p>扫描二维码数据</p>
53
+          <Input placeholder="请用扫描枪扫描二维码" onKeyDown={this.onKeyDown} onChange={this.props.onChange} />
54
+        </Modal>
55
+      </div>
56
+    );
57
+  }
58
+}
59
+
21
 
60
 
22
 function header(props) {
61
 function header(props) {
23
   const [telValue, setTelValue] = useState('')
62
   const [telValue, setTelValue] = useState('')
63
+
24
   const changeTel = (e) => {
64
   const changeTel = (e) => {
25
     setTelValue(e.target.value)
65
     setTelValue(e.target.value)
26
   }
66
   }
27
 
67
 
28
-  const verifyTel = () =>{
29
-    if(telValue === ""){
68
+  const [codeValue, setCodeValue] = useState('')
69
+  const changeCode = (e) => {
70
+
71
+    setCodeValue(e.target.value)
72
+
73
+  }
74
+
75
+  const verifyTel = () => {
76
+    if (telValue === "") {
30
       message.error("请输入手机号");
77
       message.error("请输入手机号");
31
       return;
78
       return;
32
     }
79
     }
38
     });
85
     });
39
   }
86
   }
40
 
87
 
88
+
89
+  const handleEnter = (e) => {
90
+    if (codeValue === "") {
91
+      message.error("无二维码数据");
92
+      return;
93
+    } else {
94
+
95
+      router.push({
96
+        pathname: '/integralMall/verifyList',
97
+        query: {
98
+          telValue:codeValue
99
+        },
100
+      });
101
+    }
102
+  }
103
+
41
   const { getFieldDecorator } = props.form
104
   const { getFieldDecorator } = props.form
42
   return (
105
   return (
43
     <>
106
     <>
62
               <p style={{ margin: '44px auto' }}>根据提示进行核销操作</p>
125
               <p style={{ margin: '44px auto' }}>根据提示进行核销操作</p>
63
             </Col>
126
             </Col>
64
           </Row>
127
           </Row>
65
-          <Button type="primary" style={{ margin: '80px auto', display: 'block', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }}>立即核销</Button>
128
+          <Dialog onEnter={handleEnter} onChange={changeCode} />
66
         </TabPane>
129
         </TabPane>
67
         <TabPane tab="手机号核销" key="2">
130
         <TabPane tab="手机号核销" key="2">
68
           <Row>
131
           <Row>
77
               <p>点击“立即核销”按钮</p>
140
               <p>点击“立即核销”按钮</p>
78
             </Col>
141
             </Col>
79
           </Row>
142
           </Row>
80
-          <div style={{ margin: '110px auto', display: 'block',textAlign:'center' }}>
81
-            <Input placeholder="请输入手机号" style={{width:'200px'}} onChange={changeTel}/>
82
-            <Button type="primary" style={{marginLeft:'10px', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }} onClick={verifyTel}>立即核销</Button>
143
+          <div style={{ margin: '110px auto', display: 'block', textAlign: 'center' }}>
144
+            <Input placeholder="请输入手机号" style={{ width: '200px' }} onChange={changeTel} />
145
+            <Button type="primary" style={{ marginLeft: '10px', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }} onClick={verifyTel}>立即核销</Button>
83
           </div>
146
           </div>
84
         </TabPane>
147
         </TabPane>
85
       </Tabs>,
148
       </Tabs>,
86
     </>
149
     </>
87
   )
150
   )
88
 }
151
 }
152
+
89
 const WrappedHeader = Form.create({ name: 'header' })(header);
153
 const WrappedHeader = Form.create({ name: 'header' })(header);
90
 
154
 
155
+
91
 export default WrappedHeader
156
 export default WrappedHeader

+ 101
- 13
src/pages/news/list/NewsList.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert } from 'antd';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Modal, message, Card, Row, Col, Pagination, Alert } from 'antd';
3
 import moment from 'moment';
3
 import moment from 'moment';
4
+import router from 'umi/router';
4
 import request from '../../../utils/request';
5
 import request from '../../../utils/request';
5
 import apis from '../../../services/apis';
6
 import apis from '../../../services/apis';
6
 import Styles from './style.less';
7
 import Styles from './style.less';
8
+import NewsTypeSelect from '../../../components/SelectButton/NewTypeSelect'
7
 
9
 
8
 
10
 
9
 const { Option } = Select;
11
 const { Option } = Select;
19
  */
21
  */
20
 function CartBody(props) {
22
 function CartBody(props) {
21
   const { data } = props
23
   const { data } = props
22
-  console.log(props);
24
+  console.log(data);
25
+  const cancelPage = () =>{
26
+    router.push({
27
+      pathname: '/news/list/NewsList',
28
+    });
29
+  }
30
+
31
+  // 查询列表
32
+  const getList = (params) => {
33
+    request({
34
+        url: '/api/admin/taNews',
35
+        method: 'GET',
36
+        params: { ...params },
37
+    }).then((data) => {
38
+        cancelPage();
39
+    })
40
+  }
41
+
42
+  //删除资讯
43
+  const changeNewsListStatus = (newsId) => () => {
44
+    Modal.confirm({
45
+      title: '确认删除该资讯?',
46
+      okText: '确认',
47
+      cancelText: '取消',
48
+      onOk() {
49
+        request({
50
+          url: '/api/admin/taNews/' + newsId,
51
+          method: 'DELETE',
52
+          // data: { ...row },
53
+        }).then((data) => {
54
+          message.info('操作成功!')
55
+          getList({ pageNum: 1, pageSize: 10 });
56
+        })
57
+      }
58
+    });
59
+  }
60
+
61
+  // 跳转到编辑资讯列表
62
+  const toEditList = (newsId) => ()  => {
63
+    router.push({
64
+      pathname: '/news/list/editNewsList',
65
+      query: {
66
+        newsId
67
+      },
68
+    });
69
+  } 
70
+
71
+  function cancelRelease (newsId, newsStatus, buildingId,newsTypeId) {
72
+    console.log("newsId" + newsId + "status" + newsStatus);
73
+    Modal.confirm({
74
+      title: '确认发布或取消该资讯?',
75
+      okText: '确认',
76
+      cancelText: '取消',
77
+      onOk () {
78
+        request({
79
+          url: '/api/admin/taNews/' + newsId,
80
+          method: 'PUT',
81
+          data: { "newsStatus": newsStatus, "buildingId":buildingId, "newsTypeId":newsTypeId },
82
+        }).then((data) => {
83
+          message.info('操作成功!')
84
+          getList({ pageNum: 1, pageSize: 10 });
85
+        })
86
+      },
87
+      onCancel () {
88
+        console.log('Cancel');
89
+      },
90
+    });
91
+  
92
+  }
93
+
23
   return (
94
   return (
24
           <Card
95
           <Card
25
             hoverable
96
             hoverable
30
             <p className={Styles.cardText}>
101
             <p className={Styles.cardText}>
31
               <span className={Styles.title}>资讯类型</span>
102
               <span className={Styles.title}>资讯类型</span>
32
               <span >:{ data.newsType.newsTypeName }</span>
103
               <span >:{ data.newsType.newsTypeName }</span>
33
-              <span className={Styles.ediText}>
104
+              <span className={Styles.ediText} onClick={toEditList(data.newsId)}>
34
                 编辑
105
                 编辑
35
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
106
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
36
               </span>
107
               </span>
37
             </p>
108
             </p>
38
             <p className={Styles.cardText}>
109
             <p className={Styles.cardText}>
39
               <span className={Styles.title}>状态</span>
110
               <span className={Styles.title}>状态</span>
40
-              <span >:{ data.status == 0 ? "已发布" : "未发布" }</span>
111
+              <span >:{ data.newsStatus == 0 ? "已发布" : "未发布" }</span>
41
             </p>
112
             </p>
42
             <p className={Styles.cardItem}>
113
             <p className={Styles.cardItem}>
43
               <span className={Styles.title}>阅读数量</span>
114
               <span className={Styles.title}>阅读数量</span>
45
             </p>
116
             </p>
46
             <p className={Styles.cardItem}>
117
             <p className={Styles.cardItem}>
47
               <span className={Styles.title}>转发数量</span>
118
               <span className={Styles.title}>转发数量</span>
48
-              <span className={ Styles.address }>:{ data.shareNum }</span>
119
+              <span>:{ data.shareNum }</span>
49
             </p>
120
             </p>
50
             <p className={Styles.cardItem}>
121
             <p className={Styles.cardItem}>
51
               <span className={Styles.title}>点赞数量</span>     
122
               <span className={Styles.title}>点赞数量</span>     
60
               <span >:{ data.createDate }</span>
131
               <span >:{ data.createDate }</span>
61
             </p>
132
             </p>
62
             <p style={{ margin: '15px 0', position: 'relative', fontSize: '18px' }}>
133
             <p style={{ margin: '15px 0', position: 'relative', fontSize: '18px' }}>
63
-              <span style={{ color: '#1990FF' }}>
64
-                取消发布
65
-                <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
134
+              {data.newsStatus === 0 ? 
135
+              <span style={{ color: '#1990FF' }} onClick={cancelRelease.bind(this,data.newsId, 1, data.buildingId, data.newsType.newsTypeId)}>
136
+              取消发布
137
+              <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
138
+              </span>:
139
+              <span style={{ color: '#1990FF' }} onClick={cancelRelease.bind(this,data.newsId, 0, data.buildingId, data.newsType.newsTypeId)}>
140
+              发布
141
+              <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
66
               </span>
142
               </span>
143
+              }
144
+              
67
               <span style={{
145
               <span style={{
68
                 color: '#FF4A4A', position: 'absolute', right: '0',
146
                 color: '#FF4A4A', position: 'absolute', right: '0',
69
-              }} >
147
+              }} onClick={changeNewsListStatus(data.newsId)}>
70
                 删除
148
                 删除
71
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
149
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
72
               </span>
150
               </span>
122
     });
200
     });
123
   }
201
   }
124
 
202
 
203
+  // 跳转到编辑资讯列表
204
+  const toEditList = (id) => ()  => {
205
+    router.push({
206
+      pathname: '/news/list/editNewsList',
207
+      query: {
208
+        id
209
+      },
210
+    });
211
+  }
212
+
213
+
125
   // Change 事件
214
   // Change 事件
126
   function handleSelectChange(e) {
215
   function handleSelectChange(e) {
127
     // eslint-disable-next-line no-console
216
     // eslint-disable-next-line no-console
165
           )}
254
           )}
166
         </Form.Item>
255
         </Form.Item>
167
         <Form.Item>
256
         <Form.Item>
168
-          {getFieldDecorator('type')(
169
-            <Select style={{ width: '180px' }} placeholder="咨询类型" onChange={handleSelectChange}>
170
-            </Select>,
257
+          {getFieldDecorator('buildingId')(
258
+            <NewsTypeSelect />,
171
           )}
259
           )}
172
         </Form.Item>       
260
         </Form.Item>       
173
         <Form.Item>
261
         <Form.Item>
184
           </Button>
272
           </Button>
185
         </Form.Item>
273
         </Form.Item>
186
       </Form>
274
       </Form>
187
-      <Button type="primary" className={Styles.addButton}>
275
+      <Button type="primary" className={Styles.addButton} onClick={toEditList()}>
188
         新增
276
         新增
189
       </Button>
277
       </Button>
190
 
278
 

+ 148
- 0
src/pages/news/list/editNewsList.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker,message } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../../style/GoodsList.less';
5
+import moment from 'moment';
6
+import router from 'umi/router';
7
+import BuildSelect from '../../../components/SelectButton/BuildSelect'
8
+import NewsTypeSelect from '../../../components/SelectButton/NewTypeSelect'
9
+import XForm, { FieldTypes } from '../../../components/XForm';
10
+import Wangedit from '../../../components/Wangedit/Wangedit'
11
+import request from '../../../utils/request'
12
+
13
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
+/**
15
+ *
16
+ *
17
+ * @param {*} props
18
+ * @returns
19
+ */
20
+ const Edit = (props) => {
21
+  const [ tab, changeTab ] = useState('basic')
22
+  const newsId = props.location.query.newsId
23
+  const [ dynamicData, setDynamicData ] = useState({})
24
+  if(newsId){
25
+    useEffect(() => {
26
+      getDynamicData(newsId);
27
+    },[])
28
+
29
+  // 查询列表
30
+  const getDynamicData = (newsId) => {
31
+    request({
32
+        url: '/api/admin/taNews/' + newsId,
33
+        method: 'GET',
34
+        params: { newsId },
35
+    }).then((data) => {
36
+        console.log(data)
37
+        setDynamicData(data)
38
+    })
39
+  }
40
+  }
41
+
42
+  const cancelPage = () =>{
43
+    router.push({
44
+      pathname: '/news/list/NewsList',
45
+    });
46
+  }
47
+
48
+  const Basic = (props) => {
49
+    const fields = [
50
+      {
51
+        label: '意向项目',
52
+        name: 'buildingId',
53
+        render: <BuildSelect />,
54
+        value: dynamicData.buildingId,
55
+        rules: [
56
+          {required: true, message: '请选择所属项目'},
57
+        ]
58
+      },
59
+      {
60
+        label: '资讯图片',
61
+        name: 'newsImg',
62
+        type: FieldTypes.ImageUploader,
63
+        value: dynamicData.newsImg,
64
+      },
65
+      {
66
+        label: '资讯标题',
67
+        name: 'newsName',
68
+        type: FieldTypes.Text,
69
+        value: dynamicData.newsName,
70
+        rules: [
71
+          {required: true, message: '请输入资讯标题'},
72
+        ]
73
+      },
74
+      {
75
+        label: '资讯类型',
76
+        name: 'newsTypeId',
77
+        render: <NewsTypeSelect />,
78
+        value: dynamicData.newsTypeId,
79
+        rules: [
80
+          {required: true, message: '请选择资讯类型'},
81
+        ]
82
+      },
83
+      {
84
+        label: '资讯详情',
85
+        name: 'desc',
86
+        render: <Wangedit />,
87
+        value: dynamicData.desc,
88
+      },
89
+    ]
90
+  
91
+    const handleSubmit = val => { 
92
+      let {...submitValue} = val
93
+      if(newsId){
94
+        submitValue.newsId = newsId
95
+        request({
96
+          url: '/api/admin/taNews/' + newsId,
97
+          method: 'PUT',
98
+          data: submitValue,
99
+        }).then((data) => {
100
+          cancelPage()
101
+        }).catch((err) => {
102
+          message.info(err.msg || err.message)
103
+        })
104
+      }else{
105
+        request({
106
+          url: '/api/admin/taNews',
107
+          method: 'POST',
108
+          data: submitValue,
109
+        }).then((data) => {
110
+          cancelPage()
111
+        }).catch((err) => {
112
+          message.info(err.msg || err.message)
113
+        })
114
+      }
115
+    }
116
+    
117
+    return <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
118
+  }
119
+  
120
+  const Poster = (props) => {
121
+   return <div>Poster</div>
122
+  }
123
+ 
124
+  const Share = (props) => {
125
+    return <div>Share</div>
126
+  }
127
+
128
+  return (
129
+    <div>
130
+      <div>
131
+        <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
132
+          <Radio.Button value="basic">基本信息</Radio.Button>
133
+          <Radio.Button value="poster">海报图片</Radio.Button>
134
+          <Radio.Button value="share">分享设置</Radio.Button>
135
+        </Radio.Group>
136
+      </div>
137
+      <div>
138
+        { tab === 'basic' && <Basic /> }
139
+        { tab === 'poster' && <Poster /> }
140
+        { tab === 'share' && <Share /> }
141
+      </div>
142
+    </div>
143
+  );
144
+ }
145
+
146
+
147
+
148
+export default Edit

+ 1
- 1
src/pages/news/type/NewsType.jsx View File

45
   }
45
   }
46
 
46
 
47
 
47
 
48
-  // 跳转到编辑咨询
48
+  // 跳转到编辑资讯
49
   const toEditNews = (id) => () => {
49
   const toEditNews = (id) => () => {
50
     router.push({
50
     router.push({
51
       pathname: '/news/type/editNews',
51
       pathname: '/news/type/editNews',

+ 4
- 0
src/services/apis.js View File

96
       method: 'GET',
96
       method: 'GET',
97
       url: `${prefix}/mine/taPointsRecords/id`,
97
       url: `${prefix}/mine/taPointsRecords/id`,
98
     },
98
     },
99
+    recommend: {
100
+      method: 'GET',
101
+      url: `${prefix}/customer/recommend/id`,
102
+    },
99
   },
103
   },
100
 }
104
 }