Browse Source

Merge branch 'main' of http://git.ycjcjy.com/marketing/miniapp into main

张延森 3 years ago
parent
commit
c60167f194

+ 2
- 2
config/dev.js View File

3
     NODE_ENV: '"development"'
3
     NODE_ENV: '"development"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    // HOST: '"https://xlk.njyz.tech"',
7
-    HOST: '"https://www.newhousehold.cn"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"https://www.newhousehold.cn"',
8
     // HOST: '"http://127.0.0.1:8567"',
8
     // HOST: '"http://127.0.0.1:8567"',
9
     WSS_HOST: '"wss://xlk.njyz.tech"',
9
     WSS_HOST: '"wss://xlk.njyz.tech"',
10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',

+ 2
- 2
project.config.json View File

2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "miniapp",
3
 	"projectname": "miniapp",
4
 	"description": "",
4
 	"description": "",
5
-	"appid": "wxc96058d57e77f373",
5
+	"appid": "wxe44244d1a5ea3364",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,
27
 			"outputPath": ""
27
 			"outputPath": ""
28
 		},
28
 		},
29
 		"useIsolateContext": true,
29
 		"useIsolateContext": true,
30
-		"useCompilerModule": false,
30
+		"useCompilerModule": true,
31
 		"userConfirmedUseCompilerModuleSwitch": false
31
 		"userConfirmedUseCompilerModuleSwitch": false
32
 	},
32
 	},
33
 	"compileType": "miniprogram",
33
 	"compileType": "miniprogram",

+ 3
- 3
src/components/ProjectListItem/index.jsx View File

6
 import './index.scss'
6
 import './index.scss'
7
 
7
 
8
 export default function ProjectListItem (props) {
8
 export default function ProjectListItem (props) {
9
-  const { Data = {} } = props
9
+  const { Data = {}, ShowImgIcon = true } = props
10
   const { uvList = [] } = Data
10
   const { uvList = [] } = Data
11
   return (
11
   return (
12
     <view className='components ProjectListItem flex-h' onClick={() => { Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${Data.buildingId || Data.targetId}` }) }}>
12
     <view className='components ProjectListItem flex-h' onClick={() => { Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${Data.buildingId || Data.targetId}` }) }}>
14
         <view>
14
         <view>
15
           <Image mode='aspectFill' className='centerLabel' src={getImgURL((Data?.buildingListImg || []).length ? Data.buildingListImg[0].url : Data.activityImg || null)} />
15
           <Image mode='aspectFill' className='centerLabel' src={getImgURL((Data?.buildingListImg || []).length ? Data.buildingListImg[0].url : Data.activityImg || null)} />
16
           {
16
           {
17
-            (Data?.panoramaList || []).length > 0 &&
17
+            (Data?.panoramaList || []).length > 0 && ShowImgIcon &&
18
             <Image mode='heightFix' className='Tips Vr' src={require('@/assets/index-icon18.png')} />
18
             <Image mode='heightFix' className='Tips Vr' src={require('@/assets/index-icon18.png')} />
19
           }
19
           }
20
           {
20
           {
21
-            Data.videoUrl !== null &&
21
+            Data.videoUrl !== null && ShowImgIcon &&
22
             <Image mode='heightFix' className='Tips Video' src={require('@/assets/index-icon19.png')} />
22
             <Image mode='heightFix' className='Tips Video' src={require('@/assets/index-icon19.png')} />
23
           }
23
           }
24
         </view>
24
         </view>

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

179
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
179
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
180
                                 <view className='Message Left Img'>
180
                                 <view className='Message Left Img'>
181
                                   <view>
181
                                   <view>
182
-                                    <Image onClick={CheckBigImg(item.message)} mode='scaleToFill' src={item.message}></Image>
182
+                                    <Image onClick={CheckBigImg(item.message)} mode='aspectFit' src={item.message}></Image>
183
                                   </view>
183
                                   </view>
184
                                 </view>
184
                                 </view>
185
                               }
185
                               }
204
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
204
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
205
                                 <view className='Message Right Img'>
205
                                 <view className='Message Right Img'>
206
                                   <view>
206
                                   <view>
207
-                                    <Image onClick={CheckBigImg(item.message)} mode='scaleToFill' src={item.message}></Image>
207
+                                    <Image onClick={CheckBigImg(item.message)} mode='aspectFit' src={item.message}></Image>
208
                                   </view>
