소스 검색

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into dev

张延森 5 년 전
부모
커밋
2444224e8b

+ 4
- 4
config/dev.js 파일 보기

@@ -5,14 +5,14 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    HOST: '"https://dev.pawoma.cn"',//测试
9
-    WSS_HOST: '"wss://dev.pawoma.cn"',
8
+    // HOST: '"https://dev.pawoma.cn"',//测试
9
+    // WSS_HOST: '"wss://dev.pawoma.cn"',
10 10
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
11 11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
12 12
     // HOST: '"https://lt.pawoma.cn"',
13 13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
14
-    // HOST: '"http://192.168.2.52:8080"',
15
-    // WSS_HOST: '"ws://192.168.2.52:8080"',
14
+    HOST: '"http://192.168.2.52:8080"',
15
+    WSS_HOST: '"ws://192.168.2.52:8080"',
16 16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17 17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18 18
     Version: 'V3.5.12'

+ 1
- 1
config/prod.js 파일 보기

@@ -11,7 +11,7 @@ module.exports = {
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13 13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
14
-    Version: 'V3.5.13'
14
+    Version: 'V3.5.12'
15 15
   },
16 16
   weapp: {},
17 17
   h5: {}

+ 7
- 1
src/onlineSelling/components/HouseCard/index.js 파일 보기

@@ -20,11 +20,13 @@ export default function HouseCard(props) {
20 20
     saleBatchStatus,
21 21
     houseId,
22 22
     createDate,
23
+    apartmentImgList = [],
23 24
     buildingImgList = [],
24 25
   } = props.summary || {}
25 26
 
26 27
   const title = `${buildingName || ''} ${termname || termName || ''} ${blockName || ''} ${unitName || ''} ${floorName || ''} ${roomName || ''}`
27 28
   const thumb = (buildingImgList || []).length
29
+  const thumb2 = (apartmentImgList || []).length
28 30
   const showDT = dayjs(createDate).format('YYYY/MM/DD')
29 31
   const wanY = Number(price)
30 32
 
