|
@@ -1,5 +1,5 @@
|
1
|
1
|
import React, { useState, useEffect } from 'react';
|
2
|
|
-import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message } from 'antd';
|
|
2
|
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
|
3
|
3
|
import { FormattedMessage } from 'umi-plugin-react/locale';
|
4
|
4
|
import styles from '../style/GoodsList.less';
|
5
|
5
|
import moment from 'moment';
|
|
@@ -14,6 +14,7 @@ import ImageUploader from '../../components/XForm/ImageUpload';
|
14
|
14
|
import logo from '../../assets/logo.png';
|
15
|
15
|
|
16
|
16
|
const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
|
|
17
|
+const { TextArea } = Input;
|
17
|
18
|
|
18
|
19
|
/**
|
19
|
20
|
*
|
|
@@ -22,7 +23,8 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
|
22
|
23
|
* @returns
|
23
|
24
|
*/
|
24
|
25
|
const Edit = (props) => {
|
25
|
|
- const [tab, changeTab] = useState('basic')
|
|
26
|
+ const [tab, changeTab] = useState('poster')
|
|
27
|
+ // const [tab, changeTab] = useState('basic')
|
26
|
28
|
const dynamicId = props.location.query.dynamicId
|
27
|
29
|
const [dynamicData, setDynamicData] = useState({})
|
28
|
30
|
if (dynamicId) {
|
|
@@ -165,77 +167,99 @@ const Edit = (props) => {
|
165
|
167
|
}
|
166
|
168
|
|
167
|
169
|
const Poster = (props) => {
|
|
170
|
+ const [inputValue, changeInput] = useState('')
|
|
171
|
+ const [textAreaValue, changeTextArea] = useState('')
|
|
172
|
+ const [imgValue, changeImg] = useState('')
|
|
173
|
+ return <div>
|
|
174
|
+ <div style={{ display: 'flex' }}>
|
|
175
|
+ <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
|
|
176
|
+ <div style={{ width: '375px', height: '785px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
|
|
177
|
+
|
|
178
|
+ <img style={{ width: '100%', height: '300px' }} src={imgValue ? imgValue : 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg'} alt="" />
|
168
|
179
|
|
169
|
|
- return <div style={{ display: 'flex' }}>
|
170
|
|
- <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
|
171
|
|
- <div style={{ width: '375px', height: '785px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
|
|
180
|
+ <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
|
|
181
|
+ <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} src="http://img0.imgtn.bdimg.com/it/u=3463541938,2540701974&fm=26&gp=0.jpg" alt="" />
|
|
182
|
+ <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
|
|
183
|
+ <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您阅读</span>
|
|
184
|
+ <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
|
|
185
|
+ </div>
|
|
186
|
+ <p style={{
|
|
187
|
+ margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
|
|
188
|
+ display: '-webkit-box', lineClamp: '3', height: '60px',
|
|
189
|
+ WebkitLineClamp: '2',
|
|
190
|
+ WebkitBoxOrient: 'vertical',
|
|
191
|
+ overflow: 'hidden',
|
|
192
|
+ textOverflow: 'ellipsis'
|
|
193
|
+ }}>{inputValue ? inputValue : '海报标题'}</p>
|
172
|
194
|
|
173
|
|
- <img style={{ width: '100%', height: '300px' }} src="http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg" alt="" />
|
|
195
|
+ <img src={yinhao} style={{ width: '30px', marginLeft: '10px' }} alt="" />
|
|
196
|
+ <p style={{
|
|
197
|
+ margin: '16px 20px 28px 20px', fontSize: '17px', color: '#999',
|
|
198
|
+ display: '-webkit-box', lineClamp: '3', height: '76px',
|
|
199
|
+ WebkitLineClamp: '3',
|
|
200
|
+ WebkitBoxOrient: 'vertical',
|
|
201
|
+ overflow: 'hidden',
|
|
202
|
+ textOverflow: 'ellipsis'
|
|
203
|
+ }}>{textAreaValue ? textAreaValue : '海报描述'}</p>
|
|
204
|
+ <img src={PosterBottom} style={{ width: '100%' }} alt="" />
|
|
205
|
+ </div>
|
|
206
|
+ <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
|
|
207
|
+ </div>
|
174
|
208
|
|
175
|
|
- <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
|
176
|
|
- <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} src="http://img0.imgtn.bdimg.com/it/u=3463541938,2540701974&fm=26&gp=0.jpg" alt="" />
|
177
|
|
- <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
|
178
|
|
- <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您阅读</span>
|
179
|
|
- <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
|
|
209
|
+ <div >
|
|
210
|
+ <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
|
|
211
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报图片</p>
|
|
212
|
+ <ImageUploader onChange={e => changeImg(e)} />
|
|
213
|
+ </div>
|
|
214
|
+ <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
|
|
215
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
|
|
216
|
+ <Input style={{ width: '20vw' }} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
|
|
217
|
+ </div>
|
|
218
|
+ <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
|
|
219
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
|
|
220
|
+ <TextArea rows={5} onChange={e => changeTextArea(e.target.value)} />
|
180
|
221
|
</div>
|
181
|
|
- <p style={{
|
182
|
|
- margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
|
183
|
|
- display: '-webkit-box', lineClamp: '3', height: '60px',
|
184
|
|
- WebkitLineClamp: '2',
|
185
|
|
- WebkitBoxOrient: 'vertical',
|
186
|
|
- overflow: 'hidden',
|
187
|
|
- textOverflow: 'ellipsis'
|
188
|
|
- }}>破晓·内容生态下半场的版权到企业高峰论坛会议破晓·内容生态下半场的版权到企业高峰论坛活动</p>
|
189
|
222
|
|
190
|
|
- <img src={yinhao} style={{ width: '30px', marginLeft: '10px' }} alt="" />
|
191
|
|
- <p style={{
|
192
|
|
- margin: '16px 20px 28px 20px', fontSize: '17px', color: '#999',
|
193
|
|
- display: '-webkit-box', lineClamp: '3', height: '76px',
|
194
|
|
- WebkitLineClamp: '3',
|
195
|
|
- WebkitBoxOrient: 'vertical',
|
196
|
|
- overflow: 'hidden',
|
197
|
|
- textOverflow: 'ellipsis'
|
198
|
|
- }}>活动描述:破晓·内容生态下半场的版权到企业高峰论坛活动破晓·内容生态下半场的版权到企业高峰论坛活动破晓·内容生态下半场的版权到企业高峰论坛活动</p>
|
199
|
|
- <img src={PosterBottom} style={{ width: '100%' }} alt="" />
|
200
|
223
|
</div>
|
201
|
|
- <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
|
202
|
224
|
</div>
|
203
|
|
- <div></div>
|
|
225
|
+ <Button type="primary" onClick={() => router.go(-1)} style={{ margin: '40px 40px 40px 30vw' }}> 确定</Button>
|
|
226
|
+ <Button onClick={() => router.go(-1)}>取消</Button>
|
204
|
227
|
</div>
|
|
228
|
+
|
205
|
229
|
}
|
206
|
230
|
|
|
231
|
+
|
|
232
|
+
|
207
|
233
|
const Share = (props) => {
|
208
|
|
- const fields = [
|
209
|
|
- {
|
210
|
|
- label: '分享模板',
|
211
|
|
- name: 'buildingId',
|
212
|
|
- render: () => <div style={{ margin: ' 10px 20px' }}>
|
213
|
|
- <p style={{ display: 'flex', alignItems: 'center', fontSize: '14px', color: '#999', margin: '0', lineHeight: '0' }}><img src={logo} style={{ width: '22px', marginRight: '10px' }} />知与行互动</p>
|
214
|
|
- <p style={{ fontSize: '16px', color: '#222', fontWeight: '600', margin: '0' }}>置业V客厅 精准获客平台</p>
|
215
|
|
- <img style={{ width: '200px', height: '140px' }} src="http://house.china.com.cn/nanjing/UserFiles/20171124/11070256.jpg" alt="" />
|
216
|
|
- </div>,
|
217
|
|
- },
|
218
|
|
- {
|
219
|
|
- label: '海报标题',
|
220
|
|
- name: 'newsTypeName',
|
221
|
|
- type: FieldTypes.Text,
|
222
|
|
- value: '',
|
223
|
|
- rules: [
|
224
|
|
- { required: true, message: '请输入咨询名称' },
|
225
|
|
- ]
|
226
|
|
- },
|
227
|
|
- {
|
228
|
|
- label: '类型图',
|
229
|
|
- name: 'newsTypeImg',
|
230
|
|
- type: FieldTypes.ImageUploader,
|
231
|
|
- value: 'newsTypeImg',
|
232
|
|
- },
|
233
|
|
- ]
|
234
|
|
- const handleSubmit = (values) => {
|
|
234
|
+ const [inputValue, changeInput] = useState('')
|
|
235
|
+ const [imgValue, changeImg] = useState('')
|
|
236
|
+ // const changeInputValue = e => {
|
|
237
|
+ // changeInput(e.target.value)
|
|
238
|
+ // }
|
235
|
239
|
|
236
|
|
- }
|
237
|
|
- return <div>
|
238
|
|
- <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
|
|
240
|
+ // const handleSubmit = (values) => {
|
|
241
|
+
|
|
242
|
+ // }
|
|
243
|
+
|
|
244
|
+ return <div style={{ padding: '20px' }}>
|
|
245
|
+ <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
|
|
246
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享模板</p>
|
|
247
|
+ <div>
|
|
248
|
+ <p style={{ display: 'flex', alignItems: 'center', fontSize: '14px', color: '#999', margin: '0', lineHeight: '0' }}><img src={logo} style={{ width: '22px', marginRight: '10px' }} />知与行互动</p>
|
|
249
|
+ <p style={{ fontSize: '16px', color: '#222', fontWeight: '600', margin: '0' }}>{inputValue ? inputValue : '置业V客厅 精准获客平台'}</p>
|
|
250
|
+ <img style={{ width: '200px', height: '140px' }} src={imgValue ? imgValue : 'http://house.china.com.cn/nanjing/UserFiles/20171124/11070256.jpg'} alt="" />
|
|
251
|
+ </div>
|
|
252
|
+ </div>
|
|
253
|
+ <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
|
|
254
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
|
|
255
|
+ <Input placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
|
|
256
|
+ </div>
|
|
257
|
+ <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
|
|
258
|
+ <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享图片</p>
|
|
259
|
+ <ImageUploader onChange={e => changeImg(e)} />
|
|
260
|
+ </div>
|
|
261
|
+ <Button type="primary" htmlType="submit" style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
|
|
262
|
+ <Button onClick={() => router.go(-1)}>取消</Button>
|
239
|
263
|
</div>
|
240
|
264
|
}
|
241
|
265
|
|