|
@@ -50,75 +50,75 @@ export default withLayout(() => {
|
50
|
50
|
data = data || []
|
51
|
51
|
let params = []
|
52
|
52
|
data.map((item) => {
|
53
|
|
- if(item.key === 'budget') {
|
54
|
|
- params.push({...item, key: 'minPrice', result: CurrentDemandId === 2 ? item.options[0] : item.options[0] * 10000})
|
55
|
|
- params.push({...item, key: 'maxPrice', result: CurrentDemandId === 2 ? item.result : item.result * 10000})
|
|
53
|
+ if (item.key === 'budget') {
|
|
54
|
+ params.push({ ...item, key: 'minPrice', result: CurrentDemandId === 2 ? item.options[0] : item.options[0] * 10000 })
|
|
55
|
+ params.push({ ...item, key: 'maxPrice', result: CurrentDemandId === 2 ? item.result : item.result * 10000 })
|
56
|
56
|
} else {
|
57
|
|
- if(item.result !== '' || item.resultId !== null) {
|
|
57
|
+ if (item.result !== '' || item.resultId !== null) {
|
58
|
58
|
params.push(item)
|
59
|
59
|
}
|
60
|
60
|
}
|
61
|
61
|
})
|
62
|
|
- params.push({question: '创建人小程序人员', result: user?.userInfo?.person?.personId, key: 'personId' })
|
|
62
|
+ params.push({ question: '创建人小程序人员', result: user?.userInfo?.person?.personId, key: 'personId' })
|
63
|
63
|
let payload = {}
|
64
|
64
|
params.map((item) => {
|
65
|
65
|
payload[item.key] = item.result || item.resultId
|
66
|
66
|
})
|
67
|
|
- fetch({ url: API_HELP_FIND_HOUSE_SUBMIT, method: 'post', payload }).then((res) => {
|
|
67
|
+ fetch({ url: API_HELP_FIND_HOUSE_SUBMIT, method: 'post', payload: { ...payload, questionnaire: JSON.stringify(params) } }).then((res) => {
|
68
|
68
|
setResultList(res.taBuildingList || [])
|
69
|
69
|
setShowPopup(true)
|
70
|
70
|
})
|
71
|
71
|
}
|
72
|
72
|
|
73
|
|
- return (
|
74
|
|
- <view className='Page helpToFindHouse'>
|
75
|
|
- {
|
76
|
|
- ShowPopup &&
|
77
|
|
- <SubmitBuyHouseResult List={ResultList}></SubmitBuyHouseResult>
|
78
|
|
- }
|
|
73
|
+return (
|
|
74
|
+ <view className='Page helpToFindHouse'>
|
|
75
|
+ {
|
|
76
|
+ ShowPopup &&
|
|
77
|
+ <SubmitBuyHouseResult List={ResultList}></SubmitBuyHouseResult>
|
|
78
|
+ }
|
79
|
79
|
|
80
|
|
- <ScrollView scroll-y refresher-enabled={false}>
|
81
|
|
- <view className='PageContent'>
|
|
80
|
+ <ScrollView scroll-y refresher-enabled={false}>
|
|
81
|
+ <view className='PageContent'>
|
82
|
82
|
|
83
|
|
- {
|
84
|
|
- ShowDemand &&
|
85
|
|
- <view>
|
86
|
|
- <text>选择您的需求</text>
|
87
|
|
- <view className='Demand flex-h' style='margin-top: 10px;'>
|
88
|
|
- {
|
89
|
|
- DemandList.map((item, index) => (
|
90
|
|
- <view key={`DemandItem-${index}`} className={CurrentDemandId === item.id ? 'flex-item active' : 'flex-item'} onClick={CutDemandId(item.id)}>
|
91
|
|
- <Image mode='heightFix' src={item.icon || null}></Image>
|
92
|
|
- <text>{item.name}</text>
|
93
|
|
- <text>{item.spell}</text>
|
94
|
|
- </view>
|
95
|
|
- ))
|
96
|
|
- }
|
97
|
|
- </view>
|
|
83
|
+ {
|
|
84
|
+ ShowDemand &&
|
|
85
|
+ <view>
|
|
86
|
+ <text>选择您的需求</text>
|
|
87
|
+ <view className='Demand flex-h' style='margin-top: 10px;'>
|
|
88
|
+ {
|
|
89
|
+ DemandList.map((item, index) => (
|
|
90
|
+ <view key={`DemandItem-${index}`} className={CurrentDemandId === item.id ? 'flex-item active' : 'flex-item'} onClick={CutDemandId(item.id)}>
|
|
91
|
+ <Image mode='heightFix' src={item.icon || null}></Image>
|
|
92
|
+ <text>{item.name}</text>
|
|
93
|
+ <text>{item.spell}</text>
|
|
94
|
+ </view>
|
|
95
|
+ ))
|
|
96
|
+ }
|
98
|
97
|
</view>
|
99
|
|
- }
|
|
98
|
+ </view>
|
|
99
|
+ }
|
100
|
100
|
|
101
|
|
- {/* 买房 */}
|
102
|
|
- {
|
103
|
|
- CurrentDemandId === 1 &&
|
104
|
|
- <BuyHouse change={StepChange} toSubmit={submitForm} CityList={CityAreaList}></BuyHouse>
|
105
|
|
- }
|
|
101
|
+ {/* 买房 */}
|
|
102
|
+ {
|
|
103
|
+ CurrentDemandId === 1 &&
|
|
104
|
+ <BuyHouse change={StepChange} toSubmit={submitForm} CityList={CityAreaList}></BuyHouse>
|
|
105
|
+ }
|
106
|
106
|
|
107
|
|
- {/* 租房 */}
|
108
|
|
- {
|
109
|
|
- CurrentDemandId === 2 &&
|
110
|
|
- <RentingHouse change={StepChange} toSubmit={submitForm} CityList={CityAreaList}></RentingHouse>
|
111
|
|
- }
|
|
107
|
+ {/* 租房 */}
|
|
108
|
+ {
|
|
109
|
+ CurrentDemandId === 2 &&
|
|
110
|
+ <RentingHouse change={StepChange} toSubmit={submitForm} CityList={CityAreaList}></RentingHouse>
|
|
111
|
+ }
|
112
|
112
|
|
113
|
|
- {/* 置业 */}
|
114
|
|
- {
|
115
|
|
- CurrentDemandId === 3 &&
|
116
|
|
- <HousePurchasing change={StepChange} toSubmit={submitForm} CityList={CityAreaList}></HousePurchasing>
|
117
|
|
- }
|
|
113
|
+ {/* 置业 */}
|
|
114
|
+ {
|
|
115
|
+ CurrentDemandId === 3 &&
|
|
116
|
+ <HousePurchasing change={StepChange} toSubmit={submitForm} CityList={CityAreaList}></HousePurchasing>
|
|
117
|
+ }
|
118
|
118
|
|
119
|
|
- </view>
|
120
|
|
- </ScrollView>
|
|
119
|
+ </view>
|
|
120
|
+ </ScrollView>
|
121
|
121
|
|
122
|
|
- </view>
|
123
|
|
- )
|
|
122
|
+ </view>
|
|
123
|
+)
|
124
|
124
|
})
|