Browse Source

静态页面

1002884655 3 years ago
parent
commit
cfecdf2122

+ 1
- 7
src/pages/index/addedValueService/index.jsx View File

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

+ 1
- 7
src/pages/index/helpToFindHouse/index.jsx View File

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