Browse Source

静态页面

1002884655 3 years ago
parent
commit
9aa06bff55

BIN
dist.zip View File


+ 8
- 2
src/pages/chat/chatDetail/index.jsx View File

137
     })
137
     })
138
   }, [PageList, scroll])
138
   }, [PageList, scroll])
139
 
139
 
140
+  const CheckBigImg = (img) => {
141
+    return () => {
142
+      Taro.previewImage({ current: img, urls: [img] })
143
+    }
144
+  }
145
+
140
   return (
146
   return (
141
     <view className='chatDetail flex-v'>
147
     <view className='chatDetail flex-v'>
142
       <view className='flex-item'>
148
       <view className='flex-item'>
171
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
177
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
172
                                 <view className='Message Left Img'>
178
                                 <view className='Message Left Img'>
173
                                   <view>
179
                                   <view>
174
-                                    <Image mode='scaleToFill' src={item.message}></Image>
180
+                                    <Image onClick={CheckBigImg(item.message)} mode='scaleToFill' src={item.message}></Image>
175
                                   </view>
181
                                   </view>
176
                                 </view>
182
                                 </view>
177
                               }
183
                               }
196
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
202
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
197
                                 <view className='Message Right Img'>
203
                                 <view className='Message Right Img'>
198
                                   <view>
204
                                   <view>
199
-                                    <Image mode='scaleToFill' src={item.message}></Image>
205
+                                    <Image onClick={CheckBigImg(item.message)} mode='scaleToFill' src={item.message}></Image>
200
                                   </view>
206
                                   </view>
201
                                 </view>
207
                                 </view>
202
                               }
208
                               }

+ 18
- 0
src/pages/index/helpToFindHouse/components/SubmitBuyHouseResult/index.jsx View File

