|
@@ -48,15 +48,15 @@ const BasicForm = props => {
|
48
|
48
|
|
49
|
49
|
// 查询详情
|
50
|
50
|
const getDynamicData = dynamicId => {
|
51
|
|
- request({ ...apis.activity.details, params: { dynamicId } }).then((data) => {
|
52
|
|
- console.log(data)
|
|
51
|
+ request({ ...apis.activity.details, params: { dynamicId } }).then(data => {
|
|
52
|
+
|
53
|
53
|
data.activityTime = [moment(data.startDate), moment(data.endDate)]
|
54
|
54
|
data.signupTime = [moment(data.enlistStart), moment(data.enlistEnd)]
|
55
|
55
|
// setSignupTime([moment(data.enlistStart), moment(data.enlistEnd)])
|
56
|
56
|
setData(data)
|
57
|
57
|
setIsEnlist(data.isEnlist)
|
58
|
58
|
setActivityStatus(data.activityStatus)
|
59
|
|
- setDisable(data.activityStatus === 0 ? true : false)
|
|
59
|
+ setDisable(data.activityStatus === 0)
|
60
|
60
|
props.form.setFieldsValue(data)
|
61
|
61
|
})
|
62
|
62
|
}
|
|
@@ -70,15 +70,9 @@ const BasicForm = props => {
|
70
|
70
|
}, [])
|
71
|
71
|
const checkTime = () => {
|
72
|
72
|
function compareDate(dateTime1, dateTime2) {
|
73
|
|
- var formatDate1 = new Date(dateTime1)
|
74
|
|
- var formatDate2 = new Date(dateTime2)
|
75
|
|
- if (formatDate1 > formatDate2) {
|
76
|
|
- return true;
|
77
|
|
- }
|
78
|
|
- else {
|
79
|
|
- return false;
|
80
|
|
- }
|
|
73
|
+ return new Date(dateTime1) > new Date(dateTime2)
|
81
|
74
|
}
|
|
75
|
+
|
82
|
76
|
// 1)修改后的开始时间不得大于当前时间(会存在已经成功报名的用户)
|
83
|
77
|
|
84
|
78
|
// (2)修改后开始时间<当前时间<修改后结束时间:活动进行中
|
|
@@ -169,8 +163,6 @@ const BasicForm = props => {
|
169
|
163
|
// console.log('-------1--------')
|
170
|
164
|
}
|
171
|
165
|
|
172
|
|
-
|
173
|
|
-
|
174
|
166
|
const { getFieldDecorator } = props.form;
|
175
|
167
|
return (
|
176
|
168
|
<>
|
|
@@ -310,211 +302,209 @@ const BasicForm = props => {
|
310
|
302
|
|
311
|
303
|
const Basic = Form.create({ name: 'BasicForm' })(BasicForm);
|
312
|
304
|
|
313
|
|
-/**
|
314
|
|
- *
|
315
|
|
- *
|
316
|
|
- * @param {*} props
|
317
|
|
- * @returns
|
318
|
|
- */
|
319
|
|
-const Edit = props => {
|
320
|
|
- const [tab, changeTab] = useState('basic')
|
321
|
|
- const { dynamicId } = props.location.query
|
322
|
|
-
|
|
305
|
+const Poster = props => {
|
|
306
|
+ const { dynamicId } = props
|
|
307
|
+ const [inputValue, changeInput] = useState('')
|
|
308
|
+ const [textAreaValue, changeTextArea] = useState('')
|
|
309
|
+ const [imgValue, changeImg] = useState('')
|
|
310
|
+ const [posterId, setPosterId] = useState('')
|
323
|
311
|
|
324
|
|
- const Poster = props => {
|
325
|
|
- const [inputValue, changeInput] = useState('')
|
326
|
|
- const [textAreaValue, changeTextArea] = useState('')
|
327
|
|
- const [imgValue, changeImg] = useState('')
|
328
|
|
- const [posterId, setPosterId] = useState('')
|
|
312
|
+ useEffect(() => {
|
|
313
|
+ if (dynamicId) {
|
|
314
|
+ request({ ...apis.activity.poster, params: { targetId: dynamicId, targetType: 'activity' } }).then(data => {
|
329
|
315
|
|
|
316
|
+ if (data.length > 0) {
|
|
317
|
+ setPosterId(data[0].posterId)
|
|
318
|
+ changeImg(data[0].posterImg)
|
|
319
|
+ changeTextArea(data[0].posterDescription)
|
|
320
|
+ changeInput(data[0].posterTitle)
|
|
321
|
+ }
|
|
322
|
+ }).catch(err => {
|
|
323
|
+ message.info(err.msg || err.message)
|
|
324
|
+ })
|
|
325
|
+ }
|
|
326
|
+ // getMiniappName()
|
|
327
|
+ }, [])
|
|
328
|
+
|
|
329
|
+ // 获取小程序名称
|
|
330
|
+ // const [miniappName, setMiniappName] = useState('')
|
|
331
|
+ // function getMiniappName() {
|
|
332
|
+ // request({ ...apis.building.getMiniappName }).then(res => {
|
|
333
|
+ // console.log(res, "0000000000000")
|
|
334
|
+ // setMiniappName(res)
|
|
335
|
+ // })
|
|
336
|
+ // }
|
|
337
|
+
|
|
338
|
+ const submitPoster = () => {
|
330
|
339
|
if (dynamicId) {
|
331
|
|
- console.log(dynamicId, 'dynamicId')
|
332
|
|
- useEffect(() => {
|
333
|
|
- request({ ...apis.activity.poster, params: { targetId: dynamicId, targetType: 'activity' } }).then((data) => {
|
334
|
|
- console.log(data, "2222")
|
335
|
|
- if (data.length > 0) {
|
336
|
|
- setPosterId(data[0].posterId)
|
337
|
|
- changeImg(data[0].posterImg)
|
338
|
|
- changeTextArea(data[0].posterDescription)
|
339
|
|
- changeInput(data[0].posterTitle)
|
340
|
|
- }
|
341
|
|
- }).catch((err) => {
|
|
340
|
+ if (posterId) {
|
|
341
|
+ request({ ...apis.activity.updatePoster, urlData: { id: posterId }, data: { targetId: dynamicId, targetType: 'activity', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue } }).then(data => {
|
|
342
|
+ message.info('保存成功')
|
|
343
|
+ }).catch(err => {
|
342
|
344
|
message.info(err.msg || err.message)
|
343
|
345
|
})
|
344
|
|
- getMiniappName()
|
345
|
|
- }, [])
|
346
|
|
- } else {
|
347
|
|
- getMiniappName()
|
348
|
|
- }
|
349
|
|
- // 获取小程序名称
|
350
|
|
- const [miniappName, setMiniappName] = useState('')
|
351
|
|
- function getMiniappName() {
|
352
|
|
- request({ ...apis.building.getMiniappName }).then(res => {
|
353
|
|
- console.log(res, "0000000000000")
|
354
|
|
- setMiniappName(res)
|
355
|
|
- })
|
356
|
|
- }
|
357
|
|
-
|
358
|
|
- const submitPoster = () => {
|
359
|
|
- if (dynamicId) {
|
360
|
|
- if (posterId) {
|
361
|
|
- request({ ...apis.activity.updatePoster, urlData: { id: posterId }, data: { targetId: dynamicId, targetType: 'activity', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue }, }).then((data) => {
|
362
|
|
- message.info("保存成功")
|
363
|
|
- }).catch((err) => {
|
364
|
|
- message.info(err.msg || err.message)
|
365
|
|
- })
|
366
|
|
- } else {
|
367
|
|
- request({ ...apis.activity.addPoster, data: { targetId: dynamicId, targetType: 'activity', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue }, }).then((data) => {
|
368
|
|
- setPosterId(data.posterId)
|
369
|
|
- message.info("保存成功")
|
370
|
|
- }).catch((err) => {
|
371
|
|
- message.info(err.msg || err.message)
|
372
|
|
- })
|
373
|
|
- }
|
374
|
346
|
} else {
|
375
|
|
- message.warn("请先保存基本信息数据")
|
|
347
|
+ request({ ...apis.activity.addPoster, data: { targetId: dynamicId, targetType: 'activity', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue } }).then(data => {
|
|
348
|
+ setPosterId(data.posterId)
|
|
349
|
+ message.info('保存成功')
|
|
350
|
+ }).catch(err => {
|
|
351
|
+ message.info(err.msg || err.message)
|
|
352
|
+ })
|
376
|
353
|
}
|
|
354
|
+ } else {
|
|
355
|
+ message.warn('请先保存基本信息数据')
|
377
|
356
|
}
|
|
357
|
+ }
|
378
|
358
|
|
379
|
|
- return <div>
|
380
|
|
- <div style={{ display: 'flex' }}>
|
381
|
|
- <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
|
382
|
|
- <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
|
383
|
|
- <img style={{ width: '100%', height: '300px' }} src={imgValue ? imgValue : poster1} alt="" />
|
384
|
|
- <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
|
385
|
|
- <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} src={touxiang} alt="" />
|
386
|
|
- <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
|
387
|
|
- <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
|
388
|
|
- <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
|
389
|
|
- </div>
|
390
|
|
- <p style={{
|
391
|
|
- margin: '10px 20px',
|
392
|
|
- fontSize: '20px',
|
393
|
|
- color: '#222',
|
394
|
|
- fontWeight: '600',
|
395
|
|
- display: '-webkit-box',
|
396
|
|
- lineClamp: '3',
|
397
|
|
- height: '60px',
|
398
|
|
- WebkitLineClamp: '2',
|
399
|
|
- WebkitBoxOrient: 'vertical',
|
400
|
|
- overflow: 'hidden',
|
401
|
|
- textOverflow: 'ellipsis'
|
402
|
|
- }}>{inputValue ? inputValue : '海报标题'}</p>
|
403
|
|
-
|
404
|
|
- <img src={yinhao} style={{ width: '30px', marginLeft: '20px' }} alt="" />
|
405
|
|
- <p style={{
|
406
|
|
- margin: '16px 20px 28px 20px',
|
407
|
|
- fontSize: '17px',
|
408
|
|
- color: '#999',
|
409
|
|
- display: '-webkit-box',
|
410
|
|
- lineClamp: '3',
|
411
|
|
- height: '72px',
|
412
|
|
- WebkitLineClamp: '3',
|
413
|
|
- WebkitBoxOrient: 'vertical',
|
414
|
|
- overflow: 'hidden',
|
415
|
|
- textOverflow: 'ellipsis'
|
416
|
|
- }}>{textAreaValue ? textAreaValue : '海报描述'}</p>
|
417
|
|
- <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
|
418
|
|
- <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
|
419
|
|
- <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入活动查看详情</p>
|
420
|
|
- <img style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }} src={xiaochengxu} alt="" />
|
421
|
|
- </div>
|
422
|
|
- </div>
|
423
|
|
- <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
|
424
|
|
- </div>
|
425
|
|
-
|
426
|
|
- <div >
|
427
|
|
- <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
|
428
|
|
- <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动海报图</p>
|
429
|
|
- <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
|
430
|
|
- </div>
|
431
|
|
- <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px' }}>建议图片尺寸:640*670px,比例64:67,格式:jpg,用于普通活动海报</p>
|
432
|
|
- <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
|
433
|
|
- <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
|
434
|
|
- <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
|
|
359
|
+ return <div>
|
|
360
|
+ <div style={{ display: 'flex' }}>
|
|
361
|
+ <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
|
|
362
|
+ <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
|
|
363
|
+ <img style={{ width: '100%', height: '300px' }} src={imgValue || poster1} alt="" />
|
|
364
|
+ <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
|
|
365
|
+ <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} src={touxiang} alt="" />
|
|
366
|
+ <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
|
|
367
|
+ <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
|
|
368
|
+ <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
|
435
|
369
|
</div>
|
436
|
|
- <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
|
437
|
|
- <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
|
438
|
|
- <TextArea rows={5} maxLength={1024} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
|
|
370
|
+ <p style={{
|
|
371
|
+ margin: '10px 20px',
|
|
372
|
+ fontSize: '20px',
|
|
373
|
+ color: '#222',
|
|
374
|
+ fontWeight: '600',
|
|
375
|
+ display: '-webkit-box',
|
|
376
|
+ lineClamp: '3',
|
|
377
|
+ height: '60px',
|
|
378
|
+ WebkitLineClamp: '2',
|
|
379
|
+ WebkitBoxOrient: 'vertical',
|
|
380
|
+ overflow: 'hidden',
|
|
381
|
+ textOverflow: 'ellipsis',
|
|
382
|
+ }}>{inputValue || '海报标题'}</p>
|
|
383
|
+
|
|
384
|
+ <img src={yinhao} style={{ width: '30px', marginLeft: '20px' }} alt="" />
|
|
385
|
+ <p style={{
|
|
386
|
+ margin: '16px 20px 28px 20px',
|
|
387
|
+ fontSize: '17px',
|
|
388
|
+ color: '#999',
|
|
389
|
+ display: '-webkit-box',
|
|
390
|
+ lineClamp: '3',
|
|
391
|
+ height: '72px',
|
|
392
|
+ WebkitLineClamp: '3',
|
|
393
|
+ WebkitBoxOrient: 'vertical',
|
|
394
|
+ overflow: 'hidden',
|
|
395
|
+ textOverflow: 'ellipsis',
|
|
396
|
+ }}>{textAreaValue || '海报描述'}</p>
|
|
397
|
+ <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
|
|
398
|
+ <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
|
|
399
|
+ <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入活动查看详情</p>
|
|
400
|
+ <img style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }} src={xiaochengxu} alt="" />
|
439
|
401
|
</div>
|
|
402
|
+ </div>
|
|
403
|
+ <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
|
|
404
|
+ </div>
|
440
|
405
|
|
|
406
|
+ <div >
|
|
407
|
+ <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
|
|
408
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动海报图</p>
|
|
409
|
+ <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
|
441
|
410
|
</div>
|
|
411
|
+ <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px' }}>建议图片尺寸:640*670px,比例64:67,格式:jpg,用于普通活动海报</p>
|
|
412
|
+ <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
|
|
413
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
|
|
414
|
+ <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
|
|
415
|
+ </div>
|
|
416
|
+ <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
|
|
417
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
|
|
418
|
+ <TextArea rows={5} maxLength={1024} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
|
|
419
|
+ </div>
|
|
420
|
+
|
442
|
421
|
</div>
|
443
|
|
- <Button type="primary" onClick={submitPoster} style={{ margin: '40px 40px 40px 30vw' }}> 确定</Button>
|
444
|
|
- <Button onClick={() => cancelPage()}>
|
445
|
|
- 取消
|
446
|
|
- </Button>
|
447
|
422
|
</div>
|
|
423
|
+ <Button type="primary" onClick={submitPoster} style={{ margin: '40px 40px 40px 30vw' }}> 确定</Button>
|
|
424
|
+ <Button onClick={() => cancelPage()}>
|
|
425
|
+ 取消
|
|
426
|
+ </Button>
|
|
427
|
+ </div>
|
|
428
|
+}
|
448
|
429
|
|
449
|
|
- }
|
450
|
|
-
|
|
430
|
+const Share = props => {
|
|
431
|
+ const { dynamicId } = props
|
|
432
|
+ const [inputValue, changeInput] = useState('')
|
|
433
|
+ const [imgValue, changeImg] = useState('')
|
|
434
|
+ const [shareContentId, setShareContentId] = useState('')
|
451
|
435
|
|
|
436
|
+ useEffect(() => {
|
|
437
|
+ if (dynamicId) {
|
|
438
|
+ request({ ...apis.activity.shareContent, params: { targetId: dynamicId, targetType: 'activity' } }).then(data => {
|
452
|
439
|
|
453
|
|
- const Share = (props) => {
|
454
|
|
- const [inputValue, changeInput] = useState('')
|
455
|
|
- const [imgValue, changeImg] = useState('')
|
456
|
|
- const [shareContentId, setShareContentId] = useState('')
|
|
440
|
+ if (data.length > 0) {
|
|
441
|
+ setShareContentId(data[0].shareContentId)
|
|
442
|
+ changeImg(data[0].shareContentImg)
|
|
443
|
+ changeInput(data[0].shareContentTitle)
|
|
444
|
+ }
|
|
445
|
+ }).catch(err => {
|
|
446
|
+ message.info(err.msg || err.message)
|
|
447
|
+ })
|
|
448
|
+ }
|
|
449
|
+ }, [dynamicId])
|
457
|
450
|
|
|
451
|
+ const submitShare = () => {
|
458
|
452
|
if (dynamicId) {
|
459
|
|
- useEffect(() => {
|
460
|
|
- request({ ...apis.activity.shareContent, params: { targetId: dynamicId, targetType: 'activity' }, }).then((data) => {
|
461
|
|
- console.log(data, "2222")
|
462
|
|
- if (data.length > 0) {
|
463
|
|
- setShareContentId(data[0].shareContentId)
|
464
|
|
- changeImg(data[0].shareContentImg)
|
465
|
|
- changeInput(data[0].shareContentTitle)
|
466
|
|
- }
|
467
|
|
- }).catch((err) => {
|
|
453
|
+ if (shareContentId) {
|
|
454
|
+ request({ ...apis.activity.updateShareContent, urlData: { id: shareContentId }, data: { targetId: dynamicId, shareContentType: 'activity', shareContentImg: imgValue, shareContentTitle: inputValue } }).then(data => {
|
|
455
|
+ message.info('保存成功')
|
|
456
|
+ }).catch(err => {
|
468
|
457
|
message.info(err.msg || err.message)
|
469
|
458
|
})
|
470
|
|
- }, [dynamicId])
|
471
|
|
- }
|
472
|
|
-
|
473
|
|
- const submitShare = () => {
|
474
|
|
- if (dynamicId) {
|
475
|
|
- if (shareContentId) {
|
476
|
|
- request({ ...apis.activity.updateShareContent, urlData: { id: shareContentId }, data: { targetId: dynamicId, shareContentType: 'activity', shareContentImg: imgValue, shareContentTitle: inputValue }, }).then((data) => {
|
477
|
|
- message.info("保存成功")
|
478
|
|
- }).catch((err) => {
|
479
|
|
- message.info(err.msg || err.message)
|
480
|
|
- })
|
481
|
|
- } else {
|
482
|
|
- request({ ...apis.activity.addShareContent, data: { targetId: dynamicId, shareContentType: 'activity', shareContentImg: imgValue, shareContentTitle: inputValue }, }).then((data) => {
|
483
|
|
- setShareContentId(data.shareContentId)
|
484
|
|
- message.info("保存成功")
|
485
|
|
- }).catch(err => {
|
486
|
|
- message.info(err.msg || err.message)
|
487
|
|
- })
|
488
|
|
- }
|
489
|
459
|
} else {
|
490
|
|
- message.warn("请先保存基本信息数据")
|
|
460
|
+ request({ ...apis.activity.addShareContent, data: { targetId: dynamicId, shareContentType: 'activity', shareContentImg: imgValue, shareContentTitle: inputValue } }).then(data => {
|
|
461
|
+ setShareContentId(data.shareContentId)
|
|
462
|
+ message.info('保存成功')
|
|
463
|
+ }).catch(err => {
|
|
464
|
+ message.info(err.msg || err.message)
|
|
465
|
+ })
|
491
|
466
|
}
|
|
467
|
+ } else {
|
|
468
|
+ message.warn('请先保存基本信息数据')
|
492
|
469
|
}
|
|
470
|
+ }
|
493
|
471
|
|
494
|
|
- return <div style={{ padding: '20px' }}>
|
495
|
|
- <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
|
496
|
|
- <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享模板</p>
|
497
|
|
- <div>
|
498
|
|
- <p style={{ display: 'flex', alignItems: 'center', fontSize: '14px', color: '#999', margin: '0', lineHeight: '0' }}><img src={logo} style={{ width: '22px', marginRight: '10px' }} />橙蕉互动</p>
|
499
|
|
- <p style={{ fontSize: '16px', color: '#222', fontWeight: '600', margin: '0' }}>{inputValue ? inputValue : '置业V客厅 精准获客平台'}</p>
|
500
|
|
- <img style={{ width: '200px', height: '160px' }} src={imgValue ? imgValue : poster2} alt="" />
|
501
|
|
- </div>
|
502
|
|
- </div>
|
503
|
|
- <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
|
504
|
|
- <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
|
505
|
|
- <Input placeholder="请输入分享标题" value={inputValue} onChange={e => changeInput(e.target.value)} />
|
506
|
|
- </div>
|
507
|
|
- <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
|
508
|
|
- <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动分享图</p>
|
509
|
|
- <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
|
|
472
|
+ return <div style={{ padding: '20px' }}>
|
|
473
|
+ <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
|
|
474
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享模板</p>
|
|
475
|
+ <div>
|
|
476
|
+ <p style={{ display: 'flex', alignItems: 'center', fontSize: '14px', color: '#999', margin: '0', lineHeight: '0' }}>
|
|
477
|
+ <img src={logo} style={{ width: '22px', marginRight: '10px' }} alt=""/>橙蕉互动</p>
|
|
478
|
+ <p style={{ fontSize: '16px', color: '#222', fontWeight: '600', margin: '0' }}>{inputValue || '置业V客厅 精准获客平台'}</p>
|
|
479
|
+ <img style={{ width: '200px', height: '160px' }} src={imgValue || poster2} alt="" />
|
510
|
480
|
</div>
|
511
|
|
- <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginTop: '20px' }}>建议图片尺寸:750*600px,比例5:4,格式:jpg,用于活动分享好友</p>
|
512
|
|
- <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
|
513
|
|
- <Button onClick={() => cancelPage()}>
|
514
|
|
- 取消
|
515
|
|
- </Button>
|
516
|
481
|
</div>
|
517
|
|
- }
|
|
482
|
+ <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
|
|
483
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
|
|
484
|
+ <Input placeholder="请输入分享标题" value={inputValue} onChange={e => changeInput(e.target.value)} />
|
|
485
|
+ </div>
|
|
486
|
+ <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
|
|
487
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动分享图</p>
|
|
488
|
+ <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
|
|
489
|
+ </div>
|
|
490
|
+ <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginTop: '20px' }}>建议图片尺寸:750*600px,比例5:4,格式:jpg,用于活动分享好友</p>
|
|
491
|
+ <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
|
|
492
|
+ <Button onClick={() => cancelPage()}>
|
|
493
|
+ 取消
|
|
494
|
+ </Button>
|
|
495
|
+ </div>
|
|
496
|
+}
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+/**
|
|
500
|
+ *
|
|
501
|
+ *
|
|
502
|
+ * @param {*} props
|
|
503
|
+ * @returns
|
|
504
|
+ */
|
|
505
|
+const Edit = props => {
|
|
506
|
+ const [tab, changeTab] = useState('basic')
|
|
507
|
+ const { dynamicId } = props.location.query
|
518
|
508
|
|
519
|
509
|
return (
|
520
|
510
|
<div>
|
|
@@ -527,13 +517,13 @@ const Edit = props => {
|
527
|
517
|
</div>
|
528
|
518
|
<div>
|
529
|
519
|
{tab === 'basic' && <Basic dynamicId={dynamicId} />}
|
530
|
|
- {tab === 'poster' && <Poster />}
|
531
|
|
- {tab === 'share' && <Share />}
|
|
520
|
+ {tab === 'poster' && <Poster dynamicId={dynamicId}/>}
|
|
521
|
+ {tab === 'share' && <Share dynamicId={dynamicId}/>}
|
532
|
522
|
</div>
|
533
|
523
|
<Prompt message={location =>
|
534
|
|
- location.pathname.startsWith("/activity/ActivityList")
|
|
524
|
+ (location.pathname.startsWith('/activity/ActivityList')
|
535
|
525
|
? true
|
536
|
|
- : location.pathname.startsWith("/activity/detailActivity") ? true : localStorage.removeItem("activePageParams")} />
|
|
526
|
+ : (location.pathname.startsWith("/activity/detailActivity") ? true : localStorage.removeItem("activePageParams")))} />
|
537
|
527
|
</div>
|
538
|
528
|
);
|
539
|
529
|
}
|