208
                                   </view>
209
                                 </view>
209
                                 </view>
210
                               }
210
                               }
233
       </view>
233
       </view>
234
       <view className='SendContent flex-h'>
234
       <view className='SendContent flex-h'>
235
         <view className='flex-item'>
235
         <view className='flex-item'>
236
-          <Input placeholder='发送消息' value={text} onInput={(e) => setText(e.detail.value)} />
236
+          <Input confirm-type='send' hold-keyboard confirm-hold placeholder='发送消息' value={text} onConfirm={submitText} onInput={(e) => setText(e.detail.value)} />
237
         </view>
237
         </view>
238
         <text className='iconfont icon-tianjia' onClick={submitImage}></text>
238
         <text className='iconfont icon-tianjia' onClick={submitImage}></text>
239
         <Button loading={submitting} className='Send' onClick={submitText}>发送</Button>
239
         <Button loading={submitting} className='Send' onClick={submitText}>发送</Button>

+ 7
- 3
src/pages/chat/index.jsx View File

1
 import { useState, useEffect } from 'react'
1
 import { useState, useEffect } from 'react'
2
-import Taro from '@tarojs/taro'
2
+import Taro, { useDidShow } from '@tarojs/taro'
3
 import { ScrollView, Image } from '@tarojs/components'
3
 import { ScrollView, Image } from '@tarojs/components'
4
 import withLayout from '@/layout'
4
 import withLayout from '@/layout'
5
 import { queryChatFriends } from '@/services/chat'
5
 import { queryChatFriends } from '@/services/chat'
36
     })
36
     })
37
   }
37
   }
38
 
38
 
39
-  useEffect(() => {
39
+  // useEffect(() => {
40
+  //   getList({ pageNumber: 1 })
41
+  // }, [])
42
+
43
+  useDidShow(() => {
40
     getList({ pageNumber: 1 })
44
     getList({ pageNumber: 1 })
41
-  }, [])
45
+  })
42
 
46
 
