Selaa lähdekoodia

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

张延森 3 vuotta sitten
vanhempi
commit
c60167f194

+ 2
- 2
config/dev.js Näytä tiedosto

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 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 8
     // HOST: '"http://127.0.0.1:8567"',
9 9
     WSS_HOST: '"wss://xlk.njyz.tech"',
10 10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',

+ 2
- 2
project.config.json Näytä tiedosto

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

+ 3
- 3
src/components/ProjectListItem/index.jsx Näytä tiedosto

@@ -6,7 +6,7 @@ import { getImgURL } from '@/utils/image'
6 6
 import './index.scss'
7 7
 
8 8
 export default function ProjectListItem (props) {
9
-  const { Data = {} } = props
9
+  const { Data = {}, ShowImgIcon = true } = props
10 10
   const { uvList = [] } = Data
11 11
   return (
12 12
     <view className='components ProjectListItem flex-h' onClick={() => { Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${Data.buildingId || Data.targetId}` }) }}>
@@ -14,11 +14,11 @@ export default function ProjectListItem (props) {
14 14
         <view>
15 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 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 22
             <Image mode='heightFix' className='Tips Video' src={require('@/assets/index-icon19.png')} />
23 23
           }
24 24
         </view>

+ 3
- 3
src/pages/chat/chatDetail/index.jsx Näytä tiedosto

@@ -179,7 +179,7 @@ export default withLayout((props) => {
179 179
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
180 180
                                 <view className='Message Left Img'>
181 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 183
                                   </view>
184 184
                                 </view>
185 185
                               }
@@ -204,7 +204,7 @@ export default withLayout((props) => {
204 204
                                 item.messageType === im.MESSAGETYPE.IMAGE &&
205 205
                                 <view className='Message Right Img'>
206 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 208
                                   </view>
209 209
                                 </view>
210 210
                               }
@@ -233,7 +233,7 @@ export default withLayout((props) => {
233 233
       </view>
234 234
       <view className='SendContent flex-h'>
235 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 237
         </view>
238 238
         <text className='iconfont icon-tianjia' onClick={submitImage}></text>
239 239
         <Button loading={submitting} className='Send' onClick={submitText}>发送</Button>

+ 7
- 3
src/pages/chat/index.jsx Näytä tiedosto

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

+ 2
- 2
src/pages/index/buildingDetail/components/PropertyConsultant/index.jsx Näytä tiedosto

@@ -21,7 +21,7 @@ export default function PropertyConsultant (props) {
21 21
 
22 22
   const handleMore = () => {
23 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,7 +64,7 @@ export default function PropertyConsultant (props) {
64 64
           List.map((item, index) => (
65 65
             <view key={`PersonItem-${index}`} className='flex-h'>
66 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 68
               </view>
69 69
               <view className='flex-item' onClick={() => gotoDetail(item)}>
70 70
                 <text>{item.userName}</text>

+ 1
- 1
src/pages/index/buildingList/index.scss Näytä tiedosto

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

+ 24
- 3
src/pages/index/buildingPropertyConsultant/index.jsx Näytä tiedosto

@@ -12,6 +12,18 @@ export default withLayout((props) => {
12 12
   const { buldingId } = router.params
13 13
 
14 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 28
   const handleChat = (item) => {
17 29
     Taro.navigateTo({
@@ -55,13 +67,13 @@ export default withLayout((props) => {
55 67
         <text className='TopTips'>有任何买卖房屋的问题,欢迎随时咨询</text>
56 68
         <view className='List'>
57 69
           {
58
-            List.map((item, index) => (
70
+            PageList.map((item, index) => (
59 71
               <view key={`ListItem-${index}`}>
60 72
 
61 73
                 <view className='flex-h'>
62 74
 
63 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 77
                   </view>
66 78
 
67 79
                   <view className='flex-item' onClick={() => gotoDetail(item)}>
@@ -90,7 +102,16 @@ export default withLayout((props) => {
90 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 115
         </view>
95 116
       </ScrollView>
96 117
     </view>

+ 10
- 0
src/pages/index/buildingPropertyConsultant/index.scss Näytä tiedosto

@@ -95,6 +95,16 @@
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 108
       >.BottomTips {
99 109
         display: block;
100 110
         text-align: center;

+ 1
- 0
src/pages/index/findHouseFromMap/index.jsx Näytä tiedosto

@@ -121,6 +121,7 @@ export default withLayout((props) => {
121 121
           latitude={city?.lat}
122 122
           markers={markers}
123 123
           onMarkertap={handleMarker}
124
+          onCallouttap={handleMarker}
124 125
           onTap={() => setShowInfo(false)}
125 126
         />
126 127
       </view>

+ 1
- 1
src/pages/index/specialPriceHouse/index.jsx Näytä tiedosto

@@ -148,7 +148,7 @@ export default withLayout((props) => {
148 148
                               const unitW = unitPrice ? `${Number(unitPrice).toFixed(0)}元/㎡` : '单价待定'
149 149
                               const currentW = it.currentPrice ? `${Number(it.currentPrice / 10000).toFixed(1)}` : '待定'
150 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 152
                               const leftTime = formateLeftTime(new Date(it.endTime) - new Date(), 'min');
153 153
 
154 154
                               return (

+ 1
- 1
src/pages/mine/mortgageCalc/components/SYForm.jsx Näytä tiedosto

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

+ 1
- 1
src/pages/mine/myShare/index.jsx Näytä tiedosto

@@ -66,7 +66,7 @@ export default withLayout(() => {
66 66
           <view className='List'>
67 67
             {
68 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 72
           </view>

+ 7
- 1
src/subpackages/pages/consultant/components/StatCustomerListItem/index.jsx Näytä tiedosto

@@ -7,6 +7,12 @@ export default function StatCustomerListItem (props) {
7 7
 
8 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 16
   return (
11 17
     <view className='components StatCustomerListItem flex-h'>
12 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,7 +25,7 @@ export default function StatCustomerListItem (props) {
19 25
         </view>
20 26
         <text>{data.phone}</text>
21 27
       </view>
22
-      <text className='iconfont icon-liaotian'></text>
28
+      <text className='iconfont icon-liaotian' onClick={handleChat}></text>
23 29
       <text className='iconfont icon-dianhua active' onClick={() => { Taro.makePhoneCall({ phoneNumber: data.phone }) }}></text>
24 30
       {
25 31
         showStatus &&

+ 1
- 1
src/subpackages/pages/consultant/myHomepage/index.jsx Näytä tiedosto

@@ -105,7 +105,7 @@ export default withLayout((props) => {
105 105
           <view className='Card UserInfo'>
106 106
             <view className='flex-h Top'>
107 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 109
               </view>
110 110
               <view className='flex-item'>
111 111
                 <view className='flex-h'>