Browse Source

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

魏熙美 5 years ago
parent
commit
003030cf4c

+ 1
- 1
config/config.js View File

@@ -269,7 +269,7 @@ export default {
269 269
                 },
270 270
                 {
271 271
                   path: '/activity/SignList',
272
-                  name: '报名列表',
272
+                  name: '',
273 273
                   component: './activity/SignList',
274 274
                 },
275 275
               ],

+ 2
- 1
package.json View File

@@ -60,7 +60,8 @@
60 60
     "umi": "^2.8.7",
61 61
     "umi-plugin-pro-block": "^1.3.2",
62 62
     "umi-plugin-react": "^1.9.5",
63
-    "umi-request": "^1.0.8"
63
+    "umi-request": "^1.0.8",
64
+    "wangeditor": "^3.1.1"
64 65
   },
65 66
   "devDependencies": {
66 67
     "@ant-design/colors": "^3.1.0",

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

@@ -0,0 +1,32 @@
1
+import React from 'react';
2
+import E from 'wangeditor'
3
+
4
+/**
5
+ * @param {*} props
6
+ * @returns
7
+ */
8
+class Wangedit extends React.Component {
9
+  constructor(props, context) {
10
+    super(props, context);
11
+    this.state = {}
12
+  }
13
+
14
+  render() {
15
+    return (
16
+      <div ref="editorElem" style={{ textAlign: 'left' }}>
17
+      </div>
18
+    );
19
+  }
20
+
21
+  componentDidMount() {
22
+    const elem = this.refs.editorElem
23
+    const editor = new E(elem)
24
+    // 使用 onchange 函数监听内容的变化
25
+    editor.customConfig.onchange = this.props.onChange
26
+    editor.create()
27
+    editor.txt.html(this.props.value)
28
+  }
29
+}
30
+
31
+export default Wangedit
32
+

+ 19
- 9
src/components/XForm/ImageUpload.jsx View File

@@ -1,10 +1,14 @@
1 1
 import React from 'react';
2 2
 import { Upload, Icon, message } from 'antd';
3 3
 import './style.less';
4
+import { uploaderProps } from '../../utils/upload';
5
+
6
+
4 7
 
5 8
 class ImageUpload extends React.Component {
6 9
   state = {
7
-    loading: false
10
+    loading: false,
11
+    imageUrl: undefined,
8 12
   };
9 13
 
10 14
   handleChange = info => {
@@ -14,13 +18,19 @@ class ImageUpload extends React.Component {
14 18
     }
15 19
 
16 20
     if (info.file.status === "done") {
17
-      const imageUrl = info.response.url
18
-
19 21
       this.setState({
20
-        loading: false
22
+        loading: false,
21 23
       })
22 24
 
23
-      this.props.onChange(imageUrl)
25
+      if (info.file.response && info.file.response.url) {
26
+        this.setState({
27
+          imageUrl: info.file.response.thumbUrl,
28
+        });
29
+
30
+        if (typeof this.props.onChange === 'function') {
31
+          this.props.onChange(info.file.response.url);
32
+        }
33
+      }
24 34
     }
25 35
   };
26 36
 
@@ -35,16 +45,16 @@ class ImageUpload extends React.Component {
35 45
 
36 46
     return (
37 47
       <Upload
38
-        name="avatar"
39 48
         listType="picture-card"
40 49
         className="avatar-uploader"
41 50
         showUploadList={false}
42
-        action={this.props.action}
43 51
         beforeUpload={this.props.beforeUpload}
44 52
         onChange={this.handleChange}
53
+
54
+        {...uploaderProps}
45 55
       >
46
-        {value ? (
47
-          <img src={value} alt="avatar" style={{ width: "100%" }} />
56
+        {(this.state.imageUrl || value) ? (
57
+          <img src={this.state.imageUrl || value} alt="avatar" style={{ width: "100%" }} />
48 58
         ) : (
49 59
           uploadButton
50 60
         )}

+ 6
- 1
src/global.less View File

@@ -55,7 +55,12 @@ ol {
55 55
   box-shadow: none;
56 56
   border: none;
57 57
 }
58
-
58
+.ant-input-affix-wrapper .ant-input-prefix{
59
+  left:7px;
60
+}
61
+.ant-input-affix-wrapper .ant-input:not(:first-child) {
62
+  padding-left: 40px;
63
+}
59 64
 .ant-pro-global-header-trigger{
60 65
   display: none;
61 66
 }

+ 145
- 5
src/pages/activity/editActivity.jsx View File

@@ -1,8 +1,15 @@
1
-import React, { useState } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio } from 'antd';
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker,message } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 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'
5 11
 
12
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
6 13
 /**
7 14
  *
8 15
  *
@@ -10,12 +17,145 @@ import styles from '../style/GoodsList.less';
10 17
  * @returns
11 18
  */
12 19
  const Edit = (props) => {
13
-  const [ tab, changeTab ] = useState('basic');
20
+  const [ tab, changeTab ] = useState('basic')
14 21
   const dynamicId = props.location.query.dynamicId
15
-  console.log(dynamicId)
22
+  const [ dynamicData, setDynamicData ] = useState({})
23
+  if(dynamicId){
24
+    useEffect(() => {
25
+      getDynamicData(dynamicId);
26
+    },[])
27
+
28
+  // 查询列表
29
+  const getDynamicData = (dynamicId) => {
30
+    request({
31
+        url: '/api/admin/buildingDynamic/Details',
32
+        method: 'GET',
33
+        params: { dynamicId },
34
+    }).then((data) => {
35
+        console.log(data)
36
+        setDynamicData(data)
37
+    })
38
+  }
39
+  }
40
+
41
+  const cancelPage = () =>{
42
+    router.push({
43
+      pathname: '/activity/ActivityList',
44
+    });
45
+  }
16 46
 
17 47
   const Basic = (props) => {
18
-  return <div>Basic</div>
48
+    const fields = [
49
+      {
50
+        label: '所属项目',
51
+        name: 'buildingId',
52
+        render: <BuildSelect />,
53
+        value: dynamicData.buildingId,
54
+        rules: [
55
+          {required: true, message: '请选择所属项目'},
56
+        ]
57
+      },
58
+      {
59
+        label: '主图',
60
+        name: 'imgUrl',
61
+        type: FieldTypes.ImageUploader,
62
+        value: dynamicData.imgUrl,
63
+      },
64
+      {
65
+        label: '活动标题',
66
+        name: 'title',
67
+        type: FieldTypes.Text,
68
+        value: dynamicData.title,
69
+        rules: [
70
+          {required: true, message: '请输入活动标题'},
71
+        ]
72
+      },
73
+      {
74
+        label: '活动时间',
75
+        name: 'activityTime',
76
+        type: FieldTypes.RangePicker,
77
+        value: dynamicData.startDate != null ?  [moment(dynamicData.startDate,'YYYY-MM-DD'),moment(dynamicData.endDate,'YYYY-MM-DD')] : null,
78
+        rules: [
79
+          {required: true, message: '请选择活动时间'},
80
+        ]
81
+      },
82
+      {
83
+        label: '活动地点',
84
+        name: 'address',
85
+        type: FieldTypes.Text,
86
+        value: dynamicData.address,
87
+        rules: [
88
+          {required: true, message: '请输入活动地点'},
89
+        ]
90
+      },
91
+      {
92
+        label: '活动人数',
93
+        name: 'enlistNum',
94
+        type: FieldTypes.Text,
95
+        value: dynamicData.enlistNum,
96
+        rules: [
97
+          {required: true, message: '请输入活动人数'},
98
+        ]
99
+      },
100
+      {
101
+        label: '活动详情',
102
+        name: 'desc',
103
+        render: <Wangedit />,
104
+        value: dynamicData.desc,
105
+      },
106
+      {
107
+        label: '是否需要报名',
108
+        name: 'isEnlist',
109
+        render: <Radio.Group name="radiogroup">
110
+                  <Radio value={1}>是</Radio>
111
+                  <Radio value={0}>否</Radio>
112
+                </Radio.Group>,
113
+        value: dynamicData.isEnlist != null ? dynamicData.isEnlist-0 : 1,
114
+      },
115
+      {
116
+        label: '报名时间',
117
+        name: 'signupTime',
118
+        type: FieldTypes.RangePicker,
119
+        value: dynamicData.enlistStart != null ?  [moment(dynamicData.enlistStart,'YYYY-MM-DD'),moment(dynamicData.enlistEnd,'YYYY-MM-DD')] : null,
120
+        rules: [
121
+          {required: true, message: '请选择报名时间'},
122
+        ]
123
+      },
124
+    ]
125
+  
126
+    const handleSubmit = val => { 
127
+      let {activityTime,signupTime, ...submitValue} = val
128
+      const [startDate, endDate] = activityTime
129
+      submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
130
+      submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
131
+      const [enlistStart, enlistEnd] = signupTime
132
+      submitValue.enlistStart = moment(enlistStart).format('YYYY-MM-DD');
133
+      submitValue.enlistEnd = moment(enlistEnd).format('YYYY-MM-DD');
134
+      console.log('submit data --->', submitValue)
135
+      if(dynamicId){
136
+        submitValue.dynamicId = dynamicId
137
+        request({
138
+          url: '/api/admin/buildingDynamic/update',
139
+          method: 'PUT',
140
+          data: submitValue,
141
+        }).then((data) => {
142
+          cancelPage()
143
+        }).catch((err) => {
144
+          message.info(err.msg || err.message)
145
+        })
146
+      }else{
147
+        request({
148
+          url: '/api/admin/buildingDynamic/add',
149
+          method: 'POST',
150
+          data: submitValue,
151
+        }).then((data) => {
152
+          cancelPage()
153
+        }).catch((err) => {
154
+          message.info(err.msg || err.message)
155
+        })
156
+      }
157
+    }
158
+    return <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
19 159
   }
20 160
   
21 161
   const Poster = (props) => {

+ 76
- 15
src/pages/integralMall/editGoods.jsx View File

@@ -1,27 +1,88 @@
1
-import React from 'react';
2
-import { Form, Input, Button, Icon, Select } 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 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import styles from '../style/GoodsList.less';
4
+import channels from '../channel/channelList.less';
5
+import router from 'umi/router';
6
+import request from '../../utils/request'
5 7
 
8
+const { TextArea } = Input;
9
+const { Option } = Select;
6 10
 
11
+const header = props => {
7 12
 
8
-/**
9
- *
10
- *
11
- * @param {*} props
12
- * @returns
13
- */
13
+  const [data, setData] = useState({ channelNmae: [], result: [] })
14 14
 
15
+  function goBack(){
16
+    router.push({
17
+      pathname: '/integralMall/GoodsList',
18
+    });
19
+  }
15 20
 
16
-function header(props) {
17
-  const { getFieldDecorator } = props.form
18
-  return (
21
+  function addChannel(params) {
22
+    request({
23
+      url: '/api/admin/channel',
24
+      method: 'POST',
25
+      data: { ...params },
26
+      // eslint-disable-next-line no-shadow
27
+    }).then(data => {
28
+      console.log(data)
29
+      setData(data)
30
+      // eslint-disable-next-line no-unused-expressions
31
+      router.go(-1)
32
+    })
33
+  }
34
+
35
+  function handleSubmit(e) {
36
+    e.preventDefault();
37
+    props.form.validateFields((err, values) => {
38
+      if (!err) {
39
+        console.log('Received values of form: ', values);
40
+        // eslint-disable-next-line max-len
41
+        addChannel({ channelName: values.channelName, channelContact: values.channelContact, contactTel: values.contactTel })
42
+      }
43
+    });
44
+  }
19 45
 
46
+  const { getFieldDecorator } = props.form;
47
+
48
+  return (
20 49
     <>
21
-     <div>编辑商品</div>
50
+      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
51
+        <Form.Item label="商品名称">
52
+          {getFieldDecorator('channelName', {
53
+            rules: [{ message: '请输入商品名称' }],
54
+          })(<Input className={channels.inpuit} />)}
55
+        </Form.Item>
56
+        <Form.Item label="所需积分">
57
+          {getFieldDecorator('channelContact', {
58
+            rules: [{ message: ' 请输入所需积分' }],
59
+          })(<Input className={channels.inpuit} />)}
60
+        </Form.Item>
61
+        <Form.Item label="商品数量">
62
+          {getFieldDecorator('contactTel', {
63
+            rules: [{ message: '请输入商品数量' }],
64
+          })(<Input className={channels.inpuit} />)}
65
+        </Form.Item>
66
+        <Form.Item label="剩余数量">
67
+          {getFieldDecorator('contactTel', {
68
+            rules: [{ message: '请输入剩余数量' }],
69
+          })(<Input className={channels.inpuit} />)}
70
+        </Form.Item>
71
+        <Form.Item label="商品详情">
72
+          <TextArea className={channels.inpuitTxt} rows={8} />
73
+        </Form.Item>
74
+        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
75
+          <Button type="primary" htmlType="submit">
76
+            保存
77
+          </Button>
78
+          <Button className={channels.formButton} onClick={goBack} type="primary" htmlType="submit">
79
+            取消
80
+          </Button>
81
+        </Form.Item>
82
+      </Form>
22 83
     </>
23 84
   )
24 85
 }
25
-const WrappedHeader = Form.create({ name: 'header' })(header);
26 86
 
27
-export default WrappedHeader
87
+const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);
88
+export default WrappedNormalLoginForm

+ 47
- 45
src/pages/integralMall/exchangeRecords.jsx View File

@@ -246,52 +246,54 @@ function record(props) {
246 246
 
247 247
     <>
248 248
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
249
-        <Form.Item>
250
-          {getFieldDecorator('name')(
251
-            <Input
252
-              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
253
-              placeholder="用户姓名"
254
-            />,
255
-          )}
256
-        </Form.Item>
257
-        <Form.Item>
258
-          {getFieldDecorator('phone')(
259
-            <Input
260
-              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
261
-              placeholder="手机号"
262
-            />,
263
-          )}
264
-        </Form.Item>
265
-        <Form.Item>
266
-          {getFieldDecorator('goodName')(
267
-            <Input
268
-              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
269
-              placeholder="商品名称"
270
-            />,
271
-          )}
272
-        </Form.Item>
273
-        <Form.Item>
274
-          {getFieldDecorator('type')(
275
-            <Select style={{ width: '200px' }} placeholder="用户类型" onChange={handleSelectChange}>
276
-              <Option value="2">置业顾问</Option>
277
-              <Option value="1">销售主管</Option>
278
-              <Option value="0">经纪人</Option>
279
-            </Select>,
280
-          )}
281
-        </Form.Item>
282
-        <Form.Item>
283
-          {getFieldDecorator('state')(
284
-            <Select style={{ width: '200px' }} placeholder="状态" onChange={handleSelectChange}>
285
-              <Option value="1">已领取</Option>
286
-              <Option value="0">未领取</Option>
287
-            </Select>,
288
-          )}
289
-        </Form.Item>
290
-        <Form.Item>
291
-          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
292
-            搜索
249
+        <div style={{ display: 'flex' }}>
250
+          <Form.Item>
251
+            {getFieldDecorator('name')(
252
+              <Input
253
+                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
254
+                placeholder="用户姓名"
255
+              />,
256
+            )}
257
+          </Form.Item>
258
+          <Form.Item>
259
+            {getFieldDecorator('phone')(
260
+              <Input
261
+                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
262
+                placeholder="手机号"
263
+              />,
264
+            )}
265
+          </Form.Item>
266
+          <Form.Item>
267
+            {getFieldDecorator('goodName')(
268
+              <Input
269
+                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
270
+                placeholder="商品名称"
271
+              />,
272
+            )}
273
+          </Form.Item>
274
+          <Form.Item>
275
+            {getFieldDecorator('type')(
276
+              <Select style={{ width: '220px' }} placeholder="用户类型" onChange={handleSelectChange}>
277
+                <Option value="2">置业顾问</Option>
278
+                <Option value="1">销售主管</Option>
279
+                <Option value="0">经纪人</Option>
280
+              </Select>,
281
+            )}
282
+          </Form.Item>
283
+          <Form.Item>
284
+            {getFieldDecorator('state')(
285
+              <Select style={{ width: '220px' }} placeholder="状态" onChange={handleSelectChange}>
286
+                <Option value="1">已领取</Option>
287
+                <Option value="0">未领取</Option>
288
+              </Select>,
289
+            )}
290
+          </Form.Item>
291
+          <Form.Item>
292
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
293
+              搜索
293 294
           </Button>
294
-        </Form.Item>
295
+          </Form.Item>
296
+        </div>
295 297
         <Form.Item>
296 298
           <DateRange />
297 299
         </Form.Item>

+ 210
- 0
src/pages/news/list/NewsList.jsx View File

@@ -0,0 +1,210 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import Styles from './style.less';
7
+
8
+
9
+const { Option } = Select;
10
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
11
+const { Meta } = Card;
12
+
13
+const tempDate = [{ code: 's101' }]
14
+
15
+/**
16
+ *卡片
17
+ *
18
+ * @returns
19
+ */
20
+function CartBody(props) {
21
+  const { data } = props
22
+  console.log(props);
23
+  return (
24
+          <Card
25
+            hoverable
26
+            style={{ minWidth: '400px', borderRadius: '12px', margin: '10px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)' }}
27
+            cover={<img alt="example" src={ data.newsImg } style={{ borderRadius: '12px 12px 0 0', width: '100%', height: '14vw' }}></img>}
28
+            bodyStyle={{ padding: '10px 20px' }}
29
+          >
30
+            <p className={Styles.cardText}>
31
+              <span className={Styles.title}>资讯类型</span>
32
+              <span >:{ data.newsType.newsTypeName }</span>
33
+              <span className={Styles.ediText}>
34
+                编辑
35
+                <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
36
+              </span>
37
+            </p>
38
+            <p className={Styles.cardText}>
39
+              <span className={Styles.title}>状态</span>
40
+              <span >:{ data.status == '0' ? "已发布" : "未发布" }</span>
41
+            </p>
42
+            <p className={Styles.cardItem}>
43
+              <span className={Styles.title}>阅读数量</span>
44
+              <span > :{ data.pvNum }</span>
45
+            </p>
46
+            <p className={Styles.cardItem}>
47
+              <span className={Styles.title}>转发数量</span>
48
+              <span className={ Styles.address }>:{ data.shareNum }</span>
49
+            </p>
50
+            <p className={Styles.cardItem}>
51
+              <span className={Styles.title}>点赞数量</span>     
52
+              <span >:{ data.favorNum }</span>         
53
+            </p>
54
+            <p className={Styles.cardItem}>
55
+              <span className={Styles.title}>收藏数量</span>
56
+              <span >:{ data.saveNum }</span>
57
+            </p>
58
+            <p className={Styles.cardItem}>
59
+              <span className={Styles.title}>录入时间</span>
60
+              <span >:{ data.createDate }</span>
61
+            </p>
62
+            <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' }} />
66
+              </span>
67
+              <span style={{
68
+                color: '#FF4A4A', position: 'absolute', right: '0',
69
+              }} >
70
+                删除
71
+                <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
72
+              </span>
73
+            </p>
74
+          </Card>
75
+  )
76
+}
77
+
78
+/**
79
+ *
80
+ *
81
+ * @param {*} props
82
+ * @returns
83
+ */
84
+function body(props) {
85
+  const { getFieldDecorator } = props.form
86
+
87
+  // eslint-disable-next-line react-hooks/rules-of-hooks
88
+  const [dataSource, setDataSource] = useState({ records: [] })
89
+
90
+  // eslint-disable-next-line react-hooks/rules-of-hooks
91
+  useEffect(() => {
92
+    getList({ pageNum: 1, pageSize: 6 })
93
+  }, [])
94
+
95
+  function getList(params) {
96
+    // 网路请求
97
+    request({ ...apis.news.getList, params: { ...params } }).then(res => {
98
+      setDataSource(res)
99
+    }).catch(err => {
100
+      // eslint-disable-next-line no-unused-expressions
101
+      <Alert
102
+        style={{
103
+          marginBottom: 24,
104
+        }}
105
+        message={err}
106
+        type="error"
107
+        showIcon
108
+      />
109
+    })
110
+  }
111
+
112
+  // 提交事件
113
+  function handleSubmit(e) {
114
+    e.preventDefault();
115
+    props.form.validateFields((err, values) => {
116
+      if (!err) {
117
+        // eslint-disable-next-line no-console
118
+        console.log('提交数据: ', values)
119
+        const { startDate } = values
120
+        getList({ pageNum: 1, pageSize: 9, ...values })
121
+      }
122
+    });
123
+  }
124
+
125
+  // Change 事件
126
+  function handleSelectChange(e) {
127
+    // eslint-disable-next-line no-console
128
+    console.log(e)
129
+  }
130
+
131
+  // 分页
132
+  function onChange(pageNumber) {
133
+    // eslint-disable-next-line react-hooks/rules-of-hooks
134
+      getList({ pageNum: pageNumber, pageSize: 9 })
135
+  }
136
+
137
+  function getDate(value, dateString) {
138
+    // moment(value).format('YYYY-MM-DD HH:mm:ss')
139
+    console.log(value, dateString)
140
+  }
141
+
142
+  return (
143
+    <>
144
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
145
+
146
+        <Form.Item>
147
+          {getFieldDecorator('city')(
148
+            <Select style={{ width: '180px' }} placeholder="请选择城市" onChange={handleSelectChange}>
149
+            </Select>,
150
+          )}
151
+        </Form.Item>
152
+
153
+        <Form.Item>
154
+          {getFieldDecorator('project')(
155
+            <Select style={{ width: '180px' }} placeholder="请选择项目" onChange={handleSelectChange}>
156
+            </Select>,
157
+          )}
158
+        </Form.Item>
159
+        <Form.Item>
160
+          {getFieldDecorator('title')(
161
+            <Input
162
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
163
+              placeholder="请输入标题"
164
+            />,
165
+          )}
166
+        </Form.Item>
167
+        <Form.Item>
168
+          {getFieldDecorator('type')(
169
+            <Select style={{ width: '180px' }} placeholder="咨询类型" onChange={handleSelectChange}>
170
+            </Select>,
171
+          )}
172
+        </Form.Item>       
173
+        <Form.Item>
174
+          {getFieldDecorator('newsStatus')(
175
+            <Select style={{ width: '180px' }} placeholder="状态" onChange={handleSelectChange}>
176
+              <Option value="1">已发布</Option>
177
+              <Option value="0">未发布</Option>
178
+            </Select>,
179
+          )}
180
+        </Form.Item>
181
+        <Form.Item>
182
+          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
183
+            搜索
184
+          </Button>
185
+        </Form.Item>
186
+      </Form>
187
+      <Button type="primary" className={Styles.addButton}>
188
+        新增
189
+      </Button>
190
+
191
+      {/* 卡片内容,显示楼盘项目  */}
192
+      <Row style={{ padding: ' 0 10px' }}>
193
+        {
194
+          dataSource.records.map((item, index) => (
195
+              <Col span={8}>
196
+                <CartBody data={item} key={item.buildingId}/>
197
+              </Col>
198
+            ))
199
+        }
200
+      </Row>
201
+      {/* 分页 */}
202
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
203
+        <Pagination showQuickJumper defaultCurrent={1} total={dataSource.total} onChange={onChange} />
204
+      </div>
205
+    </>
206
+  );
207
+}
208
+const WrappedBody = Form.create({ name: 'body' })(body);
209
+
210
+export default WrappedBody

+ 58
- 0
src/pages/news/list/style.less View File

@@ -0,0 +1,58 @@
1
+.SubmitButton {
2
+    background: #3a91d5;
3
+    border-radius: 7px;
4
+    border: 0px;
5
+  }
6
+  .SelectFrom {
7
+    width: 180px;
8
+    background: #ffffff;
9
+    border-radius: 7px;
10
+    border: 1px solid #dbdbdb;
11
+  }
12
+  .addButton {
13
+    background: #50be00;
14
+    border-radius: 4px;
15
+    border: 0px;
16
+    margin: 10px 0px;
17
+  }
18
+  .cardText {
19
+    font-size: 18px;
20
+    color: #333;
21
+    line-height: 24px;
22
+    display: flex;
23
+    align-items: center;
24
+    position: relative;
25
+  
26
+  }
27
+  .cardItem{
28
+    font-size: 18px;
29
+    font-weight: 400;
30
+    color: #666;
31
+    line-height: 24px;
32
+    display: flex;
33
+    align-items: center;  
34
+  }
35
+  .ediText {
36
+    font-size: 18px;
37
+    color: #ff925c;
38
+    line-height: 24px;
39
+    position: absolute;
40
+    right: 0;
41
+  }
42
+  .title{
43
+    display: inline-block;
44
+    width: 84px;
45
+    justify-content: space-between;
46
+    text-align: justify;
47
+    text-align-last:justify
48
+  }
49
+  
50
+  .address { 
51
+    width: 400px;
52
+    height: 24px; 
53
+    text-overflow: ellipsis; 
54
+    white-space: nowrap;
55
+    overflow: hidden;
56
+  }
57
+  
58
+  

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

@@ -59,7 +59,7 @@ const columns = [
59 59
     title: '类型图片',
60 60
     dataIndex: 'img',
61 61
     key: 'img',
62
-    align: 'center',
62
+    align: 'left',
63 63
     render: (text, record) => <img src={record.img} className={styles.touxiang} />,
64 64
   },
65 65
   {

+ 1
- 1
src/pages/style/GoodsList.less View File

@@ -1,5 +1,5 @@
1 1
 .addBtn {
2
-  padding: 0 30px;
2
+  padding: 0 40px;
3 3
   height: 36px;
4 4
   background-color: #FF7E48;
5 5
   color: #fff;

+ 1
- 1
src/pages/user/login/components/Login/LoginSubmit.jsx View File

@@ -9,7 +9,7 @@ const LoginSubmit = ({ className, ...rest }) => {
9 9
   const clsString = classNames(styles.submit, className);
10 10
   return (
11 11
     <FormItem>
12
-      <Button size="large" className={clsString} type="primary" htmlType="submit" {...rest} style={{ backgroundColor: '#DB3C4B', borderRadius: '4px', border: 'none' }} />
12
+      <Button size="large" className={clsString} type="primary" htmlType="submit" {...rest} style={{ backgroundColor: '#EF273A', borderRadius: '4px', border: 'none' }} />
13 13
     </FormItem>
14 14
   );
15 15
 };

+ 1
- 1
src/pages/user/login/components/Login/index.jsx View File

@@ -118,7 +118,7 @@ class Login extends Component {
118 118
           <div className={styles.con}>
119 119
             <p className={styles.welcome}>Welcome</p>
120 120
             <div className={styles.title}>
121
-              <span style={{fontSize:'18px'}}>ying xiao yun</span>
121
+              <span style={{fontSize:'18px',lineHeight:'18px'}}>ying xiao yun</span>
122 122
               <p className={styles.name}>营销云·系统</p>
123 123
             </div>
124 124
           </div>

+ 9
- 6
src/pages/user/login/components/Login/index.less View File

@@ -9,16 +9,17 @@ position: relative;
9 9
     left:50%;
10 10
     top:50%;
11 11
     margin-top: -100px;
12
-    margin-left: -136px;
12
+    margin-left: -150px;
13 13
     text-align: center;
14 14
     height: 200px;
15
-    width: 272px;
15
+    width: 300px;
16 16
     overflow: hidden;
17 17
     .welcome{
18 18
       color: #fff;
19
-      font-size: 60px;
19
+      font-size: 62px;
20 20
       font-style: italic;
21 21
       margin-bottom: 0;
22
+      font-family: initial;
22 23
     }
23 24
     .title{
24 25
       width: 260px;
@@ -29,7 +30,7 @@ position: relative;
29 30
       padding: 14px  20px;
30 31
       margin:  0 auto;
31 32
       .name{
32
-        font-size: 40px;
33
+        font-size: 41px;
33 34
         margin:0; 
34 35
       }
35 36
     }
@@ -82,8 +83,10 @@ position: relative;
82 83
   }
83 84
 
84 85
   .prefixIcon {
85
-    color: @disabled-color;
86
-    font-size: @font-size-base;
86
+    color: #fff;
87
+    font-size: 18px;
88
+    background-color: #EF273A;
89
+    padding: 3px 4px;
87 90
   }
88 91
 
89 92
   .submit {

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

@@ -1,6 +1,12 @@
1 1
 const prefix = '/api/admin'
2 2
 
3 3
 export default {
4
+  image: {
5
+    upload: {
6
+      url: `${prefix}/antd/image`,
7
+      method: 'POST',
8
+    }
9
+  },
4 10
   user: {
5 11
     current: {
6 12
       method: 'GET',
@@ -39,6 +45,12 @@ export default {
39 45
       url: `${prefix}/tdBuildingType/id`,
40 46
     },
41 47
   },
48
+  news: {
49
+    getList: {
50
+      method: 'GET',
51
+      url: `${prefix}/taNews`,
52
+    },
53
+  },
42 54
   customer: {
43 55
     drift: {
44 56
       method: 'GET',

+ 12
- 0
src/services/news.js View File

@@ -0,0 +1,12 @@
1
+import request from '@/utils/request';
2
+
3
+/**
4
+ * 项目
5
+ */
6
+
7
+/**
8
+ * 获取列表
9
+ */
10
+export async function getList() {
11
+  return request('/api/admin/taNews')
12
+}

+ 11
- 0
src/utils/upload.js View File

@@ -0,0 +1,11 @@
1
+import apis from '../services/apis';
2
+
3
+const uploaderProps = {
4
+  name: 'file',
5
+  action: apis.image.upload.url,
6
+  headers: {
7
+    Authorization: `Bearer ${window.localStorage.getItem('x-token')}`
8
+  }
9
+}
10
+
11
+export { uploaderProps }