|
@@ -42,7 +42,7 @@ const header = props => {
|
42
|
42
|
|
43
|
43
|
const cancelPage = () =>{
|
44
|
44
|
router.push({
|
45
|
|
- pathname: '/activity/liveActivity/list',
|
|
45
|
+ pathname: '/activity/liveActivity/list/index ',
|
46
|
46
|
});
|
47
|
47
|
}
|
48
|
48
|
|
|
@@ -56,6 +56,12 @@ const header = props => {
|
56
|
56
|
props.form.validateFields((err, values) => {
|
57
|
57
|
if (!err){
|
58
|
58
|
let {liveTime, ...submitValue} = values
|
|
59
|
+ console.log(submitValue.status, 'submitValue.status = 1submitValue.status = 1')
|
|
60
|
+ if (submitValue.status == '已发布'){
|
|
61
|
+ submitValue.status = 1
|
|
62
|
+ }else{
|
|
63
|
+ submitValue.status = 0
|
|
64
|
+ }
|
59
|
65
|
if(null != liveTime && liveTime.length > 0){
|
60
|
66
|
const [liveStartDate, livenEndDate] = liviTime
|
61
|
67
|
submitValue.liveStartDate = moment(liveStartDate).format('YYYY-MM-DD HH:mm:ss');
|
|
@@ -83,21 +89,24 @@ const header = props => {
|
83
|
89
|
<Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
|
84
|
90
|
<Form.Item label="所属城市">
|
85
|
91
|
{getFieldDecorator('cityId', {
|
|
92
|
+ initialValue: liveActivityData.cityId,
|
86
|
93
|
rules: [{ required: true, message: ' 请输入所属城市' }],
|
87
|
94
|
})(<CitySelect3 buildingId={props.form.getFieldValue('buildingId')}/>)}
|
88
|
95
|
</Form.Item>
|
89
|
96
|
<Form.Item label="所属楼盘">
|
90
|
97
|
{getFieldDecorator('buildingId', {
|
|
98
|
+ initialValue: liveActivityData.buildingId,
|
91
|
99
|
rules: [{ required: true, message: ' 请输入所属楼盘' }],
|
92
|
100
|
})(<BuildSelect2 cityId={props.form.getFieldValue('cityId')}/>)}
|
93
|
101
|
</Form.Item>
|
94
|
102
|
<Form.Item label="直播活动标题">
|
95
|
103
|
{getFieldDecorator('liveActivityTitle', {
|
|
104
|
+ initialValue: liveActivityData.liveActivityTitle,
|
96
|
105
|
rules: [{ required: true, message: '请输入直播活动标题' }],
|
97
|
106
|
})(<Input maxLength={20} placeholder="给直播活动起个名字" />)}
|
98
|
107
|
</Form.Item>
|
99
|
|
- <Form.Item label="直播时间">
|
100
|
|
- {getFieldDecorator('liveTime', {
|
|
108
|
+ {/* <Form.Item label="直播时间">
|
|
109
|
+ {getFieldDecorator('liveTime', { initialValue : liveActivityData.liveStartDate ? moment(liveActivityData.liveStartDate, 'YYYY-MM-DD HH:mm:ss') : null,
|
101
|
110
|
rules: [
|
102
|
111
|
{
|
103
|
112
|
required: true,
|
|
@@ -105,9 +114,10 @@ const header = props => {
|
105
|
114
|
},
|
106
|
115
|
],
|
107
|
116
|
})(<RangePicker style={{ width: '500px' }}format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }}/>)}
|
108
|
|
- </Form.Item>
|
|
117
|
+ </Form.Item> */}
|
109
|
118
|
<Form.Item label="直播小程序">
|
110
|
119
|
{getFieldDecorator('liveApp', {
|
|
120
|
+ initialValue: liveActivityData.liveApp,
|
111
|
121
|
rules: [{ required: true, message: '请选择直播小程序' }],
|
112
|
122
|
})(<Select placeholder="选择在哪个平台直播" style={{ width: '300px' }}>
|
113
|
123
|
<Option value="1">腾讯NOW直播(推荐)</Option>
|
|
@@ -119,11 +129,13 @@ const header = props => {
|
119
|
129
|
</Form.Item>
|
120
|
130
|
<Form.Item label="房间参数">
|
121
|
131
|
{getFieldDecorator('liveRoomParam', {
|
|
132
|
+ initialValue: liveActivityData.liveRoomParam,
|
122
|
133
|
rules: [{ required: true, message: '请输入房间参数' }],
|
123
|
134
|
})(<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>
|
124
|
135
|
</Form.Item>
|
125
|
136
|
<Form.Item label="封面图1" help="建议尺寸:750px*420px,比例16:9,格式:jpg,用于:活动列表">
|
126
|
137
|
{getFieldDecorator('listImg', {
|
|
138
|
+ initialValue: liveActivityData.listImg,
|
127
|
139
|
rules: [{ required: true, message: '请上传封面图1' }],
|
128
|
140
|
})(
|
129
|
141
|
<ImageUpload />,
|
|
@@ -131,6 +143,7 @@ const header = props => {
|
131
|
143
|
</Form.Item>
|
132
|
144
|
<Form.Item label="封面图2" help="建议尺寸:750*250,比例3:1,格式:jpg,用于:项目详情页">
|
133
|
145
|
{getFieldDecorator('detailImg', {
|
|
146
|
+ initialValue: liveActivityData.detailImg,
|
134
|
147
|
rules: [{ required: true, message: '请上传封面图2' }],
|
135
|
148
|
})(
|
136
|
149
|
<ImageUpload />,
|
|
@@ -138,13 +151,15 @@ const header = props => {
|
138
|
151
|
</Form.Item>
|
139
|
152
|
<Form.Item label="详情图" help="格式:jpg,用于:直播活动详情页,点击可跳转到直播间">
|
140
|
153
|
{getFieldDecorator('detailTypeImg', {
|
|
154
|
+ initialValue: liveActivityData.detailTypeImg,
|
141
|
155
|
rules: [{ required: true, message: '请上传详情图' }],
|
142
|
156
|
})(
|
143
|
157
|
<ImageUpload />,
|
144
|
158
|
)}<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
|
159
|
</Form.Item>
|
146
|
160
|
<Form.Item label="权重">
|
147
|
|
- {getFieldDecorator('detailImg', {
|
|
161
|
+ {getFieldDecorator('weight', {
|
|
162
|
+ initialValue: liveActivityData.weight,
|
148
|
163
|
rules: [{ required: true, message: '请设置权重' }],
|
149
|
164
|
})(
|
150
|
165
|
<InputNumber placeholder="权重越大越靠前" style={{width:'150px'}}/>
|
|
@@ -152,10 +167,11 @@ const header = props => {
|
152
|
167
|
</Form.Item>
|
153
|
168
|
<Form.Item label="发布状态">
|
154
|
169
|
{getFieldDecorator('status', {
|
|
170
|
+ initialValue: liveActivityData.status == 1 ? '已发布' : '未发布',
|
155
|
171
|
rules: [{ required: true, message: '请选择发布状态' }],
|
156
|
172
|
})(<Select placeholder="发布状态" style={{ width: '300px' }}>
|
157
|
|
- <Option value="0">否</Option>
|
158
|
|
- <Option value="1">是</Option>
|
|
173
|
+ <Option value="0">未发布</Option>
|
|
174
|
+ <Option value="1">已发布</Option>
|
159
|
175
|
</Select>)}
|
160
|
176
|
</Form.Item>
|
161
|
177
|
<Form.Item wrapperCol={{ span: 15, offset: 7 }}>
|