Browse Source

Merge branch 'master' of http://git.ycjcjy.com/marketing/pc-admin into master

zlisen 3 years ago
parent
commit
2fa7f4191e
24 changed files with 84 additions and 2224 deletions
  1. 1
    1
      config/routes.js
  2. 2
    2
      src/components/Poster/Form.jsx
  3. 22
    48
      src/pages/activity/SignupActivity/detail.jsx
  4. 8
    8
      src/pages/activity/SignupActivity/edit/Basic.jsx
  5. 0
    255
      src/pages/activity/SignupActivity/edit/Poster.jsx
  6. 0
    150
      src/pages/activity/SignupActivity/edit/Share.jsx
  7. 16
    14
      src/pages/activity/SignupActivity/edit/index.jsx
  8. 7
    7
      src/pages/activity/groupRoomActivity/edit/Basic.jsx
  9. 0
    182
      src/pages/activity/liveActivity/add/index.jsx
  10. 0
    65
      src/pages/activity/liveActivity/edit/components/BuildSelect/BuildSelect.jsx
  11. 0
    109
      src/pages/activity/liveActivity/edit/components/HelpDoc/index.jsx
  12. 0
    36
      src/pages/activity/liveActivity/edit/components/HelpDoc/style.less
  13. 0
    206
      src/pages/activity/liveActivity/edit/components/base.jsx
  14. 0
    167
      src/pages/activity/liveActivity/edit/components/poster.jsx
  15. 0
    118
      src/pages/activity/liveActivity/edit/components/share.jsx
  16. 0
    153
      src/pages/activity/liveActivity/edit/components/shareRecord.jsx
  17. 0
    97
      src/pages/activity/liveActivity/edit/components/style.less
  18. 0
    154
      src/pages/activity/liveActivity/edit/components/visitRecord.jsx
  19. 0
    87
      src/pages/activity/liveActivity/edit/index.jsx
  20. 0
    323
      src/pages/activity/liveActivity/list/index.jsx
  21. 0
    16
      src/pages/activity/liveActivity/list/liveActivityRecord.jsx
  22. 7
    7
      src/pages/activity/lookHouseActivity/edit/Basic.jsx
  23. 15
    15
      src/pages/building/Edit/SpecialRoom/index.jsx
  24. 6
    4
      src/pages/customer/Recommend/audit.jsx

+ 1
- 1
config/routes.js View File

