Bläddra i källkod

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

林凡 5 år sedan
förälder
incheckning
60fcabd8b0

+ 1
- 1
src/components/SelectButton/NewTypeSelect.jsx Visa fil

@@ -49,7 +49,7 @@ const NewsTypeSelect = (props) => {
49 49
   }
50 50
 
51 51
   return (
52
-      <Select value={'' === value ? undefined : value} style={{ width: '180px' }} placeholder="请选择资讯类型" onChange={handleChange}>
52
+      <Select value={props.value} style={{ width: '180px' }} placeholder="请选择资讯类型" onChange={handleChange}>
53 53
           {data.map(type => (
54 54
             <Option key={type.newsTypeId} value={type.newsTypeId}>{type.newsTypeName}</Option>
55 55
           ))}

+ 1
- 1
src/layouts/BasicLayout.jsx Visa fil

@@ -103,7 +103,7 @@ const BasicLayout = props => {
103 103
       }}
104 104
       breadcrumbRender={(routers = []) => [
105 105
         {
106
-          path: '/welcome',
106
+          path: '/',
107 107
           breadcrumbName: formatMessage({
108 108
             id: 'menu.home',
109 109
             defaultMessage: 'Home',

+ 1
- 0
src/pages/activity/detailActivity.jsx Visa fil

@@ -114,6 +114,7 @@ const BasicForm = props => {
114 114
       <Form {...formItemLayout} onSubmit={handleSubmit}>
115 115
         <Form.Item label="所属项目">
116 116
         {getFieldDecorator('buildingId', {
117
+          initialValue: detailData.buildingId,
117 118
           rules: [
118 119
             {
119 120
               required: true,

+ 4
- 6
src/pages/activity/drainage/DrainageList.jsx Visa fil

@@ -306,14 +306,12 @@ const header = (props) => {
306 306
         )}
307 307
       </Form.Item>
308 308
       <Form.Item label="下架时间">
309
-        {getFieldDecorator('endDate',{initialValue : formsdate.endDate ? moment(formsdate.endDate, 'YYYY-MM-DD HH:mm') : null,
309
+        {getFieldDecorator('endDate',{initialValue : formsdate.endDate ? moment(formsdate.endDate, 'YYYY-MM-DD HH:mm:ss') : null,
310 310
           rules: [
311 311
             { required: true, message: '请输入下架时间' },
312 312
           ]})(
313 313
           <DatePicker
314
-          // prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
315
-          // placeholder={formsdate.endDate}
316
-          // value= formsdate.endDate ? moment(formsdate.endDate, 'YYYY-MM-DD HH:mm') : null
314
+          showTime={{ format: 'HH:mm:ss' }}
317 315
           />,
318 316
         )}
319 317
       </Form.Item>
@@ -436,7 +434,7 @@ const header = (props) => {
436 434
   //打开新页面
437 435
   const openIndexImg = () => {
438 436
     const newWin=window.open('about:blank');
439
-    newWin.location.href="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3632677651,3179755979&fm=26&gp=0.jpg"
437
+    newWin.location.href="https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1575876908239-1.jpg"
440 438
   }
441 439
   
442 440
   const { getFieldDecorator } = props.form;
@@ -491,7 +489,7 @@ const header = (props) => {
491 489
         <AuthButton name="admin.taDrainage.add.post" noRight={null}>
492 490
           <Button type="danger" className={styles.addBtn} onClick={showModal}>新增</Button>
493 491
         </AuthButton>
494
-          <span style={{ color: '#66B3FF', cursor: 'pointer', marginLeft: 20 }} onClick={openIndexImg}>什么是H5活动?</span>
492
+          <span style={{ color: '#66B3FF', cursor: 'pointer', marginLeft: 20 }} onClick={openIndexImg}>优质案例</span>
495 493
         <Modal
496 494
           title={title}
497 495
 

+ 6
- 0
src/pages/activity/drainage/DrainageVisitRecordList.jsx Visa fil

@@ -38,6 +38,12 @@ const header = props => {
38 38
    */
39 39
 
40 40
   const columns = [
41
+    {
42
+      title: '活动编号',
43
+      dataIndex: 'targetId',
44
+      key: 'targetId',
45
+      align: 'center',
46
+    },
41 47
     {
42 48
       title: '活动名称',
43 49
       dataIndex: 'activityName',

+ 1
- 16
src/pages/activity/groupActivity/detailActivity.jsx Visa fil

@@ -41,22 +41,6 @@ const getSignList = groupActivityId => {
41 41
       });
42 42
 }
43 43
 
44
-const newQrcode = row => {
45
-  const x = new XMLHttpRequest();
46
-  const resourceUrl = row.qrCode
47
-  x.open('GET', resourceUrl, true);
48
-  x.responseType = 'blob';
49
-  x.onload = function (e) {
50
-    const url = window.URL.createObjectURL(x.response)
51
-    const a = document.createElement('a');
52
-    a.href = url;
53
-    a.style.display = 'none'
54
-    a.download = '活动二维码.png';
55
-    a.click();
56
-  }
57
-  x.send();
58
-}
59
-
60 44
 const BasicForm = props => {
61 45
   // const [activityStatus, setActivityStatus] = useState(1)
62 46
   // const [disable, setDisable] = useState(false)
@@ -114,6 +98,7 @@ const BasicForm = props => {
114 98
       <Form {...formItemLayout} onSubmit={handleSubmit}>
115 99
         <Form.Item label="所属项目">
116 100
         {getFieldDecorator('buildingId', {
101
+          initialValue: detailData.buildingId,
117 102
           rules: [
118 103
             {
119 104
               required: true,

+ 2
- 17
src/pages/activity/helpActivity/detailActivity.jsx Visa fil

@@ -41,26 +41,10 @@ const getSignList = helpActivityId => {
41 41
       });
42 42
 }
43 43
 
44
-const newQrcode = row => {
45
-  const x = new XMLHttpRequest();
46
-  const resourceUrl = row.qrCode
47
-  x.open('GET', resourceUrl, true);
48
-  x.responseType = 'blob';
49
-  x.onload = function (e) {
50
-    const url = window.URL.createObjectURL(x.response)
51
-    const a = document.createElement('a');
52
-    a.href = url;
53
-    a.style.display = 'none'
54
-    a.download = '活动二维码.png';
55
-    a.click();
56
-  }
57
-  x.send();
58
-}
59
-
60 44
 const BasicForm = props => {
61 45
 
62 46
   const detailData = props.detailData || {}
63
-
47
+  
64 48
   const { helpActivityId } = props
65 49
 
66 50
   const handleSubmit = e => {
@@ -111,6 +95,7 @@ const BasicForm = props => {
111 95
       <Form {...formItemLayout} onSubmit={handleSubmit}>
112 96
         <Form.Item label="所属项目">
113 97
         {getFieldDecorator('buildingId', {
98
+          initialValue: detailData.buildingId,
114 99
           rules: [
115 100
             {
116 101
               required: true,

+ 1
- 1
src/pages/carouselFigure/SelectActivity.jsx Visa fil

@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2 2
 import{ Select, Modal } from 'antd';
3 3
 import { apis, fetch } from '../../utils/request';
4 4
 
5
-const getActivities = fetch(apis.activity.list)
5
+const getActivities = fetch(apis.activity.listSelected)
6 6
 
7 7
 export default (props) => {
8 8
   const {

+ 2
- 0
src/pages/carouselFigure/SelectH5.jsx Visa fil

@@ -24,6 +24,8 @@ export default props => {
24 24
       params: {
25 25
         pageNum: 1,
26 26
         pageSize: 999,
27
+        isMiniapp: 1,
28
+        status: 1,
27 29
       },
28 30
     }).then(data => {
29 31
       setList(data.records || [])

+ 1
- 0
src/pages/carouselFigure/SelectHelp.jsx Visa fil

@@ -28,6 +28,7 @@ export default props => {
28 28
         buildingId,
29 29
         pageNum: 1,
30 30
         pageSize: 999,
31
+        status: 1,
31 32
       },
32 33
     }).then(data => {
33 34
       setList(data.records || [])

+ 1
- 0
src/pages/carouselFigure/SelectNews.jsx Visa fil

@@ -25,6 +25,7 @@ export default props => {
25 25
         buildingId,
26 26
         pageNum: 1,
27 27
         pageSize: 999,
28
+        newsStatus: 0,
28 29
       },
29 30
     }).then(data => {
30 31
       setList(data.records || [])

+ 5
- 8
src/pages/carouselFigure/carouselFigureList.jsx Visa fil

@@ -158,6 +158,7 @@ const deleteCarouse = (contentId) => () =>{
158 158
                   getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
159 159
               }).catch((err) => {
160 160
                   console.log(err)
161
+                  row.status = 0
161 162
                   message.info(err.msg || err.message)
162 163
               })
163 164
           },
@@ -175,6 +176,7 @@ const deleteCarouse = (contentId) => () =>{
175 176
                   getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
176 177
               }).catch((err) => {
177 178
                   console.log(err)
179
+                  row.status = 1
178 180
                   message.info(err.msg || err.message)
179 181
               })
180 182
           },
@@ -183,13 +185,8 @@ const deleteCarouse = (contentId) => () =>{
183 185
 
184 186
   }
185 187
   
186
-  const changePageNum = (pageNumber, props) => {
187
-      props.form.validateFields((err, values) => {
188
-        if (!err) {
189
-          console.log('提交数据: ', values)
190
-          getList({ pageNum: pageNumber, pageSize: 10, ...values, showType: 'banner' })
191
-        }
192
-      });
188
+  const changePageNum = (pageNumber) => {
189
+      getList({ pageNum: pageNumber, pageSize: 10, showType: 'banner' })
193 190
   }
194 191
 
195 192
   // 提交事件
@@ -267,7 +264,7 @@ const handleSubmit = (e, props) => {
267 264
       </AuthButton>
268 265
       <Table dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>
269 266
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
270
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e,props)} current={data.current}/>
267
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
271 268
       </div>
272 269
     </>
273 270
   )

+ 0
- 4
src/pages/carouselFigure/editAdvertising.jsx Visa fil

@@ -177,10 +177,6 @@ import SelectH5 from './SelectH5';
177 177
           label: '资讯',
178 178
           value: 'news'
179 179
         },
180
-        {
181
-          label: '其他',
182
-          value: 'other'
183
-        },
184 180
         {
185 181
           label: '拼团',
186 182
           value: 'group'

+ 2
- 1
src/pages/customer/customerlist/components/integralRecord.jsx Visa fil

@@ -113,7 +113,8 @@ class ModalIntegralRecord extends React.Component {
113 113
         title: '序号',
114 114
         dataIndex: 'index',
115 115
         key: 'index',
116
-        render: (text, record, index) => <span>{(this.state.dataSource.result.total - this.state.dataSource.result.records.length) * 1 + index + 1}</span>,
116
+        render: (text, record, index) => <span>{index + 1}</span>,
117
+        // render: (text, record, index) => <span>{(this.state.dataSource.result.total - this.state.dataSource.result.records.length) * 1 + index + 1}</span>,
117 118
       },
118 119
       {
119 120
         title: '积分类型',

+ 6
- 0
src/pages/customer/customerlist/customerDetail.jsx Visa fil

@@ -78,6 +78,12 @@ function onChange(number) {
78 78
       key: 'activity',
79 79
       align: 'center',
80 80
     },
81
+    {
82
+      title: '访问内容',
83
+      dataIndex: 'activityName',
84
+      key: 'activityName',
85
+      align: 'center',
86
+    },
81 87
     {
82 88
       title: '访问时间',
83 89
       dataIndex: 'visitTime',

+ 6
- 0
src/pages/customer/customerlist/publicCustomerDetail.jsx Visa fil

@@ -79,6 +79,12 @@ function onChange(number) {
79 79
       key: 'activity',
80 80
       align: 'center',
81 81
     },
82
+    {
83
+      title: '访问内容',
84
+      dataIndex: 'activityName',
85
+      key: 'activityName',
86
+      align: 'center',
87
+    },
82 88
     {
83 89
       title: '访问时间',
84 90
       dataIndex: 'visitTime',

+ 5
- 0
src/services/apis.js Visa fil

@@ -393,6 +393,11 @@ export default {
393 393
         url: `${prefix}/iBuildingDynamicList`,
394 394
         action: 'admin.iBuildingDynamicList.get',
395 395
       },
396
+      listSelected: {
397
+        method: 'GET',
398
+        url: `${prefix}/iBuildingDynamicSelected`,
399
+        action: 'admin.iBuildingDynamicList.get',
400
+      },
396 401
       weight: {
397 402
         method: 'PUT',
398 403
         url: `${prefix}/buildingDynamic/weight`,