Browse Source

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

林凡 5 years ago
parent
commit
bcdc3c2e92
71 changed files with 653 additions and 355 deletions
  1. 1
    1
      config/prod.js
  2. 1
    1
      project.config.json
  3. 19
    13
      src/app.js
  4. BIN
      src/assets/add.png
  5. BIN
      src/assets/close.png
  6. BIN
      src/assets/dingwei.png
  7. BIN
      src/assets/dot.png
  8. BIN
      src/assets/empty.png
  9. BIN
      src/assets/fasong@3x.png
  10. BIN
      src/assets/fenxiang_2@3x.png
  11. BIN
      src/assets/fill_1@3x.png
  12. BIN
      src/assets/goto.png
  13. BIN
      src/assets/helpgroup/bg.png
  14. BIN
      src/assets/home.png
  15. BIN
      src/assets/homeicon.png
  16. BIN
      src/assets/icon11.png
  17. BIN
      src/assets/index/background.png
  18. BIN
      src/assets/index/encyclopedia-icon.png
  19. BIN
      src/assets/index/forward.png
  20. BIN
      src/assets/index/inspection.png
  21. BIN
      src/assets/index/location.png
  22. BIN
      src/assets/index/logo.png
  23. BIN
      src/assets/index/mall-icon.png
  24. BIN
      src/assets/index/map-icon.png
  25. BIN
      src/assets/index/map.png
  26. BIN
      src/assets/index/recommend-icon.png
  27. BIN
      src/assets/index/recommend.png
  28. BIN
      src/assets/index/search.png
  29. BIN
      src/assets/index/share.png
  30. BIN
      src/assets/location.png
  31. BIN
      src/assets/map.png
  32. BIN
      src/assets/mine/share.png
  33. BIN
      src/assets/notice.png
  34. BIN
      src/assets/play.png
  35. BIN
      src/assets/qianw.png
  36. BIN
      src/assets/save-btn.png
  37. BIN
      src/assets/search.png
  38. BIN
      src/assets/shadow.png
  39. BIN
      src/assets/share-btn.png
  40. BIN
      src/assets/tuijiankehu.png
  41. BIN
      src/assets/tupian_3@3x.png
  42. BIN
      src/assets/zhuan.png
  43. BIN
      src/assets/zhuanggongnengtubiao_@3x.png
  44. BIN
      src/assets/zixun.png
  45. 0
    1
      src/components/achieveAvatar/index.js
  46. 1
    1
      src/components/achievePhone/index.js
  47. 0
    25
      src/components/consultant/index.js
  48. 0
    2
      src/components/taro-plugin-canvas/index.js
  49. 14
    7
      src/pages/activity/detail/assemble.js
  50. 21
    14
      src/pages/activity/detail/assistance.js
  51. 16
    11
      src/pages/activity/detail/index.js
  52. 2
    2
      src/pages/activity/index.js
  53. 0
    1
      src/pages/activity/item/index.js
  54. 1
    1
      src/pages/checkin/index.js
  55. 0
    2
      src/pages/city/index.js
  56. 62
    20
      src/pages/news/detail/index.js
  57. 1
    1
      src/pages/person/customerAnalysis/myCustomer.js
  58. 1
    1
      src/pages/person/menus.js
  59. 81
    0
      src/pages/project/activity/index.js
  60. 126
    0
      src/pages/project/activity/index.scss
  61. 0
    2
      src/pages/project/album/index.js
  62. 1
    1
      src/pages/project/banner/index.js
  63. 58
    29
      src/pages/project/detail/index.js
  64. 11
    11
      src/pages/project/h5Page.js
  65. 100
    102
      src/pages/project/index.js
  66. 99
    52
      src/pages/project/index.scss
  67. 0
    1
      src/pages/project/item/index.js
  68. 35
    30
      src/pages/project/newsbanner/index.js
  69. 1
    1
      src/reducers/city.js
  70. 0
    1
      src/utils/login.js
  71. 1
    21
      src/utils/rtLog.js

+ 1
- 1
config/prod.js View File

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
-    Version:'V3.5.4_2019-12-182140'
12
+    Version:'V3.5.4_2019-12-191441'
13
   },
13
   },
14
   weapp: {},
14
   weapp: {},
15
   h5: {}
15
   h5: {}

+ 1
- 1
project.config.json View File

1
 {
1
 {
2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "mini-chengjiao",
3
 	"projectname": "mini-chengjiao",
4
-	"description": "知与行互动",
4
+	"description": "知与行联调",
5
 	"appid": "wxd9ee3a9480a4e544",
5
 	"appid": "wxd9ee3a9480a4e544",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,

+ 19
- 13
src/app.js View File

5
 import "@components/wxParse/wxParse.scss";
5
 import "@components/wxParse/wxParse.scss";
6
 import Index from './pages/auth/index'
6
 import Index from './pages/auth/index'
7
 import { Provider } from '@tarojs/redux'
7
 import { Provider } from '@tarojs/redux'
8
-import { getQueryString } from '@utils/tools'
8
+import { parseQueryString } from '@utils/tools'
9
 
9
 
10
 import {
10
 import {
11
   getCodeScene,
11
   getCodeScene,
176
     })
176
     })
177
   }
177
   }
178
   componentDidMount() {
178
   componentDidMount() {
179
-    console.info('app componentDidMount')
179
+    // console.info('app componentDidMount')
180
   }
180
   }
