Selaa lähdekoodia

Merge branch 'v3.5.1' into dev

# Conflicts:
#	src/pages/person/customerAnalysis/index.js
#	src/pages/project/index.js
许静 5 vuotta sitten
vanhempi
commit
9d24dcaefe
46 muutettua tiedostoa jossa 443 lisäystä ja 183 poistoa
  1. 2
    2
      config/dev.js
  2. 3
    2
      src/app.js
  3. 105
    0
      src/components/TimeTicker/index.jsx
  4. 4
    1
      src/components/achieveAvatar/index.js
  5. 35
    0
      src/components/amap/PoiAround.js
  6. 2
    1
      src/pages/activity/assembleItem/index.js
  7. 3
    1
      src/pages/activity/assistanceItem/index.js
  8. 11
    10
      src/pages/activity/detail/assemble.js
  9. 11
    9
      src/pages/activity/detail/assistance.js
  10. 2
    2
      src/pages/activity/detail/index.js
  11. 2
    2
      src/pages/activity/item/index.js
  12. 4
    4
      src/pages/agent/recommend/index.js
  13. 35
    32
      src/pages/card/index.js
  14. 8
    8
      src/pages/card/poster.js
  15. 2
    2
      src/pages/checkin/checkinsuccess/index.js
  16. 61
    19
      src/pages/checkin/index.js
  17. 6
    6
      src/pages/im/index.js
  18. 2
    2
      src/pages/news/detail/index.js
  19. 2
    2
      src/pages/news/item.js
  20. 1
    1
      src/pages/news/item.scss
  21. 3
    1
      src/pages/person/customerAnalysis/followUpCustomer/index.js
  22. 4
    4
      src/pages/person/customerAnalysis/index.js
  23. 2
    2
      src/pages/person/customerAnalysis/item/index.js
  24. 3
    3
      src/pages/person/customerAnalysis/myCustomer.js
  25. 3
    1
      src/pages/person/customerAnalysis/transactionCustomer/index.js
  26. 2
    1
      src/pages/person/favorite/index.js
  27. 2
    2
      src/pages/person/index.js
  28. 3
    2
      src/pages/person/profile/detail/index.js
  29. 2
    1
      src/pages/person/profile/index.js
  30. 2
    1
      src/pages/policy/detail/index.js
  31. 2
    1
      src/pages/policy/item/index.js
  32. 2
    2
      src/pages/project/album/index.js
  33. 1
    1
      src/pages/project/banner/index.js
  34. 17
    17
      src/pages/project/detail/index.js
  35. 52
    15
      src/pages/project/detail/poster.js
  36. 4
    1
      src/pages/project/detail/poster.scss
  37. 3
    3
      src/pages/project/floor/index.js
  38. 3
    3
      src/pages/project/index.js
  39. 4
    4
      src/pages/project/item/index.js
  40. 2
    1
      src/pages/project/map/index.js
  41. 2
    2
      src/pages/project/swiper/index.js
  42. 2
    2
      src/pages/shop/banner/index.js
  43. 2
    2
      src/pages/shop/detail/index.js
  44. 4
    4
      src/pages/shop/index.js
  45. 2
    1
      src/pages/shop/record/index.js
  46. 14
    0
      src/utils/tools.js

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

@@ -9,8 +9,8 @@ module.exports = {
9 9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    // HOST: '"http://192.168.0.238:8080"',
13
-    // WSS_HOST: '"ws://192.168.0.238:8080"',
12
+    // HOST: '"http://192.168.0.84:8080"',
13
+    // WSS_HOST: '"ws://192.168.0.84:8080"',
14 14
   },
15 15
   weapp: {},
16 16
   h5: {}

+ 3
- 2
src/app.js Näytä tiedosto

@@ -102,7 +102,7 @@ class App extends Component {
102 102
 
103 103
       'pages/checkin/index',
104 104
       'pages/checkin/checkinsuccess/index',
105
-      // 'pages/checkin/unregistered/index',
105
+     
106 106
 
107 107
     ],
