傅行帆 пре 5 година
родитељ
комит
806af0e140

+ 9
- 5
src/pages/building/list/add/components/base.jsx Прегледај датотеку

@@ -7,6 +7,7 @@ import request from '../../../../../utils/request';
7 7
 import apis from '../../../../../services/apis';
8 8
 import Styles from '../style.less';
9 9
 import ImageUpload from '../../../../../components/XForm/ImageUpload'
10
+import NewImageUpload from '../../../../../components/uploadImage/ImageUpload';
10 11
 import ImageListUpload from '../../../../../components/XForm/ImageListUpload'
11 12
 import Wangedit from '../../../../../components/Wangedit/Wangedit'
12 13
 import TagGroup from './tags'
@@ -202,11 +203,14 @@ function AddBuilding(props) {
202 203
       data.buildingRestaurant = tagFilter(data.buildingRestaurant, 'Restaurant')
203 204
     }
204 205
   
205
-    if(typeof(data.highlights) != "undefined" && (typeof(data.highlightsCover) == "undefined" || data.highlightsCover == null)){
206
-      openNotificationWithIcon('error', '请上传项目亮点封面')
207
-      return;
206
+    // if(typeof(data.highlights) != "undefined" && (typeof(data.highlightsCover) == "undefined" || data.highlightsCover == null)){
207
+    //   openNotificationWithIcon('error', '请上传项目亮点封面')
208
+    //   return;
209
+    // }
210
+    console.log(data,"datadataddata")
211
+    if(typeof(data.highlights) == "undefined"){
212
+      data.highlights = null;
208 213
     }
209
-
210 214
     
211 215
     const api = data.buildingId === undefined ? apis.building.addBuilding : apis.building.updateBuilding
212 216
     request({ ...api, data: { ...data } }).then(res => {
@@ -587,7 +591,7 @@ function AddBuilding(props) {
587 591
           </Form.Item>*/}
588 592
           <Form.Item label="亮点封面" help="建议尺寸:比例3:1 690*230px,用于项目详情-项目亮点封面图">
589 593
             {getFieldDecorator('highlightsCover')(
590
-              <ImageUpload />,
594
+              <NewImageUpload onChange={e => console.log(e,"66")}/>,
591 595
             )}
592 596
           </Form.Item>
593 597
           <Form.Item label="亮点类型">

+ 1
- 1
src/pages/building/list/add/components/poster.jsx Прегледај датотеку

@@ -121,7 +121,7 @@ const Poster = props => {
121 121
             overflow: 'hidden',
122 122
             textOverflow: 'ellipsis',
123 123
           }}>{inputValue || (building.buildingName || '海报标题')}</p>
124
-          <p style={{ color: '#999', padding: ' 0 20px' }}>约<span style={{ color: '#fd0d0c', fontSize: '24px', marginLeft: '6px' }}>{building.price} </span><span style={{ color: '#fd0d0c', fontSize: '20px' }}>元/m²</span></p>
124
+          <p style={{ color: '#999', padding: ' 0 20px' }}>约<span style={{ color: '#fd0d0c', fontSize: '24px', marginLeft: '6px' }}>{building.price} </span><span style={{ color: '#fd0d0c', fontSize: '20px' }}></span></p>
125 125
           <img src={yinhao} style={{ width: '30px', marginLeft: '22px' }} alt="" />
126 126
           <p style={{
127 127
             margin: '16px 20px 28px 20px', fontSize: '17px', color: '#999',