|
@@ -186,7 +186,7 @@ function AddBuilding(props) {
|
186
|
186
|
data.buildingTransport = tagFilter(data.buildingTransport, 'Transport')
|
187
|
187
|
}
|
188
|
188
|
if (data.buildingMall) {
|
189
|
|
- debugger
|
|
189
|
+
|
190
|
190
|
data.buildingMall = tagFilter(data.buildingMall, 'Mall')
|
191
|
191
|
}
|
192
|
192
|
if (data.buildingEdu) {
|
|
@@ -201,8 +201,13 @@ function AddBuilding(props) {
|
201
|
201
|
if (data.buildingRestaurant) {
|
202
|
202
|
data.buildingRestaurant = tagFilter(data.buildingRestaurant, 'Restaurant')
|
203
|
203
|
}
|
|
204
|
+
|
|
205
|
+ if(typeof(data.highlights) != "undefined" && typeof(data.highlightsCover) == "undefined"){
|
|
206
|
+ openNotificationWithIcon('error', '请上传项目亮点封面')
|
|
207
|
+ return;
|
|
208
|
+ }
|
204
|
209
|
|
205
|
|
- debugger
|
|
210
|
+
|
206
|
211
|
const api = data.buildingId === undefined ? apis.building.addBuilding : apis.building.updateBuilding
|
207
|
212
|
request({ ...api, data: { ...data } }).then(res => {
|
208
|
213
|
openNotificationWithIcon('success', '操作成功')
|
|
@@ -218,7 +223,7 @@ function AddBuilding(props) {
|
218
|
223
|
* @param {*} tags
|
219
|
224
|
*/
|
220
|
225
|
function tagFilter(tags, keyType) {
|
221
|
|
- debugger
|
|
226
|
+
|
222
|
227
|
console.log(tags)
|
223
|
228
|
if (!tags) {
|
224
|
229
|
return null
|
|
@@ -241,7 +246,7 @@ function AddBuilding(props) {
|
241
|
246
|
|
242
|
247
|
setPoi(determineTag)
|
243
|
248
|
|
244
|
|
- debugger
|
|
249
|
+
|
245
|
250
|
return tags.filter(f => f.automatic === false).map(x => x.tagName).join(',')
|
246
|
251
|
}
|
247
|
252
|
|
|
@@ -580,13 +585,15 @@ function AddBuilding(props) {
|
580
|
585
|
<ImageUpload />,
|
581
|
586
|
)}
|
582
|
587
|
</Form.Item>*/}
|
583
|
|
- <Form.Item label="亮点封面" help="建议尺寸690*230px,用于项目详情-项目亮点封面图">
|
|
588
|
+ <Form.Item label="亮点封面" help="建议尺寸:比例3:1 690*230px,用于项目详情-项目亮点封面图">
|
584
|
589
|
{getFieldDecorator('highlightsCover')(
|
585
|
590
|
<ImageUpload />,
|
586
|
591
|
)}
|
587
|
592
|
</Form.Item>
|
588
|
593
|
<Form.Item label="亮点类型">
|
589
|
|
- {getFieldDecorator('highlightsType')(
|
|
594
|
+ {getFieldDecorator('highlightsType', {
|
|
595
|
+ initialValue: "rich",
|
|
596
|
+ })(
|
590
|
597
|
<Radio.Group onChange={e => highlightsTypeChange(e)}>
|
591
|
598
|
<Radio value="rich">自定义</Radio>
|
592
|
599
|
<Radio value="link">公众号链接</Radio>
|