浏览代码

priceType

1007395918@qq.com 5 年前
父节点
当前提交
021e7fd2a5
共有 2 个文件被更改,包括 14 次插入14 次删除
  1. 12
    12
      src/pages/project/detail/index.js
  2. 2
    2
      src/pages/project/item/index.js

+ 12
- 12
src/pages/project/detail/index.js 查看文件

800
             >
800
             >
801
               <View className="type-intro__list">
801
               <View className="type-intro__list">
802
                 {
802
                 {
803
-                  buildingProjectType.map((item,index) => (
804
-                    <View className={buildingProjectType.length == 1 ? 'onlyone type-intro__item' : 'type-intro__item'} key={index+'detailBuildingId'} style={`background: url(${transferImage(buildBg)}) no-repeat center;background-size: 100% 100%;`}>
803
+                  buildingProjectType.map((item, index) => (
804
+                    <View className={buildingProjectType.length == 1 ? 'onlyone type-intro__item' : 'type-intro__item'} key={index + 'detailBuildingId'} style={`background: url(${transferImage(buildBg)}) no-repeat center;background-size: 100% 100%;`}>
805
                       <View >
805
                       <View >
806
                         {marketStatus &&
806
                         {marketStatus &&
807
                           <Text className='item__status' className={marketStatus == '在售' ? 'item__status sale' : marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{marketStatus}</Text>
807
                           <Text className='item__status' className={marketStatus == '在售' ? 'item__status sale' : marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{marketStatus}</Text>
815
                         <View className='row'>
815
                         <View className='row'>
816
                           <Text className='row-label'>项目参考价格:</Text>
816
                           <Text className='row-label'>项目参考价格:</Text>
817
                           {
817
                           {
818
-                            item.price ? <Text className='row-txt'>约{item.price}元/m²</Text> : <Text className='row-txt'>待定</Text>
818
+                            item.price ? <Text className='row-txt'>约{item.price}{item.priceType == 'total' ? '万元/套' : '元/m²'}</Text> : <Text className='row-txt'>待定</Text>
819
                           }
819
                           }
820
                         </View>
820
                         </View>
821
                         <View className='row'>
821
                         <View className='row'>
963
               </View>
963
               </View>
964
               <View className="section-content">
964
               <View className="section-content">
965
                 {
965
                 {
966
-                  consultants.slice(0, 3).map((item,index) => (
967
-                    <View className="item" key={index+'detailId'} >
966
+                  consultants.slice(0, 3).map((item, index) => (
967
+                    <View className="item" key={index + 'detailId'} >
968
                       <View className="flex">
968
                       <View className="flex">
969
                         <Image className="avatar" mode="aspectFill" onClick={this.handleConsuItemClick.bind(this, item)} src={transferImage(item.photo || item.avatar)}></Image>
969
                         <Image className="avatar" mode="aspectFill" onClick={this.handleConsuItemClick.bind(this, item)} src={transferImage(item.photo || item.avatar)}></Image>
970
                         <View className='name-txt' onClick={this.handleConsuItemClick.bind(this, item)}>
970
                         <View className='name-txt' onClick={this.handleConsuItemClick.bind(this, item)}>
1078
 
1078
 
1079
     // 挂载全景图设置
1079
     // 挂载全景图设置
1080
     list.forEach(apartment => {
1080
     list.forEach(apartment => {
1081
-      const panoramaArr = (panoramaList || []).filter(x => x.buildingId === apartment.buildingId && x.apartmentId === apartment.apartmentId )
1081
+      const panoramaArr = (panoramaList || []).filter(x => x.buildingId === apartment.buildingId && x.apartmentId === apartment.apartmentId)
1082
       if (panoramaArr.length) {
1082
       if (panoramaArr.length) {
1083
         apartment.panoramaArr = panoramaArr
1083
         apartment.panoramaArr = panoramaArr
1084
       }
1084
       }
1308
     this.setState({ btnstate, current: 1 })
1308
     this.setState({ btnstate, current: 1 })
1309
   }
1309
   }
1310
 
1310
 
1311
-  goToPanorama(panorama) {    
1311
+  goToPanorama(panorama) {
1312
     const url = (panorama || {}).panoramaLink
1312
     const url = (panorama || {}).panoramaLink
1313
 
1313
 
1314
     if (!url) return;
1314
     if (!url) return;
1392
             <View className='detail'>
1392
             <View className='detail'>
1393
               <Notice></Notice>
1393
               <Notice></Notice>
1394
 
1394
 
1395
-              { !btnstate && this.renderBannerImages() }
1396
-              
1397
-              { btnstate === 1 && this.renderVideo() }
1398
-              
1399
-              { btnstate === 2 && this.renderBannerPanorama() }
1395
+              {!btnstate && this.renderBannerImages()}
1396
+
1397
+              {btnstate === 1 && this.renderVideo()}
1398
+
1399
+              {btnstate === 2 && this.renderBannerPanorama()}
1400
 
1400
 
1401
               {
1401
               {
1402
                 projectDetail.buildingImg && projectDetail.buildingImg.length &&
1402
                 projectDetail.buildingImg && projectDetail.buildingImg.length &&

+ 2
- 2
src/pages/project/item/index.js 查看文件

32
             <View className='item__right__title'>{data.name}</View>
32
             <View className='item__right__title'>{data.name}</View>
33
             <View className='item__right__price row'>
33
             <View className='item__right__price row'>
34
               {
34
               {
35
-                data.price ? <Text className='price__txt'>均价{data.price}元/m²</Text> : <Text className='price__txt'>待定</Text>
35
+                data.price ? <Text className='price__txt'>均价{data.price}{data.priceType == 'total' ? '万元/套' : '元/m²'}</Text> : <Text className='price__txt'>待定</Text>
36
               }
36
               }
37
             </View>
37
             </View>
38
           </View>
38
           </View>
55
             <View className='item__bottom__right'>
55
             <View className='item__bottom__right'>
56
               <Text className='item__bottom__seenum'>{data.pvNum || 0}人围观</Text>
56
               <Text className='item__bottom__seenum'>{data.pvNum || 0}人围观</Text>
57
               <View className='see__img'>
57
               <View className='see__img'>
58
-                {records.slice(0, 4).map((item,index) => <Image className='userImg' key={index+'uvId'} src={transferImage(item.photoOravatar)}></Image>)}
58
+                {records.slice(0, 4).map((item, index) => <Image className='userImg' key={index + 'uvId'} src={transferImage(item.photoOravatar)}></Image>)}
59
                 {records.length > 4 && <Image className="dot-img" src={transferImage(dotImg)}></Image>}
59
                 {records.length > 4 && <Image className="dot-img" src={transferImage(dotImg)}></Image>}
60
               </View>
60
               </View>
61
             </View>
61
             </View>