181
   componentWillMount(params) {
181
   componentWillMount(params) {
182
     // console.info('app componentWillMount', params)
182
     // console.info('app componentWillMount', params)
185
 
185
 
186
   initData () {
186
   initData () {
187
     // console.info('app componentDidShow')
187
     // console.info('app componentDidShow')
188
-    console.info('router1', this.$router.params)
188
+    console.info('router1', this.$router)
189
     console.info('ready status1', ready)
189
     console.info('ready status1', ready)
190
 
190
 
191
     // 获取城市列表
191
     // 获取城市列表
229
   getRouterParams() {
229
   getRouterParams() {
230
     return new Promise(resolve => {
230
     return new Promise(resolve => {
231
       const router = this.$router.params
231
       const router = this.$router.params
232
-      let { query: { scene: paramsId } } = router
233
-console.log(paramsId,'paramsId---')
232
+      const originQuery = { ...router.query };
233
+      let { query: { scene: paramsId }, scene } = router
234
+
235
+      // query 里面如果跟同级场景一样, 说明是小程序原生场景值
236
+      if (paramsId === scene) {
237
+        paramsId = undefined
238
+      }
239
+
234
       if (paramsId) {
240
       if (paramsId) {
235
         // 扫码进入
241
         // 扫码进入
236
         getCodeScene(paramsId).then(res => {
242
         getCodeScene(paramsId).then(res => {
237
           let params = JSON.parse(res).scene
243
           let params = JSON.parse(res).scene
238
-          let _from = getQueryString(params, 'from')
239
-          let _recommender = getQueryString(params, 'recommender')
240
-          let id = getQueryString(params, 'id')
241
-          let agentCode = getQueryString(params, 'agentCode')
244
+          let { from: _from, recommender: _recommender, id, ...left } = parseQueryString(params) || {}
245
+
242
           router.query = Object.assign(router.query, {
246
           router.query = Object.assign(router.query, {
247
+            originQuery,
243
             id,
248
             id,
244
             paramsId,
249
             paramsId,
245
             from: _from,
250
             from: _from,
246
             recommender: _recommender,
251
             recommender: _recommender,
247
             params,
252
             params,
248
             targetId: id,
253
             targetId: id,
249
-            agentCode
254
+            ...left,
250
           })
255
           })
251
 
256
 
252
           resolve(router)
257
           resolve(router)
253
         })
258
         })
254
       } else {
259
       } else {
255
         router.query = Object.assign(router.query, {
260
         router.query = Object.assign(router.query, {
256
-          paramsId: router.query.id ? router.query.id : '',
257
-          from: 'search',
258
-          recommender: router.query.recommender ? router.query.recommender : ''
261
+          originQuery,
262
+          paramsId: router.query.id || '',
263
+          from: router.query.from || 'search',
264
+          recommender: router.query.recommender || ''
259
         })
265
         })
260
 
266
 
261
         resolve(router)
267
         resolve(router)

BIN
src/assets/add.png View File


BIN
src/assets/close.png View File


BIN
src/assets/dingwei.png View File


BIN
src/assets/dot.png View File


BIN
src/assets/empty.png View File


BIN
src/assets/fasong@3x.png View File


BIN
src/assets/fenxiang_2@3x.png View File


BIN
src/assets/fill_1@3x.png View File


BIN
src/assets/goto.png View File


BIN
src/assets/helpgroup/bg.png View File


BIN
src/assets/home.png View File


BIN
src/assets/homeicon.png View File


BIN
src/assets/icon11.png View File


BIN
src/assets/index/background.png View File


BIN
src/assets/index/encyclopedia-icon.png View File


BIN
src/assets/index/forward.png View File


BIN
src/assets/index/inspection.png View File


BIN
src/assets/index/location.png View File


BIN
src/assets/index/logo.png View File


BIN
src/assets/index/mall-icon.png View File


BIN
src/assets/index/map-icon.png View File


BIN
src/assets/index/map.png View File


BIN
src/assets/index/recommend-icon.png View File


BIN
src/assets/index/recommend.png View File


BIN
src/assets/index/search.png View File


BIN
src/assets/index/share.png View File


BIN
src/assets/location.png View File


BIN
src/assets/map.png View File


BIN
src/assets/mine/share.png View File


BIN
src/assets/notice.png View File


BIN
src/assets/play.png View File


BIN
src/assets/qianw.png View File


BIN
src/assets/save-btn.png View File


BIN
src/assets/search.png View File


BIN
src/assets/shadow.png View File


BIN
src/assets/share-btn.png View File


BIN
src/assets/tuijiankehu.png View File


BIN
src/assets/tupian_3@3x.png View File


BIN
src/assets/zhuan.png View File


BIN
src/assets/zhuanggongnengtubiao_@3x.png View File


BIN
src/assets/zixun.png View File


+ 0
- 1
src/components/achieveAvatar/index.js View File

84
   }
84
   }
85
   render() {
85
   render() {
86
     const { user = {} } = this.props
86
     const { user = {} } = this.props
87
-    console.log('---------renderMaskBanner--------')
88
 
87
 
89
     return (
88
     return (
90
       <Block>
89
       <Block>

+ 1
- 1
src/components/achievePhone/index.js View File

4
 
4
 
5
 const grantIcon = require('@assets/helpgroup/shouquan.png')
5
 const grantIcon = require('@assets/helpgroup/shouquan.png')
6
 const logoImg = require('@assets/index/logo.png')
6
 const logoImg = require('@assets/index/logo.png')
7
-const bgImg = require('@assets/helpgroup/bg.png')
7
+const bgImg = "https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/bg.png"
8
 
8
 
9
 export default class Index extends Component {
9
 export default class Index extends Component {
10
 
10
 

+ 0
- 25
src/components/consultant/index.js View File

1
 import Taro, { Component } from '@tarojs/taro';
1
 import Taro, { Component } from '@tarojs/taro';
2
 import './index.scss'
2
 import './index.scss'
3
 import { transferImage } from '@utils/tools'
3
 import { transferImage } from '@utils/tools'
4
-import { reportClient } from '@services/report'
5
 import * as noticeType from '@constants/common.js'
4
 import * as noticeType from '@constants/common.js'
6
 
5
 
7
 export default class Index extends Component {
6
 export default class Index extends Component {
17
     }
16
     }
18
     componentDidMount() {
17
     componentDidMount() {
19
 
18
 
20
-    }
21
-    // 报备客户
22
-    reportClient() {
23
-
24
-        // const router = Taro.getStorageSync('router')
25
-        // const consultant = this.$router.params.consultant || router.query.consultant || ""
26
-        // const {
27
-        //     userInfo: { person: { phone, tel, userId } }
28
-        // } = this.props
29
-        // // debugger
30
-        // if (consultant && consultant != userId) {
31
-        //     const realPhone = phone || tel
32
-        //     const payload = {
33
-        //         realtyConsultant: consultant, //报备人 置业顾问
34
-        //         phone: realPhone,
35
-        //         showToast: false
36
-        //     }
37
-
38
-        //     reportClient(payload).then(res => {
39
-        //         console.log('恭喜您绑定成功')
40
-        //     }).catch(err => {
41
-        //         console.error(err)
42
-        //     })
43
-        // }
44
     }
19
     }
45
     //   悬浮框显示隐藏
20
     //   悬浮框显示隐藏
46
     handleClick() {
21
     handleClick() {

+ 0
- 2
src/components/taro-plugin-canvas/index.js View File

288
   }
288
   }
289
 
289
 
290
   render() {
290
   render() {
291
-    console.log('------render canvas----')
292
-
293
     const { pxWidth, pxHeight, debug } = this.state;
291
     const { pxWidth, pxHeight, debug } = this.state;
294
     if(pxWidth && pxHeight){
292
     if(pxWidth && pxHeight){
295
       return (
293
       return (

+ 14
- 7
src/pages/activity/detail/assemble.js View File

254
     const { userInfo } = this.props
254
     const { userInfo } = this.props
255
 
255
 
256
     Taro.showLoading()
256
     Taro.showLoading()
257
+    const router = Taro.getStorageSync('router')
258
+    const consultant = this.$router.params.consultant || router.query.consultant
259
+    const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
260
+    const recommender = this.$router.params.recommender || router.query.recommender || ""
257
     getGroupDetail(id, recordId).then(res => {
261
     getGroupDetail(id, recordId).then(res => {
258
       this.stopTicker()
262
       this.stopTicker()
259
 
263
 
293
         eventType: 'group',
297
         eventType: 'group',
294
         propertyName: '拼团详情',
298
         propertyName: '拼团详情',
295
         buildingId: res.taShareActivity.buildingId,
299
         buildingId: res.taShareActivity.buildingId,
300
+        consultantId: consultantId,
301
+        sharePersonId: recommender,
296
         targetId: id,
302
         targetId: id,
297
         data: '{"recordId":"' + recordId + '"}'
303
         data: '{"recordId":"' + recordId + '"}'
298
       }).then((res) => {
304
       }).then((res) => {
299
         this.setState({ pointRecordId: res.recordId })
305
         this.setState({ pointRecordId: res.recordId })
300
       })
306
       })
301
     })
307
     })
302
-    const router = Taro.getStorageSync('router')
303
-    const consultant = this.$router.params.consultant || router.query.consultant
308
+
304
     if (consultant) {
309
     if (consultant) {
305
       this.reportClientFn()
310
       this.reportClientFn()
306
       getCardDetail(consultant).then(res => {
311
       getCardDetail(consultant).then(res => {
316
 
321
 
317
     const router = Taro.getStorageSync('router') || { query: {} }
322
     const router = Taro.getStorageSync('router') || { query: {} }
318
     const consultant = this.$router.params.consultant || router.query.consultant || ""
323
     const consultant = this.$router.params.consultant || router.query.consultant || ""
319
-    const { userInfo: { person: { phone, tel, userId } } } = this.props
324
+    const { userInfo: { person: { phone, tel, personId } } } = this.props
320
 
325
 
321
-    if (consultant && consultant != userId) {
326
+    if (consultant && consultant != personId) {
322
       const realPhone = phone || tel
327
       const realPhone = phone || tel
323
       const payload = {
328
       const payload = {
324
         realtyConsultant: consultant, //报备人 置业顾问
329
         realtyConsultant: consultant, //报备人 置业顾问
337
     const { id, recordId } = this.state
342
     const { id, recordId } = this.state
338
     const { userInfo: { person: { personId, personType } } } = this.props
343
     const { userInfo: { person: { personId, personType } } } = this.props
339
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
344
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
345
+    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
340
 
346
 
341
     let queryParams = [
347
     let queryParams = [
342
       `id=${id}`,
348
       `id=${id}`,
343
       `from=group_share`,
349
       `from=group_share`,
344
       `recommender=${personId}`,
350
       `recommender=${personId}`,
345
       `consultant=${consultant}`,
351
       `consultant=${consultant}`,
352
+      `consultantId=${consultantId}`,
346
     ]
353
     ]
347
     if (recordId) {
354
     if (recordId) {
348
       queryParams.push(`recordId=${recordId}`)
355
       queryParams.push(`recordId=${recordId}`)
360
 
367
 
361
   onShareAppMessage = () => {
368
   onShareAppMessage = () => {
362
     const { shares, detail: { groupActivityId } } = this.state
369
     const { shares, detail: { groupActivityId } } = this.state
363
-    const currentPage = this.currentPageAndParams().join('?')
370
+    const currentPage = `/${this.currentPageAndParams().join('?')}`
364
     const { userInfo: { person: { personId, personType, userId } } } = this.props
371
     const { userInfo: { person: { personId, personType, userId } } } = this.props
365
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
372
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
366
 
373
 
602
 
609
 
603
     const posterConfigs = this.transTPLs2Configs(posterTpls, posterData)
610
     const posterConfigs = this.transTPLs2Configs(posterTpls, posterData)
604
 
611
 
605
-    console.log('------posterData------', posterData)
606
-    console.log('------posterConfigs------', posterConfigs)
612
+    // console.log('------posterData------', posterData)
613
+    // console.log('------posterConfigs------', posterConfigs)
607
 
614
 
608
     const isJoin = memberList.filter(x => x.personId === userInfo.person.personId)[0] || isStarter
615
     const isJoin = memberList.filter(x => x.personId === userInfo.person.personId)[0] || isStarter
609
 
616
 

+ 21
- 14
src/pages/activity/detail/assistance.js View File

257
     const { userInfo } = this.props
257
     const { userInfo } = this.props
258
 
258
 
259
     Taro.showLoading()
259
     Taro.showLoading()
260
+    const router = Taro.getStorageSync('router')
261
+    const consultant = this.$router.params.consultant || router.query.consultant
262
+    const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
263
+    const recommender = this.$router.params.recommender || router.query.recommender || ""
260
     getHelpDetail(id, initiateId).then(res => {
264
     getHelpDetail(id, initiateId).then(res => {
261
       this.stopTicker()
265
       this.stopTicker()
262
 
266
 
297
         eventType: 'help',
301
         eventType: 'help',
298
         propertyName: '助力详情',
302
         propertyName: '助力详情',
299
         buildingId: res.helpActivity.buildingId,
303
         buildingId: res.helpActivity.buildingId,
304
+        consultantId: consultantId,
305
+        sharePersonId: recommender,
300
         targetId: id,
306
         targetId: id,
301
         data: '{"initiateId":"' + initiateId + '"}'
307
         data: '{"initiateId":"' + initiateId + '"}'
302
       }).then((res) => {
308
       }).then((res) => {
303
         this.setState({ pointRecordId: res.recordId })
309
         this.setState({ pointRecordId: res.recordId })
304
       })
310
       })
305
     })
311
     })
306
-    const router = Taro.getStorageSync('router')
307
-    const consultant = this.$router.params.consultant || router.query.consultant
312
+
308
     if (consultant) {
313
     if (consultant) {
309
       this.reportClientFn()
314
       this.reportClientFn()
310
       getCardDetail(consultant).then(res => {
315
       getCardDetail(consultant).then(res => {
320
 
325
 
321
     const router = Taro.getStorageSync('router') || { query: {} }
326
     const router = Taro.getStorageSync('router') || { query: {} }
322
     const consultant = this.$router.params.consultant || router.query.consultant || ""
327
     const consultant = this.$router.params.consultant || router.query.consultant || ""
323
-    const { userInfo: { person: { phone, tel, userId } } } = this.props
328
+    const { userInfo: { person: { phone, tel, personId } } } = this.props
324
 
329
 
325
-    if (consultant && consultant != userId) {
330
+    if (consultant && consultant != personId) {
326
       const realPhone = phone || tel
331
       const realPhone = phone || tel
327
       const payload = {
332
       const payload = {
328
         realtyConsultant: consultant, //报备人 置业顾问
333
         realtyConsultant: consultant, //报备人 置业顾问
339
 
344
 
340
   currentPageAndParams() {
345
   currentPageAndParams() {
341
     const { id, initiateId } = this.state
346
     const { id, initiateId } = this.state
342
-    const { userInfo: { person: { personId, personType } } } = this.props
347
+    const { userInfo: { person: { personId, personType, userId } } } = this.props
343
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
348
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
349
+    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
344
 
350
 
345
     let queryParams = [
351
     let queryParams = [
346
       `id=${id}`,
352
       `id=${id}`,
347
       `from=help_share`,
353
       `from=help_share`,
348
       `recommender=${personId}`,
354
       `recommender=${personId}`,
349
       `consultant=${consultant}`,
355
       `consultant=${consultant}`,
356
+      `consultantId=${consultantId}`,
350
     ]
357
     ]
351
     if (initiateId) {
358
     if (initiateId) {
352
       queryParams.push(`initiateId=${initiateId}`)
359
       queryParams.push(`initiateId=${initiateId}`)
363
 
370
 
364
   onShareAppMessage = () => {
371
   onShareAppMessage = () => {
365
     const { shares, id } = this.state
372
     const { shares, id } = this.state
366
-    const currentPage = this.currentPageAndParams().join('?')
373
+    const currentPage = `/${this.currentPageAndParams().join('?')}`
367
     const { userInfo: { person: { personId, personType, userId } } } = this.props
374
     const { userInfo: { person: { personId, personType, userId } } } = this.props
368
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
375
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
369
 
376
 
396
   handleHelp = () => {
403
   handleHelp = () => {
397
     const { userInfo: { miniApp: { tpls } } } = this.props
404
     const { userInfo: { miniApp: { tpls } } } = this.props
398
     const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HELP && x.isSubscribe == true))[0].tplId
405
     const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HELP && x.isSubscribe == true))[0].tplId
399
-    const that=this
406
+    const that = this
400
     wx.requestSubscribeMessage({
407
     wx.requestSubscribeMessage({
401
       tmplIds: [tplId],
408
       tmplIds: [tplId],
402
       success(res) {
409
       success(res) {
412
         that.setState({ submitting: true }, () => {
419
         that.setState({ submitting: true }, () => {
413
           const { detail, initiateDetail } = that.state
420
           const { detail, initiateDetail } = that.state
414
           const person = that.props.userInfo.person
421
           const person = that.props.userInfo.person
415
-    
422
+
416
           giveFriendHelp({
423
           giveFriendHelp({
417
             buildingId: detail.buildingId,
424
             buildingId: detail.buildingId,
418
             helpActivityId: detail.helpActivityId,
425
             helpActivityId: detail.helpActivityId,
425
             Taro.hideLoading()
432
             Taro.hideLoading()
426
             const helpList = that.state.helpList || []
433
             const helpList = that.state.helpList || []
427
             helpList.push(res.helpRecord)
434
             helpList.push(res.helpRecord)
428
-    
435
+
429
             that.setState({
436
             that.setState({
430
               submitting: false,
437
               submitting: false,
431
               helpList,
438
               helpList,
433
               initiateId: res.helpInitiateRecord.helpRecordInitiateId,
440
               initiateId: res.helpInitiateRecord.helpRecordInitiateId,
434
               helpState: res.helpInitiateRecord.status === undefined ? HelpInProcess : res.helpInitiateRecord.status,
441
               helpState: res.helpInitiateRecord.status === undefined ? HelpInProcess : res.helpInitiateRecord.status,
435
             })
442
             })
436
-    
443
+
437
             Taro.showToast({
444
             Taro.showToast({
438
               title: '助力成功',
445
               title: '助力成功',
439
               icon: 'success'
446
               icon: 'success'
440
             })
447
             })
441
-    
448
+
442
           }).catch(err => {
449
           }).catch(err => {
443
             console.log('err:', err)
450
             console.log('err:', err)
444
             Taro.hideLoading()
451
             Taro.hideLoading()
445
-    
452
+
446
             Taro.showToast({
453
             Taro.showToast({
447
               title: '失败: ' + err.message,
454
               title: '失败: ' + err.message,
448
               icon: 'none'
455
               icon: 'none'
455
         })
462
         })
456
       }
463
       }
457
     })
464
     })
458
-   
465
+
459
   }
466
   }
460
 
467
 
461
   // 发起我的助力
468
   // 发起我的助力
501
   askForHelp = () => {
508
   askForHelp = () => {
502
     const { userInfo: { miniApp: { tpls } } } = this.props
509
     const { userInfo: { miniApp: { tpls } } } = this.props
503
     const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HELP && x.isSubscribe == true))[0].tplId
510
     const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HELP && x.isSubscribe == true))[0].tplId
504
-    const that=this
511
+    const that = this
505
     wx.requestSubscribeMessage({
512
     wx.requestSubscribeMessage({
506
       tmplIds: [tplId],
513
       tmplIds: [tplId],
507
       success(res) {
514
       success(res) {

+ 16
- 11
src/pages/activity/detail/index.js View File

81
   loadDetail() {
81
   loadDetail() {
82
     const { id } = this.state
82
     const { id } = this.state
83
     Taro.showLoading()
83
     Taro.showLoading()
84
+    const router = Taro.getStorageSync('router')
85
+    const consultant = this.$router.params.consultant || router.query.consultant
86
+    const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
87
+    const recommender = this.$router.params.recommender || router.query.recommender || ""
84
     queryActivityDetail(id).then(res => {
88
     queryActivityDetail(id).then(res => {
85
       Taro.hideLoading()
89
       Taro.hideLoading()
86
       const { isSaved, isSign } = res
90
       const { isSaved, isSign } = res
107
         propertyName: '活动详情',
111
         propertyName: '活动详情',
108
         buildingId: res.buildingId,
112
         buildingId: res.buildingId,
109
         targetId: res.dynamicId,
113
         targetId: res.dynamicId,
114
+        consultantId: consultantId,
115
+        sharePersonId: recommender,
110
         data: '{}'
116
         data: '{}'
111
       }).then(res1 => {
117
       }).then(res1 => {
112
         this.setState({
118
         this.setState({
115
         console.log('活动详情')
121
         console.log('活动详情')
116
       })
122
       })
117
     })
123
     })
118
-    const router = Taro.getStorageSync('router')
119
-    const consultant = this.$router.params.consultant || router.query.consultant
124
+
120
     if (consultant) {
125
     if (consultant) {
121
       this.reportClientFn()
126
       this.reportClientFn()
122
       getCardDetail(consultant).then(res => {
127
       getCardDetail(consultant).then(res => {
132
 
137
 
133
     const router = Taro.getStorageSync('router') || { query: {} }
138
     const router = Taro.getStorageSync('router') || { query: {} }
134
     const consultant = this.$router.params.consultant || router.query.consultant || ""
139
     const consultant = this.$router.params.consultant || router.query.consultant || ""
135
-    const { userInfo: { person: { phone, tel, userId } } } = this.props
140
+    const { userInfo: { person: { phone, tel, personId } } } = this.props
136
 
141
 
137
-    if (consultant && consultant != userId) {
142
+    if (consultant && consultant != personId) {
138
       const realPhone = phone || tel
143
       const realPhone = phone || tel
139
       const payload = {
144
       const payload = {
140
         realtyConsultant: consultant, //报备人 置业顾问
145
         realtyConsultant: consultant, //报备人 置业顾问
149
     }
154
     }
150
   }
155
   }
151
   onShareAppMessage = () => {
156
   onShareAppMessage = () => {
152
-    const { detail: { shareContents, title, dynamicId, url } } = this.state
157
+    const { detail: { shareContents, title, dynamicId, imgUrl } } = this.state
153
     const { userInfo: { person: { personId, personType, userId } } } = this.props
158
     const { userInfo: { person: { personId, personType, userId } } } = this.props
154
     console.log(dynamicId, "path")
159
     console.log(dynamicId, "path")
155
     console.log(personId, "personId")
160
     console.log(personId, "personId")
170
     })
175
     })
171
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
176
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
172
     return {
177
     return {
173
-      title: shareContents[0].shareContentTitle,
174
-      path: `/pages/activity/detail/index?id=${dynamicId}&from=dynamic_share&recommender=${personId}&consultant=${consultant}`,//分享地址
175
-      imageUrl: shareContents[0].shareContentImg
178
+      title: shareContents[0].shareContentTitle || title,
179
+      path: `/pages/activity/detail/index?id=${dynamicId}&from=dynamic_share&recommender=${personId}&consultant=${consultant}&consultantId=${consultantId}`,//分享地址
180
+      imageUrl: shareContents[0].shareContentImg || imgUrl
176
     }
181
     }
177
-
178
   }
182
   }
179
 
183
 
180
   handleSignup() {
184
   handleSignup() {
246
       }
250
       }
247
 
251
 
248
       const { userInfo: { person, miniApp } } = this.props
252
       const { userInfo: { person, miniApp } } = this.props
249
-      const { avatarurl, nickname, personId, personType, phone, tel } = person
253
+      const { avatarurl, nickname, personId, personType, phone, tel, userId } = person
250
       const { detail: { dynamicId, posters, createDate } } = this.state
254
       const { detail: { dynamicId, posters, createDate } } = this.state
251
       const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
255
       const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
256
+      const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
252
       const phoneNum = phone || tel
257
       const phoneNum = phone || tel
253
 
258
 
254
       const payload = {
259
       const payload = {
255
-        "scene": `id=${dynamicId}&from=dynamic_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}`,
260
+        "scene": `id=${dynamicId}&from=dynamic_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}&consultantId=${consultantId}`,
256
         "page": 'pages/activity/detail/index',
261
         "page": 'pages/activity/detail/index',
257
       }
262
       }
258
 
263
 

+ 2
- 2
src/pages/activity/index.js View File

57
     if (cityId) {
57
     if (cityId) {
58
       payload.cityId = cityId
58
       payload.cityId = cityId
59
     }
59
     }
60
+
60
     // 从个人中心过来
61
     // 从个人中心过来
61
-    console.log(this.router, "from")
62
     if (from === 'mine') {
62
     if (from === 'mine') {
63
       payload.mine = true
63
       payload.mine = true
64
     }
64
     }
114
       const {records, list, total, current, pages} = res || {}
114
       const {records, list, total, current, pages} = res || {}
115
       const _list = records || list || []
115
       const _list = records || list || []
116
       const newList = current <= 1 ? _list: this.state.list.concat(_list)
116
       const newList = current <= 1 ? _list: this.state.list.concat(_list)
117
-console.log(res,'---res-------')
117
+
118
       this.setState({
118
       this.setState({
119
         list: newList,
119
         list: newList,
120
         isEmpty: total == 0,
120
         isEmpty: total == 0,

+ 0
- 1
src/pages/activity/item/index.js View File

16
     const { data, style } = this.props
16
     const { data, style } = this.props
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-----')}
20
          <Image className="pic" mode="aspectFill" src={transferImage(data.mainImg ||data.listImgUrl|| data.imgUrl)}></Image>
19
          <Image className="pic" mode="aspectFill" src={transferImage(data.mainImg ||data.listImgUrl|| data.imgUrl)}></Image>
21
         <View className="box">
20
         <View className="box">
22
           <View className="title">{data.title}</View>
21
           <View className="title">{data.title}</View>

+ 1
- 1
src/pages/checkin/index.js View File

121
   render () {
121
   render () {
122
     const { dynamic = {}, enlist = {}, person = {} } = this.state.data || {}
122
     const { dynamic = {}, enlist = {}, person = {} } = this.state.data || {}
123
     const { activityStatus } = dynamic || {}
123
     const { activityStatus } = dynamic || {}
124
-    console.log(enlist, 'enlist')
124
+    // console.log(enlist, 'enlist')
125
     return (
125
     return (
126
       <View className="checkin" style="width:100vw;height:100vh;" >
126
       <View className="checkin" style="width:100vw;height:100vh;" >
127
 
127
 

+ 0
- 2
src/pages/city/index.js View File

74
           scrollY>
74
           scrollY>
75
 
75
 
76
           <View className="search-wrap">
76
           <View className="search-wrap">
77
-            {console.log(searchList, "-----------searchListview----------")}
78
             <Search placeholder="搜索意向城市" onInput={this.handleSearch} onSearch={this.handleSearch}></Search>
77
             <Search placeholder="搜索意向城市" onInput={this.handleSearch} onSearch={this.handleSearch}></Search>
79
             {
78
             {
80
               keywords && (
79
               keywords && (
83
                     searchList.length > 0 ? (
82
                     searchList.length > 0 ? (
84
                       searchList.map(item => (
83
                       searchList.map(item => (
85
                         <View key={item.id} className="list-item" onClick={this.handleSelected.bind(this, item)}>{item.name}
84
                         <View key={item.id} className="list-item" onClick={this.handleSelected.bind(this, item)}>{item.name}
86
-                          {console.log(item, "-------item------")}
87
                         </View>
85
                         </View>
88
                       ))
86
                       ))
89
                     ) : <View className="empty">暂无结果</View>
87
                     ) : <View className="empty">暂无结果</View>

+ 62
- 20
src/pages/news/detail/index.js View File

41
     consultShow: false  // 置业顾问悬浮框显示隐藏
41
     consultShow: false  // 置业顾问悬浮框显示隐藏
42
   }
42
   }
43
 
43
 
44
-  componentWillMount() {
44
+  componentWillMount(options) {
45
+    console.log('================options========================', options)
46
+    console.log('===========wx.getLaunchOptionsSync()===========', wx.getLaunchOptionsSync())
47
+    console.log('================this.$router===================', this.$router)
48
+
45
     console.info('ready status3', ready)
49
     console.info('ready status3', ready)
46
     ready.queue(() => {
50
     ready.queue(() => {
47
       const router = Taro.getStorageSync('router')
51
       const router = Taro.getStorageSync('router')
80
 
84
 
81
     const router = Taro.getStorageSync('router') || { query: {} }
85
     const router = Taro.getStorageSync('router') || { query: {} }
82
     const consultant = this.$router.params.consultant || router.query.consultant || ""
86
     const consultant = this.$router.params.consultant || router.query.consultant || ""
83
-    const { userInfo: { person: { phone, tel, userId } }} = this.props
87
+    const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
88
+    const { userInfo: { person: { phone, tel, userId } } } = this.props
84
 
89
 
85
-    if (consultant && consultant != userId) {
90
+    if (consultant && consultant != personId) {
86
       const realPhone = phone || tel
91
       const realPhone = phone || tel
87
       const payload = {
92
       const payload = {
88
         realtyConsultant: consultant, //报备人 置业顾问
93
         realtyConsultant: consultant, //报备人 置业顾问
132
       url: `/pages/project/index`
137
       url: `/pages/project/index`
133
     })
138
     })
134
   }
139
   }
140
+
141
+  currentPageAndParams () {
142
+    const { detail: { newsId } } = this.state
143
+    const { userInfo: { person: { personId, personType, userId } } } = this.props
144
+    const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
145
+    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
146
+
147
+    let queryParams = [
148
+      `id=${newsId}`,
149
+      `from=news_share`,
150
+      `recommender=${personId}`,
151
+      `consultant=${consultant}`,
152
+      `consultantId=${consultantId}`,
153
+    ]
154
+
155
+    const res = [
156
+      'pages/news/detail/index',
157
+      queryParams.join('&'),
158
+    ]
159
+
160
+    console.log('--page-params->', res)
161
+    return res
162
+  }
163
+
135
   onShareAppMessage = () => {
164
   onShareAppMessage = () => {
136
     const { detail: { shareContents, newsName, newsId, newsImg } } = this.state
165
     const { detail: { shareContents, newsName, newsId, newsImg } } = this.state
137
     const { userInfo: { person: { personId, personType, userId } } } = this.props
166
     const { userInfo: { person: { personId, personType, userId } } } = this.props
150
       console.info('资讯详情分享')
179
       console.info('资讯详情分享')
151
     })
180
     })
152
 
181
 
182
+    const shareData = shareContents && shareContents.length ? shareContents[0] : { shareContentTitle: newsName, shareContentImg: newsImg };
183
+
153
     // 分享埋点
184
     // 分享埋点
154
     addNewsShareNum(newsId)
185
     addNewsShareNum(newsId)
155
 
186
 
187
+    const [path, params] = this.currentPageAndParams();
188
+
189
+    console.log('----share-url---->', `/${path}?${params}`)
190
+
156
     return {
191
     return {
157
-      title: shareContents[0].shareContentTitle,
158
-      path: `/pages/news/detail/index?id=${newsId}&from=news_share&recommender=${personId}&consultant=${consultant}`,//分享地址
159
-      imageUrl: shareContents[0].shareContentImg
192
+      title: shareData.shareContentTitle,
193
+      path: `/${path}?${params}`,//分享地址
194
+      imageUrl: shareData.shareContentImg
160
     }
195
     }
161
   }
196
   }
162
 
197
 
163
   loadDetail() {
198
   loadDetail() {
164
     const { newsId } = this.state
199
     const { newsId } = this.state
200
+    const router = Taro.getStorageSync('router')
201
+    const consultant = this.$router.params.consultant || router.query.consultant
202
+    const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
203
+    const recommender = this.$router.params.recommender || router.query.recommender || ""
165
     Taro.showLoading()
204
     Taro.showLoading()
166
     queryNewsDetail(newsId).then(res => {
205
     queryNewsDetail(newsId).then(res => {
167
       Taro.hideLoading()
206
       Taro.hideLoading()
186
         propertyName: '资讯详情',
225
         propertyName: '资讯详情',
187
         buildingId: res.buildingId,
226
         buildingId: res.buildingId,
188
         targetId: res.newsId,
227
         targetId: res.newsId,
228
+        consultantId: consultantId,
229
+        sharePersonId: recommender,
189
         data: '{}'
230
         data: '{}'
190
       }).then(res => {
231
       }).then(res => {
191
         this.setState({
232
         this.setState({
194
         console.info('资讯详情')
235
         console.info('资讯详情')
195
       })
236
       })
196
     })
237
     })
197
-    const router = Taro.getStorageSync('router')
198
-    const consultant = this.$router.params.consultant || router.query.consultant
238
+
199
     if (consultant) {
239
     if (consultant) {
200
       this.reportClientFn()
240
       this.reportClientFn()
201
       getCardDetail(consultant).then(res => {
241
       getCardDetail(consultant).then(res => {
214
         return
254
         return
215
       }
255
       }
216
       const { userInfo: { person, miniApp } } = this.props
256
       const { userInfo: { person, miniApp } } = this.props
217
-      const { avatarurl, nickname, personId, personType, phone, tel } = person
218
-      const { newsId, detail: { posters, newsName, createDate } } = this.state
219
-      const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
220
-      const phoneNum = phone || tel
221
-      const payload = {
222
-        "scene": `id=${newsId}&from=news_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}`,
223
-        "page": 'pages/news/detail/index',
224
-      }
257
+      const { avatarurl, nickname, personId, personType, phone, tel, userId } = person
258
+      const { newsId, detail: { posters, newsName, createDate, newsImg = '' } } = this.state
259
+      // const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
260
+      // const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
261
+      // const phoneNum = phone || tel
262
+
263
+      const [page, scene] = this.currentPageAndParams();
264
+
265
+      const payload = { page, scene }
225
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
266
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
226
 
267
 
268
+      const posterDt = posters && posters.length ? posters[0] : { posterTitle: newsName, posterDescription: '', posterImg: newsImg }
269
+
227
       getMiniQrcode(payload).then(qrcode => {
270
       getMiniQrcode(payload).then(qrcode => {
228
         let data = {
271
         let data = {
229
           qrcode,//小程序二维码
272
           qrcode,//小程序二维码
230
           nickname,//访问者名字
273
           nickname,//访问者名字
231
           avatarurl: _avatarurl,//访问者头像
274
           avatarurl: _avatarurl,//访问者头像
232
-          title: posters[0].posterTitle,//资讯海报标题
233
-          posterDescription: posters[0].posterDescription,//资讯海报描述
275
+          title: posterDt.posterTitle,//资讯海报标题
276
+          posterDescription: posterDt.posterDescription,//资讯海报描述
234
           createDate: createDate,//资讯时间
277
           createDate: createDate,//资讯时间
235
-          poster: posters[0].posterImg,
278
+          poster: posterDt.posterImg,
236
           miniAppName: miniApp.name,
279
           miniAppName: miniApp.name,
237
-
238
         }
280
         }
239
         resolve(data)
281
         resolve(data)
240
       })
282
       })

+ 1
- 1
src/pages/person/customerAnalysis/myCustomer.js View File

489
           </View>
489
           </View>
490
           <View className='user__left__phone'>{customerDetail.phone}
490
           <View className='user__left__phone'>{customerDetail.phone}
491
             <Image onClick={this.handleTelClick.bind(this, customerDetail)} style="width:36rpx;height:36rpx;margin-left:20rpx;background:rgba(255,219,179,0.2);padding: 14rpx;border-radius: 30rpx;" src={phoneImg} />
491
             <Image onClick={this.handleTelClick.bind(this, customerDetail)} style="width:36rpx;height:36rpx;margin-left:20rpx;background:rgba(255,219,179,0.2);padding: 14rpx;border-radius: 30rpx;" src={phoneImg} />
492
-            <Image onClick={this.handleChatClick.bind(this, item)} style="width:36rpx;height:36rpx;margin-left:40rpx;background:rgba(255,219,179,0.2);padding: 14rpx;border-radius: 30rpx;" src={messageImg} />
492
+            <Image onClick={this.handleChatClick.bind(this, customerDetail)} style="width:36rpx;height:36rpx;margin-left:40rpx;background:rgba(255,219,179,0.2);padding: 14rpx;border-radius: 30rpx;" src={messageImg} />
493
           </View>
493
           </View>
494
         </View>
494
         </View>
495
         <AtTabs height="calc(100vh - 300rpx)" className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
495
         <AtTabs height="calc(100vh - 300rpx)" className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>

+ 1
- 1
src/pages/person/menus.js View File

17
   consultant: require('@assets/mine/consultant.png'),
17
   consultant: require('@assets/mine/consultant.png'),
18
   customerAnalysis: require('@assets/mine/customerAnalysis.png'),
18
   customerAnalysis: require('@assets/mine/customerAnalysis.png'),
19
   fenxi: require('@assets/mine/fenxi.png'),
19
   fenxi: require('@assets/mine/fenxi.png'),
20
-  share: require('@assets/mine/accessrecord.png'),
20
+  share: require('@assets/mine/share.png'),
21
 }
21
 }
22
 
22
 
23
 const DRIFT = ROLE_CODE['DRIFT']
23
 const DRIFT = ROLE_CODE['DRIFT']

+ 81
- 0
src/pages/project/activity/index.js View File

1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
3
+import { queryHelpGroup } from '@services/news'
4
+import { transferImage } from '@utils/tools'
5
+import ActivityItem from '../../activity/item'
6
+import dayjs from 'dayjs'
7
+import './index.scss'
8
+
9
+const bgImg = require('@assets/index/background.png')
10
+
11
+export default class SwiperBanner extends Component {
12
+
13
+    state = {
14
+        helpGroupList: []
15
+    }
16
+
17
+
18
+    componentWillMount() {
19
+        this.loadHelpGroupList()
20
+    }
21
+
22
+
23
+
24
+    loadHelpGroupList() {
25
+        queryHelpGroup({ cityId: this.props.cityId, buildingId: '' }).then(res => {
26
+            this.setState({
27
+                helpGroupList: res || []
28
+            })
29
+        })
30
+    }
31
+
32
+    render() {
33
+        if (!this.state.helpGroupList.length) return null;
34
+
35
+        return (
36
+            <View className="activity-box" style={`background: url(${transferImage(bgImg)}) no-repeat center;background-size: 100% 100%;`}>
37
+                <View className="section-head">
38
+                    <View className="section-head__title">热门活动 </View>
39
+                    <View className="section-head__more" >
40
+                        查看更多<Text className="iconfont icon-more"></Text>
41
+                    </View>
42
+                </View>
43
+                <ScrollView scrollX>
44
+                    <View className='activity-list'>
45
+                        {
46
+                            this.state.helpGroupList.length > 1 &&
47
+                            this.state.helpGroupList.map((item, index) => (
48
+                                <View className='item' key={index + 'act'}>
49
+                                    {/* {(data.type == 'help' || data.type == 'group') && */}
50
+                                    <View className={item.type == '1' ? 'type' : 'type2'}>{item.type == '1' ? '助力' : '拼团'}</View>
51
+                                    {/* } */}
52
+                                    <Image className="img" src={require('@assets/shop/bg.jpg')}></Image>
53
+                                    <View className="title">破晓·内容生态下半场的版权之道—2019企业啦啦啦啦</View>
54
+                                    <View className="time">参与截止时间</View>
55
+                                    <View className="time">2019年10月20日 10:08:20</View>
56
+                                    <View className="btn nostart">未开始</View>
57
+                                    {/* {item.endDate && */}
58
+                                        {/* <View className={data.activityStatus == 0 ? "btn jionin " : data.activityStatus == 1 ? "btn nostart" : data.activityStatus == 2 ? "btn jioned" : "btn"}>{data.activityStatus == 0 ? "立即参与" : data.activityStatus == 1 ? "未开始" : data.activityStatus == 2 ? "已结束" : "已参与"}</View> */}
59
+                        
60
+                                    {/* } */}
61
+                                </View>
62
+                            ))
63
+                        }
64
+                        {
65
+                            this.state.helpGroupList.length == 1 &&
66
+                            this.state.helpGroupList.map((item, index) => (
67
+                                <ActivityItem
68
+                                    data={item}
69
+                                    key={item.dynamicId}
70
+                                    onClick={this.handleItemClick}>
71
+                                </ActivityItem>
72
+                            ))
73
+                        }
74
+
75
+                    </View>
76
+                </ScrollView>
77
+
78
+            </View>
79
+        )
80
+    }
81
+}

+ 126
- 0
src/pages/project/activity/index.scss View File

1
+@import "@styles/theme.scss";
2
+@import "@styles/mixins.scss";
3
+
4
+.activity-box{
5
+
6
+    height:626px;
7
+    background:#fff;
8
+    box-shadow:0px 2px 12px 2px rgba(0,0,0,0.08);
9
+    padding: 0 30px;
10
+    border-top:20px solid #f5f5f5;
11
+    position: relative;
12
+    .section-head  {
13
+        display: flex;
14
+        align-items: center;
15
+        justify-content: space-between;
16
+        margin: 30px 0;
17
+     
18
+        .section-head__title {
19
+            font-size: 40px;
20
+            font-weight: 600;
21
+          }
22
+          .section-head__more {
23
+            font-size: 26px;
24
+            color: #A1A1A1;
25
+            display: flex;
26
+            align-items: center;
27
+
28
+      
29
+            .iconfont {
30
+              font-size: 26px;
31
+              color: #A1A1A1;
32
+              font-family: "iconfont" !important;
33
+              margin-left: 6px;
34
+
35
+            }
36
+            .icon-more:before {
37
+                content: "\e636";       
38
+            }
39
+          }
40
+        }
41
+    .activity-list{
42
+        position: relative;
43
+        -webkit-overflow-scrolling: touch;
44
+        overflow: hidden;
45
+        display: inline-flex;
46
+        padding-bottom: 10px;
47
+        .item{
48
+            width:330px;
49
+            height:452px;
50
+            background:#fff;
51
+            box-shadow: 0 4px  8px 0 rgba(0, 0, 0, 0.16);
52
+            margin: 0 20px  0 2px;
53
+            border-radius:12px;
54
+            position: relative;
55
+            .type{
56
+                position: absolute;
57
+                left:0;
58
+                top:0;
59
+                color: #fff;
60
+                background:#F6B61D;
61
+                padding: 10px 36px;
62
+                border-radius: 12px 0 12px 0;
63
+                font-size: 24px;
64
+              }
65
+              .type2{
66
+                position: absolute;
67
+                left:0;
68
+                top:0;
69
+                color: #fff;
70
+                background:#BB9C79;
71
+                padding: 12px 36px;
72
+                border-radius: 12px 0 12px 0;
73
+                font-size: 24px;
74
+            
75
+              }
76
+            .img{
77
+              width: 330px;
78
+              height: 186px;  
79
+              border-radius:12px 12px 0 0;
80
+            }
81
+            .title{
82
+                overflow: hidden;
83
+                text-overflow: ellipsis;
84
+                display: -webkit-box;
85
+                -webkit-line-clamp: 2;
86
+                line-clamp: 2;
87
+                -webkit-box-orient: vertical;
88
+                height: 80px;
89
+                color: #666666;
90
+                font-size: 28px;
91
+                margin: 16px 10px 4px 10px;
92
+            }
93
+            .time{
94
+                color: #999;
95
+                font-size: 24px;
96
+                margin: 4px 10px ;
97
+            }
98
+            .btn {
99
+
100
+                background:#DADADA;
101
+                border-radius:30px;
102
+                text-align: center;
103
+                color: white;
104
+                display: block;
105
+                width: 148px;
106
+                font-size: 26px;
107
+                height: 48px;
108
+                line-height: 48px;
109
+                margin-top: 14px;
110
+                margin: 20px auto;
111
+              }
112
+              .jionin{
113
+                background:#FF6A6A;
114
+              }
115
+                  .nostart {
116
+                
117
+                background:#FDC080;
118
+              }
119
+              .jioned{
120
+                background: #9B9B9B;
121
+              }
122
+        }
123
+        
124
+    }
125
+    
126
+  }

+ 0
- 2
src/pages/project/album/index.js View File

74
     return (
74
     return (
75
       <View className='photos'>
75
       <View className='photos'>
76
         <View className="around-tab">
76
         <View className="around-tab">
77
-          {console.log(listimg, '-----listimg---------')}
78
-          {console.log(imgList, '-------imgList-------')}
79
           {listimg.map((item, index) => {
77
           {listimg.map((item, index) => {
80
             const { apartmentName } = item || {}
78
             const { apartmentName } = item || {}
81
             const buildingImgList = item.buildingImgList || []
79
             const buildingImgList = item.buildingImgList || []

+ 1
- 1
src/pages/project/banner/index.js View File

36
   render () {
36
   render () {
37
     const { list, style, indicatorDots, current } = this.props
37
     const { list, style, indicatorDots, current } = this.props
38
 
38
 
39
-    console.log('banner', list)
39
+    // console.log('banner', list)
40
     return (
40
     return (
41
       <View className='home-banner' style={style}>
41
       <View className='home-banner' style={style}>
42
         <Swiper
42
         <Swiper

+ 58
- 29
src/pages/project/detail/index.js View File

109
     const { recordId } = this.state
109
     const { recordId } = this.state
110
     recordId && updatePoint(recordId)
110
     recordId && updatePoint(recordId)
111
   }
111
   }
112
+
112
   // 报备客户
113
   // 报备客户
113
   reportClientFn() {
114
   reportClientFn() {
114
-
115
     const router = Taro.getStorageSync('router') || { query: {} }
115
     const router = Taro.getStorageSync('router') || { query: {} }
116
     const consultant = this.$router.params.consultant || router.query.consultant || ""
116
     const consultant = this.$router.params.consultant || router.query.consultant || ""
117
-    const {
118
-      userInfo: { person: { phone, tel, userId } }
119
-    } = this.props
117
+    const { userInfo: { person: { phone, tel, personId } } } = this.props
120
 
118
 
121
-    if (consultant && consultant != userId) {
119
+    if (consultant && consultant != personId) {
122
       const realPhone = phone || tel
120
       const realPhone = phone || tel
123
       const payload = {
121
       const payload = {
124
         realtyConsultant: consultant, //报备人 置业顾问
122
         realtyConsultant: consultant, //报备人 置业顾问
132
       })
130
       })
133
     }
131
     }
134
   }
132
   }
133
+
134
+  currentPageAndParams () {
135
+    const {
136
+      projectDetail: { buildingId },
137
+      userInfo: { person: { personId, personType, userId } }
138
+    } = this.props
139
+
140
+    const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
141
+    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
142
+
143
+    const queryParams = [
144
+      `id=${buildingId}`,
145
+      'from=building_share',
146
+      `recommender=${personId}`,
147
+      `consultant=${consultant}`,
148
+      `consultantId=${consultantId}`,
149
+    ]
150
+
151
+    return [
152
+      'pages/project/detail/index',
153
+      queryParams.join('&'),
154
+    ]
155
+  }
156
+
135
   onShareAppMessage = () => {
157
   onShareAppMessage = () => {
136
     const {
158
     const {
137
-      projectDetail: { shareContents, buildingName, buildingId, poster },
159
+      projectDetail: { shareContents, buildingName, buildingId, poster = '' },
138
       userInfo: { person: { personId, personType, userId } }
160
       userInfo: { person: { personId, personType, userId } }
139
     } = this.props
161
     } = this.props
140
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
162
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
151
     }).then(res => {
173
     }).then(res => {
152
       console.log('项目详情分享')
174
       console.log('项目详情分享')
153
     })
175
     })
154
-    const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
176
+
177
+    const [page, params] = this.currentPageAndParams()
178
+
179
+    const shareData = shareContents && shareContents.length ? shareContents[0] : { shareContentTitle: buildingName, shareContentImg: poster }
180
+
155
     return {
181
     return {
156
-      title: shareContents[0].shareContentTitle,//分享内容
157
-      path: `/pages/project/detail/index?id=${buildingId}&from=building_share&recommender=${personId}&consultant=${consultant}`,//分享地址
158
-      imageUrl: shareContents[0].shareContentImg
182
+      title: shareData.shareContentTitle,//分享内容
183
+      path: `/${page}?${params}`,//分享地址
184
+      imageUrl: shareData.shareContentImg
159
     }
185
     }
160
   }
186
   }
161
 
187
 
173
 
199
 
174
       addItemUv(id)
200
       addItemUv(id)
175
       // 埋点
201
       // 埋点
202
+      const router = Taro.getStorageSync('router')
203
+      const consultant = this.$router.params.consultant || router.query.consultant
204
+      const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
205
+      const recommender = this.$router.params.recommender || router.query.recommender || ""
176
       savePoint({
206
       savePoint({
177
         event: 'detail',
207
         event: 'detail',
178
         eventType: 'building',
208
         eventType: 'building',
179
         propertyName: '项目详情',
209
         propertyName: '项目详情',
180
         targetId: id,
210
         targetId: id,
181
         buildingId: id,
211
         buildingId: id,
212
+        consultantId: consultantId,
213
+        sharePersonId: recommender,
182
         data: '{}'
214
         data: '{}'
183
       }).then(res => {
215
       }).then(res => {
184
         this.setState({
216
         this.setState({
186
         })
218
         })
187
         console.log('项目详情')
219
         console.log('项目详情')
188
       })
220
       })
189
-    })
190
-    const router = Taro.getStorageSync('router')
191
-    const consultant = this.$router.params.consultant || router.query.consultant
192
-    if (consultant) {
193
-      this.reportClientFn()
194
-      getCardDetail(consultant).then(res => {
195
-        this.setState({
196
-          consultData: res,
197
-          consultShow: true
221
+      if (consultant) {
222
+        this.reportClientFn()
223
+        getCardDetail(consultant).then(res => {
224
+          this.setState({
225
+            consultData: res,
226
+            consultShow: true
227
+          })
198
         })
228
         })
199
-      })
200
-    }
229
+      }
230
+    })
231
+  
232
+  
201
   }
233
   }
202
 
234
 
203
   loadHelpGroupList() {
235
   loadHelpGroupList() {
340
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
372
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
341
   }
373
   }
342
 
374
 
343
-
344
   getPhoneNumber(e, item) {
375
   getPhoneNumber(e, item) {
345
     getUserPhone(e, (phoneNumber) => {
376
     getUserPhone(e, (phoneNumber) => {
346
       const { userInfo: { person: { personId, nickname, name } } } = this.props
377
       const { userInfo: { person: { personId, nickname, name } } } = this.props
374
       }
405
       }
375
       con
406
       con
376
       const {
407
       const {
377
-        userInfo: { person: { avatarurl, nickname, personId, personType }, miniApp },
408
+        userInfo: { person: { avatarurl, nickname, personId, personType, userId }, miniApp },
378
         projectDetail: { posters, buildingId, poster, price, buildingRestaurant, createDate, buildingName, tel, buildingTag, uvList = {} }
409
         projectDetail: { posters, buildingId, poster, price, buildingRestaurant, createDate, buildingName, tel, buildingTag, uvList = {} }
379
       } = this.props
410
       } = this.props
380
       const { total = 0 } = uvList
411
       const { total = 0 } = uvList
381
-      const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
382
-      const phoneNum = person.phone || person.tel
383
-      const payload = {
384
-        "scene": `id=${buildingId}&from=building_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}`,
385
-        "page": 'pages/project/detail/index',
386
-      }
412
+
413
+      const [page, scene] = this.currentPageAndParams();   
414
+      const payload = {page, scene}
415
+
387
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
416
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
388
 
417
 
389
       getMiniQrcode(payload).then(qrcode => {
418
       getMiniQrcode(payload).then(qrcode => {

+ 11
- 11
src/pages/project/h5Page.js View File

11
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
11
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
12
 import { isEmpty } from '@utils/tools'
12
 import { isEmpty } from '@utils/tools'
13
 
13
 
14
-const bgImg = require('@assets/helpgroup/bg.png')
14
+const bgImg = "https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/bg.png"
15
 
15
 
16
 @connect(state => state.user, { ...actions })
16
 @connect(state => state.user, { ...actions })
17
 export default class Index extends Component {
17
 export default class Index extends Component {
67
   // 分享好友
67
   // 分享好友
68
   onShareAppMessage = () => {
68
   onShareAppMessage = () => {
69
     const { pageInfo } = this.state
69
     const { pageInfo } = this.state
70
-    const currentPage = this.currentPageAndParams().join('?')
70
+    const currentPage = `/${this.currentPageAndParams().join('?')}`
71
     console.log(currentPage)
71
     console.log(currentPage)
72
     return {
72
     return {
73
       title: pageInfo.shareTitle,
73
       title: pageInfo.shareTitle,
91
     const { h5Id } = this.state
91
     const { h5Id } = this.state
92
     const router = Taro.getStorageSync('router') || { query: {} }
92
     const router = Taro.getStorageSync('router') || { query: {} }
93
 
93
 
94
-    const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
94
+    // const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.personId : ""
95
+    const consultantId = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
95
     const firstShare = this.$router.params.firstShare || router.query.firstShare || person.personId
96
     const firstShare = this.$router.params.firstShare || router.query.firstShare || person.personId
96
 
97
 
97
     let queryParams = [
98
     let queryParams = [
98
       `sharePersonId=${person.personId}`,
99
       `sharePersonId=${person.personId}`,
99
-      `consultant=${consultant}`,
100
+      `consultant=${consultantId}`,
101
+      // `consultantId=${consultantId}`,
100
       `firstShare=${firstShare}`,
102
       `firstShare=${firstShare}`,
101
       `id=${h5Id}`
103
       `id=${h5Id}`
102
     ]
104
     ]
172
         console.log(phone, "phone#########")
174
         console.log(phone, "phone#########")
173
         // 头像手机号都有
175
         // 头像手机号都有
174
         if (phone) {
176
         if (phone) {
175
-
176
           this.reportClient()
177
           this.reportClient()
177
           this.success()
178
           this.success()
178
           this.setState({
179
           this.setState({
245
     }
246
     }
246
     console.log("授权头像成功!")
247
     console.log("授权头像成功!")
247
   }
248
   }
249
+
248
   // 授权用户信息
250
   // 授权用户信息
249
   getUserInfo() {
251
   getUserInfo() {
250
     const { dispatchUpdateUserInfo } = this.props
252
     const { dispatchUpdateUserInfo } = this.props
298
 
300
 
299
   // 报备客户
301
   // 报备客户
300
   reportClient() {
302
   reportClient() {
301
-
302
     const router = Taro.getStorageSync('router') || { query: {} }
303
     const router = Taro.getStorageSync('router') || { query: {} }
303
     const consultant = this.$router.params.consultant || router.query.consultant || ""
304
     const consultant = this.$router.params.consultant || router.query.consultant || ""
304
-    const {
305
-      userInfo: { person: { phone, tel, userId } }
306
-    } = this.props
305
+    const { userInfo: { person: { phone, tel, personId, userId, personType } } } = this.props
306
+    const isConsultant = personType == ROLE_CODE['CONSULTANT']
307
 
307
 
308
-    if (consultant && consultant != userId) {
308
+    if (isConsultant && consultant != userId) {
309
       const realPhone = phone || tel
309
       const realPhone = phone || tel
310
       const payload = {
310
       const payload = {
311
         realtyConsultant: consultant, //报备人 置业顾问
311
         realtyConsultant: consultant, //报备人 置业顾问
358
 
358
 
359
     const showH5 = !isEmpty(h5Id) && pageInfo.h5Address && pageInfo.h5Address !== 'about' && pageInfo.h5Address !== 'http://about' && pageInfo.h5Address !== 'https://about'
359
     const showH5 = !isEmpty(h5Id) && pageInfo.h5Address && pageInfo.h5Address !== 'about' && pageInfo.h5Address !== 'http://about' && pageInfo.h5Address !== 'https://about'
360
 
360
 
361
-    console.log('----web-h5------>', showH5, `${pageInfo.h5Address}?${webUrlParams}`)
361
+    // console.log('----web-h5------>', showH5, `${pageInfo.h5Address}?${webUrlParams}`)
362
 
362
 
363
     return (
363
     return (
364
       <Block>
364
       <Block>

+ 100
- 102
src/pages/project/index.js View File

4
 import ProjectItem from './item'
4
 import ProjectItem from './item'
5
 import Banner from './banner'
5
 import Banner from './banner'
6
 import Newsbanner from './newsbanner'
6
 import Newsbanner from './newsbanner'
7
-import HelpGroupBanner from './swiper'
7
+import Activity from './activity'
8
+import BannerTwo from './swiper'
8
 // import ActivityItem from '../activity/item'
9
 // import ActivityItem from '../activity/item'
9
 import ready from '@utils/ready'
10
 import ready from '@utils/ready'
10
 import { getLocationCity } from '@services/map'
11
 import { getLocationCity } from '@services/map'
11
-
12
 import { queryBanners, savePoint, updatePoint } from '@services/common'
12
 import { queryBanners, savePoint, updatePoint } from '@services/common'
13
-import { queryNewsList, queryHelpGroup } from '@services/news'
13
+import { queryHelpGroup } from '@services/news'
14
 import { queryActivityList } from '@services/activity'
14
 import { queryActivityList } from '@services/activity'
15
 import { dispatchCitySelected } from '@actions/city'
15
 import { dispatchCitySelected } from '@actions/city'
16
 import { ROLE_CODE, DECREASE_UNREADNUM } from '@constants/user'
16
 import { ROLE_CODE, DECREASE_UNREADNUM } from '@constants/user'
79
     adImage: advImageOfApp,
79
     adImage: advImageOfApp,
80
     bannerList: [],
80
     bannerList: [],
81
     helpGroupList: [],
81
     helpGroupList: [],
82
-    newsList: [],
83
     activityList: [],
82
     activityList: [],
84
     recordId: null,
83
     recordId: null,
85
     visBanner: false,
84
     visBanner: false,
139
     let defaultCity = cityList.filter(item => {
138
     let defaultCity = cityList.filter(item => {
140
       return item.id == org.defaultCityId
139
       return item.id == org.defaultCityId
141
     })[0]
140
     })[0]
142
-    console.log('-----defaultCity-->', defaultCity)
141
+    // console.log('-----defaultCity-->', defaultCity)
143
 
142
 
144
     Taro.getLocation().then(location => {
143
     Taro.getLocation().then(location => {
145
       Taro.setStorageSync('lat', location.latitude)
144
       Taro.setStorageSync('lat', location.latitude)
152
         let curCity = cityList.filter(item => {
151
         let curCity = cityList.filter(item => {
153
           return item.name == res.name || ''
152
           return item.name == res.name || ''
154
         })
153
         })
155
-        console.log('-----curCity-->', curCity)
154
+        // console.log('-----curCity-->', curCity)
156
         this.updateCity(curCity[0] || defaultCity)
155
         this.updateCity(curCity[0] || defaultCity)
157
       }).catch(err => {
156
       }).catch(err => {
158
         Taro.showToast({
157
         Taro.showToast({
187
   loadData() {
186
   loadData() {
188
     this.loadBannerList()
187
     this.loadBannerList()
189
     this.loadHelpGroupList()
188
     this.loadHelpGroupList()
190
-    this.loadNewsList()
191
     this.loadOpenScreenBanner()
189
     this.loadOpenScreenBanner()
192
     // this.loadActivityList()
190
     // this.loadActivityList()
193
     this.loadList()
191
     this.loadList()
259
   }
257
   }
260
 
258
 
261
 
259
 
262
-  loadNewsList() {
263
-    const { curCity } = this.props
264
-    const payload = {
265
-      pageNumber: 1,
266
-      pageSize: 999
267
-    }
268
-    if (curCity.id) {
269
-      payload.cityId = curCity.id
270
-    }
271
-
272
-    this.setState({
273
-      newsList: [{}]
274
-    }, () => {
275
-      queryNewsList(payload).then(res => {
276
-        this.setState({
277
-          newsList: res.records || []
278
-        })
279
-      })
280
-    })
281
-  }
282
-
283
-
284
   loadList() {
260
   loadList() {
285
     const { keywords } = this.state
261
     const { keywords } = this.state
286
     const { curCity } = this.props
262
     const { curCity } = this.props
328
       console.log('首页分享')
304
       console.log('首页分享')
329
     })
305
     })
330
     return {
306
     return {
331
-      title: `${this.props.userInfo.miniApp.name || '橙蕉'} 精准获客平台`,//分享内容
307
+      title: `${this.props.userInfo.miniApp.name || '橙蕉'} 精准获客平台`,//分享内容
332
       path: `/pages/project/index?from=share&recommender=${personId}`,//分享地址
308
       path: `/pages/project/index?from=share&recommender=${personId}`,//分享地址
333
       imageUrl: this.state.shareImg
309
       imageUrl: this.state.shareImg
334
     }
310
     }
435
   }
411
   }
436
 
412
 
437
   handleMaskBannerClick(data) {
413
   handleMaskBannerClick(data) {
438
-
439
     this.redirectTo(data)
414
     this.redirectTo(data)
440
-
441
   }
415
   }
442
 
416
 
443
   handleLocationClick() {
417
   handleLocationClick() {
463
   // DRIFT: 'drift', // 游客
437
   // DRIFT: 'drift', // 游客
464
   // CUSTOMER: 'customer' // 客户
438
   // CUSTOMER: 'customer' // 客户
465
   toRecomonedPage() {
439
   toRecomonedPage() {
466
-    const {
467
-      userInfo: { person: { personType } }
468
-    } = this.props
469
 
440
 
470
-    if (personType === ROLE_CODE['DRIFT'] || !personType) {
471
-      // 游客或者客户 区别是否有电话
472
-      // this.setState({
473
-      //   achieve: true
474
-      // })
475
-      Taro.navigateTo({
476
-        url: `/pages/agent/recommend/index?type=index&cityId=` + this.props.curCity.id
477
-      })
478
-    } else {
441
+    Taro.navigateTo({
442
+      url: `/pages/agent/recommend/index?type=index&cityId=` + this.props.curCity.id
443
+    })
479
 
444
 
480
-      Taro.navigateTo({
481
-        url: `/pages/agent/recommend/index?type=index&cityId=` + this.props.curCity.id
482
-      })
483
-      console.log(this.props.curCity.id, "this.props.curCity.id")
484
-    }
485
   }
445
   }
486
   toMapHouse() {
446
   toMapHouse() {
487
     Taro.navigateTo({
447
     Taro.navigateTo({
497
       url: `/pages/agent/recommend/index?type=index&cityId=` + curCity.id
457
       url: `/pages/agent/recommend/index?type=index&cityId=` + curCity.id
498
     })
458
     })
499
   }
459
   }
500
-  toNewsList() {
501
-    Taro.getApp().props.projectIndex = 1
502
-    Taro.switchTab({
503
-      url: `/pages/activity/activity`,
504
-      fail: res => {
505
-        Taro.getApp().props.projectIndex = 0
506
-      }
507
-    })
508
-  }
460
+
509
 
461
 
510
   renderProjectList() {
462
   renderProjectList() {
511
     const { proList: { records = [] } } = this.props
463
     const { proList: { records = [] } } = this.props
512
-    const { helpGroupList } = this.state
464
+
513
     const list = records.filter(item => item.isMain === 1)
465
     const list = records.filter(item => item.isMain === 1)
514
-    console.log(records, 'proList')
466
+    // console.log(records, 'proList')
515
     return (
467
     return (
516
       <Block>
468
       <Block>
517
         {
469
         {
519
             < View className="houses" >
471
             < View className="houses" >
520
               <View className="section-head">
472
               <View className="section-head">
521
                 <View style="display:flex;align-items:center">
473
                 <View style="display:flex;align-items:center">
522
-                  <Text className="section-head__title" onClick={this.handleProItemClick}>全部楼盘
474
+                  <Text className="section-head__title" onClick={this.handleProItemClick}>推荐楼盘
523
                 </Text>
475
                 </Text>
524
                   <Image src={require('@assets/index/map.png')} onClick={this.toMapHouse} className='map-img'></Image>
476
                   <Image src={require('@assets/index/map.png')} onClick={this.toMapHouse} className='map-img'></Image>
525
                   <Text className='map-txt' onClick={this.toMapHouse}>地图看房</Text>
477
                   <Text className='map-txt' onClick={this.toMapHouse}>地图看房</Text>
542
           )
494
           )
543
         }
495
         }
544
 
496
 
545
-        {
546
-          helpGroupList.length > 0 &&
547
-          <View
548
-            style={{
549
-              position: 'relative', padding: '20px 15px 0 15px'
550
-            }}>
551
-
552
-            <HelpGroupBanner
553
-              style={{
554
-                borderRadius: '6px',
555
-                height: '230rpx'
556
-              }}
557
-              indicatorDots={false}
558
-              list={helpGroupList}
559
-              onClick={this.handleHelpGroupClick}>
560
-            </HelpGroupBanner>
561
-          </View>
562
-        }
563
-
564
         <View className="last-text">已经到底了~</View>
497
         <View className="last-text">已经到底了~</View>
565
       </Block>
498
       </Block>
566
     )
499
     )
592
       url: '/pages/news/detail/index?id=' + item.newsId
525
       url: '/pages/news/detail/index?id=' + item.newsId
593
     })
526
     })
594
   }
527
   }
528
+  toNewsList() {
529
+    Taro.getApp().props.projectIndex = 1
530
+    Taro.switchTab({
531
+      url: `/pages/activity/activity`,
532
+      fail: res => {
533
+        Taro.getApp().props.projectIndex = 0
534
+      }
535
+    })
536
+  }
537
+  toShopMallPage() {
538
+    Taro.switchTab({
539
+      url: `/pages/shop/index`
540
+    })
541
+  }
542
+  toPolicyPage() {
543
+    Taro.navigateTo({
544
+      url: '/pages/policy/index?from=mine',
545
+    })
546
+  }
595
 
547
 
596
   render() {
548
   render() {
597
     const { curCity } = this.props
549
     const { curCity } = this.props
598
-    const { newsList, achieve, adImage } = this.state
550
+    const { achieve, helpGroupList } = this.state
599
     const { userInfo: { person: { personType, phone } } } = this.props
551
     const { userInfo: { person: { personType, phone } } } = this.props
600
     const { unReadNum, userInfo: { person } } = this.props
552
     const { unReadNum, userInfo: { person } } = this.props
601
     return (
553
     return (
606
             {!achieve && <ScrollView
558
             {!achieve && <ScrollView
607
               scrollY
559
               scrollY
608
               className='home'>
560
               className='home'>
561
+              <View className="top-box">
562
+                <View className="search" onClick={this.handleToHouseList}>
563
+                  <Image className="search-icon" src={require('@assets/index/search.png')} />
564
+                  <Input className="search-input" placeholder-style="color:#B8B8B8" placeholder="输入你想查询的楼盘"></Input>
565
+                </View>
566
+                <View className="location" onClick={this.handleLocationClick}>
567
+                  <Image className="location-icon" src={require('@assets/index/location.png')} />
568
+                  <Text className="location-text">{curCity.id ? curCity.shortname : '正在定位'}</Text>
569
+                  <View class="arrow_down"></View>
570
+                </View>
571
+              </View>
609
               <View className="section section-top" style={{ marginTop: 0, paddingTop: 0 }}>
572
               <View className="section section-top" style={{ marginTop: 0, paddingTop: 0 }}>
610
                 <View
573
                 <View
611
                   style={{
574
                   style={{
612
-                    height: '600rpx', position: 'relative'
575
+                    height: '464rpx', position: 'relative'
613
                   }}>
576
                   }}>
614
                   {
577
                   {
615
                     this.state.visBanner && (
578
                     this.state.visBanner && (
616
                       <Banner
579
                       <Banner
617
                         style={{
580
                         style={{
618
-                          height: '600rpx'
581
+                          height: '464rpx'
619
                         }}
582
                         }}
620
-                        indicatorDots={true}
583
+                        indicatorDots={false}
621
                         list={this.state.bannerList}
584
                         list={this.state.bannerList}
622
                         onClick={this.handleBannerClick}
585
                         onClick={this.handleBannerClick}
623
                         onChange={() => (1)}
586
                         onChange={() => (1)}
626
                     )
589
                     )
627
                   }
590
                   }
628
                 </View>
591
                 </View>
629
-                <View className="top-box">
630
-                  <View className="search" onClick={this.handleToHouseList}>
631
-                    <Image className="search-icon" src={require('@assets/search.png')} />
632
-                    <Input className="search-input" placeholder-style="color:#fff" placeholder="输入你想查询的楼盘"></Input>
633
-                  </View>
634
-                  <View className="location" onClick={this.handleLocationClick}>
635
-                    <Image className="location-icon" src={require('@assets/map.png')} />
636
-                    <Text className="location-text">{curCity.id ? curCity.name : '正在定位'}</Text>
637
-                  </View>
638
-                </View>
639
-
640
-                {
592
+                {/* {
641
                   (personType !== ROLE_CODE['CONSULTANT']) && (
593
                   (personType !== ROLE_CODE['CONSULTANT']) && (
642
                     <View className='section sectionn-customer' style={newsList.length ? "padding-bottom:0rpx;" : ""} >
594
                     <View className='section sectionn-customer' style={newsList.length ? "padding-bottom:0rpx;" : ""} >
643
                       <View className='section-content' onClick={this.toRecomonedPage.bind(this, personType)}>
595
                       <View className='section-content' onClick={this.toRecomonedPage.bind(this, personType)}>
660
                       </View>
612
                       </View>
661
                     </View>
613
                     </View>
662
                   )
614
                   )
663
-                }
615
+                } */}
664
 
616
 
665
               </View>
617
               </View>
666
-              <Newsbanner cityId={curCity.id} onClick={this.handleNoticeClick} onClickMore={this.toNewsList} />
667
-
618
+              <View className="mune-box" style={personType == ROLE_CODE['CONSULTANT'] ? "padding:0 8%" : ""}>
619
+                <View className="mune-item" onClick={this.toShopMallPage}>
620
+                  <Image src={require('@assets/index/mall-icon.png')} className='icon'></Image>
621
+                  <View className="mune-text">
622
+                    积分商城
623
+                  </View>
624
+                </View>
625
+                <View className="mune-item" onClick={this.toPolicyPage}>
626
+                  <Image src={require('@assets/index/encyclopedia-icon.png')} className='icon'></Image>
627
+                  <View className="mune-text">
628
+                    购房百科
629
+                  </View>
630
+                </View>
631
+                {
632
+                  (personType !== ROLE_CODE['CONSULTANT']) &&
633
+                  <View className="mune-item" onClick={this.toRecomonedPage}>
634
+                    <Image src={require('@assets/index/recommend-icon.png')} className='icon'></Image>
635
+                    <View className="mune-text">
636
+                      推荐客户
637
+                  </View>
638
+                  </View>
639
+                }
640
+                <View className="mune-item" onClick={this.toMapHouse}>
641
+                  <Image src={require('@assets/index/map-icon.png')} className='icon'></Image>
642
+                  <View className="mune-text">
643
+                    地图找房
644
+                  </View>
645
+                </View>
646
+              </View>
647
+              <View style="border-bottom:20rpx solid #f5f5f5">
648
+                {
649
+                  helpGroupList.length > 0 &&
650
+                  <View
651
+                    style={{
652
+                      position: 'relative', padding: '20px 15px 0 15px'
653
+                    }}>
654
+
655
+                    <BannerTwo
656
+                      style={{
657
+                        borderRadius: '6px',
658
+                        height: '230rpx'
659
+                      }}
660
+                      indicatorDots={false}
661
+                      list={helpGroupList}
662
+                      onClick={this.handleHelpGroupClick}>
663
+                    </BannerTwo>
664
+                  </View>
665
+                }
666
+                <Newsbanner cityId={curCity.id} onClick={this.handleNoticeClick} onClickMore={this.toNewsList} />
667
+                <Activity cityId={curCity.id} />
668
+              </View >
668
               {/* 推荐楼盘 */}
669
               {/* 推荐楼盘 */}
669
               {this.renderProjectList()}
670
               {this.renderProjectList()}
670
-
671
             </ScrollView>}
671
             </ScrollView>}
672
-            {/* user={person} onSuccess={()=>this.handleAuthPhoneSuccess(curCity) */}
673
-            {/* {achieve && <View style="width:100%;height:100%"><Authorize ></Authorize>  </View>} */}
674
             {this.state.maskVisible && this.renderMaskBanner()}
672
             {this.state.maskVisible && this.renderMaskBanner()}
675
             <View className="chat-box" onClick={this.toChatList}>
673
             <View className="chat-box" onClick={this.toChatList}>
676
               {unReadNum > 0 && <View className="red-dot"></View >}
674
               {unReadNum > 0 && <View className="red-dot"></View >}

+ 99
- 52
src/pages/project/index.scss View File

17
   width: 100%;
17
   width: 100%;
18
   align-items: center;
18
   align-items: center;
19
   justify-content: space-between;
19
   justify-content: space-between;
20
-  position: absolute;
21
-  top: 5%;
22
-  left: 0;
23
-  padding: 0 60px;
20
+  padding: 20px 30px;
21
+  background-color: #fff;
22
+  .search {
23
+    height: 60px;
24
+    line-height: 60px;
25
+    background:rgba(0,0,0,0.04);
26
+    -webkit-box-pack: start;
27
+    -webkit-justify-content: flex-start;
28
+    -ms-flex-pack: start;
29
+    border-radius: 30px;
30
+    @extend .flex;
31
+    justify-content: flex-start;
32
+    width: 500px;
33
+    &-icon {
34
+    width: 26px;
35
+    height: 24px;
36
+    margin: 0 16px 0 20px ;
37
+    }
38
+    &-input {
39
+      font-size: 24px;
40
+      color: #B8B8B8;
41
+    }
42
+  }
24
   .location {
43
   .location {
25
     @extend .flex;
44
     @extend .flex;
26
     justify-content: center;
45
     justify-content: center;
27
-    padding: 0 12px;
28
-    background:rgba(0,0,0,0.2);
29
-    border-radius:12px;
30
     height: 60px;
46
     height: 60px;
31
     line-height: 60px;
47
     line-height: 60px;
32
-    
48
+    width: 154px;
49
+    text-align: center;
33
     &-text {
50
     &-text {
34
-      font-size: 25px;
35
-      padding-left: 13px;
36
-      color: #fff;
51
+      font-size: 26px;
52
+      padding: 0 8px;
53
+      color: $primary-color;
37
       @include text-ellipsis; 
54
       @include text-ellipsis; 
38
-      width: 100px;
55
+      max-width: 120px;
39
       text-align: center;
56
       text-align: center;
40
     }
57
     }
41
-  
42
     &-icon {
58
     &-icon {
43
       width: 14px;
59
       width: 14px;
44
       height: 20px;
60
       height: 20px;
45
       animation: bigger 1s ease 3 both;
61
       animation: bigger 1s ease 3 both;
46
     }
62
     }
63
+    .arrow_down {
64
+      width: 0;
65
+      height: 0;
66
+      border-left: 8px solid transparent;
67
+      border-right: 8px solid transparent;
68
+      border-top: 8px solid $primary-color;
69
+    }
47
   }
70
   }
48
-  
49
-  .search {
50
 
71
 
51
-    height: 60px;
52
-    line-height: 60px;
53
-    background:rgba(0,0,0,0.2);
54
-    -webkit-box-pack: start;
55
-    -webkit-justify-content: flex-start;
56
-    -ms-flex-pack: start;
57
-    border-radius: 12px;
58
-    @extend .flex;
59
-    justify-content: flex-start;
60
-    width: 440px;
61
-  
62
-    &-icon {
63
-    width: 26px;
64
-    height: 26px;
65
-    margin: 0 16px 0 20px ;
66
-    }
67
-    &-input {
68
-      font-size: 24px;
69
-      color: #fff;
70
-    }
72
+}
73
+.mune-box{
74
+  width:690px;
75
+  height:188px;
76
+  background:#fff;
77
+  box-shadow:0px 4px 12px 0px rgba(0,0,0,0.12);
78
+  border-radius:12px;
79
+  display: flex;
80
+  align-items: center;
81
+  justify-content: space-between;
82
+  margin: -94px auto 0 auto;
83
+  position: relative;
84
+  .mune-item{
85
+    text-align: center;
86
+    width: 25%;
87
+    .icon{
88
+      width:80px;
89
+      height:80px;
71
 
90
 
91
+    }
72
   }
92
   }
73
 }
93
 }
74
 
94
 
75
 
95
 
76
-
77
-
78
-
79
-
80
 .section {
96
 .section {
81
   background: white;
97
   background: white;
82
   padding: 30px ;
98
   padding: 30px ;
86
 
102
 
87
     &__title {
103
     &__title {
88
       font-size: 40px;
104
       font-size: 40px;
89
-      font-weight: bold;
105
+      font-weight: 600;
90
       // font-family: PingFangSC;
106
       // font-family: PingFangSC;
91
     }
107
     }
92
 
108
 
93
     &__more {
109
     &__more {
94
       font-size: 26px;
110
       font-size: 26px;
95
-      color: $text-color-lighter;
111
+      color: #A1A1A1;
112
+      display: flex;
113
+      align-items: center;
96
 
114
 
97
       .iconfont {
115
       .iconfont {
98
         font-size: 26px;
116
         font-size: 26px;
99
-        color: $text-color-lighter;
117
+        color: #A1A1A1;
118
+        margin-left: 6px;
100
       }
119
       }
101
     }
120
     }
102
   }
121
   }
106
   align-items: center;
125
   align-items: center;
107
   justify-content: space-between;
126
   justify-content: space-between;
108
   margin: 30px;
127
   margin: 30px;
109
-  height:80px;
128
+  height:112px;
110
   background:#fff;
129
   background:#fff;
111
   box-shadow:0px 2px 10px 0px rgba(0,0,0,0.12);
130
   box-shadow:0px 2px 10px 0px rgba(0,0,0,0.12);
112
-  padding: 0 20px;
131
+  padding:  20px ;
132
+  .left-text{
133
+    padding-right: 20px;
134
+    border-right: 2px solid rgba(0,0,0,0.04);
135
+    .up{
136
+      font-size: 28px;
137
+      color: #F6B61D;
138
+      font-weight: 600;
139
+    }
140
+    .down{
141
+      font-size: 28px;
142
+      color: #888;
143
+      font-weight: 600;
144
+    }
145
+  }
146
+ 
113
   .notice-icon{
147
   .notice-icon{
114
     width: 40px ;
148
     width: 40px ;
115
     height: 32px;
149
     height: 32px;
118
   }
152
   }
119
   .notice-swiper{
153
   .notice-swiper{
120
     height: 80px;
154
     height: 80px;
121
-    width: 500px;
122
-    line-height: 80px;
155
+    width: 440px;
156
+    margin-left: 20px;
157
+    .date{
158
+      font-size:22px;
159
+      color:#888;
160
+      display: flex;
161
+      align-items: center;
162
+      line-height: 44px;
163
+      .dot{
164
+        width: 6px;
165
+        height: 6px;
166
+        border-radius: 4px;
167
+        background-color: #F6B61D;
168
+        margin-right: 12px;
169
+      }
170
+    }
123
     .notice-text{
171
     .notice-text{
124
-      font-size: 28px;
125
-      color: #888888;
126
-      width: 450px;
172
+      font-size: 26px;
173
+      color: #353535;
174
+      width: 390px;
127
       @include text-ellipsis;
175
       @include text-ellipsis;
128
     }
176
     }
129
   }
177
   }
453
 }
501
 }
454
 .last-text{
502
 .last-text{
455
   font-size: 28px;
503
   font-size: 28px;
456
-  color: #dcdcdc;
504
+  color: #999;
457
   text-align: center;
505
   text-align: center;
458
-  margin-bottom: 60px;
459
-  margin-top: 40px;
506
+  margin: 40px 0;
460
 }
507
 }
461
 @keyframes moveY {
508
 @keyframes moveY {
462
   0% {
509
   0% {

+ 0
- 1
src/pages/project/item/index.js View File

25
     return (
25
     return (
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')}
29
           <Image className='item__img' mode="aspectFill" src={transferImage(imgSrc)}></Image>
28
           <Image className='item__img' mode="aspectFill" src={transferImage(imgSrc)}></Image>
30
           {data.marketStatus &&
29
           {data.marketStatus &&
31
             <View className={data.marketStatus == '在售' ? 'item__status sale' : data.marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{data.marketStatus}</View>}
30
             <View className={data.marketStatus == '在售' ? 'item__status sale' : data.marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{data.marketStatus}</View>}

+ 35
- 30
src/pages/project/newsbanner/index.js View File

1
 import Taro, { Component } from '@tarojs/taro'
1
 import Taro, { Component } from '@tarojs/taro'
2
 import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
2
 import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
3
 import { queryNewsList } from '@services/news'
3
 import { queryNewsList } from '@services/news'
4
+import dayjs from 'dayjs'
4
 
5
 
5
 export default class SwiperBanner extends Component {
6
 export default class SwiperBanner extends Component {
6
   static options = {
7
   static options = {
16
   timer = null;
17
   timer = null;
17
 
18
 
18
   componentWillReceiveProps(nextProps) {
19
   componentWillReceiveProps(nextProps) {
19
-    
20
+
20
     // if (nextProps.cityId != this.state.lastCity) {
21
     // if (nextProps.cityId != this.state.lastCity) {
21
-      const payload = {
22
-        pageNumber: 1,
23
-        pageSize: 999,
24
-        cityId: nextProps.cityId,
25
-      }
22
+    const payload = {
23
+      pageNumber: 1,
24
+      pageSize: 999,
25
+      cityId: nextProps.cityId,
26
+    }
26
 
27
 
27
-      queryNewsList(payload).then(res => {
28
-        if (JSON.stringify(this.state.list) !== JSON.stringify(res.records || [])) {
28
+    queryNewsList(payload).then(res => {
29
+      if (JSON.stringify(this.state.list) !== JSON.stringify(res.records || [])) {
29
 
30
 
30
-          this.setState({
31
-            list: res.records || [],
32
-            lastCity: nextProps.cityId,
33
-            current: 0,
34
-          }, () => {
35
-            if (this.state.list.length > 1) {
36
-              this.clearTimer()
37
-              this.timer = setInterval(() => {
38
-                let current = this.state.current + 1
39
-                if (current >= this.state.list.length) {
40
-                  current = 0
41
-                }
42
-    
43
-                this.setState({ current })
44
-              }, 3000)
45
-            }
46
-          })
47
-        }
48
-      })  
31
+        this.setState({
32
+          list: res.records || [],
33
+          lastCity: nextProps.cityId,
34
+          current: 0,
35
+        }, () => {
36
+          if (this.state.list.length > 1) {
37
+            this.clearTimer()
38
+            this.timer = setInterval(() => {
39
+              let current = this.state.current + 1
40
+              if (current >= this.state.list.length) {
41
+                current = 0
42
+              }
43
+
44
+              this.setState({ current })
45
+            }, 3000)
46
+          }
47
+        })
48
+      }
49
+    })
49
     // }
50
     // }
50
   }
51
   }
51
 
52
 
66
     return (
67
     return (
67
       <View className="notice-box">
68
       <View className="notice-box">
68
         <View style="display: flex;align-items: center;">
69
         <View style="display: flex;align-items: center;">
69
-          <Image className="notice-icon" src={require('@assets/notice.png')}></Image>
70
+          <View className="left-text">
71
+            <View className="up"> 地产</View >
72
+            <View className="down"> 头条</View >
73
+          </View >
74
+
75
+          {/* <Image className="notice-icon" src={require('@assets/notice.png')}></Image> */}
70
           <Swiper
76
           <Swiper
71
             className='notice-swiper'
77
             className='notice-swiper'
72
             circular
78
             circular
73
-            // autoplay
74
-            // interval="3000"
75
             vertical="true"
79
             vertical="true"
76
             current={this.state.current}
80
             current={this.state.current}
77
           >
81
           >
80
                 return (
84
                 return (
81
                   <SwiperItem key={`news-${inx}`}>
85
                   <SwiperItem key={`news-${inx}`}>
82
                     <View className="notice-text" onClick={() => this.props.onClick(item)}>
86
                     <View className="notice-text" onClick={() => this.props.onClick(item)}>
87
+                    <View className="date"><View className="dot"></View>{dayjs(item.createDate).format('YYYY-MM-DD')}</View>
83
                       {item.newsName}
88
                       {item.newsName}
84
                     </View>
89
                     </View>
85
                   </SwiperItem>
90
                   </SwiperItem>

+ 1
- 1
src/reducers/city.js View File

11
 export default function news(state = INITIAL_STATE, action) {
11
 export default function news(state = INITIAL_STATE, action) {
12
   switch (action.type) {
12
   switch (action.type) {
13
     case CITY_LIST: {
13
     case CITY_LIST: {
14
-      console.log(action.payload, "!!action.payload!!")
14
+      // console.log(action.payload, "!!action.payload!!")
15
       return {
15
       return {
16
         ...state,
16
         ...state,
17
         cityList: action.payload
17
         cityList: action.payload

+ 0
- 1
src/utils/login.js View File

32
         // 用户信息已授权获取成功
32
         // 用户信息已授权获取成功
33
         if (miniAuthorized) {
33
         if (miniAuthorized) {
34
    
34
    
35
-          console.log(data, "data=============")
36
           // 保存用户信息
35
           // 保存用户信息
37
           // dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp } })
36
           // dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp } })
38
           callback && callback(data)
37
           callback && callback(data)

+ 1
- 21
src/utils/rtLog.js View File

1
 
1
 
2
-let logger;
3
-
4
-function getLogger() {
5
-  if (wx.canIUse('getRealtimeLogManager')) {
6
-    return wx.getRealtimeLogManager()
7
-  }
8
-
9
-  return undefined;
10
-}
2
+let logger = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : null;
11
 
3
 
12
 function info(...args) {
4
 function info(...args) {
13
-  if (!logger) {
14
-    logger = getLogger()
15
-  }
16
-
17
   // 本地打印
5
   // 本地打印
18
   console.info(...args)
6
   console.info(...args)
19
 
7
 
24
 }
12
 }
25
 
13
 
26
 function error(...args) {
14
 function error(...args) {
27
-  if (!logger) {
28
-    logger = getLogger()
29
-  }
30
-
31
   console.error(...args)
15
   console.error(...args)
32
 
16
 
33
   if (logger) {
17
   if (logger) {
36
 }
20
 }
37
 
21
 
38
 function warn(...args) {
22
 function warn(...args) {
39
-  if (!logger) {
40
-    logger = getLogger()
41
-  }
42
-
43
   console.warn(...args)
23
   console.warn(...args)
44
 
24
 
45
   if (logger) {
25
   if (logger) {