@@ -266,7 +266,7 @@ export default [
266 266
 
267 267
               {
268 268
                 path: '/activity/lookHouseActivity',
269
-                name: '看房团',
269
+                name: '一键带看',
270 270
                 component: './activity/lookHouseActivity',
271 271
               },
272 272
               {

+ 2
- 2
src/components/Poster/Form.jsx View File

@@ -37,8 +37,8 @@ const PosterForm = (props) => {
37 37
         return
38 38
       }
39 39
 
40
-      const request = formData.posterId ? updateData : saveData
41
-      const urlData = formData.posterId ? { id: formData.posterId } : undefined
40
+      const request = formData?.posterId ? updateData : saveData
41
+      const urlData = formData?.posterId ? { id: formData.posterId } : undefined
42 42
       const data = {
43 43
         targetId,
44 44
         targetType,

+ 22
- 48
src/pages/activity/SignupActivity/detail.jsx View File

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Card, Radio, DatePicker, message, Upload } from 'antd';
2
+import { Form, Input, Button, Tabs, Select, Card, Radio, DatePicker, message, Upload } from 'antd';
3 3
 
4 4
 import apis from '@/services/apis';
5 5
 import moment from 'moment';
@@ -17,12 +17,11 @@ import { getImgURL } from '@/utils/image';
17 17
 import Share from '@/components/Share';
18 18
 import Poster from '@/components/Poster';
19 19
 
20
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
21
-const { TextArea } = Input;
20
+const { TabPane } = Tabs
22 21
 
23 22
 const formItemLayout = {
24
-  labelCol: { span: 6 },
25
-  wrapperCol: { span: 14 },
23
+  labelCol: { span: 4 },
24
+  wrapperCol: { span: 18 },
26 25
 };
27 26
 
28 27
 const cancelPage = () => {
@@ -110,7 +109,7 @@ const BasicForm = props => {
110 109
   const { getFieldDecorator } = props.form;
111 110
   return (
112 111
     <>
113
-      <Form {...formItemLayout} onSubmit={handleSubmit}>
112
+      <Form {...formItemLayout} onSubmit={handleSubmit} style={{maxWidth: '1000px'}}>
114 113
         <Form.Item label="所属项目">
115 114
           {getFieldDecorator('buildingId', {
116 115
             initialValue: detailData.buildingId,
@@ -122,12 +121,12 @@ const BasicForm = props => {
122 121
             ],
123 122
           })(<BuildSelect disabled />)}
124 123
         </Form.Item>
125
-        <Form.Item label="活动封面图1">
124
+        <Form.Item label="活动封面图">
126 125
           <img src={getImgURL(detailData.listImgUrl)} height="210px" width="375px" />
127 126
         </Form.Item>
128
-        <Form.Item label="活动封面图2">
127
+        {/* <Form.Item label="活动封面图2">
129 128
           <img src={getImgURL(detailData.bannerListImg)} height="125px" width="375px" />
130
-        </Form.Item>
129
+        </Form.Item> */}
131 130
         <Form.Item label="活动详情主图">
132 131
           <img src={getImgURL(detailData.imgUrl)} height="300px" width="375px" />
133 132
         </Form.Item>
@@ -186,7 +185,7 @@ const BasicForm = props => {
186 185
             </span>
187 186
           )}
188 187
         </AuthButton>
189
-        <AuthButton name="admin.dymic.qrcode" noRight={null}>
188
+        {/* <AuthButton name="admin.dymic.qrcode" noRight={null}>
190 189
           {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && (
191 190
             <span
192 191
               style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }}
@@ -195,7 +194,7 @@ const BasicForm = props => {
195 194
               {<Button>下载二维码</Button>}
196 195
             </span>
197 196
           )}
198
-        </AuthButton>
197
+        </AuthButton> */}
199 198
         <Button onClick={() => cancelPage()}>取消</Button>
200 199
       </div>
201 200
     </>
@@ -211,7 +210,6 @@ const Basic = Form.create({ name: 'BasicForm' })(BasicForm);
211 210
  * @returns
212 211
  */
213 212
 const Edit = props => {
214
-  const [tab, changeTab] = useState('basic');
215 213
   const { dynamicId } = props.location.query;
216 214
   const [detailData, setDetailData] = useState(false);
217 215
 
@@ -232,44 +230,20 @@ const Edit = props => {
232 230
   }, []);
233 231
 
234 232
   const target = { id: dynamicId, type: 'activity' };
233
+
235 234
   return (
236 235
     <Card>
237
-      <div>
238
-        <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
239
-          <Radio.Button value="basic">基本信息</Radio.Button>
240
-          <Radio.Button value="poster">海报图片</Radio.Button>
241
-          <Radio.Button value="share">分享设置</Radio.Button>
242
-        </Radio.Group>
243
-      </div>
244
-      <div>
245
-        {tab === 'basic' && <Basic dynamicId={dynamicId} detailData={detailData} />}
246
-
247
-        {tab === 'poster' && <Poster target={target} />}
248
-        {tab === 'share' && <Share target={target} />}
249
-      </div>
250
-      {/* <div style={{ textAlign: 'center' }}>
251
-        <AuthButton name="admin.SignList.get" noRight={null}>
252
-          {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && (
253
-            <span
254
-              style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }}
255
-              onClick={getSignList.bind(this, detailData.dynamicId)}
256
-            >
257
-              <Button>报名记录</Button>
258
-            </span>
259
-          )}
260
-        </AuthButton>
261
-        <AuthButton name="admin.dymic.qrcode" noRight={null}>
262
-          {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && (
263
-            <span
264
-              style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }}
265
-              onClick={newQrcode.bind(this, detailData)}
266
-            >
267
-              {<Button>下载二维码</Button>}
268
-            </span>
269
-          )}
270
-        </AuthButton>
271
-        <Button onClick={() => cancelPage()}>取消</Button>
272
-      </div> */}
236
+      <Tabs defaultActiveKey="1">
237
+        <TabPane tab="基础信息" key="1">
238
+          <Basic dynamicId={dynamicId} detailData={detailData} />
239
+        </TabPane>
240
+        <TabPane tab="海报图片" key="2">
241
+          <Poster target={target} />
242
+        </TabPane>
243
+        <TabPane tab="分享设置" key="3">
244
+          <Share target={target} />
245
+        </TabPane>
246
+      </Tabs>
273 247
     </Card>
274 248
   );
275 249
 };

+ 8
- 8
src/pages/activity/SignupActivity/edit/Basic.jsx View File

@@ -11,8 +11,8 @@ import ImageUploader from '@/components/XForm/ImageUpload';
11 11
 const { RangePicker } = DatePicker;
12 12
 
13 13
 const formItemLayout = {
14
-  labelCol: { span: 6 },
15
-  wrapperCol: { span: 14 },
14
+  labelCol: { span: 4 },
15
+  wrapperCol: { span: 18 },
16 16
 };
17 17
 
18 18
 const cancelPage = () => {
@@ -133,7 +133,7 @@ const BasicForm = props => {
133 133
   const { getFieldDecorator } = props.form;
134 134
   return (
135 135
     <>
136
-      <Form {...formItemLayout} onSubmit={handleSubmit}>
136
+      <Form {...formItemLayout} onSubmit={handleSubmit} style={{maxWidth: '1000px'}}>
137 137
         <Form.Item label="所属项目">
138 138
           {getFieldDecorator('buildingId', {
139 139
             rules: [
@@ -145,8 +145,8 @@ const BasicForm = props => {
145 145
           })(<BuildSelect disabled={disable} />)}
146 146
         </Form.Item>
147 147
         <Form.Item
148
-          label="活动封面图1"
149
-          help="建议图片尺寸:750px*420px,比例16:9,格式:jpg,用于:首页推荐/活动列表"
148
+          label="活动封面图"
149
+          help="建议图片尺寸:690px*388px,比例16:9,格式:jpg"
150 150
         >
151 151
           {getFieldDecorator('listImgUrl', {
152 152
             rules: [
@@ -157,7 +157,7 @@ const BasicForm = props => {
157 157
             ],
158 158
           })(<ImageUploader />)}
159 159
         </Form.Item>
160
-        <Form.Item
160
+        {/* <Form.Item
161 161
           label="活动封面图2"
162 162
           help="建议图片尺寸:750*250,比例3:1,格式:jpg,用于:项目详情页"
163 163
         >
@@ -169,10 +169,10 @@ const BasicForm = props => {
169 169
               },
170 170
             ],
171 171
           })(<ImageUploader />)}
172
-        </Form.Item>
172
+        </Form.Item> */}
173 173
         <Form.Item
174 174
           label="活动详情主图"
175
-          help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于:普通活动详情"
175
+          help="建议图片尺寸:750*415px,比例16:9,格式:jpg,用于:普通活动详情"
176 176
         >
177 177
           {getFieldDecorator('imgUrl', {
178 178
             rules: [

+ 0
- 255
src/pages/activity/SignupActivity/edit/Poster.jsx View File

@@ -1,255 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Input, Button, message } from 'antd';
3
-import router from 'umi/router';
4
-import apis from '@/services/apis';
5
-import request from '@/utils/request';
6
-import yinhao from '@/assets/yinhao.png';
7
-import ImageUploader from '@/components/XForm/ImageUpload';
8
-import touxiang from '@/assets/touxiang.jpg';
9
-import poster1 from '@/assets/poster1.png';
10
-import xiaochengxu from '@/assets/xiaochengxu.png';
11
-
12
-const { TextArea } = Input;
13
-
14
-const cancelPage = () => {
15
-  router.go('-1');
16
-};
17
-
18
-const Poster = props => {
19
-  const { dynamicId } = props;
20
-  const [inputValue, changeInput] = useState('');
21
-  const [textAreaValue, changeTextArea] = useState('');
22
-  const [imgValue, changeImg] = useState('');
23
-  const [posterId, setPosterId] = useState('');
24
-
25
-  useEffect(() => {
26
-    if (dynamicId) {
27
-      request({ ...apis.activity.poster, params: { targetId: dynamicId, targetType: 'activity' } })
28
-        .then(data => {
29
-          if (data.length > 0) {
30
-            setPosterId(data[0].posterId);
31
-            changeImg(data[0].posterImg);
32
-            changeTextArea(data[0].posterDescription);
33
-            changeInput(data[0].posterTitle);
34
-          }
35
-        })
36
-        .catch(err => {
37
-          message.info(err.msg || err.message);
38
-        });
39
-    }
40
-    // getMiniappName()
41
-  }, []);
42
-
43
-  // 获取小程序名称
44
-  // const [miniappName, setMiniappName] = useState('')
45
-  // function getMiniappName() {
46
-  //   request({ ...apis.building.getMiniappName }).then(res => {
47
-  //     console.log(res, "0000000000000")
48
-  //     setMiniappName(res)
49
-  //   })
50
-  // }
51
-
52
-  const submitPoster = () => {
53
-    if (dynamicId) {
54
-      if (posterId) {
55
-        request({
56
-          ...apis.activity.updatePoster,
57
-          urlData: { id: posterId },
58
-          data: {
59
-            targetId: dynamicId,
60
-            targetType: 'activity',
61
-            posterImg: imgValue,
62
-            posterTitle: inputValue,
63
-            posterDescription: textAreaValue,
64
-          },
65
-        })
66
-          .then(data => {
67
-            message.info('保存成功');
68
-          })
69
-          .catch(err => {
70
-            message.info(err.msg || err.message);
71
-          });
72
-      } else {
73
-        request({
74
-          ...apis.activity.addPoster,
75
-          data: {
76
-            targetId: dynamicId,
77
-            targetType: 'activity',
78
-            posterImg: imgValue,
79
-            posterTitle: inputValue,
80
-            posterDescription: textAreaValue,
81
-          },
82
-        })
83
-          .then(data => {
84
-            setPosterId(data.posterId);
85
-            message.info('保存成功');
86
-          })
87
-          .catch(err => {
88
-            message.info(err.msg || err.message);
89
-          });
90
-      }
91
-    } else {
92
-      message.warn('请先保存基本信息数据');
93
-    }
94
-  };
95
-
96
-  return (
97
-    <div>
98
-      <div style={{ display: 'flex' }}>
99
-        <div
100
-          style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}
101
-        >
102
-          <div
103
-            style={{
104
-              width: '375px',
105
-              height: '700px',
106
-              backgroundColor: '#fff',
107
-              boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)',
108
-              position: 'relative',
109
-              margin: '0 auto',
110
-            }}
111
-          >
112
-            <img style={{ width: '100%', height: '300px' }} src={imgValue || poster1} alt="" />
113
-            <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
114
-              <img
115
-                style={{
116
-                  width: '70px',
117
-                  height: '70px',
118
-                  border: '4px solid #fff',
119
-                  borderRadius: '35px',
120
-                  marginLeft: '16px',
121
-                }}
122
-                src={touxiang}
123
-                alt=""
124
-              />
125
-              <span
126
-                style={{
127
-                  color: '#222',
128
-                  fontWeight: '600',
129
-                  margin: '24px 10px 0 14px',
130
-                  fontSize: '17px',
131
-                }}
132
-              >
133
-                喵喵
134
-              </span>
135
-              <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
136
-              <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>
137
-                2019.09.21
138
-              </span>
139
-            </div>
140
-            <p
141
-              style={{
142
-                margin: '10px 20px',
143
-                fontSize: '20px',
144
-                color: '#222',
145
-                fontWeight: '600',
146
-                display: '-webkit-box',
147
-                lineClamp: '3',
148
-                height: '60px',
149
-                WebkitLineClamp: '2',
150
-                WebkitBoxOrient: 'vertical',
151
-                overflow: 'hidden',
152
-                textOverflow: 'ellipsis',
153
-              }}
154
-            >
155
-              {inputValue || '海报标题'}
156
-            </p>
157
-
158
-            <img src={yinhao} style={{ width: '30px', marginLeft: '20px' }} alt="" />
159
-            <p
160
-              style={{
161
-                margin: '16px 20px 28px 20px',
162
-                fontSize: '17px',
163
-                color: '#999',
164
-                display: '-webkit-box',
165
-                lineClamp: '3',
166
-                height: '72px',
167
-                WebkitLineClamp: '3',
168
-                WebkitBoxOrient: 'vertical',
169
-                overflow: 'hidden',
170
-                textOverflow: 'ellipsis',
171
-              }}
172
-            >
173
-              {textAreaValue || '海报描述'}
174
-            </p>
175
-            <div
176
-              style={{
177
-                backgroundColor: '#f1f1f1',
178
-                padding: '22px 30px',
179
-                boxShadow: '0px 6px 12px -4px #dcdcdc',
180
-                position: 'relative',
181
-              }}
182
-            >
183
-              <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
184
-              <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入活动查看详情</p>
185
-              <img
186
-                style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }}
187
-                src={xiaochengxu}
188
-                alt=""
189
-              />
190
-            </div>
191
-          </div>
192
-          <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>
193
-            海报模板
194
-          </p>
195
-        </div>
196
-
197
-        <div>
198
-          <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
199
-            <p
200
-              style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}
201
-            >
202
-              活动海报图
203
-            </p>
204
-            <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
205
-          </div>
206
-          <p
207
-            style={{
208
-              fontSize: '0.5vw',
209
-              color: '#A9A9A9',
210
-              marginLeft: '230px',
211
-              marginBottom: '30px',
212
-            }}
213
-          >
214
-            建议图片尺寸:640*670px,比例64:67,格式:jpg,用于普通活动海报
215
-          </p>
216
-          <div
217
-            style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}
218
-          >
219
-            <p
220
-              style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}
221
-            >
222
-              海报标题
223
-            </p>
224
-            <Input
225
-              style={{ width: '20vw' }}
226
-              value={inputValue}
227
-              placeholder="请输入海报标题"
228
-              onChange={e => changeInput(e.target.value)}
229
-            />
230
-          </div>
231
-          <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
232
-            <p
233
-              style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}
234
-            >
235
-              海报描述
236
-            </p>
237
-            <TextArea
238
-              rows={5}
239
-              maxLength={1024}
240
-              value={textAreaValue}
241
-              onChange={e => changeTextArea(e.target.value)}
242
-            />
243
-          </div>
244
-        </div>
245
-      </div>
246
-      <Button type="primary" onClick={submitPoster} style={{ margin: '40px 40px 40px 30vw' }}>
247
-        {' '}
248
-        确定
249
-      </Button>
250
-      <Button onClick={() => cancelPage()}>取消</Button>
251
-    </div>
252
-  );
253
-};
254
-
255
-export default Poster;

+ 0
- 150
src/pages/activity/SignupActivity/edit/Share.jsx View File

@@ -1,150 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Card } from 'antd';
3
-
4
-import router from 'umi/router';
5
-import apis from '@/services/apis';
6
-import moment from 'moment';
7
-import BuildSelect from '@/components/SelectButton/BuildSelect2';
8
-import Wangedit from '@/components/Wangedit/Wangedit';
9
-import request from '@/utils/request';
10
-import yinhao from '@/assets/yinhao.png';
11
-import ImageUploader from '@/components/XForm/ImageUpload';
12
-import logo from '@/assets/logo.svg';
13
-import touxiang from '@/assets/touxiang.jpg';
14
-import poster1 from '@/assets/poster1.png';
15
-import poster2 from '@/assets/poster2.png';
16
-import xiaochengxu from '@/assets/xiaochengxu.png';
17
-
18
-const { TextArea } = Input;
19
-
20
-const cancelPage = () => {
21
-  router.go('-1');
22
-};
23
-
24
-const Share = props => {
25
-  const { dynamicId } = props;
26
-  const [inputValue, changeInput] = useState('');
27
-  const [imgValue, changeImg] = useState('');
28
-  const [shareContentId, setShareContentId] = useState('');
29
-
30
-  useEffect(() => {
31
-    if (dynamicId) {
32
-      request({
33
-        ...apis.activity.shareContent,
34
-        params: { targetId: dynamicId, targetType: 'activity' },
35
-      })
36
-        .then(data => {
37
-          if (data.length > 0) {
38
-            setShareContentId(data[0].shareContentId);
39
-            changeImg(data[0].shareContentImg);
40
-            changeInput(data[0].shareContentTitle);
41
-          }
42
-        })
43
-        .catch(err => {
44
-          message.info(err.msg || err.message);
45
-        });
46
-    }
47
-  }, [dynamicId]);
48
-
49
-  const submitShare = () => {
50
-    if (dynamicId) {
51
-      if (shareContentId) {
52
-        request({
53
-          ...apis.activity.updateShareContent,
54
-          urlData: { id: shareContentId },
55
-          data: {
56
-            targetId: dynamicId,
57
-            shareContentType: 'activity',
58
-            shareContentImg: imgValue,
59
-            shareContentTitle: inputValue,
60
-          },
61
-        })
62
-          .then(data => {
63
-            message.info('保存成功');
64
-          })
65
-          .catch(err => {
66
-            message.info(err.msg || err.message);
67
-          });
68
-      } else {
69
-        request({
70
-          ...apis.activity.addShareContent,
71
-          data: {
72
-            targetId: dynamicId,
73
-            shareContentType: 'activity',
74
-            shareContentImg: imgValue,
75
-            shareContentTitle: inputValue,
76
-          },
77
-        })
78
-          .then(data => {
79
-            setShareContentId(data.shareContentId);
80
-            message.info('保存成功');
81
-          })
82
-          .catch(err => {
83
-            message.info(err.msg || err.message);
84
-          });
85
-      }
86
-    } else {
87
-      message.warn('请先保存基本信息数据');
88
-    }
89
-  };
90
-
91
-  return (
92
-    <div style={{ padding: '20px' }}>
93
-      <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
94
-        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>
95
-          分享模板
96
-        </p>
97
-        <div>
98
-          <p
99
-            style={{
100
-              display: 'flex',
101
-              alignItems: 'center',
102
-              fontSize: '14px',
103
-              color: '#999',
104
-              margin: '0',
105
-              lineHeight: '0',
106
-            }}
107
-          >
108
-            <img src={logo} style={{ width: '22px', marginRight: '10px' }} alt="" />
109
-            橙蕉互动
110
-          </p>
111
-          <p style={{ fontSize: '16px', color: '#222', fontWeight: '600', margin: '0' }}>
112
-            {inputValue || '置业V客厅 精准获客平台'}
113
-          </p>
114
-          <img style={{ width: '200px', height: '160px' }} src={imgValue || poster2} alt="" />
115
-        </div>
116
-      </div>
117
-      <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
118
-        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>
119
-          分享标题
120
-        </p>
121
-        <Input
122
-          placeholder="请输入分享标题"
123
-          value={inputValue}
124
-          onChange={e => changeInput(e.target.value)}
125
-        />
126
-      </div>
127
-      <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
128
-        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>
129
-          活动分享图
130
-        </p>
131
-        <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
132
-      </div>
133
-      <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginTop: '20px' }}>
134
-        建议图片尺寸:750*600px,比例5:4,格式:jpg,用于活动分享好友
135
-      </p>
136
-      <Button
137
-        type="primary"
138
-        htmlType="submit"
139
-        onClick={submitShare}
140
-        style={{ margin: '40px 40px 40px 220px' }}
141
-      >
142
-        {' '}
143
-        确定
144
-      </Button>
145
-      <Button onClick={() => cancelPage()}>取消</Button>
146
-    </div>
147
-  );
148
-};
149
-
150
-export default Share;

+ 16
- 14
src/pages/activity/SignupActivity/edit/index.jsx View File

@@ -1,9 +1,12 @@
1 1
 import React, { useState } from 'react';
2
-import { Radio, Card } from 'antd';
2
+import { Tabs, Card } from 'antd';
3 3
 import Basic from './Basic';
4 4
 // import Poster from './Poster';
5 5
 import Share from '@/components/Share';
6 6
 import Poster from '@/components/Poster'
7
+
8
+const { TabPane } = Tabs
9
+
7 10
 const type= 'dymic'
8 11
 /**
9 12
  *
@@ -12,23 +15,22 @@ const type= 'dymic'
12 15
  * @returns
13 16
  */
14 17
 const Edit = props => {
15
-  const [tab, changeTab] = useState('basic');
16 18
   const { dynamicId } = props.location.query;
17 19
   const target = { id:dynamicId, type: 'activity' }
20
+
18 21
   return (
19 22
     <Card>
20
-      <div>
21
-        <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
22
-          <Radio.Button value="basic">基本信息</Radio.Button>
23
-          <Radio.Button value="poster">海报图片</Radio.Button>
24
-          <Radio.Button value="share">分享设置</Radio.Button>
25
-        </Radio.Group>
26
-      </div>
27
-      <div>
28
-        {tab === 'basic' && <Basic dynamicId={dynamicId} type={type}/>}
29
-        {tab === 'poster' && <Poster target={target} />}
30
-        {tab === 'share' && <Share target={target} />}
31
-      </div>
23
+      <Tabs defaultActiveKey="1">
24
+        <TabPane tab="基础信息" key="1">
25
+          <Basic dynamicId={dynamicId} type={type}/>
26
+        </TabPane>
27
+        <TabPane tab="海报图片" key="2">
28
+          <Poster target={target} />
29
+        </TabPane>
30
+        <TabPane tab="分享设置" key="3">
31
+          <Share target={target} />
32
+        </TabPane>
33
+      </Tabs>
32 34
     </Card>
33 35
   );
34 36
 };

+ 7
- 7
src/pages/activity/groupRoomActivity/edit/Basic.jsx View File

@@ -160,8 +160,8 @@ const BasicForm = props => {
160 160
           })(<BuildSelect disabled={disable} />)}