43
   const PageRefresh = () => { // 页面下拉刷新回调
47
   const PageRefresh = () => { // 页面下拉刷新回调
44
     setPull(true)
48
     setPull(true)

+ 2
- 2
src/pages/index/buildingDetail/components/PropertyConsultant/index.jsx View File

21
 
21
 
22
   const handleMore = () => {
22
   const handleMore = () => {
23
     Taro.navigateTo({
23
     Taro.navigateTo({
24
-      url: `/pages/index/buildingPropertyConsultant/index?buildingId=${Info?.buildingId}`
24
+      url: `/pages/index/buildingPropertyConsultant/index?buldingId=${Info?.buildingId}`
25
     })
25
     })
26
   }
26
   }
27
 
27
 
64
           List.map((item, index) => (
64
           List.map((item, index) => (
65
             <view key={`PersonItem-${index}`} className='flex-h'>
65
             <view key={`PersonItem-${index}`} className='flex-h'>
66
               <view className='Icon' onClick={() => gotoDetail(item)}>
66
               <view className='Icon' onClick={() => gotoDetail(item)}>
67
-                <Image mode='aspectFill' src={item.photo || item.avatarurl || item.avatar || item.picture}></Image>
67
+                <Image mode='aspectFill' src={item.userPhoto || item.photo || item.avatarurl || item.avatar || item.picture}></Image>
68
               </view>
68
               </view>
69
               <view className='flex-item' onClick={() => gotoDetail(item)}>
69
               <view className='flex-item' onClick={() => gotoDetail(item)}>
70
                 <text>{item.userName}</text>
70
                 <text>{item.userName}</text>

+ 1
- 1
src/pages/index/buildingList/index.scss View File

24
         display: inline-block;
24
         display: inline-block;
25
         vertical-align: middle;
25
         vertical-align: middle;
26
         width: 150px;
26
         width: 150px;
27
-        font-size: 20px;
27
+        font-size: 22px;
28
         margin-left: 10px;
28
         margin-left: 10px;
29
         height: 78px;
29
         height: 78px;
30
         text-align: left;
30
         text-align: left;

+ 24
- 3
src/pages/index/buildingPropertyConsultant/index.jsx View File

12
   const { buldingId } = router.params
12
   const { buldingId } = router.params
13
 
13
 
14
   const [List, setList] = useState([])
14
   const [List, setList] = useState([])
15
+  const [PageList, setPageList] = useState([])
16
+  const [ShowMore, setShowMore] = useState(false)
17
+
18
+  useEffect(() => {
19
+    if(List.length) {
20
+      if(ShowMore) {
21
+        setPageList([...List])
22
+      } else {
23
+        setPageList(List.slice(0, 3))
24
+      }
25
+    }
26
+  }, [ShowMore, List])
15
 
27
 
16
   const handleChat = (item) => {
28
   const handleChat = (item) => {
17
     Taro.navigateTo({
29
     Taro.navigateTo({
55
         <text className='TopTips'>有任何买卖房屋的问题,欢迎随时咨询</text>
67
         <text className='TopTips'>有任何买卖房屋的问题,欢迎随时咨询</text>
56
         <view className='List'>
68
         <view className='List'>
57
           {
69
           {
58
-            List.map((item, index) => (
70
+            PageList.map((item, index) => (
59
               <view key={`ListItem-${index}`}>
71
               <view key={`ListItem-${index}`}>
60
 
72
 
61
                 <view className='flex-h'>
73
                 <view className='flex-h'>
62
 
74
 
63
                   <view className='Icon'>
75
                   <view className='Icon'>
64
-                    <Image mode='scaleToFill' src={getImgURL(item.photo || item.avatar)}></Image>
76
+                    <Image mode='scaleToFill' src={getImgURL(item.userPhoto || item.photo || item.avatar)}></Image>
65
                   </view>
77
                   </view>
66
 
78
 
67
                   <view className='flex-item' onClick={() => gotoDetail(item)}>
79
                   <view className='flex-item' onClick={() => gotoDetail(item)}>
90
               </view>
102
               </view>
91
             ))
103
             ))
92
           }
104
           }
93
-          <text className='BottomTips'>已经到底了~</text>
105
+          {
106
+            List.length > 3 && !ShowMore &&
107
+            <view className='More'>
108
+              <text onClick={() => { setShowMore(true) }}>查看更多置业顾问</text>
109
+            </view>
110
+          }
111
+          {
112
+            !(List.length > 3 && !ShowMore) &&
113
+            <text className='BottomTips'>已经到底了~</text>
114
+          }
94
         </view>
115
         </view>
95
       </ScrollView>
116
       </ScrollView>
96
     </view>
117
     </view>

+ 10
- 0
src/pages/index/buildingPropertyConsultant/index.scss View File

95
           }
95
           }
96
         }
96
         }
97
       }
97
       }
98
+      >.More {
99
+        text-align: center;
100
+        border: none;
101
+        >text {
102
+          display: inline-block;
103
+          font-size: 28px;
104
+          color: #333;
105
+          line-height: 40px;
106
+        }
107
+      }
98
       >.BottomTips {
108
       >.BottomTips {
99
         display: block;
109
         display: block;
100
         text-align: center;
110
         text-align: center;

+ 1
- 0
src/pages/index/findHouseFromMap/index.jsx View File

121
           latitude={city?.lat}
121
           latitude={city?.lat}
122
           markers={markers}
122
           markers={markers}
123
           onMarkertap={handleMarker}
123
           onMarkertap={handleMarker}
124
+          onCallouttap={handleMarker}
124
           onTap={() => setShowInfo(false)}
125
           onTap={() => setShowInfo(false)}
125
         />
126
         />
126
       </view>
127
       </view>

+ 1
- 1
src/pages/index/specialPriceHouse/index.jsx View File

148
                               const unitW = unitPrice ? `${Number(unitPrice).toFixed(0)}元/㎡` : '单价待定'
148
                               const unitW = unitPrice ? `${Number(unitPrice).toFixed(0)}元/㎡` : '单价待定'
149
                               const currentW = it.currentPrice ? `${Number(it.currentPrice / 10000).toFixed(1)}` : '待定'
149
                               const currentW = it.currentPrice ? `${Number(it.currentPrice / 10000).toFixed(1)}` : '待定'
150
                               const originalW = it.originalPrice ? `${Number(it.originalPrice / 10000).toFixed(1)}` : '待定'
150
                               const originalW = it.originalPrice ? `${Number(it.originalPrice / 10000).toFixed(1)}` : '待定'
151
-                              const thriftW = it.thriftPrice ? `省${Number(it.thriftPrice / 10000).toFixed(1)}` : '待定'
151
+                              const thriftW = it.thriftPrice ? `省${Number(it.thriftPrice / 10000).toFixed(1)}` : '待定'
152
                               const leftTime = formateLeftTime(new Date(it.endTime) - new Date(), 'min');
152
                               const leftTime = formateLeftTime(new Date(it.endTime) - new Date(), 'min');
153
 
153
 
154
                               return (
154
                               return (

+ 1
- 1
src/pages/mine/mortgageCalc/components/SYForm.jsx View File

39
         <input type='digit' placeholder='请输入基点' value={add} onInput={e => setAdd(e.detail.value)} />
39
         <input type='digit' placeholder='请输入基点' value={add} onInput={e => setAdd(e.detail.value)} />
40
       </Cell>
40
       </Cell>
41
       <Cell header='贷款利率 : ' footer='%'>
41
       <Cell header='贷款利率 : ' footer='%'>
42
-        {`${LPR}% + ${add||''}BP‱ = ${rate}`}
42
+        {`${LPR}% + ${add||''}BP‱ = ${(rate - 0).toFixed(2)}`}
43
       </Cell>
43
       </Cell>
44
     </view>
44
     </view>
45
   )
45
   )

+ 1
- 1
src/pages/mine/myShare/index.jsx View File

66
           <view className='List'>
66
           <view className='List'>
67
             {
67
             {
68
               PageList.map((item, index) => (
68
               PageList.map((item, index) => (
69
-                <ProjectListItem Data={item} key={`ProjectListItem-${index}`}></ProjectListItem>
69
+                <ProjectListItem ShowImgIcon={item.eventType === 'building'} Data={item} key={`ProjectListItem-${index}`}></ProjectListItem>
70
               ))
70
               ))
71
             }
71
             }
72
           </view>
72
           </view>

+ 7
- 1
src/subpackages/pages/consultant/components/StatCustomerListItem/index.jsx View File

7
 
7
 
8
   const { data = {}, showStatus = false } = props
8
   const { data = {}, showStatus = false } = props
9
 
9
 
10
+  const handleChat = () => {
11
+    Taro.navigateTo({
12
+      url: `/pages/chat/chatDetail/index?friend=${data.id}`
13
+    })
14
+  }
15
+
10
   return (
16
   return (
11
     <view className='components StatCustomerListItem flex-h'>
17
     <view className='components StatCustomerListItem flex-h'>
12
       <view className='Icon' onClick={() => { Taro.navigateTo({ url: `/pages/mine/customerDetail/index?id=${data.customerId}&name=${data.name}&sex=${data.sex}&phone=${data.phone}&avatarurl=${data.avatarurl}&status=${data.status}` }) }}>
18
       <view className='Icon' onClick={() => { Taro.navigateTo({ url: `/pages/mine/customerDetail/index?id=${data.customerId}&name=${data.name}&sex=${data.sex}&phone=${data.phone}&avatarurl=${data.avatarurl}&status=${data.status}` }) }}>
19
         </view>
25
         </view>
20
         <text>{data.phone}</text>
26
         <text>{data.phone}</text>
21
       </view>
27
       </view>
22
-      <text className='iconfont icon-liaotian'></text>
28
+      <text className='iconfont icon-liaotian' onClick={handleChat}></text>
23
       <text className='iconfont icon-dianhua active' onClick={() => { Taro.makePhoneCall({ phoneNumber: data.phone }) }}></text>
29
       <text className='iconfont icon-dianhua active' onClick={() => { Taro.makePhoneCall({ phoneNumber: data.phone }) }}></text>
24
       {
30
       {
25
         showStatus &&
31
         showStatus &&

+ 1
- 1
src/subpackages/pages/consultant/myHomepage/index.jsx View File

105
           <view className='Card UserInfo'>
105
           <view className='Card UserInfo'>
106
             <view className='flex-h Top'>
106
             <view className='flex-h Top'>
107
               <view className='Icon'>
107
               <view className='Icon'>
108
-                <Image mode='aspectFill' src={getImgURL(UserInfo.avatarurl || UserInfo.avatar || UserInfo.picture)}></Image>
108
+                <Image mode='aspectFill' src={getImgURL(UserInfo.userPhoto || UserInfo.photo || UserInfo.avatarurl || UserInfo.avatar || UserInfo.picture)}></Image>
109
               </view>
109
               </view>
110
               <view className='flex-item'>
110
               <view className='flex-item'>
111
                 <view className='flex-h'>
111
                 <view className='flex-h'>