10
 export default function SubmitBuyHouseResult (props) {
10
 export default function SubmitBuyHouseResult (props) {
11
   const { List = [], setting, ShowResult = true } = props
11
   const { List = [], setting, ShowResult = true } = props
12
 
12
 
13
+  // const [ShowSorry, setShowSorry] = useState(false)
14
+
13
   const handlePhone = () => {
15
   const handlePhone = () => {
14
     if (!setting?.phone) {
16
     if (!setting?.phone) {
15
       Taro.showToast({
17
       Taro.showToast({
81
               </view>
83
               </view>
82
             }
84
             }
83
 
85
 
86
+            {
87
+              List.length === 0 &&
88
+              <view className='Recommend Sorry'>
89
+                <view className='Title'>
90
+                  <view>
91
+                    <text>温馨提示</text>
92
+                  </view>
93
+                </view>
94
+                <view className='Tips'>
95
+                  <text>非常抱歉!</text>
96
+                  <text>根据您的需求,目前尚无可推荐的楼盘</text>
97
+                  <text>您可以返回首页浏览更多内容!</text>
98
+                </view>
99
+              </view> 
100
+            }
101
+
84
           </view>
102
           </view>
85
         </view>
103
         </view>
86
       </view>
104
       </view>

+ 18
- 0
src/pages/index/helpToFindHouse/components/SubmitBuyHouseResult/index.scss View File

83
           padding: 0 30px;
83
           padding: 0 30px;
84
           position: relative;
84
           position: relative;
85
           overflow: hidden;
85
           overflow: hidden;
86
+          &.Sorry {
87
+            position: relative;
88
+            overflow: hidden;
89
+            padding: 60px 0 80px;
90
+            > .Tips {
91
+              position: relative;
92
+              overflow: hidden;
93
+              margin-top: 40px;
94
+              > text {
95
+                display: block;
96
+                text-align: center;
97
+                font-size: 26px;
98
+                color: #666;
99
+                line-height: 50px;
100
+                white-space: nowrap;
101
+              }
102
+            }
103
+          }
86
           > .Title {
104
           > .Title {
87
             position: relative;
105
             position: relative;
88
             overflow: hidden;
106
             overflow: hidden;

+ 8
- 0
src/pages/mine/components/EditUserDetailBasicInfo/index.jsx View File

20
   const [BuyTimeRange] = useState(['1月以内', '1至3月', '半年以内', '一年以内', '一年以上'])
20
   const [BuyTimeRange] = useState(['1月以内', '1至3月', '半年以内', '一年以内', '一年以上'])
21
   const [CanSubmit, setCanSubmit] = useState(false)
21
   const [CanSubmit, setCanSubmit] = useState(false)
22
 
22
 
23
+  useEffect(() => {
24
+    setFormData({ ...Data })
25
+    setSex(Data?.sex - 0 === 1 ? '男' : '女')
26
+    setAge(Data?.age)
27
+    setHouseholdIncome(Data?.householdIncome)
28
+    setEstimatedPurchaseTime(Data?.estimatedPurchaseTime)
29
+  }, [Data])
30
+
23
   useEffect(() => {
31
   useEffect(() => {
24
     if (CanSubmit) {
32
     if (CanSubmit) {
25
       setCanSubmit(false)
33
       setCanSubmit(false)

+ 45
- 24
src/subpackages/pages/marketing/changeVisit/index.jsx View File

5
 import { getCardList } from '@/services/card'
5
 import { getCardList } from '@/services/card'
6
 import { fetch } from '@/utils/request'
6
 import { fetch } from '@/utils/request'
7
 import Taro from '@tarojs/taro'
7
 import Taro from '@tarojs/taro'
8
-import { API_SURE_CHIP, API_BUILDING_HOUSE_TYPE, API_SURE_SIGN, API_SURE_BUY } from '@/constants/api'
8
+import { formatDate } from "@/utils/chatDate";
9
+import { API_SURE_CHIP, API_BUILDING_HOUSE_TYPE, API_SURE_SIGN, API_SURE_BUY, API_CUSTOMER_DETAILINFO } from '@/constants/api'
9
 import './index.scss'
10
 import './index.scss'
10
 
11
 
11
 export default withLayout((props) => {
12
 export default withLayout((props) => {
13
   const { router } = props
14
   const { router } = props
14
   const { name, buildingId, type, id, channelId } = router.params
15
   const { name, buildingId, type, id, channelId } = router.params
15
 
16
 
16
-  const RenChouData = {
17
+  const [RenChouData, setRenChouData] = useState({
17
     name,
18
     name,
18
     realtyConsultant: '',
19
     realtyConsultant: '',
19
     remark: '',
20
     remark: '',
20
-  }
21
+  })
21
 
22
 
22
-  const QianYueData = {
23
+  const [QianYueData, setQianYueData] = useState({
23
     name,
24
     name,
24
     realtyConsultant: '',
25
     realtyConsultant: '',
25
     remark: '',
26
     remark: '',
29
     houseType: '',
30
     houseType: '',
30
     price: '',
31
     price: '',
31
     successDate: '',
32
     successDate: '',
32
-  }
33
+  })
33
 
34
 
34
   const [FormData, setFormData] = useState({ ...RenChouData })
35
   const [FormData, setFormData] = useState({ ...RenChouData })
35
 
36
 
48
 
49
 
49
   const [CurrentRoomTypeId, setCurrentRoomTypeId] = useState(null)
50
   const [CurrentRoomTypeId, setCurrentRoomTypeId] = useState(null)
50
 
51
 
51
-  useEffect(() => {
52
-    if (channelId !== null && channelId !== 'null') {
53
-
54
-    }
55
-  }, [])
56
-
57
   useEffect(() => {
52
   useEffect(() => {
58
     if (buildingId) {
53
     if (buildingId) {
59
       const params = {
54
       const params = {
68
     }
63
     }
69
   }, [buildingId])
64
   }, [buildingId])
70
 
65
 
66
+  useEffect(() => {
67
+    fetch({ url: `${API_CUSTOMER_DETAILINFO}/${id}`, method: 'get' }).then((res) => {
68
+      if(CurrentStatusId - 0 === 3) {
69
+        setFormData({ ...FormData, ...res?.customerPreparatory })
70
+      }
71
+      setRenChouData({ ...RenChouData, ...res?.customerPreparatory })
72
+      if((res.customerSignatory || []).length) {
73
+        let customerSignatory = res.customerSignatory[0]
74
+        customerSignatory.dividendsPer = customerSignatory.dividendsName.substring(customerSignatory.dividendsName.indexOf('|') + 1, customerSignatory.dividendsName.indexOf('%'))
75
+        customerSignatory.dividendsName = customerSignatory.dividendsName.substring(0, customerSignatory.dividendsName.indexOf('|'))
76
+        setQianYueData({...QianYueData, ...customerSignatory})
77
+        HouseTypeList.map((item) => {
78
+          if(item.apartmentId === res.customerSignatory[0].houseType) {
79
+            setCurrentRoomTypeId(item.apartmentId)
80
+          }
81
+        })
82
+        setSuccessDate(res.customerSignatory[0].successDate.substring(0, 10))
83
+      }
84
+      ConsultantList.map((item) => {
85
+        if(item.id === res.customerPreparatory.realtyConsultant) {
86
+          setCurrnetConsultant(item)
87
+        }
88
+      })
89
+    })
90
+  }, [ConsultantList, HouseTypeList])
91
+
71
   useEffect(() => {
92
   useEffect(() => {
72
     if (CurrentStatusId - 0 !== 3 && buildingId) {
93
     if (CurrentStatusId - 0 !== 3 && buildingId) {
73
       fetch({ url: `${API_BUILDING_HOUSE_TYPE}?buildingId=${buildingId}&pageSize=${500}`, method: 'get' }).then((res) => {
94
       fetch({ url: `${API_BUILDING_HOUSE_TYPE}?buildingId=${buildingId}&pageSize=${500}`, method: 'get' }).then((res) => {
76
     }
97
     }
77
   }, [CurrentStatusId, buildingId])
98
   }, [CurrentStatusId, buildingId])
78
 
99
 
100
+  useEffect(() => {
101
+    console.log(FormData)
102
+  }, [FormData])
103
+
79
   const CutStatus = (item) => {
104
   const CutStatus = (item) => {
80
     return () => {
105
     return () => {
81
       setCurrentStatusId(item.id)
106
       setCurrentStatusId(item.id)
82
-      if (item.id === 3) {
107
+      if (item.id - 0 === 3) {
83
         setFormData({ ...RenChouData })
108
         setFormData({ ...RenChouData })
84
-      } else if (item.id === 4) {
109
+      } else if (item.id - 0 === 4) {
85
         setFormData({ ...QianYueData })
110
         setFormData({ ...QianYueData })
86
-      } else if (item.id === 5) {
111
+      } else if (item.id - 0 === 5) {
87
         setFormData({ ...QianYueData })
112
         setFormData({ ...QianYueData })
88
       }
113
       }
89
     }
114
     }
101
   const InputChange = (key, e) => {
126
   const InputChange = (key, e) => {
102
     let resData = { ...FormData }
127
     let resData = { ...FormData }
103
     resData[key] = e.detail.value
128
     resData[key] = e.detail.value
104
-    console.log('---------resData---------', resData)
105
     setFormData({ ...resData })
129
     setFormData({ ...resData })
106
   }
130
   }
107
 
131
 
108
-  console.log('---------FormData---------', FormData)
109
-
110
   const PickerChange = (key, e) => {
132
   const PickerChange = (key, e) => {
111
     let resData = { ...FormData }
133
     let resData = { ...FormData }
112
     if (key === 'realtyConsultant') {
134
     if (key === 'realtyConsultant') {
134
   }
156
   }
135
 
157
 
136
   const ToSubmit = () => {
158
   const ToSubmit = () => {
137
-    // if (!CheckForm()) return false
138
     if (CurrentStatusId === 3) {
159
     if (CurrentStatusId === 3) {
139
       fetch({ url: API_SURE_CHIP, method: 'put', payload: { customerId: id, customerPreparatory: { ...FormData, channelId: channelId === 'null' || channelId === null ? '' : channelId } } }).then(() => {
160
       fetch({ url: API_SURE_CHIP, method: 'put', payload: { customerId: id, customerPreparatory: { ...FormData, channelId: channelId === 'null' || channelId === null ? '' : channelId } } }).then(() => {
140
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
161
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
176
   const SuccessDateChange = (e) => {
197
   const SuccessDateChange = (e) => {
177
     let resData = { ...FormData }
198
     let resData = { ...FormData }
178
     resData.successDate = new Date(e.detail.value)
199
     resData.successDate = new Date(e.detail.value)
179
-    setFormData(resData.successDate)
200
+    setFormData(resData)
180
     setSuccessDate(e.detail.value)
201
     setSuccessDate(e.detail.value)
181
   }
202
   }
182
 
203
 
233
               <text className='required'>业绩分成人|占比/%</text>
254
               <text className='required'>业绩分成人|占比/%</text>
234
               <view className='FormLine flex-h'>
255
               <view className='FormLine flex-h'>
235
                 <view className='flex-item'>
256
                 <view className='flex-item'>
236
-                  <Input placeholder='请输入业绩分成人' onInput={InputChange.bind(this, 'dividendsName')}></Input>
257
+                  <Input placeholder='请输入业绩分成人' value={FormData.dividendsName} onInput={InputChange.bind(this, 'dividendsName')}></Input>
237
                 </view>
258
                 </view>
238
                 <view className='flex-item'>
259
                 <view className='flex-item'>
239
-                  <Input placeholder='请输入占比%' type='number' onInput={InputChange.bind(this, 'dividendsPer')}></Input>
260
+                  <Input placeholder='请输入占比%' value={FormData.dividendsPer} type='number' onInput={InputChange.bind(this, 'dividendsPer')}></Input>
240
                 </view>
261
                 </view>
241
               </view>
262
               </view>
242
             </Block>
263
             </Block>
272
               <text className='required'>房号</text>
293
               <text className='required'>房号</text>
273
               <view className='FormLine flex-h'>
294
               <view className='FormLine flex-h'>
274
                 <view className='flex-item'>
295
                 <view className='flex-item'>
275
-                  <Input placeholder='请输入房号' onInput={InputChange.bind(this, 'houseInfo')}></Input>
296
+                  <Input placeholder='请输入房号' value={FormData.houseInfo} onInput={InputChange.bind(this, 'houseInfo')}></Input>
276
                 </view>
297
                 </view>
277
               </view>
298
               </view>
278
             </Block>
299
             </Block>
284
               <text className='required'>签约日期</text>
305
               <text className='required'>签约日期</text>
285
               <view className='FormLine flex-h'>
306
               <view className='FormLine flex-h'>
286
                 <view className='flex-item'>
307
                 <view className='flex-item'>
287
-                  <Picker mode='date' value={null} onChange={SuccessDateChange}>{SuccessDate || '请选择开始日期'}</Picker>
308
+                  <Picker mode='date' value={FormData.successDate} onChange={SuccessDateChange}>{SuccessDate || '请选择开始日期'}</Picker>
288
                 </view>
309
                 </view>
289
                 <text className='iconfont icon-jiantoudown'></text>
310
                 <text className='iconfont icon-jiantoudown'></text>
290
               </view>
311
               </view>
297
               <text className='required'>成交金额</text>
318
               <text className='required'>成交金额</text>
298
               <view className='FormLine flex-h'>
319
               <view className='FormLine flex-h'>
299
                 <view className='flex-item'>
320
                 <view className='flex-item'>
300
-                  <Input placeholder='请输入金额' onInput={InputChange.bind(this, 'price')}></Input>
321
+                  <Input placeholder='请输入金额' value={FormData.price} onInput={InputChange.bind(this, 'price')}></Input>
301
                 </view>
322
                 </view>
302
               </view>
323
               </view>
303
             </Block>
324
             </Block>