108 108
     window: {
@@ -225,7 +225,7 @@ class App extends Component {
225 225
     return new Promise(resolve => {
226 226
       const router = this.$router.params
227 227
       let { query: { scene: paramsId } } = router
228
-
228
+console.log(paramsId,'paramsId---')
229 229
       if (paramsId) {
230 230
         // 扫码进入
231 231
         getCodeScene(paramsId).then(res => {
@@ -255,6 +255,7 @@ class App extends Component {
255 255
 
256 256
         resolve(router)
257 257
       }
258
+      
258 259
     })
259 260
   }
260 261
   // 在 App 类中的 render() 函数没有实际作用

+ 105
- 0
src/components/TimeTicker/index.jsx Näytä tiedosto

@@ -0,0 +1,105 @@
1
+import Taro from '@tarojs/taro'
2
+import dayjs from 'dayjs'
3
+
4
+// 未开始
5
+const STATUS_READY = -1
6
+
7
+// 进行中
8
+const STATUS_PROCESSING = 0
9
+
10
+// 已结束
11
+const STATUS_OVER = 1
12
+
13
+export default class TimeTicker extends Taro.Component {
14
+
15
+  state = {
16
+    status: STATUS_READY,
17
+    tmStart: undefined,
18
+    tmEnd: undefined,
19
+    preText: undefined,
20
+    tkText: undefined,
21
+  }
22
+
23
+  timer = null
24
+
25
+  componentWillMount() {
26
+
27
+
28
+  }
29
+
30
+  computeProps(props) {
31
+    const { timeRange } = props || {}
32
+    const now = dayjs().valueOf()
33
+    const [t1, t2] = timeRange || []
34
+    
35
+    // 当前状态 -  默认未开始
36
+    let status = this.state.status
37
+    let tmStart = undefined
38
+    let tmEnd = undefined
39
+
40
+    // 没有设置起止时间
41
+    if (!t1 && !t2) {
42
+      throw new Error('TimeTicker has no timeRange setting')
43
+    }
44
+
45
+    if (!t1 || !t2) {
46
+      // 只设置了一个时间
47
+      targetTime = t1 ? dayjs(t1).valueOf() : dayjs(t2).valueOf()
48
+
49
+      if (now > targetTime) {
50
+        status = STATUS_OVER
51
+      } else if (now === targetTime) {
52
+        status = STATUS_PROCESSING
53
+      } else {
54
+        status = STATUS_READY
55
+      }
56
+    } else {
57
+      // 设置了时间区间
58
+      const dtStart = dayjs(t1).valueOf()
59
+      const dtEnd = dayjs(t2).valueOf()
60
+
61
+      if (dtStart > now) {
62
+        status = STATUS_READY
63
+        targetTime = dtStart
64
+      } else if (dtStart <= now && now < dtEnd) {
65
+        status = STATUS_PROCESSING
66
+        targetTime = dtEnd
67
+      } else {
68
+        status = STATUS_OVER
69
+        targetTime = dtEnd
70
+      }
71
+    }
72
+
73
+    this.setState({ status, targetTime }, this.startTimer.bind(this))
74
+  }
75
+
76
+  startTimer = (props) => {
77
+    const {
78
+      status,
79
+      targetTime,
80
+      interval = 1000,
81
+      onStart,
82
+      onProcess,
83
+      onEnd,
84
+    } = props || {}
85
+
86
+    if (this.timer) {
87
+      clearInterval(this.timer)
88
+    }
89
+
90
+    this.timer = setInterval(() => {
91
+      const now = dayjs().valueOf()
92
+      const diff = targetTime - now
93
+
94
+
95
+
96
+    }, interval)
97
+
98
+  }
99
+
100
+  render() {
101
+    
102
+
103
+
104
+  }
105
+}

+ 4
- 1
src/components/achieveAvatar/index.js Näytä tiedosto

@@ -38,7 +38,9 @@ export default class Index extends Component {
38 38
           this.props.onSuccess();
39 39
         })
40 40
       },
41
-      fail: () => {
41
+      fail: (err) => {
42
+        console.error(err)
43
+
42 44
         Taro.showToast({
43 45
           title: '获取用户信息失败',
44 46
           icon: 'none'
@@ -82,6 +84,7 @@ export default class Index extends Component {
82 84
   }
83 85
   render() {
84 86
     const { user = {} } = this.props
87
+    console.log('---------renderMaskBanner--------')
85 88
 
86 89
     return (
87 90
       <Block>

+ 35
- 0
src/components/amap/PoiAround.js Näytä tiedosto

@@ -2,9 +2,32 @@ import Taro, { Component } from '@tarojs/taro'
2 2
 import { Map } from '@tarojs/components'
3 3
 import icons from './icons'
4 4
 
5
+const centerIcon = require('@assets/dingwei.png')
6
+const centerProject = 'project-999'
7
+
8
+function ObjEqual (a = {}, b = {}) { return JSON.stringify(a) === JSON.stringify(b) }
9
+
5 10
 export default class PoiAround extends Component {
11
+  map = null;
12
+
13
+  componentDidMount () {
14
+    this.map = wx.createMapContext('poi-around', this)
15
+  }
16
+
17
+  componentWillReceiveProps (nextProps) {
18
+    if (this.map) {
19
+      if (!ObjEqual(nextProps.markers, this.props.markers)) {
20
+        this.map.moveToLocation({
21
+          latitude: nextProps.latitude,
22
+          longitude: nextProps.longitude,
23
+        })
24
+      }
25
+    }
26
+  }
6 27
 
7 28
   handleTap = (e) => {
29
+    if (e.markerId === centerProject) return;
30
+
8 31
     const marker = this.props.markers.filter(x => x.id === e.markerId)[0]
9 32
     this.props.onMarkerClick && this.props.onMarkerClick(marker)
10 33
   }
@@ -24,9 +47,21 @@ export default class PoiAround extends Component {
24 47
       }
25 48
     })
26 49
 
50
+    // 最后放项目位置
51
+    markers.push({
52
+      id: centerProject,
53
+      latitude: this.props.latitude,
54
+      longitude: this.props.longitude,
55
+      iconPath: centerIcon,
56
+      width: 20,
57
+      height: 20,
58
+    })
59
+
27 60
     return this.props.longitude && (
28 61
       <Map
62
+        id="poi-around"
29 63
         showLocation
64
+        show-location={true}
30 65
         scale={12}
31 66
         markers={markers}
32 67
         longitude={this.props.longitude}

+ 2
- 1
src/pages/activity/assembleItem/index.js Näytä tiedosto

@@ -1,6 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3 3
 import dayjs from 'dayjs'
4
+import { transferImage } from '@utils/tools'
4 5
 
5 6
 const groupSuccess = require('@assets/helpgroup/group/already.png')
6 7
 const groupFail = require('@assets/helpgroup/fail.png')
@@ -70,7 +71,7 @@ export default class Item extends Component {
70 71
     const { data, style } = this.props
71 72
     return (
72 73
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
73
-        <Image className="pic" mode="aspectFill" src={data.mainImg} ></Image>
74
+        <Image className="pic" mode="aspectFill" src={transferImage(data.mainImg)} ></Image>
74 75
         <View className="title">{data.activityName}</View>
75 76
         {(!data.verificationCode && data.status == 1) &&
76 77
           <View className="time">参与截止时间: 

+ 3
- 1
src/pages/activity/assistanceItem/index.js Näytä tiedosto

@@ -1,6 +1,8 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3 3
 import dayjs from 'dayjs'
4
+import { transferImage } from '@utils/tools'
5
+
4 6
 const helpSuccess = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/help/success1.png'
5 7
 const helpFail = require('@assets/helpgroup/fail.png')
6 8
 
@@ -69,7 +71,7 @@ export default class Item extends Component {
69 71
     const { data, style } = this.props
70 72
     return (
71 73
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
72
-        <Image className="pic" mode="aspectFill" src={data.img} ></Image>
74
+        <Image className="pic" mode="aspectFill" src={transferImage(data.img)} ></Image>
73 75
         <View className="title">{data.title}</View>
74 76
         {(!data.verification && data.status == 1) &&
75 77
           <View className="time">参与截止时间:

+ 11
- 10
src/pages/activity/detail/assemble.js Näytä tiedosto

@@ -10,7 +10,7 @@ import dayjs from 'dayjs'
10 10
 // import WxParse from '@components/wxParse/wxParse'
11 11
 // import getUserPhone from '@utils/getUserPhone'
12 12
 import ready from '@utils/ready'
13
-import { getDownloadURL, times, formateLeftTime, getCanvasConfig, getThumbnail } from '@utils/tools'
13
+import { getDownloadURL, times, formateLeftTime, getCanvasConfig, transferImage } from '@utils/tools'
14 14
 import {
15 15
   getGroupDetail,
16 16
   createGroupActivity,
@@ -73,10 +73,9 @@ export default class Detail extends Component {
73 73
     ready.queue(() => {
74 74
       // 必须授权电话
75 75
       if (this.toggleGrantPhone()) {
76
-        if (this.toggleGrantAvatar()) {
77
-          this.initPageData()
78
-        }
76
+        this.toggleGrantAvatar()
79 77
       }
78
+      this.initPageData()
80 79
     })
81 80
   }
82 81
 
@@ -142,10 +141,12 @@ export default class Detail extends Component {
142 141
   // 调起授权头像
143 142
   toggleGrantAvatar = () => {
144 143
     const { userInfo: { person: { avatarurl } } } = this.props
145
-    if (!avatarurl) {
144
+
145
+    if (!avatarurl || avatarurl.indexOf('wx.qlogo.cn') === -1) {
146 146
       this.setState({ grantAvatarVisible: true })
147 147
       return false
148 148
     }
149
+
149 150
     console.log(avatarurl,"avatarurl")
150 151
     console.log(this.props.userInfo,"this.props")
151 152
     return true
@@ -534,7 +535,7 @@ export default class Detail extends Component {
534 535
         }
535 536
         {
536 537
           grantAvatarVisible &&
537
-          <AchieveAvatar user={userInfo.person} onSuccess={this.initPageData} ></AchieveAvatar>
538
+          <AchieveAvatar user={userInfo.person} onSuccess={() => { this.setState({ grantAvatarVisible: false }) }} ></AchieveAvatar>
538 539
         }
539 540
         <BackHomeBtn></BackHomeBtn>
540 541
         {
@@ -542,7 +543,7 @@ export default class Detail extends Component {
542 543
             <View className="ass-page">
543 544
               <Notice></Notice>
544 545
               <View className="detail-banner">
545
-                <Image mode="widthFix" src={getThumbnail(detail.mainImg)} className="detail-banner__img"></Image>
546
+                <Image mode="widthFix" src={transferImage(detail.mainImg)} className="detail-banner__img"></Image>
546 547
 
547 548
                 <View className="rest-time">
548 549
                   <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '')} </Text>
@@ -569,7 +570,7 @@ export default class Detail extends Component {
569 570
                     groupState === GroupSuccess &&
570 571
                     (
571 572
                       <Block>
572
-                        <Image className="status__img" style="margin:12rpx auto 24rpx auto" src={getThumbnail(successImg)}></Image>
573
+                        <Image className="status__img" style="margin:12rpx auto 24rpx auto" src={transferImage(successImg)}></Image>
573 574
                         {
574 575
                           verificationCode && <View className="hexiaoma" style="margin:0 auto 40rpx auto">核销码: {verificationCode}</View>
575 576
                         }
@@ -581,7 +582,7 @@ export default class Detail extends Component {
581 582
                     groupState === GroupFailure &&
582 583
                     (
583 584
                       <View>
584
-                        <Image className="status__img" style="margin:12rpx auto 24rpx auto" src={getThumbnail(failImg)}></Image>
585
+                        <Image className="status__img" style="margin:12rpx auto 24rpx auto" src={transferImage(failImg)}></Image>
585 586
                         <View className="fail-text" style="margin:0 auto 40rpx auto">活动已超时,拼团失败!</View>
586 587
                       </View>
587 588
                     )
@@ -627,7 +628,7 @@ export default class Detail extends Component {
627 628
 
628 629
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
629 630
                 <View style="padding:0 40rpx 180rpx 40rpx">
630
-                  <Image src={getThumbnail(detail.descImg)} mode="widthFix" style="width:100%;"></Image>
631
+                  <Image src={transferImage(detail.descImg)} mode="widthFix" style="width:100%;"></Image>
631 632
                 </View>
632 633
                 {(actState === ActBeforeStart || (isStarter && actState === ActInProcess && groupState === GroupInProcess) || (!isStarter && actState === ActInProcess && groupState != GroupInProcess) || (!isStarter && actState === ActInProcess && groupState === GroupInProcess)) &&
633 634
                   <View className="btn-fixed">

+ 11
- 9
src/pages/activity/detail/assistance.js Näytä tiedosto

@@ -10,7 +10,7 @@ import dayjs from 'dayjs'
10 10
 // import WxParse from '@components/wxParse/wxParse'
11 11
 // import getUserPhone from '@utils/getUserPhone'
12 12
 import ready from '@utils/ready'
13
-import { getDownloadURL, times, formateLeftTime, getCanvasConfig, getThumbnail } from '@utils/tools'
13
+import { getDownloadURL, times, formateLeftTime, getCanvasConfig, transferImage } from '@utils/tools'
14 14
 import {
15 15
   getHelpDetail,
16 16
   createHelpActivity,
@@ -72,10 +72,10 @@ export default class Detail extends Component {
72 72
     ready.queue(() => {
73 73
       // 必须授权电话
74 74
       if (this.toggleGrantPhone()) {
75
-        if (this.toggleGrantAvatar()) {
76
-          this.initPageData()
77
-        }
75
+        this.toggleGrantAvatar()
78 76
       }
77
+      
78
+      this.initPageData()
79 79
     })
80 80
   }
81 81
 
@@ -127,6 +127,7 @@ export default class Detail extends Component {
127 127
   // 调起授权电话
128 128
   toggleGrantPhone = () => {
129 129
     const { userInfo: { person: { phone, tel } } } = this.props
130
+    
130 131
     if (!phone && !tel) {
131 132
       this.setState({ grantPhoneVisible: true })
132 133
       return false
@@ -140,12 +141,13 @@ export default class Detail extends Component {
140 141
   // 调起授权头像
141 142
   toggleGrantAvatar = () => {
142 143
     const { userInfo: { person: { avatarurl } } } = this.props
143
-    if (!avatarurl) {
144
+
145
+    if (!avatarurl || avatarurl.indexOf('wx.qlogo.cn') === -1) {
146
+      console.log(this.props.userInfo,"this.props")
144 147
       this.setState({ grantAvatarVisible: true })
145 148
       return false
146 149
     }
147 150
     console.log(avatarurl,"avatarurl")
148
-    console.log(this.props.userInfo,"this.props")
149 151
     return true
150 152
   }
151 153
 
@@ -518,7 +520,7 @@ export default class Detail extends Component {
518 520
         }
519 521
         {
520 522
           grantAvatarVisible &&
521
-          <AchieveAvatar user={userInfo.person} onSuccess={this.initPageData} ></AchieveAvatar>
523
+          <AchieveAvatar user={userInfo.person} onSuccess={() => { this.setState({ grantAvatarVisible: false }) }} ></AchieveAvatar>
522 524
         }
523 525
         <BackHomeBtn></BackHomeBtn>
524 526
         {
@@ -526,7 +528,7 @@ export default class Detail extends Component {
526 528
             <View className="ass-page">
527 529
               <Notice></Notice>
528 530
               <View className="detail-banner">
529
-                <Image mode="aspectFill" src={getThumbnail(detail.img)} className="detail-banner__img"></Image>
531
+                <Image mode="aspectFill" src={transferImage(detail.img)} className="detail-banner__img"></Image>
530 532
 
531 533
                 <View className="rest-time">
532 534
                   <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '')} </Text>
@@ -627,7 +629,7 @@ export default class Detail extends Component {
627 629
                 </View>
628 630
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
629 631
                 <View style="padding:0 40rpx">
630
-                  <Image src={getThumbnail(detail.activityInstructions)} mode="widthFix" style="width:100%;margin-bottom:20px;"></Image>
632
+                  <Image src={transferImage(detail.activityInstructions)} mode="widthFix" style="width:100%;margin-bottom:20px;"></Image>
631 633
                 </View>
632 634
 
633 635
               </ScrollView>

+ 2
- 2
src/pages/activity/detail/index.js Näytä tiedosto

@@ -7,7 +7,7 @@ import dayjs from 'dayjs'
7 7
 import WxParse from '@components/wxParse/wxParse'
8 8
 import getUserPhone from '@utils/getUserPhone'
9 9
 import ready from '@utils/ready'
10
-import { getDownloadURL, times, getThumbnail } from '@utils/tools'
10
+import { getDownloadURL, times, transferImage } from '@utils/tools'
11 11
 import {
12 12
   addActivityShareNum,
13 13
   signupActivity,
@@ -324,7 +324,7 @@ export default class Detail extends Component {
324 324
             <View>
325 325
               <Notice></Notice>
326 326
               <View className="detail-banner">
327
-                <Image mode="aspectFill" src={getThumbnail(detail.imgUrl)} className="detail-banner__img"></Image>
327
+                <Image mode="aspectFill" src={transferImage(detail.imgUrl)} className="detail-banner__img"></Image>
328 328
               </View>
329 329
               <ScrollView
330 330
                 scrollY

+ 2
- 2
src/pages/activity/item/index.js Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3 3
 import dayjs from 'dayjs'
4
-import { getThumbnail } from '@utils/tools'
4
+import { transferImage } from '@utils/tools'
5 5
 
6 6
 export default class Item extends Component {
7 7
   static defaultProps = {
@@ -17,7 +17,7 @@ export default class Item extends Component {
17 17
     return (
18 18
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
19 19
         {console.log(data,'----data-----')}
20
-         <Image className="pic" mode="aspectFill" src={getThumbnail(data.mainImg ||data.listImgUrl|| data.imgUrl)}></Image>
20
+         <Image className="pic" mode="aspectFill" src={transferImage(data.mainImg ||data.listImgUrl|| data.imgUrl)}></Image>
21 21
         <View className="box">
22 22
           <View className="title">{data.title}</View>
23 23
           {

+ 4
- 4
src/pages/agent/recommend/index.js Näytä tiedosto

@@ -66,12 +66,12 @@ export default class Index extends Component {
66 66
     const { type } = this.$router.params
67 67
 
68 68
     this.setState({
69
-      reType: type,
69
+      reType: type || "",
70 70
 
71 71
     }, () => {
72 72
       console.log(this.state.sex, "sex")
73 73
       console.log('buildingName' + this.props.proList.records[0].buildingName)
74
-      if (this.state.reType != 'index') {
74
+      if (this.state.reType == 'projectDeatil') {
75 75
         this.setState({
76 76
           intention: this.props.projectDetail.buildingName ? this.props.projectDetail.buildingName : this.props.proList.records[0].buildingName,
77 77
           floor: this.props.projectDetail.buildingId ? this.props.projectDetail.buildingId : this.props.proList.records[0].buildingId
@@ -422,7 +422,7 @@ export default class Index extends Component {
422 422
 
423 423
   renderDetail() {
424 424
     const { reType, name, phone, floorArray, floorID, floorColor, intention, adviserArray, adviserID, adviserColor, remarks, radioList } = this.state
425
- 
425
+
426 426
     return (
427 427
       <View className='recommend__customers'>
428 428
         <View className='submit__infor ani'>
@@ -451,7 +451,7 @@ export default class Index extends Component {
451 451
           <View className='info info__4'>
452 452
             <Text className='customers__txt'>意向楼盘</Text>
453 453
             {
454
-              reType == 'index' ? (<Picker className='input customers__name' onChange={this.bindFloorChange} value={floorID} range={floorArray} range-key="buildingName">
454
+              reType != 'projectDeatil' ? (<Picker className='input customers__name' onChange={this.bindFloorChange} value={floorID} range={floorArray} range-key="buildingName">
455 455
                 <View class="picker overtext" style={floorColor}>
456 456
                   {floorArray[floorID].buildingName}
457 457
                 </View>

+ 35
- 32
src/pages/card/index.js Näytä tiedosto

@@ -1,15 +1,13 @@
1 1
 import Taro, { Component } from '@tarojs/taro'
2 2
 import './index.scss'
3
-
4 3
 import Notice from '@components/Notice'
5 4
 import Poster from './poster'
6 5
 import ProjectItem from '../project/item'
7 6
 import BackHomeBtn from '@components/BackHomeBtn'
8 7
 import getUserPhone from '@utils/getUserPhone'
9
-import AchievePhone from '@components/achievePhone'
10 8
 import ready from '@utils/ready'
9
+import AchievePhone from '@components/achievePhone'
11 10
 import { sceneInShare } from '@utils/tools'
12
-
13 11
 import { ROLE_CODE } from '@constants/user'
14 12
 import { addCardUv, addCardShareNum, favorCard, cancelFavorCard } from '@services/card'
15 13
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
@@ -44,7 +42,8 @@ export default class Index extends Component {
44 42
 
45 43
   componentWillMount() {
46 44
     ready.queue(() => {
47
-
45
+      // const router = Taro.getStorageSync('router')
46
+      // const id = this.$router.params.id || router.query.id || '4604a792d575eb8187711625bd88832c'
48 47
       // 分享场景需要先授权手机, 再授权头像
49 48
       const options = wx.getLaunchOptionsSync()
50 49
       if (sceneInShare(options.scene)) {
@@ -54,6 +53,7 @@ export default class Index extends Component {
54 53
           return
55 54
         }
56 55
 
56
+
57 57
         this.setState({
58 58
           grantPhoneVisible: true,
59 59
         })
@@ -62,7 +62,6 @@ export default class Index extends Component {
62 62
       this.initPageData()
63 63
     })
64 64
   }
65
-
66 65
   initPageData() {
67 66
     const router = Taro.getStorageSync('router')
68 67
     const id = this.$router.params.id || router.query.id
@@ -87,6 +86,7 @@ export default class Index extends Component {
87 86
     this.handleModalConfirm(tel || phone)
88 87
   }
89 88
 
89
+
90 90
   componentWillUnmount() {
91 91
     const { recordId } = this.state
92 92
     recordId && updatePoint(recordId)
@@ -118,6 +118,7 @@ export default class Index extends Component {
118 118
           recordId: res1.recordId
119 119
         })
120 120
         console.log('个人主页')
121
+        console.log(this.props, "this.props-=====!!")
121 122
       })
122 123
     })
123 124
   }
@@ -142,12 +143,16 @@ export default class Index extends Component {
142 143
   }
143 144
 
144 145
   getLocation = () => {
145
-    const { cardInfo: { address, company } } = this.props
146
+    const { cardInfo: { address, company,coordinate } } = this.props
147
+    const coord = coordinate.split(',')
148
+    const latitude = parseFloat(coord[0])
149
+    const longitude = parseFloat(coord[1])
150
+    
146 151
     Taro.getLocation({ //返回可以用于Taro.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息  
147 152
       success: function (res) {
148 153
         Taro.openLocation({
149
-          latitude: 31.979190,
150
-          longitude: 118.733660,
154
+          latitude,
155
+          longitude,
151 156
           name: company,
152 157
           address
153 158
         })
@@ -354,12 +359,11 @@ export default class Index extends Component {
354 359
       cardInfo: { id, projects = [] },
355 360
       userInfo: { person: { phone, tel, personType, avatarurl } }
356 361
     } = this.props
357
-
358 362
     if (personType === ROLE_CODE['CONSULTANT']) {
359 363
       return
360 364
     }
361
-
362 365
     const buildingId = projects[0]
366
+
363 367
     const realPhone = phoneNumber || phone || tel
364 368
 
365 369
     // TODO:
@@ -370,25 +374,26 @@ export default class Index extends Component {
370 374
         buildingId,
371 375
         phone: realPhone
372 376
       }
377
+      const { cardInfo, userInfo: { person } } = this.props
378
+      if (person.personId != cardInfo.id) {
379
+        reportClient(payload).then(res => {
380
+          this.hideModal()
381
+          this.setState({ bound: true })
382
+          if (res !== 'bound') {
383
+            Taro.showToast({
384
+              title: '恭喜您绑定成功'
385
+            })
386
+          }
387
+        }).catch(err => {
388
+          console.error(err)
389
+          this.setState({ bound: true })
373 390
 
374
-      reportClient(payload).then(res => {
375
-        this.hideModal()
376
-        this.setState({ bound: true })
377
-
378
-        if (res !== 'bound') {
379 391
           Taro.showToast({
380
-            title: '恭喜您绑定成功'
392
+            title: err.message || err,
393
+            icon: 'none'
381 394
           })
382
-        }
383
-      }).catch(err => {
384
-        console.error(err)
385
-        this.setState({ bound: true })
386
-
387
-        Taro.showToast({
388
-          title: err.message || err,
389
-          icon: 'none'
390 395
         })
391
-      })
396
+      }
392 397
 
393 398
     }
394 399
   }
@@ -439,7 +444,6 @@ export default class Index extends Component {
439 444
       modalStatus: false
440 445
     })
441 446
   }
442
-  
443 447
   handleAuthPhoneSuccess = (phone) => {
444 448
     const { person = {} } = this.props.userInfo || {}
445 449
     if ((person.avatarurl || '').indexOf('wx.qlogo.cn') === -1) {
@@ -453,18 +457,17 @@ export default class Index extends Component {
453 457
   }
454 458
 
455 459
   handeAuthPhoneFail = () => {
456
-    Taro.showToast({ 
460
+    Taro.showToast({
457 461
       title: '未授权手机号无法成为报备客户',
458 462
       icon: 'none'
459
-     })
463
+    })
460 464
   }
461
-
462 465
   render() {
463 466
     const { makePosterStatus, posterData, modalStatus, grantPhoneVisible } = this.state
464 467
     const { userInfo, cardInfo, projectDetail } = this.props
465 468
     const { person: { personType, personId, phone, tel } } = userInfo
466 469
     const { unReadNum, picture, visitors, id, isReport } = cardInfo
467
-    const { buildingId } = projectDetail
470
+    const { buildingId, address } = projectDetail
468 471
 
469 472
     const visitorList = visitors ? visitors.slice(0, 5) : []
470 473
     const isSelf = personId === id
@@ -475,11 +478,11 @@ export default class Index extends Component {
475 478
     // const visibleConfirmModal = modalStatus && !isReport && !isSelf && (personType === ROLE_CODE['DRIFT'] || personType === ROLE_CODE['CUSTOMER'])
476 479
     const visibleConfirmModal = modalStatus && !isReport && !isSelf
477 480
     const showAuthPhone = grantPhoneVisible && userInfo.person.personId && !userInfo.person.phone
478
-
479 481
     return (
480 482
       <Block>
481 483
         {/* 生成海报 */}
482 484
         {makePosterStatus && (<Poster data={posterData} toggle={this.toggleVisiblePoster}></Poster>)}
485
+
483 486
         {
484 487
           showAuthPhone &&
485 488
           <AchievePhone user={userInfo.person} onCancel={this.handeAuthPhoneFail} onSuccess={this.handleAuthPhoneSuccess}></AchievePhone>
@@ -592,7 +595,7 @@ export default class Index extends Component {
592 595
                   </View>
593 596
                   <View className='detailed__add' onClick={this.getLocation}>
594 597
                     <View className='detailed__add__txt'>
595
-                      <Text className='add__txt' space='emsp'>地址 </Text> {cardInfo.address}
598
+                      <Text className='add__txt' space='emsp'>地址 </Text> {address}
596 599
                     </View>
597 600
                     <Text className='iconfont icon-daohangdizhi add__img'></Text>
598 601
                   </View>

+ 8
- 8
src/pages/card/poster.js Näytä tiedosto

@@ -94,7 +94,7 @@ export default class Index extends Component {
94 94
         zIndex: 999
95 95
       },
96 96
       {
97
-        x: 100,
97
+        x: 80,
98 98
         y: 710,
99 99
         text: '长按识别小程序码',
100 100
         fontSize: 26,
@@ -105,7 +105,7 @@ export default class Index extends Component {
105 105
         zIndex: 100
106 106
       },
107 107
       {
108
-        x: 100,
108
+        x: 80,
109 109
         y: 755,
110 110
         text: '进入',
111 111
         fontSize: 26,
@@ -116,20 +116,20 @@ export default class Index extends Component {
116 116
         zIndex: 100
117 117
       },
118 118
       {
119
-        x: 170,
119
+        x: 140,
120 120
         y: 755,
121 121
         text: data.miniAppName,
122 122
         fontSize: 34,
123 123
         color: 'red',
124 124
         baseLine: 'middle',
125 125
         lineHeight: 48,
126
-        width: (data.miniAppName || '').length * 30 + 60,
126
+        width: (data.miniAppName || '').length * 30 + 50,
127 127
         zIndex: 100
128 128
       },
129 129
       {
130
-        x: (data.miniAppName || '').length * 30 + 200,
130
+        x: (data.miniAppName || '').length * 30 + 156,
131 131
         y: 755,
132
-        text: '查看主页',
132
+        text: '查看',
133 133
         fontSize: 26,
134 134
         color: '#999',
135 135
         baseLine: 'middle',
@@ -160,9 +160,9 @@ export default class Index extends Component {
160 160
         borderRadius: 40,
161 161
       },
162 162
       {
163
-        width: 520,
163
+        width: 540,
164 164
         height: 160,
165
-        x: 60,
165
+        x: 50,
166 166
         y: 650,
167 167
         backgroundColor: '#F8F8F8',
168 168
         borderRadius: 10,

+ 2
- 2
src/pages/checkin/checkinsuccess/index.js Näytä tiedosto

@@ -1,6 +1,6 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3
-import {getThumbnail } from '@utils/tools'
3
+import {transferImage } from '@utils/tools'
4 4
 
5 5
 
6 6
 
@@ -36,7 +36,7 @@ export default class checkinsuccess extends Component {
36 36
     return (
37 37
       <View className="checkin" style="width:100vw;height:100vh;background:rgba(245,245,245,1);" >
38 38
         <View style="text-align: center;">
39
-          <Image className="img" src={getThumbnail('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/checkin/checkinsuccessfully.png')}  ></Image>
39
+          <Image className="img" src={transferImage('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/checkin/checkinsuccessfully.png')}  ></Image>
40 40
         </View>
41 41
         <View>
42 42
           {this.state.addPoints && (<Text className="text1" style="">+{this.state.addPoints}积分</Text>)}

+ 61
- 19
src/pages/checkin/index.js Näytä tiedosto

@@ -4,8 +4,13 @@ import { AtDivider, AtList, AtListItem, AtGrid, AtButton } from 'taro-ui'
4 4
 
5 5
 // import achievePhone from '@components/achievePhone'
6 6
 import { checkinDetails, checkinActive } from '@services/checkin'
7
-import { parseQueryString } from '@utils/tools'
7
+import {
8
+  getCodeScene,
8 9
 
10
+} from '@services/common'
11
+import { parseQueryString, getQueryString } from '@utils/tools'
12
+import { NONAME } from 'dns';
13
+import ready from '@utils/ready'
9 14
 export default class checkin extends Component {
10 15
 
11 16
   state = {
@@ -15,23 +20,58 @@ export default class checkin extends Component {
15 20
   }
16 21
 
17 22
   componentWillMount () {
18
-    const router = Taro.getStorageSync('router')
19
-    console.log('router---',router)
20
-    console.log('props---',this.props)
21
-    const { id, type } = parseQueryString(router.query.params)
22
-    console.log('props---',id)
23
-    this.setState({ id, type })
24
-    this.getcheckinDetails(id, type)
23
+    ready.queue(() => {
24
+      const router = Taro.getStorageSync('router')
25
+
26
+      const { id = router.query.id, type = router.query.type || '' } = parseQueryString(router.query.params)
27
+      console.log(id, 'id-----')
28
+      this.setState({ id, type })
29
+      this.getcheckinDetails(id, type)
30
+
31
+      // const routers = wx.getLaunchOptionsSync()
32
+
33
+      // const { query: { scene } } = routers
34
+      // console.log(routers, 'routers-----')
35
+
36
+
37
+      // console.log(scene, 'query-----')
38
+      // getCodeScene(scene).then(res => {
39
+
40
+      //   let params = JSON.parse(res).scene
41
+
42
+      //   let id = getQueryString(params, 'id')
43
+      //   let type = getQueryString(params, 'type')
44
+
45
+      //   this.setState({ id, type })
46
+      //   this.getcheckinDetails(id, type)
47
+      // })
48
+
49
+    })
50
+
51
+
52
+
53
+  }
54
+  // const router = Taro.getStorageSync('router')
55
+
56
+
57
+
58
+  // const { id = router.query.id , type = router.query.type || '' } = parseQueryString(router.query.params)
59
+  // console.log(id, 'id-----')
60
+  // this.setState({ id, type })
61
+  componentDidShow () {
62
+    const { id, type } = this.state
63
+    // this.getcheckinDetails(id, type)
25 64
   }
26 65
   // dynamicId
27 66
   getcheckinDetails (id, type) {
28 67
     Taro.showLoading()
29 68
 
30 69
     checkinDetails(id, type).then(res => {
70
+      console.log('data:', res)
31 71
       Taro.hideLoading()
32 72
       this.setState({
33 73
         data: res,
34
-      })      
74
+      })
35 75
     })
36 76
   }
37 77
 
@@ -43,12 +83,13 @@ export default class checkin extends Component {
43 83
 
44 84
       // TODO: 需要依据 type 跳转
45 85
       Taro.navigateTo({
46
-        url: '/pages/checkin/checkinsuccess/index?addPoints=' + res.addPoints,      
86
+        url: '/pages/checkin/checkinsuccess/index?addPoints=' + res.addPoints,
47 87
       })
48 88
 
49 89
     }).catch((err) => {
50 90
       Taro.showToast({
51
-        title: `失败: ${err.message}`
91
+        title: `失败: ${err.message}`,
92
+        icon: 'none'
52 93
       })
53 94
 
54 95
       console.error(err)
@@ -64,7 +105,8 @@ export default class checkin extends Component {
64 105
 
65 106
   render () {
66 107
     const { dynamic = {}, enlist = {}, person = {} } = this.state.data || {}
67
-
108
+    const { activityStatus } = dynamic || {}
109
+    console.log(enlist, 'enlist')
68 110
     return (
69 111
       <View className="checkin" style="width:100vw;height:100vh;" >
70 112
 
@@ -104,16 +146,16 @@ export default class checkin extends Component {
104 146
           {/* {console.log(data.person.status)} */}
105 147
         </View>}
106 148
         {enlist.enlistId == null && <View className="unregistered">
107
-        {dynamic.activityStatus === 1 && <View style="text-align: center;color:#666666">
108
-          活动未开始
149
+          {activityStatus === 1 && <View style="text-align: center;color:#666666">
150
+            活动未开始
109 151
         </View>
110 152
           }
111
-          {dynamic.activityStatus === 2 && <View style="text-align: center;color:#666666">
112
-          活动已结束
153
+          {activityStatus === 2 && <View style="text-align: center;color:#666666">
154
+            活动已结束
113 155
         </View>
114 156
           }
115 157
 
116
-          {!dynamic.activityStatus && 
158
+          {activityStatus===0 &&
117 159
             <View>
118 160
               <View>
119 161
                 <Image className="img1" src={require('@assets/checkin/noentry.png')} ></Image>
@@ -125,9 +167,9 @@ export default class checkin extends Component {
125 167
 
126 168
               <AtButton type='primary' className="toactivebutton" onClick={() => { this.toactivity(dynamic.dynamicId) }}>立即前往</AtButton>
127 169
             </View>
128
-          }        
170
+          }
129 171
         </View>
130
-      }
172
+        }
131 173
       </View>
132 174
 
133 175
     );

+ 6
- 6
src/pages/im/index.js Näytä tiedosto

@@ -78,7 +78,7 @@ export default class Chat extends Component {
78 78
       const { sendId, sendName, receiverId, receiverName } = this.$router.params
79 79
       const me = this.props.userInfo.person
80 80
       const { personId: mineId } = me
81
-            
81
+
82 82
       // 系统异常
83 83
       if (!sendId || !receiverId) {
84 84
         Taro.showToast({
@@ -134,11 +134,11 @@ export default class Chat extends Component {
134 134
         this.setState({ chatting, me }, () => {
135 135
           this.loadList(res => {
136 136
             this.toBottom()
137
-  
137
+
138 138
             const { records } = res
139 139
             const newMsg = records[0]
140 140
             const isCardMsg = newMsg && newMsg.messageType === MESSAGETYPE.CARD
141
-  
141
+
142 142
             // 如果最新一条消息不是卡片类型 则自动发送卡片信息
143 143
             if (!isCardMsg) {
144 144
               setTimeout(() => {
@@ -149,7 +149,7 @@ export default class Chat extends Component {
149 149
         });
150 150
       })
151 151
 
152
-      socket.wss.onMessage(res => {    
152
+      socket.wss.onMessage(res => {
153 153
         const data = JSON.parse(res.data)
154 154
 
155 155
         console.log('receive message ==>', data)
@@ -369,7 +369,7 @@ export default class Chat extends Component {
369 369
       console.log('发送成功')
370 370
       this.appendData(payload)
371 371
     })
372
- 
372
+
373 373
     this.setState({
374 374
       inputText: '',
375 375
       // msgList: list
@@ -504,7 +504,7 @@ export default class Chat extends Component {
504 504
           <Text className="text">常见问题</Text>
505 505
         </View>
506 506
 
507
-        <BackHomeBtn style={{ right: '3%' }}></BackHomeBtn>
507
+        <BackHomeBtn style={{ right: '3%', bottom: '20%' }}></BackHomeBtn>
508 508
         {
509 509
           visiblePrompt && (
510 510
             <View className="prompt" onClick={this.togglePromptVisible.bind(this, false)}>

+ 2
- 2
src/pages/news/detail/index.js Näytä tiedosto

@@ -7,7 +7,7 @@ import WxParse from '@components/wxParse/wxParse'
7 7
 import BackHomeBtn from '@components/BackHomeBtn'
8 8
 import Notice from '@components/Notice'
9 9
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
10
-import { getDownloadURL, getThumbnail } from '@utils/tools'
10
+import { getDownloadURL, transferImage } from '@utils/tools'
11 11
 import {
12 12
   addNewsUv,
13 13
   favorNews,
@@ -222,7 +222,7 @@ export default class NewsDetail extends Component {
222 222
 
223 223
                   <View>{dayjs(detail.createDate).format('YYYY-MM-DD')}</View>
224 224
                 </View>
225
-                {/* <Image mode="widthFix" style={{ width: '100%', marginTop: '20px' }} src={getThumbnail(detail.newsImg)}></Image> */}
225
+                {/* <Image mode="widthFix" style={{ width: '100%', marginTop: '20px' }} src={transferImage(detail.newsImg)}></Image> */}
226 226
                 <View className="detail-con">
227 227
                   <import src='../../../components/wxParse/wxParse.wxml' />
228 228
                   <template is='wxParse' data='{{wxParseData:article.nodes}}' />

+ 2
- 2
src/pages/news/item.js Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import dayjs from 'dayjs'
3 3
 import './item.scss'
4
-import { getThumbnail } from '@utils/tools'
4
+import { transferImage } from '@utils/tools'
5 5
 
6 6
 export default class NewsItem extends Component {
7 7
   static defaultProps = {
@@ -14,7 +14,7 @@ export default class NewsItem extends Component {
14 14
     const { data } = this.props
15 15
     return (
16 16
       <View className="item" key={data.newsId} onClick={this.handleClick}>
17
-        <Image className="item-img"  src={getThumbnail(data.newsImg)}></Image>
17
+        <Image className="item-img"  src={transferImage(data.newsImg)}></Image>
18 18
         <View className="item-con">
19 19
           <View className="item-con__title">{data.newsName}</View>
20 20
           <View className="item-con__date">于{dayjs(data.createDate).format('YYYY-MM-DD  HH:mm:ss')}发布</View>

+ 1
- 1
src/pages/news/item.scss Näytä tiedosto

@@ -14,7 +14,7 @@
14 14
   }
15 15
 
16 16
   &-con {
17
-    width:450px;
17
+    width:430px;
18 18
     display: flex;
19 19
     flex-direction: column;
20 20
     justify-content: space-between;

+ 3
- 1
src/pages/person/customerAnalysis/followUpCustomer/index.js Näytä tiedosto

@@ -6,6 +6,8 @@ import { savePoint, updatePoint } from '@services/common'
6 6
 import { connect } from '@tarojs/redux'
7 7
 import { View, Text, Picker } from '@tarojs/components';
8 8
 import { queryCustomerList, addFollowRecord } from '@services/person'
9
+import { transferImage } from '@utils/tools'
10
+
9 11
 const maleImg = require('@assets/person/male.png')
10 12
 const femaleImg = require('@assets/person/female.png')
11 13
 const phoneImg = require('@assets/person/phone.png')
@@ -279,7 +281,7 @@ export default class transactionCustomer extends Taro.Component {
279 281
                 customerList.length &&
280 282
                 customerList.map((item, index) => (
281 283
                   <View class="item" key={index + 'customerList'} onClick={this.toMyCustomer.bind(this, item.customerId)}>
282
-                    <Image src={item.picture || require('@assets/default-avatar.png')} className='img'></Image>
284
+                    <Image src={transferImage(item.picture) || require('@assets/default-avatar.png')} className='img'></Image>
283 285
                     <View className="name">
284 286
                       {item.name}
285 287
                       {

+ 4
- 4
src/pages/person/customerAnalysis/index.js Näytä tiedosto

@@ -59,11 +59,11 @@ export default class customer extends Taro.Component {
59 59
   }
60 60
 
61 61
   render() {
62
-    const tabList = [{ title: '我的客户' }, { title: '客户分析' }]
62
+    const tabList = [{ title: '我的客户' },{ title: '客户分析' }]
63 63
     const { customerNum, current } = this.state
64 64
     return (
65
-      <AtTabs className="tab-box overflow-tab" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable={false}>
66
-        <AtTabsPane current={current} index={0}>
65
+      <AtTabs  className="tab-box overflow-tab" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable={false}>
66
+         <AtTabsPane current={current} index={0}>
67 67
           <View style="padding:10px 20px; display: flex;flex-wrap: wrap;align-content: flex-start;justify-content: space-between;">
68 68
             <View className="my-customer" onClick={this.toFollowUpCustomer} style="border-right:1px solid rgba(0,0,0,0.12)">
69 69
               <Image mode="widthFix" src={require('@assets/person/genjin.png')} className='img'></Image>
@@ -84,7 +84,7 @@ export default class customer extends Taro.Component {
84 84
             }
85 85
           </View>
86 86
         </AtTabsPane>
87
-
87
+       
88 88
       </AtTabs>
89 89
     )
90 90
   }

+ 2
- 2
src/pages/person/customerAnalysis/item/index.js Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3 3
 import dayjs from 'dayjs'
4
-import { getThumbnail } from '@utils/tools'
4
+import { transferImage } from '@utils/tools'
5 5
 
6 6
 export default class Item extends Component {
7 7
   static defaultProps = {
@@ -20,7 +20,7 @@ export default class Item extends Component {
20 20
           <View className={data.type == 'help' ? 'type' : 'type2'}>{data.type == 'help' ? '助力' : '拼团'}</View>
21 21
         }
22 22
 
23
-        <Image className="pic" mode="aspectFill" src={getThumbnail(data.mainImg || data.imgUrl)}></Image>
23
+        <Image className="pic" mode="aspectFill" src={transferImage(data.mainImg || data.imgUrl)}></Image>
24 24
 
25 25
         <View className="box">
26 26
 

+ 3
- 3
src/pages/person/customerAnalysis/myCustomer.js Näytä tiedosto

@@ -8,7 +8,7 @@ import { connect } from '@tarojs/redux'
8 8
 import './index.scss'
9 9
 import ActivityItem from './item'
10 10
 import dayjs from 'dayjs'
11
-import { getThumbnail } from '@utils/tools'
11
+import { transferImage } from '@utils/tools'
12 12
 import emptyImg from '@assets/empty.png'
13 13
 const maleImg = require('@assets/person/male.png')
14 14
 const femaleImg = require('@assets/person/female.png')
@@ -451,8 +451,8 @@ export default class myCustomer extends Taro.Component {
451 451
         {followVisible && this.renderFollowBox()}
452 452
         {baseVisible && this.renderBaseBox()}
453 453
         <View className="user_con" style=" margin: 0 20rpx 40rpx 20rpx; height:256rpx;box-shadow:0rpx 4rpx 12rpx 0rpx rgba(0,0,0,0.12); border-radius:12rpx;">
454
-          <Image className="bg" src={getThumbnail('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/shop/background.jpg')} ></Image>
455
-          <Image className="user__left__headimg" src={customerDetail.picture || require('@assets/default-avatar.png')} />
454
+          <Image className="bg" src={transferImage('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/shop/background.jpg')} ></Image>
455
+          <Image className="user__left__headimg" src={transferImage(customerDetail.picture) || require('@assets/default-avatar.png')} />
456 456
           <View className='user__left__name'>
457 457
             <View className="text">{customerDetail.name}</View>
458 458
             {

+ 3
- 1
src/pages/person/customerAnalysis/transactionCustomer/index.js Näytä tiedosto

@@ -5,6 +5,8 @@ import './index.scss'
5 5
 import { savePoint, updatePoint } from '@services/common'
6 6
 import { connect } from '@tarojs/redux'
7 7
 import { queryCustomerList, addFollowRecord } from '@services/person'
8
+import { transferImage } from '@utils/tools'
9
+
8 10
 const maleImg = require('@assets/person/male.png')
9 11
 const femaleImg = require('@assets/person/female.png')
10 12
 const phoneImg = require('@assets/person/phone.png')
@@ -115,7 +117,7 @@ export default class transactionCustomer extends Taro.Component {
115 117
               customerList.length &&
116 118
               customerList.map((item, index) => (
117 119
                 <View class="item" key={index + 'transaction'} onClick={this.toMyCustomer.bind(this, item.customerId)}>
118
-                  <Image src={item.picture || require('@assets/default-avatar.png')} className='img'></Image>
120
+                  <Image src={transferImage(item.picture) || require('@assets/default-avatar.png')} className='img'></Image>
119 121
                   <View className="name">
120 122
                     {item.name}
121 123
                     {

+ 2
- 1
src/pages/person/favorite/index.js Näytä tiedosto

@@ -5,6 +5,7 @@ import { getItemList } from '@services/item'
5 5
 import { getCardList } from '@services/card'
6 6
 import { queryNewsList } from '@services/news'
7 7
 import { buildingDynamiceList } from '@services/activity'
8
+import { transferImage } from '@utils/tools'
8 9
 import ProjectItem from '../../project/item'
9 10
 import NewsItem from '../../news/item'
10 11
 
@@ -126,7 +127,7 @@ export default class Index extends Component {
126 127
         {cardList.map(item => (
127 128
           <View className="card-item" key={item.id} onClick={this.navigateTo.bind(this, '/pages/card/index?id=' + item.id)}>
128 129
             <View className="flex">
129
-              <Image className="avatar" mode="aspectFill" src={item.avatar || item.photo}></Image>
130
+              <Image className="avatar" mode="aspectFill" src={transferImage(item.avatar || item.photo)}></Image>
130 131
               <Text className="name">{item.name}</Text>
131 132
             </View>
132 133
             <View className="flex item-btn__box">

+ 2
- 2
src/pages/person/index.js Näytä tiedosto

@@ -8,7 +8,7 @@ import Notice from '@components/Notice'
8 8
 import { getCodeMessage, putRegisterConsultant } from '@services/getCode'
9 9
 import * as actions from '@actions/user'
10 10
 import Authorize from '@components/authorize'
11
-import { getThumbnail } from '@utils/tools'
11
+import { transferImage } from '@utils/tools'
12 12
 import { menus } from './menus'
13 13
 
14 14
 @connect(({ user, city }) => ({ user, city }), { ...actions })
@@ -169,7 +169,7 @@ export default class Person extends Component {
169 169
       <View className="person">
170 170
         <Notice></Notice>
171 171
         <View className="info">
172
-          <Image className="bg" src={getThumbnail('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/mine/background.png')} mode='aspectFill'></Image>
172
+          <Image className="bg" src={transferImage('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/mine/background.png')} mode='aspectFill'></Image>
173 173
           <View className="content">
174 174
             <View className="info-block">
175 175
               <View className="avatar" onClick={this.goPersonDetail}>

+ 3
- 2
src/pages/person/profile/detail/index.js Näytä tiedosto

@@ -6,6 +6,7 @@ import dayjs from 'dayjs'
6 6
 import { getProfileDetail, editDocumentVerify } from '@services/user'
7 7
 
8 8
 import { uploadFiles } from '@utils/request'
9
+import { transferImage } from '@utils/tools'
9 10
 
10 11
 import "taro-ui/dist/style/components/image-picker.scss";
11 12
 import "taro-ui/dist/style/components/icon.scss";
@@ -175,7 +176,7 @@ export default class Profile extends Component {
175 176
                     return (
176 177
                       <View className="image-con" key={`img-${inx}`}>
177 178
                         <Image className="close-btn" src={closeImg} onClick={this.deleteImg.bind(this, (inx))} />
178
-                        <Image className="img" src={item.img} onClick={this.onPreview.bind(this, (item))} />
179
+                        <Image className="img" src={transferImage(item.img)} onClick={this.onPreview.bind(this, (item))} />
179 180
                       </View>
180 181
                     )
181 182
                   })
@@ -201,7 +202,7 @@ export default class Profile extends Component {
201 202
                   imgList.map((item, inx) => {
202 203
                     return (
203 204
                       <View className="image-con" key={`img-${inx}`}>
204
-                        <Image className="img" src={item.img} onClick={this.onPreview.bind(this, (item))} />
205
+                        <Image className="img" src={transferImage(item.img)} onClick={this.onPreview.bind(this, (item))} />
205 206
                       </View>
206 207
                     )
207 208
                   })

+ 2
- 1
src/pages/person/profile/index.js Näytä tiedosto

@@ -3,6 +3,7 @@ import './index.scss'
3 3
 import dayjs from 'dayjs'
4 4
 import { getDocumentVerify, commitDocumentVerify, getVerifyList } from '@services/user'
5 5
 import { uploadFiles } from '@utils/request'
6
+import { transferImage } from '@utils/tools'
6 7
 
7 8
 const profileBg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/index/profile.png'
8 9
 const add = require('@assets/add.png')
@@ -234,7 +235,7 @@ export default class Profile extends Component {
234 235
                         return (
235 236
                           <View className="image-con" key={`img-${inx}`}>
236 237
                             <Image className="close-btn" src={closeImg} onClick={this.deleteImg.bind(this, (inx))} />
237
-                            <Image className="img" onClick={this.onPreview.bind(this, (item))} src={item.img} />
238
+                            <Image className="img" onClick={this.onPreview.bind(this, (item))} src={transferImage(item.img)} />
238 239
                           </View>
239 240
                         )
240 241
                       })

+ 2
- 1
src/pages/policy/detail/index.js Näytä tiedosto

@@ -9,6 +9,7 @@ import {
9 9
   queryPolicyDetail,
10 10
 } from '@services/policy'
11 11
 import { connect } from '@tarojs/redux'
12
+import { transferImage } from '@utils/tools'
12 13
 
13 14
 @connect(state => state.user)
14 15
 export default class PolicyDetail extends Component {
@@ -85,7 +86,7 @@ export default class PolicyDetail extends Component {
85 86
                     <View><Text className="iconfont icon-eye"></Text>{detail.pvNum || 0}</View>
86 87
                     {/* <View><Text className="iconfont icon-fenxiang1"></Text>{detail.shareNum || 0}</View> */}
87 88
                   </View>
88
-                  <Image mode="widthFix" style={{ width: '100%', marginTop: '20px' }} src={detail.policyImg}></Image>
89
+                  <Image mode="widthFix" style={{ width: '100%', marginTop: '20px' }} src={transferImage(detail.policyImg)}></Image>
89 90
                   <View className="detail-con">
90 91
                     <import src='../../../components/wxParse/wxParse.wxml' />
91 92
                     <template is='wxParse' data='{{wxParseData:article.nodes}}' />

+ 2
- 1
src/pages/policy/item/index.js Näytä tiedosto

@@ -1,6 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import dayjs from 'dayjs'
3 3
 import './item.scss'
4
+import { transferImage } from '@utils/tools'
4 5
 
5 6
 export default class PolicyItem extends Component {
6 7
 
@@ -14,7 +15,7 @@ export default class PolicyItem extends Component {
14 15
     const { data } = this.props
15 16
     return (
16 17
       <View className="item" key={data.policyId} onClick={this.handleClick}>
17
-        <Image className="item-img" mode="aspectFill" src={data.policyImg}></Image>
18
+        <Image className="item-img" mode="aspectFill" src={transferImage(data.policyImg)}></Image>
18 19
         <View className="item-con">
19 20
           <View className="item-con__title">{data.title}</View>
20 21
           <View className="item-con__date">{dayjs(data.createDate).format('YYYY-MM-DD')}</View>

+ 2
- 2
src/pages/project/album/index.js Näytä tiedosto

@@ -4,7 +4,7 @@ import './index.scss'
4 4
 import { connect } from '@tarojs/redux'
5 5
 import * as actions from '@actions/project'
6 6
 import { savePoint, updatePoint } from '@services/common'
7
-import { getThumbnail } from '@utils/tools'
7
+import { transferImage } from '@utils/tools'
8 8
 
9 9
 
10 10
 @connect(state => state.project, { ...actions })
@@ -98,7 +98,7 @@ export default class Index extends Component {
98 98
           {imgList.map((item, index) => {
99 99
             console.log(item, '299999933333222')
100 100
             return (
101
-              <Image className='photos__item-img' src={getThumbnail(item.url)} mode='aspectFill' onClick={this.previewImage.bind(this, item.url, _photosImgs)}></Image>
101
+              <Image className='photos__item-img' src={transferImage(item.url)} mode='aspectFill' onClick={this.previewImage.bind(this, item.url, _photosImgs)}></Image>
102 102
             )
103 103
           })}
104 104
         </View>

+ 1
- 1
src/pages/project/banner/index.js Näytä tiedosto

@@ -3,7 +3,7 @@ import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
3 3
 // import { cdn } from '@constants/api'
4 4
 import './index.scss'
5 5
 import emptyImg from '@assets/empty.png'
6
-import { getThumbnail, resizeImage } from '@utils/tools'
6
+import { transferImage, resizeImage } from '@utils/tools'
7 7
 
8 8
 export default class SwiperBanner extends Component {
9 9
   static defaultProps = {

+ 17
- 17
src/pages/project/detail/index.js Näytä tiedosto

@@ -21,7 +21,7 @@ import dayjs from 'dayjs'
21 21
 import 'dayjs/locale/zh-cn' // 按需加载
22 22
 import ready from '@utils/ready'
23 23
 import Notice from '@components/Notice'
24
-import { getDownloadURL, getThumbnail, sceneInShare } from '@utils/tools'
24
+import { getDownloadURL, transferImage, sceneInShare } from '@utils/tools'
25 25
 import { connect } from '@tarojs/redux'
26 26
 import { dispatchProjectDetail } from '@actions/project'
27 27
 import getUserPhone from '@utils/getUserPhone'
@@ -55,7 +55,7 @@ export default class Index extends Component {
55 55
     recordId: null,
56 56
     posterShow: 'none',
57 57
     current: 1,
58
-    btnstate: 1,// 1显示视频 0显示图片
58
+    btnstate: 0,// 1显示视频 0显示图片
59 59
     albumCurrent: 0,
60 60
     videoPlayShow: 'flex',
61 61
     grantPhoneVisible: false, // 授权手机弹框
@@ -406,7 +406,7 @@ export default class Index extends Component {
406 406
       })
407 407
     } else {
408 408
       Taro.navigateTo({
409
-        url: `/pages/agent/recommend/index`
409
+        url: `/pages/agent/recommend/index?type=projectDeatil` 
410 410
       })
411 411
     }
412 412
   }
@@ -561,7 +561,7 @@ export default class Index extends Component {
561 561
               <View className="type-intro__list">
562 562
                 {
563 563
                   buildingProjectType.map(item => (
564
-                    <View className={buildingProjectType.length == 1 ? 'onlyone type-intro__item' : 'type-intro__item'} key={item.buildingId} style={`background: url(${getThumbnail(buildBg)}) no-repeat center;background-size: 100% 100%;`}>
564
+                    <View className={buildingProjectType.length == 1 ? 'onlyone type-intro__item' : 'type-intro__item'} key={item.buildingId} style={`background: url(${transferImage(buildBg)}) no-repeat center;background-size: 100% 100%;`}>
565 565
 
566 566
                       <View >
567 567
 
@@ -646,7 +646,7 @@ export default class Index extends Component {
646 646
                         >
647 647
 
648 648
                           <View>
649
-                            <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} onClick={() => this.toViewAlbum(index)}></Image>
649
+                            <Image className='albumimg' src={transferImage(buildingImgList[0].url)} onClick={() => this.toViewAlbum(index)}></Image>
650 650
                             <View style={{ width: '218rpx', display: 'flex', justifyContent: 'center' }} >
651 651
                               <View style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
652 652
                               <View> ({buildingImgList.length})</View>
@@ -723,7 +723,7 @@ export default class Index extends Component {
723 723
                   consultants.slice(0, 3).map(item => (
724 724
                     <View className="item" key={item.id} onClick={this.handleConsuItemClick.bind(this, item)}>
725 725
                       <View className="flex">
726
-                        <Image className="avatar" mode="aspectFill" src={getThumbnail(item.photo || item.avatar)}></Image>
726
+                        <Image className="avatar" mode="aspectFill" src={transferImage(item.photo || item.avatar)}></Image>
727 727
                         <View className='name-txt'>
728 728
                           <Text className="name">{item.userName}</Text>
729 729
                           <Text className='txt'>{item.description || ' '}</Text>
@@ -844,7 +844,7 @@ export default class Index extends Component {
844 844
                       {
845 845
                         item && (
846 846
                           <View className='house__img-info'>
847
-                            <Image className='house__img' src={getThumbnail(item.buildingImgList[0].url)} mode="widthFix" onClick={this.handlePreviewHxImage.bind(this, item.buildingImgList[0].url, imgUrls)}></Image>
847
+                            <Image className='house__img' src={transferImage(item.buildingImgList[0].url)} mode="widthFix" onClick={this.handlePreviewHxImage.bind(this, item.buildingImgList[0].url, imgUrls)}></Image>
848 848
                             <View className='house-type__state' style={`background-color: ${statusBgColors[item.marketStatus - 1]}`}>{statusOpts[item.marketStatus - 1]}</View>
849 849
                           </View>
850 850
                         )
@@ -924,7 +924,7 @@ export default class Index extends Component {
924 924
                   {
925 925
                     newsList.map(item => (
926 926
                       <View className="news-item" key={item.newsId} onClick={this.handNewsItemClick.bind(this, item.newsId)}>
927
-                        <Image src={getThumbnail(item.newsImg)} mode="aspectFill" className="news-item__pic"></Image>
927
+                        <Image src={transferImage(item.newsImg)} mode="aspectFill" className="news-item__pic"></Image>
928 928
                         <View className="news-item__title">{item.newsName}</View>
929 929
                       </View>
930 930
                     ))
@@ -1001,7 +1001,7 @@ videoContext.poster = undefined
1001 1001
         <Video
1002 1002
           src={projectDetail.videoUrl}
1003 1003
           // src='http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
1004
-          poster={getThumbnail(imgSrc)}
1004
+          poster={transferImage(imgSrc)}
1005 1005
           // poster='http://misc.aotu.io/booxood/mobile-video/cover_900x500.jpg'
1006 1006
           style={{
1007 1007
             height: '600rpx',
@@ -1063,7 +1063,7 @@ videoContext.poster = undefined
1063 1063
           loaded && (
1064 1064
             <View className='detail'>
1065 1065
               <Notice></Notice>
1066
-              {(projectDetail.videoUrl == null || btnstate === 0) && (
1066
+              {/* {(projectDetail.videoUrl == null || btnstate === 0) && ( */}
1067 1067
                 <View
1068 1068
                   className="pro__banner"
1069 1069
                   onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
@@ -1080,19 +1080,19 @@ videoContext.poster = undefined
1080 1080
                   ></Banner>
1081 1081
                   <Text className="pro__banner-text">{this.current}/{(projectDetail.buildingImg && projectDetail.buildingImg.length) || 0}</Text>
1082 1082
                 </View>
1083
-              )}
1083
+              {/* )} */}
1084 1084
 
1085
-              {btnstate === 1 && projectDetail.videoUrl != null && this.renderVideo()}
1085
+              {/* {btnstate === 1 && projectDetail.videoUrl != null && this.renderVideo()} */}
1086 1086
 
1087
-              {btnstate === 1 && projectDetail.videoUrl != null && (<View className='media-btn'>
1087
+              {/* {btnstate === 1 && projectDetail.videoUrl != null && (<View className='media-btn'>
1088 1088
                 <View className='video-btn' style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }} >视频</View>
1089 1089
                 <View className='img-btn' onClick={() => this.setState({ btnstate: 0 })}>图片</View>
1090
-              </View>)}
1090
+              </View>)} */}
1091 1091
 
1092
-              {btnstate === 0 && projectDetail.videoUrl != null && (<View className='media-btn'>
1092
+              {/* {btnstate === 0 && projectDetail.videoUrl != null && (<View className='media-btn'>
1093 1093
                 <View className='video-btn' onClick={() => this.setState({ btnstate: 1 })} >视频</View>
1094 1094
                 <View className='img-btn' style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }}>图片</View>
1095
-              </View>)}
1095
+              </View>)} */}
1096 1096
 
1097 1097
               <ScrollView
1098 1098
                 enableBackToTop
@@ -1165,7 +1165,7 @@ videoContext.poster = undefined
1165 1165
                         <View className='top__txt'>{projectDetail.pvNum || 0}人围观</View>
1166 1166
                         <View className='bottom__img' onClick={this.onViewFans.bind(this)}>
1167 1167
                           <View className="records">
1168
-                            {records.slice(0, 9).map(item => <Image src={item.photoOravatar} className='user__img' key={item.personId} />)}
1168
+                            {records.slice(0, 9).map(item => <Image src={transferImage(item.photoOravatar)} className='user__img' key={item.personId} />)}
1169 1169
                             {records.length > 9 && <Text> ···</Text>}
1170 1170
                           </View>
1171 1171
 

+ 52
- 15
src/pages/project/detail/poster.js Näytä tiedosto

@@ -38,9 +38,44 @@ export default class Index extends Component {
38 38
     const { data } = this.props
39 39
     const { basicConfig } = this.state
40 40
     const texts = [
41
+      {
42
+        x: 180,
43
+        y: 540,
44
+        text: data.nickname,
45
+        fontSize: 29,
46
+        color: '#000',
47
+        baseLine: 'middle',
48
+        lineHeight: 48,
49
+        overFlow:'hidden',
50
+        width: 240,
51
+        zIndex: 999
52
+      },
53
+      {
54
+        x: 180,
55
+        y: 580,
56
+        text: '邀请您查看详情',
57
+        fontSize: 29,
58
+        color: '#888',
59
+        baseLine: 'middle',
60
+        lineHeight: 48,
61
+        // textAlign: 'left',
62
+        width: 260,
63
+        zIndex: 999
64
+      },
65
+      {
66
+        x: 480,
67
+        y: 540,
68
+        text: dayjs(data.createDate).format('YYYY-MM-DD') || '',
69
+        fontSize: 25,
70
+        color: '#888',
71
+        baseLine: 'middle',
72
+        lineHeight: 48,
73
+        width: 200,
74
+        zIndex: 999
75
+      },
41 76
       {
42 77
         x: 30,
43
-        y: 740,
78
+        y: 660,
44 79
         text: data.buildingName,
45 80
         fontSize: 36,
46 81
         color: 'black',
@@ -52,10 +87,10 @@ export default class Index extends Component {
52 87
         zIndex: 999
53 88
       },{
54 89
         x: 30,
55
-        y: 820,
90
+        y: 746,
56 91
         text: data.price ? '约'+data.price+'元/m²' : '待定',
57 92
         fontSize: 36,
58
-        color: 'red',
93
+        color: '#FF2744',
59 94
         baseLine: 'middle',
60 95
         lineNum: 2,
61 96
         lineHeight: 48,
@@ -65,12 +100,12 @@ export default class Index extends Component {
65 100
       },
66 101
       {
67 102
         x: 30,
68
-        y: 890,
103
+        y: 830,
69 104
         text: data.posterDescription,
70 105
         fontSize: 28,
71 106
         color: '#999',
72 107
         baseLine: 'middle',
73
-        lineNum: 1,
108
+        lineNum: 2,
74 109
         lineHeight: 48,
75 110
         // textAlign: 'center',
76 111
         width: 560,
@@ -103,14 +138,14 @@ export default class Index extends Component {
103 138
         y: 1070,
104 139
         text: data.miniAppName,
105 140
         fontSize: 34,
106
-        color: 'red',
141
+        color: '#000',
107 142
         baseLine: 'middle',
108 143
         lineHeight: 48,
109 144
         width: (data.miniAppName || '').length * 30 + 60,
110 145
         zIndex: 11
111 146
       },
112 147
       {
113
-        x: (data.miniAppName || '').length * 30 + 130,
148
+        x: (data.miniAppName || '').length * 30 + 120,
114 149
         y: 1070,
115 150
         text: '项目详情',
116 151
         fontSize: 26,
@@ -126,7 +161,7 @@ export default class Index extends Component {
126 161
       {
127 162
         url: data.poster,
128 163
         width: 640,
129
-        height: 670,
164
+        height: 512,
130 165
         y: 0,
131 166
         x: 0
132 167
       },
@@ -140,11 +175,11 @@ export default class Index extends Component {
140 175
       },
141 176
       {
142 177
         url: data.avatarurl || require('@assets/default-avatar.png'),
143
-        width: 130,
144
-        height: 130,
145
-        y: 550,
146
-        x: 20,
147
-        borderRadius: 130,
178
+        width: 120,
179
+        height: 120,
180
+        y: 452,
181
+        x: 40,
182
+        borderRadius: 120,
148 183
         zIndex: 999
149 184
       }
150 185
     ]
@@ -152,9 +187,9 @@ export default class Index extends Component {
152 187
     const blocks = [
153 188
       {
154 189
         x: 0,
155
-        y: 966,
190
+        y: 953,
156 191
         width: 640,
157
-        height: 160,
192
+        height: 186,
158 193
         backgroundColor: 'rgba(248,248,248,1)',
159 194
         zIndex: 1
160 195
       }
@@ -235,11 +270,13 @@ export default class Index extends Component {
235 270
       <Block>
236 271
         {
237 272
           this.state.canvasStatus && (
273
+            <View style="10rpx 0px 30rpx #dcdcdc">
238 274
             <TaroCanvasDrawer
239 275
               config={this.state.config}
240 276
               onCreateSuccess={this.onCreateSuccess}
241 277
               onCreateFail={this.onCreateFail}
242 278
             />
279
+            </View>
243 280
           )
244 281
         }
245 282
         {

+ 4
- 1
src/pages/project/detail/poster.scss Näytä tiedosto

@@ -44,9 +44,12 @@
44 44
       padding: 40px 0;
45 45
 
46 46
       .result-img {
47
-        height: 60vh;
47
+        height: 720.65px;
48
+        // height: 60vh;
49
+        width: 406px;
48 50
         display: block;
49 51
         margin: 0 auto;
52
+        box-shadow:10px 0px 30px #dcdcdc;
50 53
       }
51 54
     }
52 55
   }

+ 3
- 3
src/pages/project/floor/index.js Näytä tiedosto

@@ -35,11 +35,11 @@ export default class Index extends Component {
35 35
           </View>
36 36
           <View className='item'>
37 37
             <Text className='txt left-txt'>均价</Text>
38
-            <Text className='txt right-txt'>{projectDetail.price ? projectDetail.price :'待定'}</Text>
38
+            <Text className='txt right-txt'>{projectDetail.price ? projectDetail.price : '待定'}</Text>
39 39
           </View>
40 40
           <View className='item'>
41 41
             <Text className='txt left-txt'>销售状态</Text>
42
-            <Text className='txt right-txt'>{projectDetail.marketStatus ? projectDetail.marketStatus :'待定'}</Text>
42
+            <Text className='txt right-txt'>{projectDetail.marketStatus ? projectDetail.marketStatus : '待定'}</Text>
43 43
           </View>
44 44
           <View className='item'>
45 45
             <Text className='txt left-txt'>开盘日期</Text>
@@ -83,7 +83,7 @@ export default class Index extends Component {
83 83
           </View>
84 84
           <View className='item'>
85 85
             <Text className='txt left-txt'>项目说明</Text>
86
-            <Text className='txt right-txt'>{'暂无'}</Text>
86
+            <Text className='txt right-txt'>{projectDetail.dynamic || '暂无'}</Text>
87 87
           </View>
88 88
         </View>
89 89
       </View >

+ 3
- 3
src/pages/project/index.js Näytä tiedosto

@@ -17,7 +17,7 @@ import { dispatchCitySelected } from '@actions/city'
17 17
 import { ROLE_CODE } from '@constants/user'
18 18
 import { connect } from '@tarojs/redux'
19 19
 import * as actions from '@actions/project'
20
-import { getThumbnail } from '@utils/tools'
20
+import { transferImage } from '@utils/tools'
21 21
 import QQMapWX from '@lib/qqmap-wx-jssdk.min'
22 22
 import Notice from '@components/Notice'
23 23
 import Authorize from '@components/authorize'
@@ -38,8 +38,8 @@ export default class Index extends Component {
38 38
     keywords: '',
39 39
     loaded: false,
40 40
     maskBanner: '',
41
-    // shareImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1565358322510-share.jpg',
42 41
     shareImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1574145199853-97feda7895c65be33aa234a7b81b37f.jpg',
42
+    // shareImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1565358322510-share.jpg',
43 43
     bannerList: [],
44 44
     helpGroupList: [],
45 45
     newsList: [],
@@ -512,7 +512,7 @@ export default class Index extends Component {
512 512
           <Image
513 513
             mode="widthFix"
514 514
             className="img"
515
-            src={getThumbnail(maskBanner.image)}
515
+            src={transferImage(maskBanner.image)}
516 516
             onClick={this.handleMaskBannerClick.bind(this, maskBanner)}>
517 517
           </Image>
518 518
           <Icon className="iconfont close icon-buoumaotubiao20" onClick={this.handleMaskClose}></Icon>

+ 4
- 4
src/pages/project/item/index.js Näytä tiedosto

@@ -1,6 +1,6 @@
1 1
 import Taro, { Component } from '@tarojs/taro'
2 2
 import './index.scss'
3
-import { getThumbnail } from '@utils/tools'
3
+import { transferImage } from '@utils/tools'
4 4
 
5 5
 const dotImg = require('@assets/dot.png')
6 6
 
@@ -26,7 +26,7 @@ export default class Index extends Component {
26 26
       <View className='item' onClick={onClick.bind(this, data)}>
27 27
         <View className='item__top'>
28 28
           {console.log(data, 'data')}
29
-          <Image className='item__img' mode="aspectFill" src={getThumbnail(imgSrc)}></Image>
29
+          <Image className='item__img' mode="aspectFill" src={transferImage(imgSrc)}></Image>
30 30
           {data.marketStatus &&
31 31
             <View className={data.marketStatus == '在售' ? 'item__status sale' : data.marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{data.marketStatus}</View>}
32 32
           <View className='item__right'>
@@ -56,8 +56,8 @@ export default class Index extends Component {
56 56
             <View className='item__bottom__right'>
57 57
               <Text className='item__bottom__seenum'>{data.pvNum || 0}人围观</Text>
58 58
               <View className='see__img'>
59
-                {records.slice(0, 4).map(item => <Image className='userImg' key={item.uvId} src={getThumbnail(item.photoOravatar)}></Image>)}
60
-                {records.length > 4 && <Image className="dot-img" src={getThumbnail(dotImg)}></Image>}
59
+                {records.slice(0, 4).map(item => <Image className='userImg' key={item.uvId} src={transferImage(item.photoOravatar)}></Image>)}
60
+                {records.length > 4 && <Image className="dot-img" src={transferImage(dotImg)}></Image>}
61 61
               </View>
62 62
             </View>
63 63
           )}

+ 2
- 1
src/pages/project/map/index.js Näytä tiedosto

@@ -129,7 +129,7 @@ export default class Index extends Component {
129 129
       longitude,
130 130
       name: buildingName,
131 131
       address,
132
-      scale: 18
132
+      scale: 12,
133 133
     })
134 134
   }
135 135
   // onShareAppMessage = () => {
@@ -153,6 +153,7 @@ export default class Index extends Component {
153 153
           markers={markers}
154 154
           show-location
155 155
           include-points={points}
156
+          scale={12}
156 157
           onCallouttap={this.showProject.bind(this)}
157 158
         >
158 159
         </Map>

+ 2
- 2
src/pages/project/swiper/index.js Näytä tiedosto

@@ -3,7 +3,7 @@ import { View, Swiper, SwiperItem, Image, Block } from '@tarojs/components'
3 3
 // import { cdn } from '@constants/api'
4 4
 import './index.scss'
5 5
 import emptyImg from '@assets/empty.png'
6
-import { getThumbnail } from '@utils/tools'
6
+import { transferImage } from '@utils/tools'
7 7
 
8 8
 export default class SwiperBanner extends Component {
9 9
   static defaultProps = {
@@ -48,7 +48,7 @@ export default class SwiperBanner extends Component {
48 48
                   mode="aspectFill"
49 49
                   style={style}
50 50
                   className='home-banner__swiper-item-img'
51
-                  src={getThumbnail(item.bannerListImg || item.image || item.url || item.img || item.imgUrl || emptyImg)}
51
+                  src={transferImage(item.bannerListImg || item.image || item.url || item.img || item.imgUrl || emptyImg)}
52 52
                 />
53 53
                 {type=='activity' && <View className='home-banner__swiper-item__title'> {item.title}</View>}
54 54
               </View>

+ 2
- 2
src/pages/shop/banner/index.js Näytä tiedosto

@@ -2,7 +2,7 @@ import Taro, { Component } from '@tarojs/taro'
2 2
 import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
3 3
 // import { cdn } from '@constants/api'
4 4
 import './index.scss'
5
-import { getThumbnail } from '@utils/tools'
5
+import { transferImage } from '@utils/tools'
6 6
 
7 7
 export default class SwiperBanner extends Component {
8 8
   static defaultProps = {
@@ -36,7 +36,7 @@ export default class SwiperBanner extends Component {
36 36
               <Image
37 37
                 mode="aspectFill"
38 38
                 className='home-banner__swiper-item-img'
39
-                src={getThumbnail(item.image)}
39
+                src={transferImage(item.image)}
40 40
               />
41 41
             </SwiperItem>
42 42
           ))}

+ 2
- 2
src/pages/shop/detail/index.js Näytä tiedosto

@@ -5,7 +5,7 @@ import { connect } from '@tarojs/redux'
5 5
 import * as actions from '@actions/shop'
6 6
 import WxParse from '@components/wxParse/wxParse'
7 7
 
8
-import { getThumbnail } from '@utils/tools'
8
+import { transferImage } from '@utils/tools'
9 9
 
10 10
 let hasClick = true
11 11
 @connect(state => state.shop, { ...actions })
@@ -91,7 +91,7 @@ export default class Index extends Component {
91 91
             paddingBottom: `${this.state.visibleExcBtn ? '100rpx' : ''}`
92 92
           }}>
93 93
           <View className="detail__head">
94
-            <Image src={getThumbnail(goodsDetail.detailImgUrl || goodsDetail.imgUrl)} mode="widthFix" className="detail__head-pic"></Image>
94
+            <Image src={transferImage(goodsDetail.detailImgUrl || goodsDetail.imgUrl)} mode="widthFix" className="detail__head-pic"></Image>
95 95
             <Image src={require('@assets/shop/hot.png')} className="detail__head-hot" />
96 96
           </View>
97 97
 

+ 4
- 4
src/pages/shop/index.js Näytä tiedosto

@@ -3,7 +3,7 @@ import { getWindowHeight } from '@utils/style'
3 3
 import { AtTabs, AtTabsPane } from 'taro-ui'
4 4
 import "taro-ui/dist/style/components/tabs.scss"
5 5
 import './index.scss'
6
-import { getThumbnail } from '@utils/tools'
6
+import { transferImage } from '@utils/tools'
7 7
 // import Search from '@components/search'
8 8
 import Banner from './banner'
9 9
 import ready from '@utils/ready'
@@ -264,7 +264,7 @@ export default class Shop extends Component {
264 264
 
265 265
                 <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
266 266
                   {console.log(item, '--item---')}
267
-                  <Image className="item__img" mode="aspectFill" src={item.imgUrl} />
267
+                  <Image className="item__img" mode="aspectFill" src={transferImage(item.imgUrl)} />
268 268
                   <View className="item__title">{item.goodsName}</View>
269 269
                   <View className="item__des">
270 270
                     <View>
@@ -297,7 +297,7 @@ export default class Shop extends Component {
297 297
                     {goodsList.length &&
298 298
                       goodsList.map(item => (
299 299
                         <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
300
-                          <Image className="item__img" mode="aspectFill" src={item.imgUrl} />
300
+                          <Image className="item__img" mode="aspectFill" src={transferImage(item.imgUrl)} />
301 301
                           <View className="item__title">{item.goodsName}</View>
302 302
                           <View className="item__des">
303 303
                             <View>
@@ -347,7 +347,7 @@ export default class Shop extends Component {
347 347
           }}>
348 348
           <View className="user_box">
349 349
             <View className="user_con">
350
-              <Image className="bg" src={getThumbnail('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/shop/background.jpg')} ></Image>
350
+              <Image className="bg" src={transferImage('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/shop/background.jpg')} ></Image>
351 351
               <Image className="user__left__headimg" src={person.avatarurl} />
352 352
               <View className='user__left__name'>{person.nickname}</View>
353 353
               {

+ 2
- 1
src/pages/shop/record/index.js Näytä tiedosto

@@ -5,6 +5,7 @@ import EmptyPage from '@components/empty-page'
5 5
 import { connect } from '@tarojs/redux'
6 6
 import * as actions from '@actions/shop'
7 7
 import dayjs from 'dayjs'
8
+import { transferImage } from '@utils/tools'
8 9
 
9 10
 @connect(state => ({ ...state.shop, ...state.user }), { ...actions })
10 11
 export default class Index extends Component {
@@ -71,7 +72,7 @@ export default class Index extends Component {
71 72
 									<View className="title-state">{item.status==0?"未领取":"已领取"}</View>
72 73
 								</View>
73 74
 								<View className="bottom">
74
-									<Image className="botttom_img" mode="aspectFill" src={item.image} />
75
+									<Image className="botttom_img" mode="aspectFill" src={transferImage(item.image)} />
75 76
 									<View className="bottom-right">
76 77
 										<View className="bottom-right-top">
77 78
 											<View className="product-name" style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap',width:'300rpx' }}>{item.targetName}</View>

+ 14
- 0
src/utils/tools.js Näytä tiedosto

@@ -42,6 +42,20 @@ export function resizeImage(img, size) {
42 42
   return img
43 43
 }
44 44
 
45
+/**
46
+ * 压缩图片 80%, 最大宽度 750
47
+ * @param {*} img 
48
+ */
49
+export function transferImage(img) {
50
+  if (!img) return img
51
+
52
+  if (img.indexOf('https://estateagents.oss-cn-shanghai.aliyuncs.com') === 0) {
53
+    return `${img}?x-oss-process=image/resize,m_lfit,w_750/quality,Q_80`
54
+  }
55
+
56
+  return img
57
+}
58
+
45 59
 /**
46 60
  * 解析 queryString   a=b&c=d  ==> { a:b, c:d }
47 61
  * @param {*} queryString