|
@@ -59,9 +59,10 @@ const header = props => {
|
59
|
59
|
function handleSubmit (e) {
|
60
|
60
|
e.preventDefault();
|
61
|
61
|
props.form.validateFields((err, values) => {
|
|
62
|
+ console.log(values, 'values');
|
62
|
63
|
if (!err){
|
63
|
64
|
let {liveTime, ...submitValue} = values
|
64
|
|
- if (submitValue.status == '已发布'){
|
|
65
|
+ if (submitValue.status == '已发布' || submitValue.status == '1'){
|
65
|
66
|
submitValue.status = 1
|
66
|
67
|
}else{
|
67
|
68
|
submitValue.status = 0
|
|
@@ -70,6 +71,8 @@ const header = props => {
|
70
|
71
|
message.info("直播结束时间大于开始时间")
|
71
|
72
|
return;
|
72
|
73
|
}
|
|
74
|
+ submitValue.liveStartDate = moment(submitValue.liveStartDate._d).format('YYYY-MM-DD HH:mm:ss')
|
|
75
|
+ submitValue.liveEndDate = moment(submitValue.liveEndDate._d).format('YYYY-MM-DD HH:mm:ss')
|
73
|
76
|
console.log(submitValue)
|
74
|
77
|
request({ ...apis.taliveActivity.updateTaLiveActivity, urlData: {id: liveActivityId},data: submitValue, }).then((data) => {
|
75
|
78
|
message.info("保存成功")
|
|
@@ -95,7 +98,6 @@ const header = props => {
|
95
|
98
|
<Form.Item label="所属楼盘">
|
96
|
99
|
{getFieldDecorator('buildingId', {
|
97
|
100
|
initialValue: liveActivityData.buildingId,
|
98
|
|
- rules: [{ required: true, message: ' 请输入所属楼盘' }],
|
99
|
101
|
})(<BuildSelect2 cityId={props.form.getFieldValue('cityId')}/>)}
|
100
|
102
|
</Form.Item>
|
101
|
103
|
<Form.Item label="直播活动标题">
|
|
@@ -112,7 +114,7 @@ const header = props => {
|
112
|
114
|
message: '请选择直播开始时间',
|
113
|
115
|
},
|
114
|
116
|
],
|
115
|
|
- })(<DatePicker style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
|
|
117
|
+ })(<DatePicker placeholder="预计开始时间" style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
|
116
|
118
|
</Form.Item>
|
117
|
119
|
<Form.Item label="直播结束时间">
|
118
|
120
|
{getFieldDecorator('liveEndDate', { initialValue : liveActivityData.liveEndDate ? moment(liveActivityData.liveEndDate, 'YYYY-MM-DD HH:mm:ss') : null,
|
|
@@ -122,18 +124,8 @@ const header = props => {
|
122
|
124
|
message: '请选择直播结束时间',
|
123
|
125
|
},
|
124
|
126
|
],
|
125
|
|
- })(<DatePicker disabledDate={disabledDate} style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
|
|
127
|
+ })(<DatePicker placeholder="预计结束时间" disabledDate={disabledDate} style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
|
126
|
128
|
</Form.Item>
|
127
|
|
- {/* <Form.Item label="直播时间">
|
128
|
|
- {getFieldDecorator('liveTime', { initialValue : liveActivityData.liveStartDate ? moment(liveActivityData.liveStartDate, 'YYYY-MM-DD HH:mm:ss') : null,
|
129
|
|
- rules: [
|
130
|
|
- {
|
131
|
|
- required: true,
|
132
|
|
- message: '请选择直播时间',
|
133
|
|
- },
|
134
|
|
- ],
|
135
|
|
- })(<RangePicker style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
|
136
|
|
- </Form.Item> */}
|
137
|
129
|
<Form.Item label="直播小程序">
|
138
|
130
|
{getFieldDecorator('liveApp', {
|
139
|
131
|
initialValue: liveActivityData.liveApp,
|
|
@@ -150,7 +142,7 @@ const header = props => {
|
150
|
142
|
{getFieldDecorator('liveRoomParam', {
|
151
|
143
|
initialValue: liveActivityData.liveRoomParam,
|
152
|
144
|
rules: [{ required: true, message: '请输入房间参数' }],
|
153
|
|
- })(<Input maxLength={1000} placeholder="请下载文档查看如何获取" style={{width:'680px'}}/>)}<a href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E7%9B%B4%E6%92%AD%E6%88%BF%E9%97%B4%E5%8F%B7%E8%8E%B7%E5%8F%96%E6%95%99%E7%A8%8B(1).docx" style={{ color: 'blue' }}> 不知道怎么填?查看说明</a>
|
|
145
|
+ })(<Input maxLength={1000} placeholder="点击右侧按钮查看如何获取房间参数" style={{width:'680px'}}/>)}<a href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E7%9B%B4%E6%92%AD%E6%88%BF%E9%97%B4%E5%8F%B7%E8%8E%B7%E5%8F%96%E6%95%99%E7%A8%8B(1).docx" style={{ color: 'blue' }}> 不知道怎么填?查看说明</a>
|
154
|
146
|
</Form.Item>
|
155
|
147
|
<Form.Item label="封面图1" help="建议尺寸:750px*420px,比例16:9,格式:jpg,用于:活动列表">
|
156
|
148
|
{getFieldDecorator('listImg', {
|
|
@@ -160,7 +152,7 @@ const header = props => {
|
160
|
152
|
<ImageUpload />,
|
161
|
153
|
)}
|
162
|
154
|
</Form.Item>
|
163
|
|
- <Form.Item label="封面图2" help="建议尺寸:750*250,比例3:1,格式:jpg,用于:项目详情页">
|
|
155
|
+ <Form.Item label="封面图2" help="建议尺寸:750*250px,比例3:1,格式:jpg,用于:项目详情页">
|
164
|
156
|
{getFieldDecorator('detailImg', {
|
165
|
157
|
initialValue: liveActivityData.detailImg,
|
166
|
158
|
rules: [{ required: true, message: '请上传封面图2' }],
|
|
@@ -173,8 +165,8 @@ const header = props => {
|
173
|
165
|
initialValue: liveActivityData.detailTypeImg,
|
174
|
166
|
rules: [{ required: true, message: '请上传详情图' }],
|
175
|
167
|
})(
|
176
|
|
- <ImageUpload />,
|
177
|
|
- )}<a href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E7%9B%B4%E6%92%AD%E6%88%BF%E9%97%B4%E5%8F%B7%E8%8E%B7%E5%8F%96%E6%95%99%E7%A8%8B(1).docx" style={{ color: 'blue' }}> 查看详情图示例</a>
|
|
168
|
+ <ImageUpload style={{width:'300px',height:'600px'}}/>,
|
|
169
|
+ )}
|
178
|
170
|
</Form.Item>
|
179
|
171
|
<Form.Item label="权重">
|
180
|
172
|
{getFieldDecorator('weight', {
|