161 161
         </Form.Item>
162 162
         <Form.Item
163
-          label="活动封面图1"
164
-          help="建议图片尺寸:750px*420px,比例16:9,格式:jpg,用于:首页推荐/活动列表"
163
+          label="活动封面图"
164
+          help="建议图片尺寸:690*388px,比例16:9,格式:jpg,用于:首页推荐/活动列表"
165 165
         >
166 166
           {getFieldDecorator('listImgUrl', {
167 167
             rules: [
@@ -172,7 +172,7 @@ const BasicForm = props => {
172 172
             ],
173 173
           })(<ImageUploader />)}
174 174
         </Form.Item>
175
-        <Form.Item
175
+        {/* <Form.Item
176 176
           label="活动封面图2"
177 177
           help="建议图片尺寸:750*250,比例3:1,格式:jpg,用于:项目详情页"
178 178
         >
@@ -184,10 +184,10 @@ const BasicForm = props => {
184 184
               },
185 185
             ],
186 186
           })(<ImageUploader />)}
187
-        </Form.Item>
187
+        </Form.Item> */}
188 188
         <Form.Item
189 189
           label="活动详情主图"
190
-          help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于:普通活动详情"
190
+          help="建议图片尺寸:750*415px,比例16:9,格式:jpg,用于:普通活动详情"
191 191
         >
192 192
           {getFieldDecorator('imgUrl', {
193 193
             rules: [
@@ -243,7 +243,7 @@ const BasicForm = props => {
243 243
             ],
244 244
           })(<Input type="number" />)}
245 245
         </Form.Item>
246
-        <Form.Item label="用户携带人数" help="每个用户最多可携带参与活动的人数">
246
+        {/* <Form.Item label="用户携带人数" help="每个用户最多可携带参与活动的人数">
247 247
           {getFieldDecorator('maxEnlistByPerson', {
248 248
             rules: [
249 249
               {
@@ -252,7 +252,7 @@ const BasicForm = props => {
252 252
               },
253 253
             ],
254 254
           })(<Input type="number" min={1} />)}
255
-        </Form.Item>
255
+        </Form.Item> */}
256 256
         <Form.Item label="活动详情">{getFieldDecorator('desc')(<Wangedit />)}</Form.Item>
257 257
         <Form.Item label="报名时间">
258 258
           {getFieldDecorator('signupTime', {

+ 0
- 182
src/pages/activity/liveActivity/add/index.jsx View File

@@ -1,182 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, Radio, Upload, InputNumber } from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import XForm, { FieldTypes } from '../../../../components/XForm';
5
-import router from 'umi/router';
6
-import moment from 'moment';
7
-import styles from '../../../style/GoodsList.less';
8
-import SelectCity from '../../../../components/SelectButton/CitySelect'
9
-import BuildSelect2 from '../../../../components/SelectButton/BuildSelect2'
10
-import LivePlatSelect from '../../../../components/SelectButton/LivePlatSelect'
11
-import CitySelect3 from '../../../../components/SelectButton/CitySelect3'
12
-import ImageUpload from '../../../../components/XForm/ImageUpload'
13
-import Wangedit from '../../../../components/Wangedit/Wangedit'
14
-import Navigate from '@/components/Navigate';
15
-import apis from '../../../../services/apis';
16
-import request from '../../../../utils/request';
17
-import AuthButton from '@/components/AuthButton';
18
-import Prompt from 'umi/prompt';
19
-
20
-const { Option } = Select;
21
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
22
-
23
-let cityId = ''
24
-
25
-const header = props => {
26
-  const { salesBatchId } = props.location.query
27
-  console.log(salesBatchId)
28
-  const [ saleBatchData, setSaleBatchData ] = useState({})
29
-  const [showHelp, setShowHelp] = useState(false)
30
-
31
-  const cancelPage = () =>{
32
-    router.push({
33
-      pathname: '/activity/liveActivity/list',
34
-    });
35
-  }
36
-
37
-   //打开新页面
38
-   const openIndexImg = () => {
39
-    const newWin=window.open('about:blank');
40
-    newWin.location.href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E6%95%99%E7%A8%8B.png"
41
-  }
42
-
43
-  function highlightsTypeChange(e) {
44
-    console.log(e.target.value,"ee")
45
-    setTypeState(e.target.value)
46
-  }
47
-
48
-  function disabledDate(current) {
49
-    // Can not select days before today and today
50
-    return current && current < moment().endOf('day');
51
-  }
52
-
53
-  function handleSubmit (e) {
54
-    e.preventDefault();
55
-    props.form.validateFields((err, values) => {
56
-      if (!err){
57
-        let {liveTime, ...submitValue} = values
58
-        submitValue.liveStartDate = moment(submitValue.liveStartDate._d).format('YYYY-MM-DD HH:mm:ss')
59
-        submitValue.liveEndDate = moment(submitValue.liveEndDate._d).format('YYYY-MM-DD HH:mm:ss')
60
-        
61
-        if (values.liveStartDate > values.liveEndDate){
62
-          message.info("直播结束时间大于开始时间")
63
-          return;
64
-        }
65
-
66
-        request({ ...apis.taliveActivity.addTaLiveActivity, data: { ...submitValue },}).then((data) => {
67
-          message.info("保存成功")
68
-          console.log(data,"datattttttt")
69
-          router.push({
70
-            pathname: '/activity/liveActivity/list/index',
71
-          });
72
-        }).catch((err) => {
73
-          message.info(err.msg || err.message)
74
-        })
75
-      }
76
-    });
77
-  }
78
-
79
-  const { getFieldDecorator } = props.form;
80
-
81
-  return (
82
-    <>
83
-      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
84
-        <Form.Item label="所属城市">
85
-          {getFieldDecorator('cityId', {
86
-            rules: [{ required: true, message: ' 请输入所属城市' }],
87
-          })(<CitySelect3 buildingId={props.form.getFieldValue('buildingId')}/>)}
88
-        </Form.Item>
89
-        <Form.Item label="所属楼盘">
90
-          {getFieldDecorator('buildingId')(<BuildSelect2 cityId={props.form.getFieldValue('cityId')}/>)}
91
-        </Form.Item>
92
-        <Form.Item label="直播活动标题">
93
-          {getFieldDecorator('liveActivityTitle', {
94
-            rules: [{ required: true, message: '请输入直播活动标题' }],
95
-          })(<Input maxLength={20} placeholder="给直播活动起个名字" />)}
96
-        </Form.Item>
97
-        <Form.Item label="直播开始时间">
98
-          {getFieldDecorator('liveStartDate', {
99
-                rules: [
100
-                  {
101
-                    required: true,
102
-                    message: '请选择直播开始时间',
103
-                  },
104
-                ],
105
-              })(<DatePicker placeholder="预计开始时间"style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
106
-        </Form.Item>
107
-        <Form.Item label="直播结束时间">
108
-          {getFieldDecorator('liveEndDate', {
109
-                rules: [
110
-                  {
111
-                    required: true,
112
-                    message: '请选择直播结束时间',
113
-                  },
114
-                ],
115
-              })(<DatePicker placeholder="预计结束时间" disabledDate={disabledDate} style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
116
-        </Form.Item>
117
-        <Form.Item label="直播小程序">
118
-          {getFieldDecorator('liveApp', {
119
-              rules: [{ required: true, message: '请选择直播小程序' }],
120
-            })((<LivePlatSelect />))}
121
-        </Form.Item>
122
-        <Form.Item label="房间参数">
123
-          {getFieldDecorator('liveRoomParam', {
124
-            rules: [{ required: true, message: '请输入房间参数' }],
125
-          })(<Input maxLength={1000} placeholder="点击右侧按钮查看如何获取房间参数" style={{width:'680px'}}/>)}<Navigate onClick={openIndexImg}>不知道怎么填?查看说明</Navigate>
126
-        </Form.Item>
127
-        <Form.Item label="封面图1" help="建议尺寸:750px*420px,比例16:9,格式:jpg,用于:活动列表">
128
-              {getFieldDecorator('listImg', {
129
-                  rules: [{ required: true, message: '请上传封面图1' }],
130
-              })(
131
-                <ImageUpload />,
132
-              )}
133
-        </Form.Item>  
134
-        <Form.Item label="封面图2" help="建议尺寸:750*250px,比例3:1,格式:jpg,用于:项目详情页">
135
-              {getFieldDecorator('detailImg', {
136
-                  rules: [{ required: true, message: '请上传封面图2' }],
137
-              })(
138
-                <ImageUpload />,
139
-              )}
140
-        </Form.Item>  
141
-        <Form.Item label="详情图" help="格式:jpg,用于:直播活动详情页,点击可跳转到直播间">
142
-              {getFieldDecorator('detailTypeImg', {
143
-                  rules: [{ required: true, message: '请上传详情图' }],
144
-              })(
145
-                <ImageUpload />,
146
-              )}
147
-        </Form.Item>      
148
-        <Form.Item label="权重">
149
-              {getFieldDecorator('weight', {
150
-                  rules: [{ required: true, message: '请设置权重' }],
151
-              })(
152
-                <InputNumber placeholder="权重越大越靠前" style={{width:'150px'}}/>
153
-              )}
154
-        </Form.Item>
155
-        <Form.Item label="发布状态">
156
-          {getFieldDecorator('status', {
157
-              rules: [{ required: true, message: '请选择发布状态' }],
158
-            })(<Select placeholder="发布状态" style={{ width: '300px' }}>
159
-            <Option value="0">否</Option>
160
-            <Option value="1">是</Option>
161
-          </Select>)}
162
-        </Form.Item>
163
-        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
164
-          <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
165
-            确定
166
-          </Button>
167
-          <Button onClick={() => router.go(-1)}>
168
-            取消
169
-          </Button>
170
-        </Form.Item>
171
-      </Form>
172
-      <Prompt message={location =>
173
-        location.pathname.startsWith("/activity/liveActivity")
174
-          ? true
175
-          : localStorage.removeItem("liveActivePageParams")} />
176
-    </>
177
-  )
178
-}
179
-
180
-const WrappedHeader = Form.create({ name: 'header' })(header);
181
-
182
-export default WrappedHeader

+ 0
- 65
src/pages/activity/liveActivity/edit/components/BuildSelect/BuildSelect.jsx View File

@@ -1,65 +0,0 @@
1
-import React, { useState, useEffect, useRef } from 'react';
2
-import { Select } from 'antd';
3
-import apis from '../../../../../../services/apis';
4
-import request from '../../../../../../utils/request'
5
-
6
-const { Option } = Select;
7
-
8
-function usePrevious(props) {
9
-  const ref = useRef();
10
-  useEffect(() => {
11
-    ref.current = props;
12
-  });
13
-  return ref.current;
14
-}
15
-
16
-/**
17
- *
18
- *
19
- * @param {*} props
20
- * @returns
21
- */
22
-const BuildingSelect = props => {
23
-  const [data, setData] = useState([])
24
-  const [value, setValue] = useState([])
25
-  console.log('props', props.cityId());
26
-  useEffect(() => {
27
-    getBuildList();
28
-  }, [props.cityId()])
29
-
30
-
31
-  const getBuildList = e => {
32
-    request({ ...apis.building.buildingSelect, params: { cityId: props.cityId(), pageNum: 1, pageSize: 999 } }).then(data => {
33
-        setData(data)
34
-        checkValue(data)
35
-        // 默认选中第一个
36
-    })
37
-  }
38
-
39
-
40
-  const checkValue = (data) => {
41
-    if (props.value) {
42
-      const tempData = data.filter(f => f.buildingId == props.value)
43
-      const va = (tempData.length > 0) ? props.value : '项目已下线,请重新选择项目'
44
-      props.onChange(va)
45
-
46
-    }
47
-  }
48
-
49
-  return (
50
-      <Select
51
-      showSearch
52
-      value={props.value}
53
-      style={{ width: '300px' }}
54
-      placeholder="请选择项目"
55
-      onChange={props.onChange}
56
-      filterOption={(input, option) =>
57
-        option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
58
-      }>
59
-          {data.map(building => (
60
-            <Option key={building.buildingId} value={building.buildingId}>{building.buildingName}</Option>
61
-          ))}
62
-      </Select>
63
-  )
64
-}
65
-export default BuildingSelect

+ 0
- 109
src/pages/activity/liveActivity/edit/components/HelpDoc/index.jsx View File

@@ -1,109 +0,0 @@
1
-import React, { PureComponent } from 'react'
2
-import { Modal, Row, Col } from 'antd'
3
-import EnDash from '../EnDash'
4
-
5
-import Style from './style.less'
6
-import HotBlock from '../HotBlock'
7
-
8
-const dataset = [
9
-  {
10
-    label: '(0)',
11
-    value: 0,
12
-  },
13
-  {
14
-    label: '(1)',
15
-    value: 1,
16
-  },
17
-  {
18
-    label: '(2)',
19
-    value: 2,
20
-  },
21
-  {
22
-    label: '(3)',
23
-    value: 3,
24
-  },
25
-  {
26
-    label: '(4)',
27
-    value: 4,
28
-  },
29
-  {
30
-    label: '(5)',
31
-    value: 5,
32
-  },
33
-  {
34
-    label: '(6~10)',
35
-    value: 8,
36
-  },
37
-  {
38
-    label: '(11~20)',
39
-    value: 15,
40
-  },
41
-  {
42
-    label: '(21~30)',
43
-    value: 25,
44
-  },
45
-  {
46
-    label: '(31~40)',
47
-    value: 35,
48
-  },
49
-  {
50
-    label: '(41~50)',
51
-    value: 45,
52
-  },
53
-  {
54
-    label: '(51~100)',
55
-    value: 80,
56
-  },
57
-  {
58
-    label: '(101~200)',
59
-    value: 150,
60
-  },
61
-  {
62
-    label: '(200以上)',
63
-    value: 201,
64
-  },
65
-]
66
-
67
-function Cell(props) {
68
-  return (
69
-    <Row type="flex" align="middle" gutter={20}>
70
-      <Col span={2}>{props.left}</Col>
71
-      <Col span={12}><EnDash /></Col>
72
-      <Col span={6}>{props.right}</Col>
73
-    </Row>
74
-  )
75
-}
76
-
77
-export default function HelpDoc(props) {
78
-  return (
79
-    <Modal footer={null} title="相关说明" visible={props.visible} onCancel={props.onCancel} width={800}>
80
-      <div className={Style.article}>
81
-        <div className={Style.section}>
82
-          <div className={Style.title}>1.图例解释:</div>
83
-          <div>
84
-            <Cell left="1号楼" right="楼栋/幢" />
85
-            <Cell left="2单元" right="单元" />
86
-            <Cell left="3楼" right="楼层" />
87
-            <Cell left="301" right="房号" />
88
-            <Cell left="1人" right="预选人数" />
89
-            <Cell left="234万" right="价格" />
90
-            <Cell left="A户型" right="户型名" />
91
-          </div>
92
-        </div>
93
-        <div className={Style.section}>
94
-          <div className={Style.title}>2.预选人数(热度):</div>
95
-          <div>每有一位客户预选此房源,热度自动增加1,热度越大说明想购买此房源的用户越多,认筹摇号购买难度越大。</div>
96
-        </div>
97
-        <div className={Style.section}>
98
-          <div className={Style.title}>3.热度指标:</div>
99
-          <div className={Style.subtitle}>颜色越深代表热度越高。黑底白字代表房源未发布,未发布房源用户不会看到。</div>
100
-          <div className={Style.flex}>
101
-            {
102
-              dataset.map((block) => (<div className={Style['flex-item']} key={block.value}><HotBlock number={block.value}>{block.label}</HotBlock></div>))
103
-            }
104
-          </div>
105
-        </div>
106
-      </div>
107
-    </Modal>
108
-  );
109
-}

+ 0
- 36
src/pages/activity/liveActivity/edit/components/HelpDoc/style.less View File

@@ -1,36 +0,0 @@
1
-.article {
2
-    .section {
3
-        font-size: 16px;
4
-        line-height: 1.8em;
5
-        color: #666;
6
-
7
-        & + .section {
8
-            margin-top: 24px;
9
-        }
10
-    }
11
-
12
-    .title {
13
-        font-size: 18px;
14
-        line-height: 2em;
15
-        color: #333;
16
-    }
17
-
18
-    .subtitle {
19
-        font-size: 14px;
20
-        line-height: 1.6em;
21
-        color: #999;
22
-    }
23
-
24
-    .flex {
25
-        display: flex;
26
-        flex-wrap: wrap;
27
-
28
-        .flex-item {
29
-            margin-top: 16px;
30
-            margin-right: 8px;
31
-            flex: none;
32
-            width: 100px;
33
-            text-align: center;
34
-        }
35
-    }
36
-}

+ 0
- 206
src/pages/activity/liveActivity/edit/components/base.jsx View File

@@ -1,206 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload, InputNumber } from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import moment from 'moment';
5
-import router from 'umi/router';
6
-import styles from '../../../../style/GoodsList.less';
7
-import XForm, { FieldTypes, createForm } from '../../../../../components/XForm';
8
-import apis from '../../../../../services/apis';
9
-import BuildSelect2 from '../../../../../components/SelectButton/BuildSelect2';
10
-import LivePlatSelect from '../../../../../components/SelectButton/LivePlatSelect'
11
-import CitySelect3 from '../../../../../components/SelectButton/CitySelect3';
12
-import ImageUpload from '../../../../../components/XForm/ImageUpload'
13
-import request from '../../../../../utils/request';
14
-import Navigate from '@/components/Navigate';
15
-
16
-const { Option } = Select;
17
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
18
-
19
-let cityId = ''
20
-
21
-const header = props => {
22
-  console.log(props)
23
-  const liveActivityId = props.liveActivityId.liveId
24
-  console.log(liveActivityId)
25
-  const [ liveActivityData, setLiveActivityData ] = useState({})
26
-  const [showHelp, setShowHelp] = useState(false)
27
-
28
-  if(liveActivityId){
29
-    useEffect(() => {
30
-      getLiveActivityData(liveActivityId);
31
-    },[])
32
-
33
-  // 查询列表
34
-  const getLiveActivityData = (liveActivityId) => {
35
-    request({ ...apis.taliveActivity.getTaLiveActivity, urlData: {id: liveActivityId} }).then((data) => {
36
-        console.log(data, 'getLiveActivityData')
37
-        setLiveActivityData(data.data)
38
-        // if(data.qrCode == 'null'){
39
-        //   message.error("暂时无法获取二维码")
40
-        // }
41
-    })
42
-  }
43
-  }
44
-
45
-  const cancelPage = () =>{
46
-    router.push({
47
-      pathname: '/activity/liveActivity/list/index',
48
-    });
49
-  }
50
-
51
-  //打开新页面
52
-  const openIndexImg = () => {
53
-    const newWin=window.open('about:blank');
54
-    newWin.location.href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E6%95%99%E7%A8%8B.png"
55
-  }
56
-
57
-  function highlightsTypeChange(e) {
58
-    console.log(e.target.value,"ee")
59
-    setTypeState(e.target.value)
60
-  }
61
-
62
-  function disabledDate(current) {
63
-    // Can not select days before today and today
64
-    return current && current < moment().endOf('day');
65
-  }
66
-
67
-  function handleSubmit (e) {
68
-    e.preventDefault();
69
-    props.form.validateFields((err, values) => {
70
-      console.log(values, 'values');
71
-      if (!err){
72
-        let {liveTime, ...submitValue} = values
73
-        if (submitValue.status == '已发布' || submitValue.status == '1'){
74
-          submitValue.status = 1
75
-        }else{
76
-          submitValue.status = 0
77
-        }
78
-        if (values.liveStartDate > values.liveEndDate){
79
-          message.info("直播结束时间大于开始时间")
80
-          return;
81
-        }
82
-        submitValue.liveStartDate = moment(submitValue.liveStartDate._d).format('YYYY-MM-DD HH:mm:ss')
83
-        submitValue.liveEndDate = moment(submitValue.liveEndDate._d).format('YYYY-MM-DD HH:mm:ss')
84
-        console.log(submitValue)
85
-        request({ ...apis.taliveActivity.updateTaLiveActivity, urlData: {id: liveActivityId},data: submitValue, }).then((data) => {
86
-          message.info("保存成功")
87
-          cancelPage()
88
-        }).catch((err) => {
89
-          message.info(err.msg || err.message)
90
-        })
91
-      }
92
-    });
93
-  }
94
-
95
-  const { getFieldDecorator } = props.form;
96
-
97
-  return (
98
-    <>
99
-      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
100
-        <Form.Item label="所属城市">
101
-          {getFieldDecorator('cityId', {
102
-            initialValue: liveActivityData.cityId,
103
-            rules: [{ required: true, message: ' 请输入所属城市' }],
104
-          })(<CitySelect3 buildingId={props.form.getFieldValue('buildingId')}/>)}
105
-        </Form.Item>
106
-        <Form.Item label="所属楼盘">
107
-          {getFieldDecorator('buildingId', {
108
-            initialValue: liveActivityData.buildingId,
109
-          })(<BuildSelect2 cityId={props.form.getFieldValue('cityId')}/>)}
110
-        </Form.Item>
111
-        <Form.Item label="直播活动标题">
112
-          {getFieldDecorator('liveActivityTitle', {
113
-            initialValue: liveActivityData.liveActivityTitle,
114
-            rules: [{ required: true, message: '请输入直播活动标题' }],
115
-          })(<Input maxLength={20} placeholder="给直播活动起个名字" />)}
116
-        </Form.Item>
117
-        <Form.Item label="直播开始时间">
118
-          {getFieldDecorator('liveStartDate', { initialValue : liveActivityData.liveStartDate ? moment(liveActivityData.liveStartDate, 'YYYY-MM-DD HH:mm:ss') : null,
119
-                rules: [
120
-                  {
121
-                    required: true,
122
-                    message: '请选择直播开始时间',
123
-                  },
124
-                ],
125
-              })(<DatePicker placeholder="预计开始时间" style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
126
-        </Form.Item>
127
-        <Form.Item label="直播结束时间">
128
-          {getFieldDecorator('liveEndDate', { initialValue : liveActivityData.liveEndDate ? moment(liveActivityData.liveEndDate, 'YYYY-MM-DD HH:mm:ss') : null,
129
-                rules: [
130
-                  {
131
-                    required: true,
132
-                    message: '请选择直播结束时间',
133
-                  },
134
-                ],
135
-              })(<DatePicker placeholder="预计结束时间" disabledDate={disabledDate} style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
136
-        </Form.Item>
137
-        <Form.Item label="直播小程序">
138
-          {getFieldDecorator('liveApp', {
139
-              initialValue: liveActivityData.liveApp,
140
-              rules: [{ required: true, message: '请选择直播小程序' }],
141
-            })(<LivePlatSelect />)}
142
-        </Form.Item>
143
-        <Form.Item label="房间参数">
144
-          {getFieldDecorator('liveRoomParam', {
145
-            initialValue: liveActivityData.liveRoomParam,
146
-            rules: [{ required: true, message: '请输入房间参数' }],
147
-          })(<Input maxLength={1000} placeholder="点击右侧按钮查看如何获取房间参数" style={{width:'680px'}}/>)}
148
-          <Navigate onClick={openIndexImg}>不知道怎么填?查看说明</Navigate>
149
-        </Form.Item>
150
-        <Form.Item label="封面图1" help="建议尺寸:750px*420px,比例16:9,格式:jpg,用于:活动列表">
151
-              {getFieldDecorator('listImg', {
152
-                  initialValue: liveActivityData.listImg,
153
-                  rules: [{ required: true, message: '请上传封面图1' }],
154
-              })(
155
-                <ImageUpload />,
156
-              )}
157
-        </Form.Item>  
158
-        <Form.Item label="封面图2" help="建议尺寸:750*250px,比例3:1,格式:jpg,用于:项目详情页">
159
-              {getFieldDecorator('detailImg', {
160
-                  initialValue: liveActivityData.detailImg,
161
-                  rules: [{ required: true, message: '请上传封面图2' }],
162
-              })(
163
-                <ImageUpload />,
164
-              )}
165
-        </Form.Item>  
166
-        <Form.Item label="详情图" help="格式:jpg,用于:直播活动详情页,点击可跳转到直播间">
167
-              {getFieldDecorator('detailTypeImg', {
168
-                  initialValue: liveActivityData.detailTypeImg,
169
-                  rules: [{ required: true, message: '请上传详情图' }],
170
-              })(
171
-                <ImageUpload style={{width:'300px',height:'600px'}}/>,
172
-              )}
173
-        </Form.Item>      
174
-        <Form.Item label="权重">
175
-              {getFieldDecorator('weight', {
176
-                  initialValue: liveActivityData.weight,
177
-                  rules: [{ required: true, message: '请设置权重' }],
178
-              })(
179
-                <InputNumber placeholder="权重越大越靠前" style={{width:'150px'}}/>
180
-              )}
181
-        </Form.Item>
182
-        <Form.Item label="发布状态">
183
-          {getFieldDecorator('status', {
184
-              initialValue: liveActivityData.status == 1 ? '已发布' : '未发布',
185
-              rules: [{ required: true, message: '请选择发布状态' }],
186
-            })(<Select placeholder="发布状态" style={{ width: '300px' }}>
187
-            <Option value="0">未发布</Option>
188
-            <Option value="1">已发布</Option>
189
-          </Select>)}
190
-        </Form.Item>
191
-        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
192
-          <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
193
-            确定
194
-          </Button>
195
-          <Button onClick={() => router.go(-1)}>
196
-            取消
197
-          </Button>
198
-        </Form.Item>
199
-      </Form>
200
-    </>
201
-  )
202
-}
203
-
204
-const Base = Form.create({ name: 'header' })(header);
205
-
206
-export default Base

+ 0
- 167
src/pages/activity/liveActivity/edit/components/poster.jsx View File

@@ -1,167 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import moment from 'moment';
5
-import router from 'umi/router';
6
-import BuildSelect from '../../../../../components/SelectButton/BuildSelect'
7
-import XForm, { FieldTypes } from '../../../../../components/XForm';
8
-import Wangedit from '../../../../../components/Wangedit/Wangedit'
9
-import request from '../../../../../utils/request'
10
-import yinhao from '../../../../../assets/yinhao.png'
11
-import xiaochengxu from '../../../../../assets/xiaochengxu.png'
12
-import ImageUploader from '../../../../../components/XForm/ImageUpload';
13
-import poster1 from '../../../../../assets/poster1.png';
14
-import poster2 from '../../../../../assets/poster2.png';
15
-import Styles from './style.less';
16
-import apis from '../../../../../services/apis';
17
-
18
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
19
-const { TextArea } = Input;
20
-
21
-const Poster = props => {
22
-  const [inputValue, changeInput] = useState('')
23
-  const [textAreaValue, changeTextArea] = useState('')
24
-  const [imgValue, changeImg] = useState('')
25
-  const [posterId, setPosterId] = useState('')
26
-
27
-  const [building, setBuilding] = useState({ buildingImg: [{ url: '' }] })
28
-  const liveActivityId = props.liveActivityId.liveId
29
-  if (liveActivityId) {
30
-    // eslint-disable-next-line react-hooks/rules-of-hooks
31
-    useEffect(() => {
32
-      request({
33
-        ...apis.activity.poster,
34
-        params: { targetId: liveActivityId, targetType: 'live' },
35
-      }).then(data => {
36
-        if (data.length > 0) {
37
-          setPosterId(data[0].posterId)
38
-          changeImg(data[0].posterImg)
39
-          changeTextArea(data[0].posterDescription)
40
-          changeInput(data[0].posterTitle)
41
-        }
42
-      }).catch(err => {
43
-        message.info(err.msg || err.message)
44
-      })
45
-
46
-      // getById(salesBatchId)
47
-      getMiniappName()
48
-    }, [])
49
-  }
50
-
51
-  // 获取详情信息
52
-  function getById(currentId) {
53
-
54
-    request({ ...apis.building.buildingGetById, urlData: { id: currentId } }).then(res => {
55
-      setBuilding(res)
56
-      console.log('getById: ', res)
57
-    })
58
-  }
59
-  // 获取小程序名称
60
-  const [miniappName, setMiniappName] = useState('')
61
-  function getMiniappName() {
62
-
63
-    request({ ...apis.building.getMiniappName }).then(res => {
64
-    
65
-      setMiniappName(res)
66
-     
67
-    })
68
-  }
69
-
70
-  const submitPoster = () => {
71
-    if (liveActivityId) {
72
-      if (!imgValue) {
73
-        message.error('请选择海报图片')
74
-        return
75
-      }
76
-
77
-      if (posterId) {
78
-        request({
79
-          ...apis.activity.updatePoster,
80
-          urlData: { id: posterId },
81
-          data: { targetId: liveActivityId, targetType: 'live', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue },
82
-        }).then(() => {
83
-          message.info('保存成功')
84
-        }).catch(err => {
85
-          message.info(err.msg || err.message)
86
-        })
87
-      } else {
88
-        request({
89
-          ...apis.activity.addPoster,
90
-          data: { targetId: liveActivityId, targetType: 'live', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue },
91
-        }).then(data => {
92
-          setPosterId(data.posterId)
93
-          message.info('保存成功')
94
-        }).catch(err => {
95
-          message.info(err.msg || err.message)
96
-        })
97
-      }
98
-    } else {
99
-      message.warn('请先保存基本信息数据')
100
-    }
101
-  }
102
-
103
-  return <div>
104
-    <div style={{ display: 'flex' }}>
105
-      <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
106
-        <div style={{ width: '375px', height: '600px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
107
-          <img style={{ width: '100%', height: '560px' }} src={imgValue ? imgValue : poster1} alt="" />
108
-
109
-          {/* <p className={Styles.tagLabel}>
110
-            {
111
-              building.buildingTag && building.buildingTag.map(item => <span>{item.tagName}</span>)
112
-            }
113
-          </p> */}
114
-          {/* <p style={{
115
-            margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
116
-            display: '-webkit-box', lineClamp: '3', height: '36px', lineHeight: '36px',
117
-            WebkitLineClamp: '1',
118
-            WebkitBoxOrient: 'vertical',
119
-            overflow: 'hidden',
120
-            textOverflow: 'ellipsis',
121
-          }}>{inputValue || (building.buildingName || '海报标题')}</p>
122
-          <p style={{ color: '#999', padding: ' 0 20px' }}><span style={{ color: '#fd0d0c', fontSize: '24px', marginLeft: '6px' }}>{building.price} </span><span style={{ color: '#fd0d0c', fontSize: '20px' }}></span></p>
123
-          <img src={yinhao} style={{ width: '30px', marginLeft: '22px' }} alt="" />
124
-          <p style={{
125
-            margin: '16px 20px 28px 20px', fontSize: '17px', color: '#999',
126
-            display: '-webkit-box', lineClamp: '3', height: '72px',
127
-            WebkitLineClamp: '3',
128
-            WebkitBoxOrient: 'vertical',
129
-            overflow: 'hidden',
130
-            textOverflow: 'ellipsis',
131
-          }}>{textAreaValue || '海报描述'}</p> */}
132
-          <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc',position:'relative' }}>
133
-            <p style={{margin:'0',fontSize:'18px',color:'#888'}}>长按识别小程序码</p>
134
-            <p style={{margin:'0',fontSize:'18px',color:'#888'}}>进入<span style={{margin:'0 5px',fontSize:'18px',color:'#333',fontWeight:'600'}}>{miniappName||'置业V顾问'}</span>房源列表</p>
135
-            <img style={{ width: '80px',position: 'absolute',right:'30px',top:'10px' }} src={xiaochengxu} alt="" />
136
-          </div>
137
-        </div>
138
-        <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
139
-      </div>
140
-      <div >
141
-        <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
142
-        <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>
143
-          <span style={{marginLeft:'135px', color: '#999'}}>请上传制作好的海报图片用于置业顾问或用户保存分享到朋友圈,可随时更新</span>
144
-        </p>
145
-        </div>
146
-        <div style={{ display: 'flex', width: '100%', margin: '30px 0' }}>
147
-          <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}><span style={{ color: 'red' }}>*</span> 海报图片</p>
148
-          <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
149
-        </div>
150
-        <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议尺寸:640*960px,比例2::3,格式:jpg,文件小于300KB,用于:吸引用户扫码进入直播活动页</p>
151
-        <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
152
-          {/* <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
153
-          <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} /> */}
154
-        </div>
155
-        {/* <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
156
-          <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
157
-          <TextArea rows={5} maxLength={1024} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
158
-        </div> */}
159
-
160
-      </div>
161
-    </div>
162
-    <Button type="primary" onClick={submitPoster} style={{ margin: '40px 40px 40px 30vw' }}> 确定</Button>
163
-    <Button onClick={() => router.go(-1)}>取消</Button>
164
-  </div>
165
-}
166
-
167
-export default Poster

+ 0
- 118
src/pages/activity/liveActivity/edit/components/share.jsx View File

@@ -1,118 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import moment from 'moment';
5
-import router from 'umi/router';
6
-import BuildSelect from '../../../../../components/SelectButton/BuildSelect'
7
-import XForm, { FieldTypes } from '../../../../../components/XForm';
8
-import Wangedit from '../../../../../components/Wangedit/Wangedit'
9
-import request from '../../../../../utils/request'
10
-import yinhao from '../../../../../assets/yinhao.png'
11
-import ImageUploader from '../../../../../components/XForm/ImageUpload';
12
-import logo from '../../../../../assets/logo.svg';
13
-import touxiang from '../../../../../assets/touxiang.jpg';
14
-import poster1 from '../../../../../assets/poster1.png';
15
-import poster2 from '../../../../../assets/poster2.png';
16
-import apis from '../../../../../services/apis';
17
-
18
-const Share = props => {
19
-  const [inputValue, changeInput] = useState('')
20
-  const [imgValue, changeImg] = useState('')
21
-  const [shareContentId, setShareContentId] = useState('')
22
-  const liveActivityId = props.liveActivityId.liveId
23
-  if (liveActivityId) {
24
-    // eslint-disable-next-line react-hooks/rules-of-hooks
25
-    useEffect(() => {
26
-      request({
27
-        ...apis.activity.shareContent,
28
-        params: { targetId: liveActivityId, targetType: 'live' },
29
-      }).then(data => {
30
-        if (data.length > 0) {
31
-          setShareContentId(data[0].shareContentId)
32
-          changeImg(data[0].shareContentImg)
33
-          changeInput(data[0].shareContentTitle)
34
-        }
35
-        // else{
36
-        //   changeInput("诚挚邀您在线选房购房~");
37
-        //   request({ ...apis.house.getTaSalesBatch, urlData: {id: salesBatchId} }).then((data) => {
38
-        //     changeImg(data.aerialViewImg);
39
-        // })
40
-        // }
41
-      }).catch(err => {
42
-        message.info(err.msg || err.message)
43
-      })
44
-      getMiniappName();
45
-    }, [])
46
-  }
47
-
48
-  // 获取小程序名称
49
-  const [miniappName, setMiniappName] = useState('')
50
-  function getMiniappName() {
51
-
52
-    request({ ...apis.building.getMiniappName }).then(res => {
53
-    
54
-      setMiniappName(res)
55
-     
56
-    })
57
-  }
58
-
59
-  const submitShare = () => {
60
-    if (liveActivityId) {
61
-      if (shareContentId) {
62
-        request({
63
-          ...apis.activity.updateShareContent,
64
-          urlData: { id: shareContentId },
65
-          data: { targetId: liveActivityId, shareContentType: 'live', shareContentImg: imgValue,shareContentTitle: inputValue },
66
-        }).then(data => {
67
-          message.info('保存成功')
68
-        }).catch(err => {
69
-          message.info(err.msg || err.message)
70
-        })
71
-       } else {
72
-        request({
73
-          ...apis.activity.addShareContent,
74
-          data: { targetId: liveActivityId, shareContentType: 'live', shareContentImg: imgValue,shareContentTitle: inputValue },
75
-        }).then(data => {
76
-          setShareContentId(data.shareContentId)
77
-          message.info('保存成功')
78
-        }).catch(err => {
79
-          message.info(err.msg || err.message)
80
-        })
81
-       }
82
-     } else {
83
-      message.warn('请先保存基本信息数据')
84
-     }
85
-  }
86
-
87
-  return <div style={{ padding: '20px' }}>
88
-    <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
89
-      <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>
90
-        <span style={{marginLeft:'135px', color: '#999'}}>请上传制作好的分享图片用于置业顾问或用户分享房源列表页面到好友或群</span>
91
-      </p>
92
-    </div>
93
-    <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
94
-      <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享模板</p>
95
-      <div>
96
-        <p style={{ display: 'flex', alignItems: 'center', fontSize: '14px', color: '#999', margin: '0', lineHeight: '0' }}>
97
-          <img src={logo} style={{ width: '22px', marginRight: '10px' }} />
98
-            {miniappName}
99
-        </p>
100
-        <p style={{ fontSize: '16px', color: '#222', fontWeight: '600', margin: '0' }}>{miniappName ? miniappName : '置业V客厅 精准获客平台'}</p>
101
-        <img style={{ width: '200px', height: '160px' }} src={imgValue ? imgValue : poster2} alt="" />
102
-      </div>
103
-    </div>
104
-    <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
105
-      <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
106
-      <Input placeholder="请输入分享标题" value={inputValue}  onChange={e => changeInput(e.target.value)} />
107
-    </div>
108
-    <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
109
-      <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享图片</p>
110
-      <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
111
-    </div>
112
-    <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginTop: '20px' }}>建议尺寸:750*600px,比例5:4,格式:jpg</p>
113
-    <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
114
-    <Button onClick={() => router.go(-1)}>取消</Button>
115
-  </div>
116
-}
117
-
118
-export default Share

+ 0
- 153
src/pages/activity/liveActivity/edit/components/shareRecord.jsx View File

@@ -1,153 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload, Table, Pagination } from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import moment from 'moment';
5
-import router from 'umi/router';
6
-import apis from '../../../../../services/apis';
7
-import BuildSelect from '../../../../../components/SelectButton/BuildSelect';
8
-import AuthButton from '@/components/AuthButton';
9
-import styles from './style.less';
10
-import request from '../../../../../utils/request';
11
-
12
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
-const { TextArea } = Input;
14
-
15
-const header = (props) => {
16
-  const [ data, setData ] = useState({})
17
-  const [page, changePage] = useState({})
18
-  const liveActivityId = props.liveActivityId.liveId
19
-
20
-  useEffect(() => {
21
-    getList({ pageNum: 1, pageSize: 10, liveActivityId : liveActivityId});
22
-  },[])
23
-
24
-  // 查询列表
25
-  const getList = (params) => {
26
-    request({ ...apis.taliveActivity.taLiveShare, params: { ...params },}).then((data) => {
27
-        console.log(data)
28
-        setData(data)
29
-    })
30
-  }
31
-  
32
-  const columns = [
33
-    {
34
-      title: '头像',
35
-      align: 'center',
36
-      render: (text, records) => <img src={records.photoOravatar} width={50} height={50} />,
37
-    },
38
-    {
39
-      title: '昵称',
40
-      dataIndex: 'nameOrnick',
41
-      key: 'nameOrnick',
42
-      align: 'center',
43
-    },
44
-    {
45
-      title: '姓名',
46
-      dataIndex: 'name',
47
-      key: 'name',
48
-      align: 'center',
49
-    },
50
-    {
51
-      title: '手机号',
52
-      dataIndex: 'phone',
53
-      key: 'phone',
54
-      align: 'center',
55
-    },
56
-    {
57
-      title: '身份',
58
-      dataIndex: 'personType',
59
-      key: 'personType',
60
-      align: 'center',
61
-      render: (personType) => <span>{ personType === 'Realty Consultant' ? '置业顾问' : personType === 'customer' || personType === 'estate agent' ? '用户' : '游客' }</span>
62
-    },
63
-    {
64
-      title: '分享时间',
65
-      dataIndex: 'createDate',
66
-      key: 'createDate',
67
-      align: 'center',
68
-      render: (x, row) => <><span>{moment(row.createDate).format('YYYY-MM-DD hh:mm:ss')}</span></>
69
-    },
70
-    {
71
-      title: '分享方式',
72
-      dataIndex: 'shareType',
73
-      key: 'shareType',
74
-      align: 'center',
75
-      render: (x, row) => <span>{ row.tagertType == 'livePost' ? '海报分享' : '小程序分享' }</span>
76
-    },
77
-    {
78
-      title: '分享内容',
79
-      dataIndex: 'liveActivityTitle',
80
-      key: 'liveActivityTitle',
81
-      align: 'center',
82
-      render: (x, row) => <span>直播活动{ row.liveActivityTitle }的活动详情</span>
83
-    },
84
-  ];
85
-  
86
-  const changePageNum = (pageNumber) => {
87
-      getList({ pageNum: pageNumber, pageSize: 10, liveActivityId : liveActivityId, ...props.form.getFieldsValue() })
88
-  }
89
-
90
-  // 提交事件
91
-const handleSubmit = (e, props) => {
92
-    e.preventDefault();
93
-    props.form.validateFields((err, values) => {
94
-      if (!err) {
95
-        console.log('提交数据: ', values)
96
-        getList({ pageNum: 1, pageSize: 10, liveActivityId : liveActivityId,  ...values })
97
-      }
98
-    });
99
-  }
100
-
101
-   //重置搜索
102
-   function handleReset() {
103
-    props.form.resetFields();
104
-  }
105
-
106
-  const { getFieldDecorator } = props.form
107
-  return (
108
-
109
-    <>
110
-      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
111
-        <Form.Item>
112
-          {getFieldDecorator('shareType')(
113
-            <Select style={{ width: '180px' }} placeholder="分享方式">
114
-              <Option value="livePost">海报分享</Option>
115
-              <Option value="liveApp">小程序分享</Option>
116
-            </Select>,
117
-          )}
118
-        </Form.Item>
119
-        <Form.Item>
120
-          {getFieldDecorator('personType')(
121
-            <Select style={{ width: '180px' }} placeholder="身份">
122
-              <Option value="Realty Consultant">置业顾问</Option>
123
-              <Option value="customer">用户</Option>
124
-            </Select>,
125
-          )}
126
-        </Form.Item>
127
-        <Form.Item>
128
-          {getFieldDecorator('phone')(
129
-            <Input placeholder="手机号"/>
130
-          )}
131
-        </Form.Item>
132
-        <Form.Item>
133
-        <AuthButton name="admin.extendContent.search" noRight={null}>
134
-          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
135
-            搜索
136
-          </Button>
137
-          </AuthButton>
138
-          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
139
-              重置
140
-            </Button>
141
-        </Form.Item>
142
-      </Form>
143
-      <span>共筛选出{data.total}条记录</span>
144
-      <Table dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>
145
-      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
146
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
147
-      </div>
148
-    </>
149
-  )
150
-}
151
-const ShareRecord = Form.create({ name: 'header' })(header);
152
-
153
-export default ShareRecord

+ 0
- 97
src/pages/activity/liveActivity/edit/components/style.less View File

@@ -1,97 +0,0 @@
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
-  border-radius: 4px;
14
-  border: 0px;
15
-  margin: 10px 0px;
16
-}
17
-.cardText {
18
-  font-size: 0.106rem;
19
-  color: #333;
20
-  display: flex;
21
-  align-items: center;
22
-  position: relative;
23
-  margin-bottom: 0.08rem; 
24
-}
25
-
26
-.recommderTag{
27
-  position: absolute;
28
-  color: #fff;
29
-  line-height: 0.28rem;
30
-  width: 0.54rem;
31
-  background-color: rgba(0,0,0,0.4);
32
-  text-align: center;
33
-  border-radius: 12px 0 12px 0;
34
-  font-size: 0.09rem;
35
-}
36
-.cardItem{
37
-  font-size: 0.106rem;
38
-  font-weight: 400;
39
-  color: #666;
40
-  display: flex;
41
-  align-items: center;  
42
-  margin-bottom: 0.08rem;
43
-  .title{
44
-    display: inline-block;
45
-    width: 0.58rem;
46
-  
47
-    min-width: 0.58rem;
48
-    justify-content: space-between;
49
-    text-align: justify;
50
-    text-align-last:justify
51
-  }
52
-  
53
-}
54
-.cardText{
55
-  font-size: 0.106rem;
56
-  font-weight: 400;
57
-  color: #666;
58
-  display: flex;
59
-  align-items: center;  
60
-  margin-bottom: 0.08rem;
61
-  .title{
62
-    display: inline-block;
63
-    width: 0.58rem;
64
-  
65
-    min-width: 0.58rem;
66
-    justify-content: space-between;
67
-    text-align: justify;
68
-    text-align-last:justify
69
-  }
70
-  
71
-}
72
-.ediText {
73
-  font-size: 0.106rem;
74
-  color: #ff925c;
75
-  position: absolute;
76
-  right: 0;
77
-
78
-}
79
-
80
-
81
-.address { 
82
-  width: 400px;
83
-  height: 24px; 
84
-  text-overflow: ellipsis; 
85
-  white-space: nowrap;
86
-  overflow: hidden;
87
-}
88
-.cover{
89
-  width: 100%;
90
-
91
-  padding-bottom: 56.25%;
92
-  background-size: 100% 100% !important;
93
- 
94
-  border-radius: 12px 12px 0 0;
95
-  
96
-    // height: '14vw';
97
-}

+ 0
- 154
src/pages/activity/liveActivity/edit/components/visitRecord.jsx View File

@@ -1,154 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload, Table, Pagination } from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import moment from 'moment';
5
-import router from 'umi/router';
6
-import apis from '../../../../../services/apis';
7
-import BuildSelect from '../../../../../components/SelectButton/BuildSelect';
8
-import AuthButton from '@/components/AuthButton';
9
-import styles from './style.less';
10
-import request from '../../../../../utils/request';
11
-
12
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
-const { TextArea } = Input;
14
-
15
-const header = (props) => {
16
-  const [ data, setData ] = useState({})
17
-  // const [page, changePage] = useState({})
18
-  const liveActivityId = props.liveActivityId.liveId
19
-
20
-  useEffect(() => {
21
-    getList({ pageNum: 1, pageSize: 10, liveActivityId : liveActivityId});
22
-  },[])
23
-
24
-  // 查询列表
25
-  const getList = (params) => {
26
-    request({ ...apis.taliveActivity.taLiveVisit, liveActivityId : liveActivityId, params: { ...params },}).then((data) => {
27
-        console.log(data)
28
-        setData(data)
29
-    })
30
-  }
31
-  
32
-  const columns = [
33
-    {
34
-      title: '头像',
35
-      align: 'center',
36
-      render: (text, records) => <img src={records.photoOravatar} width={50} height={50} />,
37
-    },
38
-    {
39
-      title: '昵称',
40
-      dataIndex: 'nameOrnick',
41
-      key: 'nameOrnick',
42
-      align: 'center',
43
-    },
44
-    {
45
-      title: '姓名',
46
-      dataIndex: 'name',
47
-      key: 'name',
48
-      align: 'center',
49
-    },
50
-    {
51
-      title: '手机号',
52
-      dataIndex: 'phone',
53
-      key: 'phone',
54
-      align: 'center',
55
-    },
56
-    {
57
-      title: '身份',
58
-      dataIndex: 'sharePersonType',
59
-      key: 'sharePersonType',
60
-      align: 'center',
61
-      render: (sharePersonType) => <span>{ sharePersonType == 'Realty Consultant' ? '置业顾问' : sharePersonType == 'customer' || sharePersonType === 'estate agent'? '用户' : '游客' }</span>
62
-    },
63
-    {
64
-      title: '访问时间',
65
-      dataIndex: 'createDate',
66
-      key: 'createDate',
67
-      align: 'center',
68
-      render: (x, row) => <><span>{moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}</span></>
69
-    },
70
-    // {
71
-    //   title: '进入场景',
72
-    //   dataIndex: 'sceneName',
73
-    //   key: 'sceneName',
74
-    //   align: 'center',
75
-    //   render: (x, row) => <span>{ row.sceneName === 'mini_program_code' ? '扫码进入' : row.sceneName === 'search' ? '自主进入' : '小程序分享进入' }</span>
76
-    // },
77
-    {
78
-      title: '访问内容',
79
-      dataIndex: 'liveActivityTitle',
80
-      key: 'liveActivityTitle',
81
-      align: 'center',
82
-      render: (x, row) => <span>直播活动{ row.liveActivityTitle }的活动详情</span>
83
-    },
84
-  ];
85
-  
86
-  const changePageNum = (pageNumber) => {
87
-      getList({ pageNum: pageNumber, pageSize: 10, liveActivityId : liveActivityId, ...props.form.getFieldsValue() })
88
-  }
89
-
90
-  // 提交事件
91
-const handleSubmit = (e, props) => {
92
-    e.preventDefault();
93
-    props.form.validateFields((err, values) => {
94
-      if (!err) {
95
-        console.log('提交数据: ', values)
96
-        getList({ pageNum: 1, pageSize: 10, liveActivityId: liveActivityId, ...values})
97
-      }
98
-    });
99
-  }
100
-
101
-   //重置搜索
102
-   function handleReset() {
103
-    props.form.resetFields();
104
-  }
105
-
106
-  const { getFieldDecorator } = props.form
107
-  return (
108
-
109
-    <>
110
-      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
111
-        {/* <Form.Item>
112
-          {getFieldDecorator('sceneType')(
113
-            <Select style={{ width: '180px' }} placeholder="进入场景">
114
-              <Option value="mini_program_code">扫码进入</Option>
115
-              <Option value="share">小程序分享进入</Option>
116
-              <Option value="search">自主进入</Option>
117
-            </Select>,
118
-          )}
119
-        </Form.Item> */}
120
-        <Form.Item>
121
-          {getFieldDecorator('personType')(
122
-            <Select style={{ width: '180px' }} placeholder="身份">
123
-              <Option value="Realty Consultant">置业顾问</Option>
124
-              <Option value="customer">用户</Option>
125
-              <Option value="drift">游客</Option>
126
-            </Select>,
127
-          )}
128
-        </Form.Item>
129
-        <Form.Item>
130
-          {getFieldDecorator('phone')(
131
-            <Input placeholder="手机号"/>
132
-          )}
133
-        </Form.Item>
134
-        <Form.Item>
135
-        <AuthButton name="admin.extendContent.search" noRight={null}>
136
-          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
137
-            搜索
138
-          </Button>
139
-          </AuthButton>
140
-          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
141
-              重置
142
-            </Button>
143
-        </Form.Item>
144
-      </Form>
145
-      <span>共筛选出{data.total}条记录</span>
146
-      <Table dataSource={data.records} columns={columns} pagination={false} rowKey="carouseFigureList"/>
147
-      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
148
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
149
-      </div>
150
-    </>
151
-  )
152
-}
153
-const VisitRecord = Form.create({ name: 'header' })(header);
154
-export default VisitRecord

+ 0
- 87
src/pages/activity/liveActivity/edit/index.jsx View File

@@ -1,87 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Radio, Tag, Tooltip, Tabs, notification } from 'antd';
3
-import moment from 'moment';
4
-import request from '../../../../utils/request';
5
-import apis from '../../../../services/apis';
6
-import { router } from 'umi';
7
-
8
-import Base from './components/base'
9
-import Poster from './components/poster'
10
-import Share from './components/share'
11
-import ShareRecord from './components/shareRecord'
12
-import VisitRecord from './components/visitRecord'
13
-import Prompt from 'umi/prompt';
14
-
15
-
16
-const { Option } = Select
17
-const { TabPane } = Tabs;
18
-
19
-const formItemLayout = {
20
-  labelCol: {
21
-    xs: { span: 24 },
22
-    sm: { span: 2 },
23
-  },
24
-  wrapperCol: {
25
-    xs: { span: 24 },
26
-    sm: { span: 16 },
27
-  },
28
-};
29
-
30
-function openNotificationWithIcon(type, message) {
31
-  notification[type]({
32
-    message,
33
-    description:
34
-      '',
35
-  });
36
-}
37
-
38
-function EditHouse(props) {
39
-  const {liveActivityId} = props.location.query.id;
40
-  console.log(props.location.query.id)
41
-  const [tab, setTab] = useState('base')
42
-  const [liveActivity, setLiveActivity] = useState({ liveActivityId: undefined })
43
-  const [houseId, setHouseId] = useState('')
44
-
45
-  function tabsCallback(e) {
46
-    setTab(e.target.value)
47
-  }
48
-
49
-  // building 回调
50
-  function buildingOnSuccess(e) {
51
-    setBuildingData(e)
52
-  }
53
-
54
-  function housTabChange(e) {
55
-    setHouseId(e.houseId)
56
-    setTab('preselectionRecord')
57
-  }
58
-
59
-  const liveId = liveActivity.liveActivityId || (props.location.query && props.location.query.id)
60
-  console.log(liveId)
61
-  return (
62
-    <>
63
-      <Radio.Group value={ tab } buttonStyle="solid" onChange={e => tabsCallback(e)}>
64
-        <Radio.Button value="base">基本信息</Radio.Button>
65
-        <Radio.Button value="poster">海报设置</Radio.Button>
66
-        <Radio.Button value="share">分享设置</Radio.Button>
67
-        <Radio.Button value="shareRecord">分享记录</Radio.Button>
68
-        <Radio.Button value="visitRecord">分享访问记录</Radio.Button>
69
-      </Radio.Group>
70
-      <div style={{ marginTop: '20px' }}>
71
-        { (tab === 'base' && <Base liveActivityId={{ liveId }} onSuccess={e => buildingOnSuccess(e)}/>)} 
72
-        { (tab === 'poster' && <Poster liveActivityId={{ liveId }}/>)}
73
-        { (tab === 'share' && <Share liveActivityId={{ liveId }}/>)}
74
-        { (tab === 'shareRecord' && <ShareRecord liveActivityId={{ liveId }}/>)}
75
-        { (tab === 'visitRecord' && <VisitRecord liveActivityId={{ liveId }}/>)}
76
-      </div>
77
-      <Prompt message={location =>
78
-        location.pathname.startsWith("/activity/liveActivity")
79
-          ? true
80
-          : localStorage.removeItem("liveActivePageParams")} />
81
-    </>
82
-  )
83
-}
84
-
85
-const WrappedEditHouseForm = Form.create({ name: 'editHouse' })(EditHouse);
86
-
87
-export default WrappedEditHouseForm

+ 0
- 323
src/pages/activity/liveActivity/list/index.jsx View File

@@ -1,323 +0,0 @@
1
-import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Pagination, Modal, DatePicker, notification } from 'antd';
3
-import router from 'umi/router';
4
-import moment from 'moment';
5
-import AuthButton from '@/components/AuthButton';
6
-import Prompt from 'umi/prompt';
7
-import withActions from '@/components/ActionList';
8
-import EditIcon from '@/components/EditIcon';
9
-import styles from '../../../style/GoodsList.less';
10
-import SelectCity from '../../../../components/SelectButton/CitySelect'
11
-import BuildSelect from '../../../../components/SelectButton/BuildSelect'
12
-import apis from '../../../../services/apis';
13
-import request from '../../../../utils/request';
14
-import Navigate from '@/components/Navigate';
15
-// import SaleBatchListHelpDoc from '../edit/components/SalesBatchListHelpDoc';
16
-
17
-const { Option } = Select;
18
-
19
-const header = props => {
20
-  // eslint-disable-next-line react-hooks/rules-of-hooks
21
-  const [data, setData] = useState({ list: [], total: 0 })
22
-  //   const [page, changePage] = useState({})
23
-  const [liveIdList, setLiveIdList] = useState([])
24
-  const [time, setTime] = useState('')
25
-  const [showHelp, setShowHelp] = useState(false)
26
-
27
-  // 查询列表
28
-  const getList = params => {
29
-    request({ ...apis.taliveActivity.taLiveActivity, params: { ...params } }).then(data => {
30
-      console.log(data)
31
-      setData(data)
32
-    })
33
-  }
34
-
35
-  // eslint-disable-next-line react-hooks/rules-of-hooks
36
-  useEffect(() => {
37
-
38
-    if (localStorage.getItem("liveActivePageParams")) {
39
-      props.form.setFieldsValue(JSON.parse(localStorage.getItem("liveActivePageParams")));
40
-      // const { getFieldDecorator } = JSON.parse(localStorage.getItem("pageParams"))
41
-
42
-      getList(JSON.parse(localStorage.getItem("liveActivePageParams")))
43
-    } else {
44
-      localStorage.setItem("liveActivePageParams", JSON.stringify({ pageNum: 1, pageSize: 10 }));
45
-      getList({ pageNum: 1, pageSize: 10 });
46
-    }
47
-   
48
-  }, [])
49
-
50
-  // 跳转到编辑
51
-  const toAddLive = rowData => () => {
52
-    if(rowData) {
53
-      router.push({
54
-      pathname: '/activity/liveActivity/edit',
55
-      query: {
56
-        id: rowData.liveActivityId,
57
-        buildingId: rowData.buildingId,
58
-      },
59
-    });
60
-      return
61
-    }
62
-    router.push({
63
-      pathname: '/activity/liveActivity/add',
64
-    });
65
-  }
66
-
67
-  const toDataReacord = rowData => () => {
68
-  
69
-      router.push({
70
-      pathname: '/activity/liveActivity/liveActivityRecord',
71
-      query: {
72
-        id: rowData.liveActivityId,
73
-      },
74
-    });
75
-  }
76
-
77
-  function openNotificationWithIcon(type, message) {
78
-    notification[type]({
79
-      message,
80
-      description:
81
-        '',
82
-    });
83
-  }
84
-
85
-  
86
-  const toDelLiveActivity = rowData => () =>{
87
-    console.log(liveIdList, 'liveIdListliveIdList')
88
-    if(liveIdList.length < 1){
89
-      openNotificationWithIcon('error', '请先选择需要删除的直播活动')
90
-      return
91
-    }
92
-    Modal.confirm({
93
-      title: '删除后当前直播活动关联的小程序端开屏图、banner图等也会自动下架',
94
-      okText: '确定',
95
-      cancelText: '取消',
96
-      onOk () {
97
-        request({ ...apis.taliveActivity.deleteTaLiveActivity, data: liveIdList, }).then((data) => {
98
-          message.info("操作成功")
99
-          getList(JSON.parse(localStorage.getItem("liveActivePageParams")))
100
-        }).catch((err) => {
101
-          // message.info(err.msg)
102
-        })
103
-      },
104
-    });
105
-
106
-    
107
-  }
108
-
109
-  /**
110
-   *
111
-   *
112
-   * @param {*} props
113
-   * @returns
114
-   */
115
-  const columns = [
116
-    {
117
-      title: '直播活动标题',
118
-      dataIndex: 'liveActivityTitle',
119
-      key: 'liveActivityTitle',
120
-      align: 'center',
121
-      render:  (x, row) => <Navigate onClick={toAddLive(row)}>{row.liveActivityTitle}</Navigate>,
122
-    },
123
-    {
124
-      title: '所属城市',
125
-      dataIndex: 'cityName',
126
-      key: 'cityName',
127
-      align: 'center',
128
-    },
129
-    {
130
-      title: '所属楼盘',
131
-      dataIndex: 'buildingName',
132
-      key: 'buildingName',
133
-      align: 'center',
134
-    },
135
-    {
136
-      title: '直播开始时间',
137
-      dataIndex: 'liveStartDate',
138
-      key: 'liveStartDate',
139
-      align: 'center',
140
-      render: (x, row) => <><span>{`${moment(row.liveStartDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
141
-    },
142
-    {
143
-      title: '直播结束时间',
144
-      dataIndex: 'liveEndDate',
145
-      key: 'liveEndDate',
146
-      align: 'center',
147
-      render: (x, row) => <><span>{`${moment(row.liveEndDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
148
-    },
149
-    {
150
-      title: '权重',
151
-      dataIndex: 'weight',
152
-      key: 'weight',
153
-      align: 'center',
154
-    },
155
-    {
156
-      title: '发布状态',
157
-      dataIndex: 'status',
158
-      key: 'status',
159
-      align: 'center',
160
-      render: status => <><span>{status == 0 ? '未发布' : '已发布'}</span></>,
161
-    },
162
-    {
163
-      title: '新增人',
164
-      dataIndex: 'createName',
165
-      key: 'createName',
166
-      align: 'center',
167
-    },
168
-    {
169
-      title: '新增时间',
170
-      dataIndex: 'createDate',
171
-      key: 'createDate',
172
-      align: 'center',
173
-      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
174
-    },
175
-    {
176
-      title: '修改人',
177
-      dataIndex: 'updateName',
178
-      key: 'updateName',
179
-      align: 'center',
180
-    },
181
-    {
182
-      title: '修改时间',
183
-      dataIndex: 'updateDate',
184
-      key: 'updateDate',
185
-      align: 'center',
186
-      render: (x, row) => <><span>{`${moment(row.updateDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
187
-    },
188
-    {
189
-      title: '操作',
190
-      align: 'center',
191
-      width: 240,
192
-      render: withActions((text, record) => [    
193
-        <AuthButton name="admin.liveActivity.dataRecord" noRight={null}>
194
-          <EditIcon type="record" text="数据记录" onClick={toDataReacord(record)} />
195
-        </AuthButton>,
196
- 
197
-        <AuthButton name="admin.live.detail.get" noRight={null}>
198
-          <EditIcon type="look" text="查看详情" onClick={toAddLive(record)} />
199
-        </AuthButton>,
200
-      ]),
201
-    },
202
-  ];
203
-  const getSignList = dynamicId => {
204
-    router.push({
205
-      pathname: '/activity/SignList',
206
-      query: {
207
-        dynamicId,
208
-      },
209
-    });
210
-  }
211
-
212
-  const changePageNum = pageNumber => {
213
-    localStorage.setItem("liveActivePageParams", JSON.stringify({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() }));
214
-    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
215
-  }
216
-
217
-  const rowSelection = {
218
-    onChange: (selectedRowKeys, selectedRows) => {
219
-      console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
220
-      setLiveIdList(selectedRows)
221
-    },
222
-  };
223
-
224
-  // 提交事件
225
-  const handleSubmit = e => {
226
-    e.preventDefault();
227
-    props.form.validateFields((err, values) => {
228
-      if (!err) {
229
-        console.log('提交数据: ', values)
230
-        if (time) {
231
-          values.time = `${moment(time).format('YYYY-MM-DDT00:00:00.000')}Z`
232
-        } else {
233
-          values.time = null
234
-        }
235
-        localStorage.setItem("liveActivePageParams", JSON.stringify({ pageNum: 1, pageSize: 10, ...values }));
236
-        getList({ pageNum: 1, pageSize: 10, ...values })
237
-      }
238
-    });
239
-  }
240
-
241
-  // 重置搜索
242
-  function handleReset () {
243
-    props.form.resetFields();
244
-    setTime('')
245
-    localStorage.setItem("liveActivePageParams", JSON.stringify({ pageNum: 1, pageSize: 10 }));
246
-    getList({ pageNum: 1, pageSize: 10 })
247
-  }
248
-
249
-  // 时间回调
250
-  function timeOnChange(date, dateString) {
251
-    console.log(date, dateString)
252
-    setTime(date)
253
-  }
254
-
255
-
256
-  const { getFieldDecorator } = props.form
257
-  return (
258
-
259
-    <>
260
-      {/* style={{ display: 'none' }} */}
261
-      <div id="qrcode"></div>
262
-      <Form layout="inline" onSubmit={e => handleSubmit(e)}>
263
-        <Form.Item>
264
-          {getFieldDecorator('liveActivityTitle')(
265
-             <Input
266
-             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
267
-             placeholder="直播活动标题"
268
-           />,
269
-          )}
270
-        </Form.Item>
271
-        <Form.Item>
272
-          {getFieldDecorator('cityId')(
273
-            <SelectCity />,
274
-          )}
275
-        </Form.Item>
276
-        <Form.Item>
277
-          {getFieldDecorator('buildingId')(
278
-            <BuildSelect />,
279
-          )}
280
-        </Form.Item>
281
-        <Form.Item>
282
-          {getFieldDecorator('status')(
283
-            <Select style={{ width: '180px' }} placeholder="发布状态">
284
-            <Option value="1">已发布</Option>
285
-            <Option value="0">未发布</Option>
286
-          </Select>,
287
-          )}
288
-        </Form.Item>
289
-        <Form.Item>
290
-          <AuthButton name="admin.buildingDynamic.search" noRight={null}>
291
-            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
292
-              搜索
293
-            </Button>
294
-          </AuthButton>
295
-          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
296
-            重置
297
-            </Button>
298
-        </Form.Item>
299
-      </Form>
300
-      
301
-      <AuthButton name="admin.live.add.post" noRight={null}>
302
-        <Button type="danger" className={styles.addBtn} onClick={toAddLive()}>新增</Button>
303
-      </AuthButton>
304
-      <AuthButton name="admin.live.del" noRight={null}>
305
-        <Button type="primary" className={styles.addBtn} onClick={toDelLiveActivity()} style={{marginLeft:'30px'}}>删除</Button>
306
-      </AuthButton><br/>
307
-      <span>共筛选出{data.total}条记录</span>
308
-      <Table rowSelection={rowSelection}
309
-       dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
310
-      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
311
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current}/>
312
-      </div>
313
-      {/* <SaleBatchListHelpDoc visible={showHelp} onCancel={() => setShowHelp(false)} /> */}
314
-      <Prompt message={location =>
315
-        location.pathname.startsWith("/activity/liveActivity")
316
-          ? true
317
-          : localStorage.removeItem("liveActivePageParams")} />
318
-    </>
319
-  )
320
-}
321
-const WrappedHeader = Form.create({ name: 'header' })(header);
322
-
323
-export default WrappedHeader

+ 0
- 16
src/pages/activity/liveActivity/list/liveActivityRecord.jsx View File

@@ -1,16 +0,0 @@
1
-import React from 'react';
2
-import DataRecord from '../../dataRecord/index'
3
-import Prompt from 'umi/prompt';
4
-
5
-const header = props =>{
6
-    const id = props.location.query.id
7
-    // type:'live',
8
-    return <><DataRecord id ={id} activeType="live"/>
9
-    <Prompt message={location =>
10
-        location.pathname.startsWith("/activity/liveActivity")
11
-          ? true
12
-          : localStorage.removeItem("liveActivePageParams")} />
13
-          </>
14
-}
15
-
16
-export default header

+ 7
- 7
src/pages/activity/lookHouseActivity/edit/Basic.jsx View File

@@ -164,8 +164,8 @@ const BasicForm = props => {
164 164
           })(<BuildSelect disabled={disable} />)}
165 165
         </Form.Item>
166 166
         <Form.Item
167
-          label="活动封面图1"
168
-          help="建议图片尺寸:750px*420px,比例16:9,格式:jpg,用于:首页推荐/活动列表"
167
+          label="活动封面图"
168
+          help="建议图片尺寸:690px*388px,比例16:9,格式:jpg,用于:首页推荐/活动列表"
169 169
         >
170 170
           {getFieldDecorator('listImgUrl', {
171 171
             rules: [
@@ -176,7 +176,7 @@ const BasicForm = props => {
176 176
             ],
177 177
           })(<ImageUploader />)}
178 178
         </Form.Item>
179
-        <Form.Item
179
+        {/* <Form.Item
180 180
           label="活动封面图2"
181 181
           help="建议图片尺寸:750*250,比例3:1,格式:jpg,用于:项目详情页"
182 182
         >
@@ -188,10 +188,10 @@ const BasicForm = props => {
188 188
               },
189 189
             ],
190 190
           })(<ImageUploader />)}
191
-        </Form.Item>
191
+        </Form.Item> */}
192 192
         <Form.Item
193 193
           label="活动详情主图"
194
-          help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于:普通活动详情"
194
+          help="建议图片尺寸:750*415px,比例16:9,格式:jpg,用于:普通活动详情"
195 195
         >
196 196
           {getFieldDecorator('imgUrl', {
197 197
             rules: [
@@ -247,7 +247,7 @@ const BasicForm = props => {
247 247
             ],
248 248
           })(<Input type="number" />)}
249 249
         </Form.Item>
250
-        <Form.Item label="用户携带人数" help="每个用户最多可携带参与活动的人数">
250
+        {/* <Form.Item label="用户携带人数" help="每个用户最多可携带参与活动的人数">
251 251
           {getFieldDecorator('maxEnlistByPerson', {
252 252
             rules: [
253 253
               {
@@ -256,7 +256,7 @@ const BasicForm = props => {
256 256
               },
257 257
             ],
258 258
           })(<Input type="number" min={1} />)}
259
-        </Form.Item>
259
+        </Form.Item> */}
260 260
         <Form.Item label="活动详情">{getFieldDecorator('desc')(<Wangedit />)}</Form.Item>
261 261
         <Form.Item label="报名时间">
262 262
           {getFieldDecorator('signupTime', {

+ 15
- 15
src/pages/building/Edit/SpecialRoom/index.jsx View File

@@ -37,28 +37,28 @@ export default (props) => {
37 37
   }
38 38
 
39 39
   useEffect(() => {
40
-    getList({ pageNum: 1, pageSize: 10 });
40
+    getList({ pageNum: 1, pageSize: 20 });
41 41
   }, []);
42 42
 
43 43
   const onChangePageNum = pageNumber => {
44
-    getList({ pageNum: pageNumber, pageSize: 10 });
44
+    getList({ pageNum: pageNumber, pageSize: 20 });
45 45
   };
46 46
 
47 47
   const onSuccess = () => {
48
-    // setVisible(false);
49
-    // getList();
48
+    setVisible({visible:false})
49
+    getList({ pageNum: 1, pageSize: 10 });
50 50
   };
51 51
   function onDelete(record) {
52
-    // request({ ...apis.paorama.delete, urlData: { id: record.panoramaId } })
53
-    //   .then(res => {
54
-    //     notification.success({ message: '删除成功' });
55
-    //     getList();
56
-    //   })
57
-    //   .catch(err => {
58
-    //     notification.error({
59
-    //       message: err.message,
60
-    //     });
61
-    //   });
52
+    request({ ...apis.building.deletebuildingSpecialRoom, urlData: { id: record.specialRoomId } })
53
+      .then(res => {
54
+        notification.success({ message: '删除成功' });
55
+        getList({ pageNum: 1, pageSize: 10 });
56
+      })
57
+      .catch(err => {
58
+        notification.error({
59
+          message: err.message,
60
+        });
61
+      });
62 62
   }
63 63
 
64 64
   function onEdit(data) {
@@ -71,7 +71,7 @@ export default (props) => {
71 71
       <div>
72 72
         <Button type="primary" onClick={() => setVisible({visible:true})}>新增特价房</Button>
73 73
       </div>
74
-      <Form visibleData={visible} onCancel={() => setVisible({visible:false})} onSuccess={onSuccess}  />
74
+      <Form visibleData={visible} buildingId={id} onCancel={() => setVisible({visible:false})} onSuccess={onSuccess}  />
75 75
       <List data={data} buildingId={id} loading={loading} onChangePageNum={onChangePageNum} onDelete={onDelete} onEdit={onEdit}/>
76 76
     </div>
77 77
   )

+ 6
- 4
src/pages/customer/Recommend/audit.jsx View File

@@ -107,7 +107,7 @@ function body(props) {
107 107
 
108 108
   return (
109 109
     <Card>
110
-      <Form {...tailFormItemLayout} onSubmit={e => handleSubmit(e)} style={{ width: '800px', margin: 'auto' }}>
110
+      <Form {...tailFormItemLayout} onSubmit={e => handleSubmit(e)} style={{ maxWidth: '1000px' }}>
111 111
         <Form.Item label="客户ID" style={{ display: 'none' }}>
112 112
           {getFieldDecorator('customerId')(
113 113
             <Input
@@ -217,13 +217,15 @@ function body(props) {
217 217
           </Row>
218 218
         </Form.Item>
219 219
         <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
220
-          <Button type="primary" className={Styles.SubmitButton} htmlType="submit" >
220
+          <Button type="primary" htmlType="submit" >
221 221
             审核通过
222 222
           </Button>
223
-          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
224
-          <Button onClick={() => submitDate({ verifyStatus: '2' })}>
223
+          <Button type="danger" ghost style={{marginLeft: '4em'}} onClick={() => submitDate({ verifyStatus: '2' })}>
225 224
             驳回
226 225
           </Button>
226
+          <Button style={{marginLeft: '4em'}} onClick={() => router.goBack(-1)}>
227
+            取消
228
+          </Button>
227 229
         </Form.Item>
228 230
       </Form>
229 231