1007395918@qq.com 5 年之前
父節點
當前提交
0e275ebd93
共有 4 個檔案被更改,包括 30 行新增10 行删除
  1. 2
    1
      src/pages/person/index.js
  2. 19
    3
      src/pages/project/detail/index.js
  3. 2
    2
      src/pages/project/list/filter/index.js
  4. 7
    4
      src/reducers/user.js

+ 2
- 1
src/pages/person/index.js 查看文件

195
   renderDetail() {
195
   renderDetail() {
196
     const { users, menus, roleName } = this.state
196
     const { users, menus, roleName } = this.state
197
     const { user: { userInfo: { person: { org: { waterMark } }, miniApp: { name } } } } = this.props
197
     const { user: { userInfo: { person: { org: { waterMark } }, miniApp: { name } } } } = this.props
198
-
198
+    
199
     // const showQRCode = user.personType === ROLE_CODE['CONSULTANT'] || ROLE_CODE['ESTATE_AGENT'] || ROLE_CODE['CHANNEL_AGENT']
199
     // const showQRCode = user.personType === ROLE_CODE['CONSULTANT'] || ROLE_CODE['ESTATE_AGENT'] || ROLE_CODE['CHANNEL_AGENT']
200
     // const isConsultant = user.personType == ROLE_CODE['CONSULTANT']
200
     // const isConsultant = user.personType == ROLE_CODE['CONSULTANT']
201
     // const isConsultant = user.personType
201
     // const isConsultant = user.personType
284
     const { phone, tel } = this.state.users
284
     const { phone, tel } = this.state.users
285
     return (
285
     return (
286
       <View className='wrap'>
286
       <View className='wrap'>
287
+        {/* {(phone || tel) && this.renderDetail()} */}
287
         {!phone && !tel ? this.renderLogin() : this.renderDetail()}
288
         {!phone && !tel ? this.renderLogin() : this.renderDetail()}
288
       </View>
289
       </View>
289
     )
290
     )

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

743
     console.log(this.props.userInfo, "this.props")
743
     console.log(this.props.userInfo, "this.props")
744
     return true
744
     return true
745
   }
745
   }
746
+  getPrice(start, end) {
747
+
748
+    if (start) {
749
+      if (end) {
750
+        if (start == end) {
751
+          return start
752
+        } else {
753
+          return start + '--' + end
754
+        }
755
+      } else {
756
+        return start
757
+      }
758
+    } else {
759
+      return end
760
+    }
761
+  }
746
 
762
 
747
 
763
 
748
   renderBottomMenu() {
764
   renderBottomMenu() {
803
                   buildingProjectType.map((item, index) => (
819
                   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%;`}>
820
                     <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 >
821
                       <View >
806
-                        {marketStatus &&
807
-                          <Text className='item__status' className={marketStatus == '在售' ? 'item__status sale' : marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{marketStatus}</Text>
822
+                        {item.marketStatus &&
823
+                          <Text className='item__status' className={item.marketStatus == '在售' ? 'item__status sale' : item.marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{item.marketStatus}</Text>
808
                         }
824
                         }
809
                         {/* <Text className='type-status'>{statusOpts[status]}</Text> */}
825
                         {/* <Text className='type-status'>{statusOpts[status]}</Text> */}
810
                         {/* <Icon className="iconfont icon-jinrongxianxingge-" onClick={this.handleToolsClick}></Icon> */}
826
                         {/* <Icon className="iconfont icon-jinrongxianxingge-" onClick={this.handleToolsClick}></Icon> */}
815
                         <View className='row'>
831
                         <View className='row'>
816
                           <Text className='row-label'>参考价格:</Text>
832
                           <Text className='row-label'>参考价格:</Text>
817
                           {
833
                           {
818
-                            item.startPrice ? <Text className='row-txt'>约{item.startPrice == item.endPrice ? <Text>{item.startPrice}</Text> : <Text>{item.startPrice}--{item.endPrice}</Text>}{item.priceType == 'total' ? '万元/套' : '元/m²'}</Text> : <Text className='row-txt'>待定</Text>
834
+                            (item.startPrice || item.endPrice) ? <Text className='row-txt'>约{this.getPrice(item.startPrice, item.endPrice)}{item.priceType == 'total' ? '万元/套' : '元/m²'}</Text> : <Text className='row-txt'>待定</Text>
819
                           }
835
                           }
820
                         </View>
836
                         </View>
821
                         <View className='row'>
837
                         <View className='row'>

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

144
           value = regVal ? regVal[0] : ''
144
           value = regVal ? regVal[0] : ''
145
           // 最小值
145
           // 最小值
146
           if (index === 1) {
146
           if (index === 1) {
147
-            return '-' + value
147
+            return '0-' + value
148
           }
148
           }
149
 
149
 
150
           // 最大值
150
           // 最大值
166
 
166
 
167
           // 最小值
167
           // 最小值
168
           if (index === 1) {
168
           if (index === 1) {
169
-            return '-' + value
169
+            return '0-' + value
170
           }
170
           }
171
 
171
 
172
           // 最大值
172
           // 最大值

+ 7
- 4
src/reducers/user.js 查看文件

61
     // }
61
     // }
62
     case UPDATE_USER_INFO: {
62
     case UPDATE_USER_INFO: {
63
       // debugger
63
       // debugger
64
-      const { person, extraInfo, miniApp = {} } = state.userInfo
65
-      
64
+      // const { person, extraInfo, miniApp = {} } = state.userInfo
65
+      const { person, extraInfo, miniApp } = action.payload || {}
66
+      const newPerson = mergeNotNull(state.userInfo.person, person)
67
+
66
       return {
68
       return {
67
         ...state,
69
         ...state,
68
         userInfo: {
70
         userInfo: {
69
           extraInfo,
71
           extraInfo,
70
           person: {
72
           person: {
71
-            ...person,
72
-            ...action.payload
73
+            ...state.userInfo,
74
+            ...action.payload,
75
+            person: newPerson,
73
           },
76
           },
74
           miniApp,
77
           miniApp,
75
         }
78
         }