Browse Source

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

张延森 5 years ago
parent
commit
2444224e8b

+ 4
- 4
config/dev.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
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
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
10
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
12
     // HOST: '"https://lt.pawoma.cn"',
12
     // HOST: '"https://lt.pawoma.cn"',
13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
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
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18
     Version: 'V3.5.12'
18
     Version: 'V3.5.12'

+ 1
- 1
config/prod.js View File

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

+ 7
- 1
src/onlineSelling/components/HouseCard/index.js View File

20
     saleBatchStatus,
20
     saleBatchStatus,
21
     houseId,
21
     houseId,
22
     createDate,
22
     createDate,
23
+    apartmentImgList = [],
23
     buildingImgList = [],
24
     buildingImgList = [],
24
   } = props.summary || {}
25
   } = props.summary || {}
25
 
26
 
26
   const title = `${buildingName || ''} ${termname || termName || ''} ${blockName || ''} ${unitName || ''} ${floorName || ''} ${roomName || ''}`
27
   const title = `${buildingName || ''} ${termname || termName || ''} ${blockName || ''} ${unitName || ''} ${floorName || ''} ${roomName || ''}`
27
   const thumb = (buildingImgList || []).length
28
   const thumb = (buildingImgList || []).length
29
+  const thumb2 = (apartmentImgList || []).length
28
   const showDT = dayjs(createDate).format('YYYY/MM/DD')
30
   const showDT = dayjs(createDate).format('YYYY/MM/DD')
29
   const wanY = Number(price)
31
   const wanY = Number(price)
30
 
32
 
45
   return (
47
   return (
46
     <View className="housecard">
48
     <View className="housecard">
47
       <View className="head" onClick={toHouseDetail}>
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
           <Text style="font-size:26rpx;color:#666">暂无户型图</Text>
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
       </View>
57
       </View>
52
       <View className="body" onClick={toHouseDetail}>
58
       <View className="body" onClick={toHouseDetail}>
53
         <View className="badge">已预选</View>
59
         <View className="badge">已预选</View>

+ 0
- 46
src/onlineSelling/components/RaiseHouse/index.js View File

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 View File

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 View File

41
   handleCheckboxChange = (e) => {
41
   handleCheckboxChange = (e) => {
42
     const { house } = this.props
42
     const { house } = this.props
43
     const houseIdList = e.detail.value.map(x => x - 0)
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
     this.setState({ chooseList })
51
     this.setState({ chooseList })
47
   }
52
   }
82
     const { house } = this.props
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
     return houseList.length && (
97
     return houseList.length && (
88
       <Block>
98
       <Block>

+ 12
- 3
src/onlineSelling/pages/records/index.js View File

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