1002884655 3 lat temu
rodzic
commit
9aa06bff55

BIN
dist.zip Wyświetl plik


+ 8
- 2
src/pages/chat/chatDetail/index.jsx Wyświetl plik

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

+ 18
- 0
src/pages/index/helpToFindHouse/components/SubmitBuyHouseResult/index.jsx Wyświetl plik

@@ -10,6 +10,8 @@ import './index.scss'
10 10
 export default function SubmitBuyHouseResult (props) {
11 11
   const { List = [], setting, ShowResult = true } = props
12 12
 
13
+  // const [ShowSorry, setShowSorry] = useState(false)
14
+
13 15
   const handlePhone = () => {
14 16
     if (!setting?.phone) {
15 17
       Taro.showToast({
@@ -81,6 +83,22 @@ export default function SubmitBuyHouseResult (props) {
81 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 102
           </view>
85 103
         </view>
86 104
       </view>

+ 18
- 0
src/pages/index/helpToFindHouse/components/SubmitBuyHouseResult/index.scss Wyświetl plik

@@ -83,6 +83,24 @@
83 83
           padding: 0 30px;
84 84
           position: relative;
85 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 104
           > .Title {
87 105
             position: relative;
88 106
             overflow: hidden;

+ 8
- 0
src/pages/mine/components/EditUserDetailBasicInfo/index.jsx Wyświetl plik

@@ -20,6 +20,14 @@ export default function EditUserDetailBasicInfo (props) {
20 20
   const [BuyTimeRange] = useState(['1月以内', '1至3月', '半年以内', '一年以内', '一年以上'])
21 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 31
   useEffect(() => {
24 32
     if (CanSubmit) {
25 33
       setCanSubmit(false)

+ 45
- 24
src/subpackages/pages/marketing/changeVisit/index.jsx Wyświetl plik

@@ -5,7 +5,8 @@ import '@/assets/css/iconfont.css'
5 5
 import { getCardList } from '@/services/card'
6 6
 import { fetch } from '@/utils/request'
7 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 10
 import './index.scss'
10 11
 
11 12
 export default withLayout((props) => {
@@ -13,13 +14,13 @@ export default withLayout((props) => {
13 14
   const { router } = props
14 15
   const { name, buildingId, type, id, channelId } = router.params
15 16
 
16
-  const RenChouData = {
17
+  const [RenChouData, setRenChouData] = useState({
17 18
     name,
18 19
     realtyConsultant: '',
19 20
     remark: '',
20
-  }
21
+  })
21 22
 
22
-  const QianYueData = {
23
+  const [QianYueData, setQianYueData] = useState({
23 24
     name,
24 25
     realtyConsultant: '',
25 26
     remark: '',
@@ -29,7 +30,7 @@ export default withLayout((props) => {
29 30
     houseType: '',
30 31
     price: '',
31 32
     successDate: '',
32
-  }
33
+  })
33 34
 
34 35
   const [FormData, setFormData] = useState({ ...RenChouData })
35 36
 
@@ -48,12 +49,6 @@ export default withLayout((props) => {
48 49
 
49 50
   const [CurrentRoomTypeId, setCurrentRoomTypeId] = useState(null)
50 51
 
51
-  useEffect(() => {
52
-    if (channelId !== null && channelId !== 'null') {
53
-
54
-    }
55
-  }, [])
56
-
57 52
   useEffect(() => {
58 53
     if (buildingId) {
59 54
       const params = {
@@ -68,6 +63,32 @@ export default withLayout((props) => {
68 63
     }
69 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 92
   useEffect(() => {
72 93
     if (CurrentStatusId - 0 !== 3 && buildingId) {
73 94
       fetch({ url: `${API_BUILDING_HOUSE_TYPE}?buildingId=${buildingId}&pageSize=${500}`, method: 'get' }).then((res) => {
@@ -76,14 +97,18 @@ export default withLayout((props) => {
76 97
     }
77 98
   }, [CurrentStatusId, buildingId])
78 99
 
100
+  useEffect(() => {
101
+    console.log(FormData)
102
+  }, [FormData])
103
+
79 104
   const CutStatus = (item) => {
80 105
     return () => {
81 106
       setCurrentStatusId(item.id)
82
-      if (item.id === 3) {
107
+      if (item.id - 0 === 3) {
83 108
         setFormData({ ...RenChouData })
84
-      } else if (item.id === 4) {
109
+      } else if (item.id - 0 === 4) {
85 110
         setFormData({ ...QianYueData })
86
-      } else if (item.id === 5) {
111
+      } else if (item.id - 0 === 5) {
87 112
         setFormData({ ...QianYueData })
88 113
       }
89 114
     }
@@ -101,12 +126,9 @@ export default withLayout((props) => {
101 126
   const InputChange = (key, e) => {
102 127
     let resData = { ...FormData }
103 128
     resData[key] = e.detail.value
104
-    console.log('---------resData---------', resData)
105 129
     setFormData({ ...resData })
106 130
   }
107 131
 
108
-  console.log('---------FormData---------', FormData)
109
-
110 132
   const PickerChange = (key, e) => {
111 133
     let resData = { ...FormData }
112 134
     if (key === 'realtyConsultant') {
@@ -134,7 +156,6 @@ export default withLayout((props) => {
134 156
   }
135 157
 
136 158
   const ToSubmit = () => {
137
-    // if (!CheckForm()) return false
138 159
     if (CurrentStatusId === 3) {
139 160
       fetch({ url: API_SURE_CHIP, method: 'put', payload: { customerId: id, customerPreparatory: { ...FormData, channelId: channelId === 'null' || channelId === null ? '' : channelId } } }).then(() => {
140 161
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
@@ -176,7 +197,7 @@ export default withLayout((props) => {
176 197
   const SuccessDateChange = (e) => {
177 198
     let resData = { ...FormData }
178 199
     resData.successDate = new Date(e.detail.value)
179
-    setFormData(resData.successDate)
200
+    setFormData(resData)
180 201
     setSuccessDate(e.detail.value)
181 202
   }
182 203
 
@@ -233,10 +254,10 @@ export default withLayout((props) => {
233 254
               <text className='required'>业绩分成人|占比/%</text>
234 255
               <view className='FormLine flex-h'>
235 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 258
                 </view>
238 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 261
                 </view>
241 262
               </view>
242 263
             </Block>
@@ -272,7 +293,7 @@ export default withLayout((props) => {
272 293
               <text className='required'>房号</text>
273 294
               <view className='FormLine flex-h'>
274 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 297
                 </view>
277 298
               </view>
278 299
             </Block>
@@ -284,7 +305,7 @@ export default withLayout((props) => {
284 305
               <text className='required'>签约日期</text>
285 306
               <view className='FormLine flex-h'>
286 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 309
                 </view>
289 310
                 <text className='iconfont icon-jiantoudown'></text>
290 311
               </view>
@@ -297,7 +318,7 @@ export default withLayout((props) => {
297 318
               <text className='required'>成交金额</text>
298 319
               <view className='FormLine flex-h'>
299 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 322
                 </view>
302 323
               </view>
303 324
             </Block>