浏览代码

Merge branch 'v3.5.1' into dev

# Conflicts:
#	src/pages/person/customerAnalysis/index.js
#	src/pages/project/index.js
许静 5 年前
父节点
当前提交
9d24dcaefe
共有 46 个文件被更改,包括 443 次插入183 次删除
  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 查看文件

9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
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
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 3
- 2
src/app.js 查看文件

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

+ 105
- 0
src/components/TimeTicker/index.jsx 查看文件

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 查看文件

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

+ 35
- 0
src/components/amap/PoiAround.js 查看文件

2
 import { Map } from '@tarojs/components'
2
 import { Map } from '@tarojs/components'
3
 import icons from './icons'
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
 export default class PoiAround extends Component {
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
   handleTap = (e) => {
28
   handleTap = (e) => {
29
+    if (e.markerId === centerProject) return;
30
+
8
     const marker = this.props.markers.filter(x => x.id === e.markerId)[0]
31
     const marker = this.props.markers.filter(x => x.id === e.markerId)[0]
9
     this.props.onMarkerClick && this.props.onMarkerClick(marker)
32
     this.props.onMarkerClick && this.props.onMarkerClick(marker)
10
   }
33
   }
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
     return this.props.longitude && (
60
     return this.props.longitude && (
28
       <Map
61
       <Map
62
+        id="poi-around"
29
         showLocation
63
         showLocation
64
+        show-location={true}
30
         scale={12}
65
         scale={12}
31
         markers={markers}
66
         markers={markers}
32
         longitude={this.props.longitude}
67
         longitude={this.props.longitude}

+ 2
- 1
src/pages/activity/assembleItem/index.js 查看文件

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

+ 3
- 1
src/pages/activity/assistanceItem/index.js 查看文件

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

+ 11
- 10
src/pages/activity/detail/assemble.js 查看文件

10
 // import WxParse from '@components/wxParse/wxParse'
10
 // import WxParse from '@components/wxParse/wxParse'
11
 // import getUserPhone from '@utils/getUserPhone'
11
 // import getUserPhone from '@utils/getUserPhone'
12
 import ready from '@utils/ready'
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
 import {
14
 import {
15
   getGroupDetail,
15
   getGroupDetail,
16
   createGroupActivity,
16
   createGroupActivity,
73
     ready.queue(() => {
73
     ready.queue(() => {
74
       // 必须授权电话
74
       // 必须授权电话
75
       if (this.toggleGrantPhone()) {
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
   // 调起授权头像
141
   // 调起授权头像
143
   toggleGrantAvatar = () => {
142
   toggleGrantAvatar = () => {
144
     const { userInfo: { person: { avatarurl } } } = this.props
143
     const { userInfo: { person: { avatarurl } } } = this.props
145
-    if (!avatarurl) {
144
+
145
+    if (!avatarurl || avatarurl.indexOf('wx.qlogo.cn') === -1) {
146
       this.setState({ grantAvatarVisible: true })
146
       this.setState({ grantAvatarVisible: true })
147
       return false
147
       return false
148
     }
148
     }
149
+
149
     console.log(avatarurl,"avatarurl")
150
     console.log(avatarurl,"avatarurl")
150
     console.log(this.props.userInfo,"this.props")
151
     console.log(this.props.userInfo,"this.props")
151
     return true
152
     return true
534
         }
535
         }
535
         {
536
         {
536
           grantAvatarVisible &&
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
         <BackHomeBtn></BackHomeBtn>
540
         <BackHomeBtn></BackHomeBtn>
540
         {
541
         {
542
             <View className="ass-page">
543
             <View className="ass-page">
543
               <Notice></Notice>
544
               <Notice></Notice>
544
               <View className="detail-banner">
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
                 <View className="rest-time">
548
                 <View className="rest-time">
548
                   <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '')} </Text>
549
                   <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '')} </Text>
569
                     groupState === GroupSuccess &&
570
                     groupState === GroupSuccess &&
570
                     (
571
                     (
571
                       <Block>
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
                           verificationCode && <View className="hexiaoma" style="margin:0 auto 40rpx auto">核销码: {verificationCode}</View>
575
                           verificationCode && <View className="hexiaoma" style="margin:0 auto 40rpx auto">核销码: {verificationCode}</View>
575
                         }
576
                         }
581
                     groupState === GroupFailure &&
582
                     groupState === GroupFailure &&
582
                     (
583
                     (
583
                       <View>
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
                         <View className="fail-text" style="margin:0 auto 40rpx auto">活动已超时,拼团失败!</View>
586
                         <View className="fail-text" style="margin:0 auto 40rpx auto">活动已超时,拼团失败!</View>
586
                       </View>
587
                       </View>
587
                     )
588
                     )
627
 
628
 
628
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
629
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
629
                 <View style="padding:0 40rpx 180rpx 40rpx">
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
                 </View>
632
                 </View>
632
                 {(actState === ActBeforeStart || (isStarter && actState === ActInProcess && groupState === GroupInProcess) || (!isStarter && actState === ActInProcess && groupState != GroupInProcess) || (!isStarter && actState === ActInProcess && groupState === GroupInProcess)) &&
633
                 {(actState === ActBeforeStart || (isStarter && actState === ActInProcess && groupState === GroupInProcess) || (!isStarter && actState === ActInProcess && groupState != GroupInProcess) || (!isStarter && actState === ActInProcess && groupState === GroupInProcess)) &&
633
                   <View className="btn-fixed">
634
                   <View className="btn-fixed">

+ 11
- 9
src/pages/activity/detail/assistance.js 查看文件

10
 // import WxParse from '@components/wxParse/wxParse'
10
 // import WxParse from '@components/wxParse/wxParse'
11
 // import getUserPhone from '@utils/getUserPhone'
11
 // import getUserPhone from '@utils/getUserPhone'
12
 import ready from '@utils/ready'
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
 import {
14
 import {
15
   getHelpDetail,
15
   getHelpDetail,
16
   createHelpActivity,
16
   createHelpActivity,
72
     ready.queue(() => {
72
     ready.queue(() => {
73
       // 必须授权电话
73
       // 必须授权电话
74
       if (this.toggleGrantPhone()) {
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
   // 调起授权电话
127
   // 调起授权电话
128
   toggleGrantPhone = () => {
128
   toggleGrantPhone = () => {
129
     const { userInfo: { person: { phone, tel } } } = this.props
129
     const { userInfo: { person: { phone, tel } } } = this.props
130
+    
130
     if (!phone && !tel) {
131
     if (!phone && !tel) {
131
       this.setState({ grantPhoneVisible: true })
132
       this.setState({ grantPhoneVisible: true })
132
       return false
133
       return false
140
   // 调起授权头像
141
   // 调起授权头像
141
   toggleGrantAvatar = () => {
142
   toggleGrantAvatar = () => {
142
     const { userInfo: { person: { avatarurl } } } = this.props
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
       this.setState({ grantAvatarVisible: true })
147
       this.setState({ grantAvatarVisible: true })
145
       return false
148
       return false
146
     }
149
     }
147
     console.log(avatarurl,"avatarurl")
150
     console.log(avatarurl,"avatarurl")
148
-    console.log(this.props.userInfo,"this.props")
149
     return true
151
     return true
150
   }
152
   }
151
 
153
 
518
         }
520
         }
519
         {
521
         {
520
           grantAvatarVisible &&
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
         <BackHomeBtn></BackHomeBtn>
525
         <BackHomeBtn></BackHomeBtn>
524
         {
526
         {
526
             <View className="ass-page">
528
             <View className="ass-page">
527
               <Notice></Notice>
529
               <Notice></Notice>
528
               <View className="detail-banner">
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
                 <View className="rest-time">
533
                 <View className="rest-time">
532
                   <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '')} </Text>
534
                   <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '')} </Text>
627
                 </View>
629
                 </View>
628
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
630
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
629
                 <View style="padding:0 40rpx">
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
                 </View>
633
                 </View>
632
 
634
 
633
               </ScrollView>
635
               </ScrollView>

+ 2
- 2
src/pages/activity/detail/index.js 查看文件

7
 import WxParse from '@components/wxParse/wxParse'
7
 import WxParse from '@components/wxParse/wxParse'
8
 import getUserPhone from '@utils/getUserPhone'
8
 import getUserPhone from '@utils/getUserPhone'
9
 import ready from '@utils/ready'
9
 import ready from '@utils/ready'
10
-import { getDownloadURL, times, getThumbnail } from '@utils/tools'
10
+import { getDownloadURL, times, transferImage } from '@utils/tools'
11
 import {
11
 import {
12
   addActivityShareNum,
12
   addActivityShareNum,
13
   signupActivity,
13
   signupActivity,
324
             <View>
324
             <View>
325
               <Notice></Notice>
325
               <Notice></Notice>
326
               <View className="detail-banner">
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
               </View>
328
               </View>
329
               <ScrollView
329
               <ScrollView
330
                 scrollY
330
                 scrollY

+ 2
- 2
src/pages/activity/item/index.js 查看文件

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

+ 4
- 4
src/pages/agent/recommend/index.js 查看文件

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

+ 35
- 32
src/pages/card/index.js 查看文件

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

+ 8
- 8
src/pages/card/poster.js 查看文件

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

+ 2
- 2
src/pages/checkin/checkinsuccess/index.js 查看文件

1
 import Taro, { Component } from '@tarojs/taro';
1
 import Taro, { Component } from '@tarojs/taro';
2
 import './index.scss'
2
 import './index.scss'
3
-import {getThumbnail } from '@utils/tools'
3
+import {transferImage } from '@utils/tools'
4
 
4
 
5
 
5
 
6
 
6
 
36
     return (
36
     return (
37
       <View className="checkin" style="width:100vw;height:100vh;background:rgba(245,245,245,1);" >
37
       <View className="checkin" style="width:100vw;height:100vh;background:rgba(245,245,245,1);" >
38
         <View style="text-align: center;">
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
         </View>
40
         </View>
41
         <View>
41
         <View>
42
           {this.state.addPoints && (<Text className="text1" style="">+{this.state.addPoints}积分</Text>)}
42
           {this.state.addPoints && (<Text className="text1" style="">+{this.state.addPoints}积分</Text>)}

+ 61
- 19
src/pages/checkin/index.js 查看文件

4
 
4
 
5
 // import achievePhone from '@components/achievePhone'
5
 // import achievePhone from '@components/achievePhone'
6
 import { checkinDetails, checkinActive } from '@services/checkin'
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
 export default class checkin extends Component {
14
 export default class checkin extends Component {
10
 
15
 
11
   state = {
16
   state = {
15
   }
20
   }
16
 
21
 
17
   componentWillMount () {
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
   // dynamicId
65
   // dynamicId
27
   getcheckinDetails (id, type) {
66
   getcheckinDetails (id, type) {
28
     Taro.showLoading()
67
     Taro.showLoading()
29
 
68
 
30
     checkinDetails(id, type).then(res => {
69
     checkinDetails(id, type).then(res => {
70
+      console.log('data:', res)
31
       Taro.hideLoading()
71
       Taro.hideLoading()
32
       this.setState({
72
       this.setState({
33
         data: res,
73
         data: res,
34
-      })      
74
+      })
35
     })
75
     })
36
   }
76
   }
37
 
77
 
43
 
83
 
44
       // TODO: 需要依据 type 跳转
84
       // TODO: 需要依据 type 跳转
45
       Taro.navigateTo({
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
     }).catch((err) => {
89
     }).catch((err) => {
50
       Taro.showToast({
90
       Taro.showToast({
51
-        title: `失败: ${err.message}`
91
+        title: `失败: ${err.message}`,
92
+        icon: 'none'
52
       })
93
       })
53
 
94
 
54
       console.error(err)
95
       console.error(err)
64
 
105
 
65
   render () {
106
   render () {
66
     const { dynamic = {}, enlist = {}, person = {} } = this.state.data || {}
107
     const { dynamic = {}, enlist = {}, person = {} } = this.state.data || {}
67
-
108
+    const { activityStatus } = dynamic || {}
109
+    console.log(enlist, 'enlist')
68
     return (
110
     return (
69
       <View className="checkin" style="width:100vw;height:100vh;" >
111
       <View className="checkin" style="width:100vw;height:100vh;" >
70
 
112
 
104
           {/* {console.log(data.person.status)} */}
146
           {/* {console.log(data.person.status)} */}
105
         </View>}
147
         </View>}
106
         {enlist.enlistId == null && <View className="unregistered">
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
         </View>
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
         </View>
155
         </View>
114
           }
156
           }
115
 
157
 
116
-          {!dynamic.activityStatus && 
158
+          {activityStatus===0 &&
117
             <View>
159
             <View>
118
               <View>
160
               <View>
119
                 <Image className="img1" src={require('@assets/checkin/noentry.png')} ></Image>
161
                 <Image className="img1" src={require('@assets/checkin/noentry.png')} ></Image>
125
 
167
 
126
               <AtButton type='primary' className="toactivebutton" onClick={() => { this.toactivity(dynamic.dynamicId) }}>立即前往</AtButton>
168
               <AtButton type='primary' className="toactivebutton" onClick={() => { this.toactivity(dynamic.dynamicId) }}>立即前往</AtButton>
127
             </View>
169
             </View>
128
-          }        
170
+          }
129
         </View>
171
         </View>
130
-      }
172
+        }
131
       </View>
173
       </View>
132
 
174
 
133
     );
175
     );

+ 6
- 6
src/pages/im/index.js 查看文件

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

+ 2
- 2
src/pages/news/detail/index.js 查看文件

7
 import BackHomeBtn from '@components/BackHomeBtn'
7
 import BackHomeBtn from '@components/BackHomeBtn'
8
 import Notice from '@components/Notice'
8
 import Notice from '@components/Notice'
9
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
9
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
10
-import { getDownloadURL, getThumbnail } from '@utils/tools'
10
+import { getDownloadURL, transferImage } from '@utils/tools'
11
 import {
11
 import {
12
   addNewsUv,
12
   addNewsUv,
13
   favorNews,
13
   favorNews,
222
 
222
 
223
                   <View>{dayjs(detail.createDate).format('YYYY-MM-DD')}</View>
223
                   <View>{dayjs(detail.createDate).format('YYYY-MM-DD')}</View>
224
                 </View>
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
                 <View className="detail-con">
226
                 <View className="detail-con">
227
                   <import src='../../../components/wxParse/wxParse.wxml' />
227
                   <import src='../../../components/wxParse/wxParse.wxml' />
228
                   <template is='wxParse' data='{{wxParseData:article.nodes}}' />
228
                   <template is='wxParse' data='{{wxParseData:article.nodes}}' />

+ 2
- 2
src/pages/news/item.js 查看文件

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

+ 1
- 1
src/pages/news/item.scss 查看文件

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

+ 3
- 1
src/pages/person/customerAnalysis/followUpCustomer/index.js 查看文件

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

+ 4
- 4
src/pages/person/customerAnalysis/index.js 查看文件

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

+ 2
- 2
src/pages/person/customerAnalysis/item/index.js 查看文件

1
 import Taro, { Component } from '@tarojs/taro';
1
 import Taro, { Component } from '@tarojs/taro';
2
 import './index.scss'
2
 import './index.scss'
3
 import dayjs from 'dayjs'
3
 import dayjs from 'dayjs'
4
-import { getThumbnail } from '@utils/tools'
4
+import { transferImage } from '@utils/tools'
5
 
5
 
6
 export default class Item extends Component {
6
 export default class Item extends Component {
7
   static defaultProps = {
7
   static defaultProps = {
20
           <View className={data.type == 'help' ? 'type' : 'type2'}>{data.type == 'help' ? '助力' : '拼团'}</View>
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
         <View className="box">
25
         <View className="box">
26
 
26
 

+ 3
- 3
src/pages/person/customerAnalysis/myCustomer.js 查看文件

8
 import './index.scss'
8
 import './index.scss'
9
 import ActivityItem from './item'
9
 import ActivityItem from './item'
10
 import dayjs from 'dayjs'
10
 import dayjs from 'dayjs'
11
-import { getThumbnail } from '@utils/tools'
11
+import { transferImage } from '@utils/tools'
12
 import emptyImg from '@assets/empty.png'
12
 import emptyImg from '@assets/empty.png'
13
 const maleImg = require('@assets/person/male.png')
13
 const maleImg = require('@assets/person/male.png')
14
 const femaleImg = require('@assets/person/female.png')
14
 const femaleImg = require('@assets/person/female.png')
451
         {followVisible && this.renderFollowBox()}
451
         {followVisible && this.renderFollowBox()}
452
         {baseVisible && this.renderBaseBox()}
452
         {baseVisible && this.renderBaseBox()}
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;">
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
           <View className='user__left__name'>
456
           <View className='user__left__name'>
457
             <View className="text">{customerDetail.name}</View>
457
             <View className="text">{customerDetail.name}</View>
458
             {
458
             {

+ 3
- 1
src/pages/person/customerAnalysis/transactionCustomer/index.js 查看文件

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

+ 2
- 1
src/pages/person/favorite/index.js 查看文件

5
 import { getCardList } from '@services/card'
5
 import { getCardList } from '@services/card'
6
 import { queryNewsList } from '@services/news'
6
 import { queryNewsList } from '@services/news'
7
 import { buildingDynamiceList } from '@services/activity'
7
 import { buildingDynamiceList } from '@services/activity'
8
+import { transferImage } from '@utils/tools'
8
 import ProjectItem from '../../project/item'
9
 import ProjectItem from '../../project/item'
9
 import NewsItem from '../../news/item'
10
 import NewsItem from '../../news/item'
10
 
11
 
126
         {cardList.map(item => (
127
         {cardList.map(item => (
127
           <View className="card-item" key={item.id} onClick={this.navigateTo.bind(this, '/pages/card/index?id=' + item.id)}>
128
           <View className="card-item" key={item.id} onClick={this.navigateTo.bind(this, '/pages/card/index?id=' + item.id)}>
128
             <View className="flex">
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
               <Text className="name">{item.name}</Text>
131
               <Text className="name">{item.name}</Text>
131
             </View>
132
             </View>
132
             <View className="flex item-btn__box">
133
             <View className="flex item-btn__box">

+ 2
- 2
src/pages/person/index.js 查看文件

8
 import { getCodeMessage, putRegisterConsultant } from '@services/getCode'
8
 import { getCodeMessage, putRegisterConsultant } from '@services/getCode'
9
 import * as actions from '@actions/user'
9
 import * as actions from '@actions/user'
10
 import Authorize from '@components/authorize'
10
 import Authorize from '@components/authorize'
11
-import { getThumbnail } from '@utils/tools'
11
+import { transferImage } from '@utils/tools'
12
 import { menus } from './menus'
12
 import { menus } from './menus'
13
 
13
 
14
 @connect(({ user, city }) => ({ user, city }), { ...actions })
14
 @connect(({ user, city }) => ({ user, city }), { ...actions })
169
       <View className="person">
169
       <View className="person">
170
         <Notice></Notice>
170
         <Notice></Notice>
171
         <View className="info">
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
           <View className="content">
173
           <View className="content">
174
             <View className="info-block">
174
             <View className="info-block">
175
               <View className="avatar" onClick={this.goPersonDetail}>
175
               <View className="avatar" onClick={this.goPersonDetail}>

+ 3
- 2
src/pages/person/profile/detail/index.js 查看文件

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

+ 2
- 1
src/pages/person/profile/index.js 查看文件

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

+ 2
- 1
src/pages/policy/detail/index.js 查看文件

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

+ 2
- 1
src/pages/policy/item/index.js 查看文件

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

+ 2
- 2
src/pages/project/album/index.js 查看文件

4
 import { connect } from '@tarojs/redux'
4
 import { connect } from '@tarojs/redux'
5
 import * as actions from '@actions/project'
5
 import * as actions from '@actions/project'
6
 import { savePoint, updatePoint } from '@services/common'
6
 import { savePoint, updatePoint } from '@services/common'
7
-import { getThumbnail } from '@utils/tools'
7
+import { transferImage } from '@utils/tools'
8
 
8
 
9
 
9
 
10
 @connect(state => state.project, { ...actions })
10
 @connect(state => state.project, { ...actions })
98
           {imgList.map((item, index) => {
98
           {imgList.map((item, index) => {
99
             console.log(item, '299999933333222')
99
             console.log(item, '299999933333222')
100
             return (
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
         </View>
104
         </View>

+ 1
- 1
src/pages/project/banner/index.js 查看文件

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

+ 17
- 17
src/pages/project/detail/index.js 查看文件

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

+ 52
- 15
src/pages/project/detail/poster.js 查看文件

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

+ 4
- 1
src/pages/project/detail/poster.scss 查看文件

44
       padding: 40px 0;
44
       padding: 40px 0;
45
 
45
 
46
       .result-img {
46
       .result-img {
47
-        height: 60vh;
47
+        height: 720.65px;
48
+        // height: 60vh;
49
+        width: 406px;
48
         display: block;
50
         display: block;
49
         margin: 0 auto;
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 查看文件

35
           </View>
35
           </View>
36
           <View className='item'>
36
           <View className='item'>
37
             <Text className='txt left-txt'>均价</Text>
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
           </View>
39
           </View>
40
           <View className='item'>
40
           <View className='item'>
41
             <Text className='txt left-txt'>销售状态</Text>
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
           </View>
43
           </View>
44
           <View className='item'>
44
           <View className='item'>
45
             <Text className='txt left-txt'>开盘日期</Text>
45
             <Text className='txt left-txt'>开盘日期</Text>
83
           </View>
83
           </View>
84
           <View className='item'>
84
           <View className='item'>
85
             <Text className='txt left-txt'>项目说明</Text>
85
             <Text className='txt left-txt'>项目说明</Text>
86
-            <Text className='txt right-txt'>{'暂无'}</Text>
86
+            <Text className='txt right-txt'>{projectDetail.dynamic || '暂无'}</Text>
87
           </View>
87
           </View>
88
         </View>
88
         </View>
89
       </View >
89
       </View >

+ 3
- 3
src/pages/project/index.js 查看文件

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

+ 4
- 4
src/pages/project/item/index.js 查看文件

1
 import Taro, { Component } from '@tarojs/taro'
1
 import Taro, { Component } from '@tarojs/taro'
2
 import './index.scss'
2
 import './index.scss'
3
-import { getThumbnail } from '@utils/tools'
3
+import { transferImage } from '@utils/tools'
4
 
4
 
5
 const dotImg = require('@assets/dot.png')
5
 const dotImg = require('@assets/dot.png')
6
 
6
 
26
       <View className='item' onClick={onClick.bind(this, data)}>
26
       <View className='item' onClick={onClick.bind(this, data)}>
27
         <View className='item__top'>
27
         <View className='item__top'>
28
           {console.log(data, 'data')}
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
           {data.marketStatus &&
30
           {data.marketStatus &&
31
             <View className={data.marketStatus == '在售' ? 'item__status sale' : data.marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{data.marketStatus}</View>}
31
             <View className={data.marketStatus == '在售' ? 'item__status sale' : data.marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{data.marketStatus}</View>}
32
           <View className='item__right'>
32
           <View className='item__right'>
56
             <View className='item__bottom__right'>
56
             <View className='item__bottom__right'>
57
               <Text className='item__bottom__seenum'>{data.pvNum || 0}人围观</Text>
57
               <Text className='item__bottom__seenum'>{data.pvNum || 0}人围观</Text>
58
               <View className='see__img'>
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
               </View>
61
               </View>
62
             </View>
62
             </View>
63
           )}
63
           )}

+ 2
- 1
src/pages/project/map/index.js 查看文件

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

+ 2
- 2
src/pages/project/swiper/index.js 查看文件

3
 // import { cdn } from '@constants/api'
3
 // import { cdn } from '@constants/api'
4
 import './index.scss'
4
 import './index.scss'
5
 import emptyImg from '@assets/empty.png'
5
 import emptyImg from '@assets/empty.png'
6
-import { getThumbnail } from '@utils/tools'
6
+import { transferImage } from '@utils/tools'
7
 
7
 
8
 export default class SwiperBanner extends Component {
8
 export default class SwiperBanner extends Component {
9
   static defaultProps = {
9
   static defaultProps = {
48
                   mode="aspectFill"
48
                   mode="aspectFill"
49
                   style={style}
49
                   style={style}
50
                   className='home-banner__swiper-item-img'
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
                 {type=='activity' && <View className='home-banner__swiper-item__title'> {item.title}</View>}
53
                 {type=='activity' && <View className='home-banner__swiper-item__title'> {item.title}</View>}
54
               </View>
54
               </View>

+ 2
- 2
src/pages/shop/banner/index.js 查看文件

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

+ 2
- 2
src/pages/shop/detail/index.js 查看文件

5
 import * as actions from '@actions/shop'
5
 import * as actions from '@actions/shop'
6
 import WxParse from '@components/wxParse/wxParse'
6
 import WxParse from '@components/wxParse/wxParse'
7
 
7
 
8
-import { getThumbnail } from '@utils/tools'
8
+import { transferImage } from '@utils/tools'
9
 
9
 
10
 let hasClick = true
10
 let hasClick = true
11
 @connect(state => state.shop, { ...actions })
11
 @connect(state => state.shop, { ...actions })
91
             paddingBottom: `${this.state.visibleExcBtn ? '100rpx' : ''}`
91
             paddingBottom: `${this.state.visibleExcBtn ? '100rpx' : ''}`
92
           }}>
92
           }}>
93
           <View className="detail__head">
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
             <Image src={require('@assets/shop/hot.png')} className="detail__head-hot" />
95
             <Image src={require('@assets/shop/hot.png')} className="detail__head-hot" />
96
           </View>
96
           </View>
97
 
97
 

+ 4
- 4
src/pages/shop/index.js 查看文件

3
 import { AtTabs, AtTabsPane } from 'taro-ui'
3
 import { AtTabs, AtTabsPane } from 'taro-ui'
4
 import "taro-ui/dist/style/components/tabs.scss"
4
 import "taro-ui/dist/style/components/tabs.scss"
5
 import './index.scss'
5
 import './index.scss'
6
-import { getThumbnail } from '@utils/tools'
6
+import { transferImage } from '@utils/tools'
7
 // import Search from '@components/search'
7
 // import Search from '@components/search'
8
 import Banner from './banner'
8
 import Banner from './banner'
9
 import ready from '@utils/ready'
9
 import ready from '@utils/ready'
264
 
264
 
265
                 <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
265
                 <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
266
                   {console.log(item, '--item---')}
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
                   <View className="item__title">{item.goodsName}</View>
268
                   <View className="item__title">{item.goodsName}</View>
269
                   <View className="item__des">
269
                   <View className="item__des">
270
                     <View>
270
                     <View>
297
                     {goodsList.length &&
297
                     {goodsList.length &&
298
                       goodsList.map(item => (
298
                       goodsList.map(item => (
299
                         <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
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
                           <View className="item__title">{item.goodsName}</View>
301
                           <View className="item__title">{item.goodsName}</View>
302
                           <View className="item__des">
302
                           <View className="item__des">
303
                             <View>
303
                             <View>
347
           }}>
347
           }}>
348
           <View className="user_box">
348
           <View className="user_box">
349
             <View className="user_con">
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
               <Image className="user__left__headimg" src={person.avatarurl} />
351
               <Image className="user__left__headimg" src={person.avatarurl} />
352
               <View className='user__left__name'>{person.nickname}</View>
352
               <View className='user__left__name'>{person.nickname}</View>
353
               {
353
               {

+ 2
- 1
src/pages/shop/record/index.js 查看文件

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

+ 14
- 0
src/utils/tools.js 查看文件

42
   return img
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
  * 解析 queryString   a=b&c=d  ==> { a:b, c:d }
60
  * 解析 queryString   a=b&c=d  ==> { a:b, c:d }
47
  * @param {*} queryString 
61
  * @param {*} queryString