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

+ 19
- 3
src/pages/project/detail/index.js Целия файл

@@ -743,6 +743,22 @@ export default class Index extends Component {
743 743
     console.log(this.props.userInfo, "this.props")
744 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 764
   renderBottomMenu() {
@@ -803,8 +819,8 @@ export default class Index extends Component {
803 819
                   buildingProjectType.map((item, index) => (
804 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 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 825
                         {/* <Text className='type-status'>{statusOpts[status]}</Text> */}
810 826
                         {/* <Icon className="iconfont icon-jinrongxianxingge-" onClick={this.handleToolsClick}></Icon> */}
@@ -815,7 +831,7 @@ export default class Index extends Component {
815 831
                         <View className='row'>
816 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 836
                         </View>
821 837
                         <View className='row'>

+ 2
- 2
src/pages/project/list/filter/index.js Целия файл

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

+ 7
- 4
src/reducers/user.js Целия файл

@@ -61,15 +61,18 @@ export default function user(state = INITIAL_STATE, action) {
61 61
     // }
62 62
     case UPDATE_USER_INFO: {
63 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 68
       return {
67 69
         ...state,
68 70
         userInfo: {
69 71
           extraInfo,
70 72
           person: {
71
-            ...person,
72
-            ...action.payload
73
+            ...state.userInfo,
74
+            ...action.payload,
75
+            person: newPerson,
73 76
           },
74 77
           miniApp,
75 78
         }