1002884655 3 lat temu
rodzic
commit
8b3924b482

+ 6
- 0
src/pages/index/addedValueService/index.jsx Wyświetl plik

@@ -33,8 +33,10 @@ export default function AddedValueService () {
33 33
   const SubmitForm = (data) => {
34 34
     data = data || []
35 35
     let params = []
36
+    let budgetCheck = false
36 37
     data.map((item) => {
37 38
       if(item.key === 'budget') {
39
+        budgetCheck = true
38 40
         params.push({...item, key: 'minPrice', result: item.options[0] * 10000})
39 41
         params.push({...item, key: 'maxPrice', result: item.result * 10000})
40 42
       } else {
@@ -43,6 +45,10 @@ export default function AddedValueService () {
43 45
         }
44 46
       }
45 47
     })
48
+    if(!budgetCheck) {
49
+      params.push({question: '你的装修预算是多少?', result: 1000000, key: 'minPrice' })
50
+      params.push({question: '你的装修预算是多少?', result: 1000000, key: 'maxPrice' })
51
+    }
46 52
     params.push({question: '创建人小程序人员', result: user?.userInfo?.person?.personId, key: 'personId' })
47 53
     let payload = {}
48 54
     params.map((item) => {

+ 6
- 0
src/pages/index/helpToFindHouse/index.jsx Wyświetl plik

@@ -45,8 +45,10 @@ export default withLayout(() => {
45 45
   const submitForm = (data) => {
46 46
     data = data || []
47 47
     let params = []
48
+    let budgetCheck = false
48 49
     data.map((item) => {
49 50
       if (item.key === 'budget') {
51
+        budgetCheck = true
50 52
         params.push({ ...item, key: 'minPrice', result: CurrentDemandId === 2 ? item.options[0] : item.options[0] * 10000 })
51 53
         params.push({ ...item, key: 'maxPrice', result: CurrentDemandId === 2 ? item.result : item.result * 10000 })
52 54
       } else {
@@ -55,6 +57,10 @@ export default withLayout(() => {
55 57
         }
56 58
       }
57 59
     })
60
+    if(!budgetCheck) {
61
+      params.push({question: '你的预算是多少?', result: 0, key: 'minPrice' })
62
+      params.push({question: '你的预算是多少?', result: 5000000, key: 'maxPrice' })
63
+    }
58 64
     params.push({ question: '创建人小程序人员', result: user?.userInfo?.person?.personId, key: 'personId' })
59 65
     if(CurrentDemandId !== 3) {
60 66
       params.push({ question: '意向区域', result: AreaInfo.id, key: 'intentArea' })