1002884655 3 年 前
コミット
8b3924b482
共有2 個のファイルを変更した12 個の追加0 個の削除を含む
  1. 6
    0
      src/pages/index/addedValueService/index.jsx
  2. 6
    0
      src/pages/index/helpToFindHouse/index.jsx

+ 6
- 0
src/pages/index/addedValueService/index.jsx ファイルの表示

33
   const SubmitForm = (data) => {
33
   const SubmitForm = (data) => {
34
     data = data || []
34
     data = data || []
35
     let params = []
35
     let params = []
36
+    let budgetCheck = false
36
     data.map((item) => {
37
     data.map((item) => {
37
       if(item.key === 'budget') {
38
       if(item.key === 'budget') {
39
+        budgetCheck = true
38
         params.push({...item, key: 'minPrice', result: item.options[0] * 10000})
40
         params.push({...item, key: 'minPrice', result: item.options[0] * 10000})
39
         params.push({...item, key: 'maxPrice', result: item.result * 10000})
41
         params.push({...item, key: 'maxPrice', result: item.result * 10000})
40
       } else {
42
       } else {
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
     params.push({question: '创建人小程序人员', result: user?.userInfo?.person?.personId, key: 'personId' })
52
     params.push({question: '创建人小程序人员', result: user?.userInfo?.person?.personId, key: 'personId' })
47
     let payload = {}
53
     let payload = {}
48
     params.map((item) => {
54
     params.map((item) => {

+ 6
- 0
src/pages/index/helpToFindHouse/index.jsx ファイルの表示

45
   const submitForm = (data) => {
45
   const submitForm = (data) => {
46
     data = data || []
46
     data = data || []
47
     let params = []
47
     let params = []
48
+    let budgetCheck = false
48
     data.map((item) => {
49
     data.map((item) => {
49
       if (item.key === 'budget') {
50
       if (item.key === 'budget') {
51
+        budgetCheck = true
50
         params.push({ ...item, key: 'minPrice', result: CurrentDemandId === 2 ? item.options[0] : item.options[0] * 10000 })
52
         params.push({ ...item, key: 'minPrice', result: CurrentDemandId === 2 ? item.options[0] : item.options[0] * 10000 })
51
         params.push({ ...item, key: 'maxPrice', result: CurrentDemandId === 2 ? item.result : item.result * 10000 })
53
         params.push({ ...item, key: 'maxPrice', result: CurrentDemandId === 2 ? item.result : item.result * 10000 })
52
       } else {
54
       } else {
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
     params.push({ question: '创建人小程序人员', result: user?.userInfo?.person?.personId, key: 'personId' })
64
     params.push({ question: '创建人小程序人员', result: user?.userInfo?.person?.personId, key: 'personId' })
59
     if(CurrentDemandId !== 3) {
65
     if(CurrentDemandId !== 3) {
60
       params.push({ question: '意向区域', result: AreaInfo.id, key: 'intentArea' })
66
       params.push({ question: '意向区域', result: AreaInfo.id, key: 'intentArea' })