@@ -45,9 +47,13 @@ export default function HouseCard(props) {
45 47
   return (
46 48
     <View className="housecard">
47 49
       <View className="head" onClick={toHouseDetail}>
48
-        {thumb ? <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" /> :
50
+        {thumb && <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" />
51
+        }
52
+        {!thumb && !thumb2 &&
49 53
           <Text style="font-size:26rpx;color:#666">暂无户型图</Text>
50 54
         }
55
+        {thumb2 && <Image className="thumb" src={transferImage((apartmentImgList)[0].url)} mode="aspectFit" />
56
+        }
51 57
       </View>
52 58
       <View className="body" onClick={toHouseDetail}>
53 59
         <View className="badge">已预选</View>

+ 0
- 46
src/onlineSelling/components/RaiseHouse/index.js 파일 보기

@@ -1,46 +0,0 @@
1
-import { View, Image, Text } from "@tarojs/components";
2
-import { transferImage } from '@/utils/tools'
3
-import dayjs from 'dayjs'
4
-
5
-import './index.scss'
6
-
7
-export default function RaiseHouse(props) {
8
-  const {
9
-    buildingName,
10
-    termname,
11
-    blockName,
12
-    unitName,
13
-    roomName,
14
-    price,
15
-    createDate,
16
-    buildingImgList = [],
17
-  } = props.summary || {}
18
-
19
-  const title = `${buildingName} ${termname||''} ${blockName} ${unitName} ${roomName}`
20
-  const thumb = (buildingImgList || []).length
21
-  const showDT = dayjs(createDate).format('YYYY/MM/DD')
22
-  const wanY = Number(price)
23
-
24
-  return (
25
-    <View className="raisehouse">
26
-      <View className="head">
27
-        {thumb ? <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" /> :
28
-          <Text style="font-size:26rpx;color:#666">暂无户型图</Text>
29
-        }
30
-      </View>
31
-      <View className="body">
32
-        <View className="apartment">A户型</View>
33
-        <View className="price">现价234万</View>
34
-        <View className="title">XX嘉苑 1号楼 2单元 3楼 303号</View>
35
-        <View className="subtitle">
36
-          <Text>建筑面积约</Text>
37
-          <Text className="red">{wanY + 'm²' || '待定'}</Text>
38
-        </View>
39
-        <View className="subtitle">
40
-          <Text>使用面积约</Text>
41
-          <Text className="red">{wanY + 'm²' || '待定'}</Text>
42
-        </View>
43
-      </View>
44
-    </View>
45
-  )
46
-}

+ 0
- 65
src/onlineSelling/components/RaiseHouse/index.scss 파일 보기

@@ -1,65 +0,0 @@
1
-.raisehouse {
2
-  width: 690px;
3
-  height: 250px;
4
-  background:#fff;
5
-  border-radius: 8px;
6
-  display: flex;
7
-  margin: 16px 30px;
8
-  box-shadow: 0 4px 15px 1px rgba(0, 0, 0, 0.12);
9
-  font-weight: 400;
10
-
11
-  .head {
12
-    width: 250px;
13
-    flex: none;
14
-    border-right: 2px solid rgba(0, 0, 0, 0.04);
15
-    padding: 20px;
16
-    display: flex;
17
-    align-items: center;
18
-    justify-content: center;
19
-
20
-    .thumb {
21
-      width: 100%;
22
-      height: 100%;
23
-    }
24
-  }
25
-
26
-  .body {
27
-    width: 438px;
28
-    flex: none;
29
-    position: relative;
30
-    line-height: 40px;
31
-    padding: 20px 16px;
32
-
33
-    .apartment {
34
-      font-size: 26px;
35
-      color: #FE1C1C;
36
-      font-weight: 700;
37
-    }
38
-
39
-    .price {
40
-      font-size: 24px;
41
-      font-weight: 700;
42
-      color: #FE1C1C;
43
-      line-height: 1.8;
44
-    }
45
-    .title {
46
-      font-size: 26px;
47
-      font-weight: bold;
48
-      color: #333;
49
-      line-height: 1.8;
50
-    }
51
-
52
-    .subtitle {
53
-      font-size: 28px;
54
-      color:#333;
55
-      line-height: 1.6;
56
-
57
-    }
58
-  }
59
-
60
-  .red {
61
-    color: #FF3C3C;
62
-    margin: 0 6px;
63
-  }
64
-
65
-}

+ 12
- 2
src/onlineSelling/pages/addHouse/index.js 파일 보기

@@ -41,7 +41,12 @@ export default class extends Component {
41 41
   handleCheckboxChange = (e) => {
42 42
     const { house } = this.props
43 43
     const houseIdList = e.detail.value.map(x => x - 0)
44
-    const chooseList = (house.mySelectHouses || []).filter(x => houseIdList.indexOf(x.houseId) > -1).map(x => x.housingInfo)
44
+    const chooseList = (house.mySelectHouses || []).filter(x => houseIdList.indexOf(x.houseId) > -1).map(x => ({
45
+      ...x.housingInfo,
46
+      buildingImgList: x.buildingImgList,
47
+      displayHousePrice:x.displayHousePrice,
48
+      displayHousePrice: x.displayHousePrice
49
+    }))
45 50
 
46 51
     this.setState({ chooseList })
47 52
   }
@@ -82,7 +87,12 @@ export default class extends Component {
82 87
     const { house } = this.props
83 88
 
84 89
     // 从预选记录中过滤出来, 状态正常且未锁定的房源
85
-    const houseList = (house.mySelectHouses || []).map(x => x.housingInfo).filter(x => x.status == 1)
90
+    const houseList = (house.mySelectHouses || []).map(x => ({
91
+      ...x.housingInfo,
92
+      buildingImgList: x.buildingImgList,
93
+      displayHousePrice:x.displayHousePrice,
94
+      displayHousePrice: x.displayHousePrice
95
+    })).filter(x => x.status == 1)
86 96
 
87 97
     return houseList.length && (
88 98
       <Block>

+ 12
- 3
src/onlineSelling/pages/records/index.js 파일 보기

@@ -53,6 +53,7 @@ export default class Records extends Component {
53 53
     customerLocked: '',
54 54
 
55 55
     chooseList: [], // 选中的房源ID列表
56
+    clickDisable: true,
56 57
   }
57 58
   componentDidShow() {
58 59
     ready.queue(() => {
@@ -202,9 +203,13 @@ export default class Records extends Component {
202 203
     )
203 204
   }
204 205
   toRaiseProfile(id) {
206
+    this.setState({
207
+      clickDisable: false
208
+    })
209
+
205 210
     const { userInfo: { miniApp: { tpls } } } = this.props
206 211
     const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
207
-
212
+    const that = this
208 213
     wx.requestSubscribeMessage({
209 214
       tmplIds: [tplId],
210 215
       success(res) {
@@ -213,14 +218,18 @@ export default class Records extends Component {
213 218
 
214 219
       },
215 220
       complete() {
221
+        that.setState({
222
+          clickDisable: true
223
+        })
216 224
         Taro.navigateTo({
217 225
           url: `/onlineSelling/pages/raiseProfile/index?id=${id}`
218 226
         })
219 227
       }
220 228
     })
229
+
221 230
   }
222 231
   renderRaise() {
223
-    const { raiseList, noRaiseRecord } = this.state
232
+    const { raiseList, noRaiseRecord, clickDisable } = this.state
224 233
     return (
225 234
       <Block>
226 235
         <ScrollView scrollY className="container">
@@ -230,7 +239,7 @@ export default class Records extends Component {
230 239
                 {
231 240
                   raiseList.map(item => (
232 241
                     <View key={item.raiseRecordId} >
233
-                      <RaiseCard handleCard={() => this.toRaiseProfile(item.raiseRecordId)} summary={item} statusType="raise" />
242
+                      <RaiseCard handleCard={clickDisable ? () => this.toRaiseProfile(item.raiseRecordId) : ''} summary={item} statusType="raise" />
234 243
                     </View>
235 244
                   )
236 245
                   )