|
|
|
|
51
|
let areaResultId;
|
51
|
let areaResultId;
|
52
|
data.map((item) => {
|
52
|
data.map((item) => {
|
53
|
if (item.key === 'budget') {
|
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 === '' ? 1000 : item.result) : (item.result === '' ? 10000000 : item.result * 10000) })
|
|
|
|
|
54
|
+ // 用户选择 200, 则区间为 [100, 300]
|
|
|
55
|
+ // 用户选择 300, 则区间为 [200, 400]
|
|
|
56
|
+ const price = item.result === '' ? 300 : item.result - 0;
|
|
|
57
|
+ const min = price < 100 ? 100 : price - 100;
|
|
|
58
|
+ const max = price + 100;
|
|
|
59
|
+
|
|
|
60
|
+ params.push({ ...item, key: 'minPrice', result: CurrentDemandId === 2 ? min : min * 10000 })
|
|
|
61
|
+ params.push({ ...item, key: 'maxPrice', result: CurrentDemandId === 2 ? max : max * 10000 })
|
56
|
} else {
|
62
|
} else {
|
57
|
if (CurrentDemandId === 1) {
|
63
|
if (CurrentDemandId === 1) {
|
58
|
if (item.key === 'area') {
|
64
|
if (item.key === 'area') {
|