Browse Source

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

xujing 5 years ago
parent
commit
bbabec222d

+ 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)

+ 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>

+ 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 (

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

367
 
367
 
368
   onShareAppMessage = () => {
368
   onShareAppMessage = () => {
369
     const { shares, detail: { groupActivityId } } = this.state
369
     const { shares, detail: { groupActivityId } } = this.state
370
-    const currentPage = this.currentPageAndParams().join('?')
370
+    const currentPage = `/${this.currentPageAndParams().join('?')}`
371
     const { userInfo: { person: { personId, personType, userId } } } = this.props
371
     const { userInfo: { person: { personId, personType, userId } } } = this.props
372
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
372
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
373
 
373
 
609
 
609
 
610
     const posterConfigs = this.transTPLs2Configs(posterTpls, posterData)
610
     const posterConfigs = this.transTPLs2Configs(posterTpls, posterData)
611
 
611
 
612
-    console.log('------posterData------', posterData)
613
-    console.log('------posterConfigs------', posterConfigs)
612
+    // console.log('------posterData------', posterData)
613
+    // console.log('------posterConfigs------', posterConfigs)
614
 
614
 
615
     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
616
 
616
 

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

370
 
370
 
371
   onShareAppMessage = () => {
371
   onShareAppMessage = () => {
372
     const { shares, id } = this.state
372
     const { shares, id } = this.state
373
-    const currentPage = this.currentPageAndParams().join('?')
373
+    const currentPage = `/${this.currentPageAndParams().join('?')}`
374
     const { userInfo: { person: { personId, personType, userId } } } = this.props
374
     const { userInfo: { person: { personId, personType, userId } } } = this.props
375
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
375
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
376
 
376
 

+ 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>

+ 52
- 19
src/pages/news/detail/index.js View File

41
     consultShow: false  // 置业顾问悬浮框显示隐藏
41
     consultShow: false  // 置业顾问悬浮框显示隐藏
42
   }
42
   }
43
 
43
 
44
-  componentWillMount(routerProps) {
45
-    console.log(routerProps,"routerProps")
44
+  componentWillMount(options) {
45
+    console.log('================options========================', options)
46
+    console.log('===========wx.getLaunchOptionsSync()===========', wx.getLaunchOptionsSync())
47
+    console.log('================this.$router===================', this.$router)
46
 
48
 
47
     console.info('ready status3', ready)
49
     console.info('ready status3', ready)
48
     ready.queue(() => {
50
     ready.queue(() => {
82
 
84
 
83
     const router = Taro.getStorageSync('router') || { query: {} }
85
     const router = Taro.getStorageSync('router') || { query: {} }
84
     const consultant = this.$router.params.consultant || router.query.consultant || ""
86
     const consultant = this.$router.params.consultant || router.query.consultant || ""
85
-    const { userInfo: { person: { phone, tel, personId } } } = this.props
87
+    const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
88
+    const { userInfo: { person: { phone, tel, userId } } } = this.props
86
 
89
 
87
     if (consultant && consultant != personId) {
90
     if (consultant && consultant != personId) {
88
       const realPhone = phone || tel
91
       const realPhone = phone || tel
134
       url: `/pages/project/index`
137
       url: `/pages/project/index`
135
     })
138
     })
136
   }
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
+
137
   onShareAppMessage = () => {
164
   onShareAppMessage = () => {
138
     const { detail: { shareContents, newsName, newsId, newsImg } } = this.state
165
     const { detail: { shareContents, newsName, newsId, newsImg } } = this.state
139
     const { userInfo: { person: { personId, personType, userId } } } = this.props
166
     const { userInfo: { person: { personId, personType, userId } } } = this.props
152
       console.info('资讯详情分享')
179
       console.info('资讯详情分享')
153
     })
180
     })
154
 
181
 
182
+    const shareData = shareContents && shareContents.length ? shareContents[0] : { shareContentTitle: newsName, shareContentImg: newsImg };
183
+
155
     // 分享埋点
184
     // 分享埋点
156
     addNewsShareNum(newsId)
185
     addNewsShareNum(newsId)
157
-    console.log(`/pages/news/detail/index?id=${newsId}&from=news_share&recommender=${personId}&consultant=${consultant}`, "path")
186
+
187
+    const [path, params] = this.currentPageAndParams();
188
+
189
+    console.log('----share-url---->', `/${path}?${params}`)
158
 
190
 
159
     return {
191
     return {
160
-      title: shareContents[0].shareContentTitle || newsName,
161
-      path: `/pages/news/detail/index?id=${newsId}&from=news_share&recommender=${personId}&consultant=${consultant}&consultantId=${consultantId}`,//分享地址
162
-      imageUrl: shareContents[0].shareContentImg || newsImg
192
+      title: shareData.shareContentTitle,
193
+      path: `/${path}?${params}`,//分享地址
194
+      imageUrl: shareData.shareContentImg
163
     }
195
     }
164
   }
196
   }
165
 
197
 
223
       }
255
       }
224
       const { userInfo: { person, miniApp } } = this.props
256
       const { userInfo: { person, miniApp } } = this.props
225
       const { avatarurl, nickname, personId, personType, phone, tel, userId } = person
257
       const { avatarurl, nickname, personId, personType, phone, tel, userId } = person
226
-      const { newsId, detail: { posters, newsName, createDate } } = this.state
227
-      const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
228
-      const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
229
-      const phoneNum = phone || tel
230
-      const payload = {
231
-        "scene": `id=${newsId}&from=news_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}&consultantId=${consultantId}`,
232
-        "page": 'pages/news/detail/index',
233
-      }
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 }
234
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
266
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
235
 
267
 
268
+      const posterDt = posters && posters.length ? posters[0] : { posterTitle: newsName, posterDescription: '', posterImg: newsImg }
269
+
236
       getMiniQrcode(payload).then(qrcode => {
270
       getMiniQrcode(payload).then(qrcode => {
237
         let data = {
271
         let data = {
238
           qrcode,//小程序二维码
272
           qrcode,//小程序二维码
239
           nickname,//访问者名字
273
           nickname,//访问者名字
240
           avatarurl: _avatarurl,//访问者头像
274
           avatarurl: _avatarurl,//访问者头像
241
-          title: posters[0].posterTitle,//资讯海报标题
242
-          posterDescription: posters[0].posterDescription,//资讯海报描述
275
+          title: posterDt.posterTitle,//资讯海报标题
276
+          posterDescription: posterDt.posterDescription,//资讯海报描述
243
           createDate: createDate,//资讯时间
277
           createDate: createDate,//资讯时间
244
-          poster: posters[0].posterImg,
278
+          poster: posterDt.posterImg,
245
           miniAppName: miniApp.name,
279
           miniAppName: miniApp.name,
246
-
247
         }
280
         }
248
         resolve(data)
281
         resolve(data)
249
       })
282
       })

+ 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

+ 38
- 14
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 { userInfo: { person: { phone, tel, personId } } } = this.props
117
     const { userInfo: { person: { phone, tel, personId } } } = this.props
130
       })
130
       })
131
     }
131
     }
132
   }
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
+
133
   onShareAppMessage = () => {
157
   onShareAppMessage = () => {
134
     const {
158
     const {
135
-      projectDetail: { shareContents, buildingName, buildingId, poster },
159
+      projectDetail: { shareContents, buildingName, buildingId, poster = '' },
136
       userInfo: { person: { personId, personType, userId } }
160
       userInfo: { person: { personId, personType, userId } }
137
     } = this.props
161
     } = this.props
138
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
162
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
149
     }).then(res => {
173
     }).then(res => {
150
       console.log('项目详情分享')
174
       console.log('项目详情分享')
151
     })
175
     })
152
-    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
+
153
     return {
181
     return {
154
-      title: shareContents[0].shareContentTitle,//分享内容
155
-      path: `/pages/project/detail/index?id=${buildingId}&from=building_share&recommender=${personId}&consultant=${consultant}&consultantId=${consultantId}`,//分享地址
156
-      imageUrl: shareContents[0].shareContentImg
182
+      title: shareData.shareContentTitle,//分享内容
183
+      path: `/${page}?${params}`,//分享地址
184
+      imageUrl: shareData.shareContentImg
157
     }
185
     }
158
   }
186
   }
159
 
187
 
344
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
372
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
345
   }
373
   }
346
 
374
 
347
-
348
   getPhoneNumber(e, item) {
375
   getPhoneNumber(e, item) {
349
     getUserPhone(e, (phoneNumber) => {
376
     getUserPhone(e, (phoneNumber) => {
350
       const { userInfo: { person: { personId, nickname, name } } } = this.props
377
       const { userInfo: { person: { personId, nickname, name } } } = this.props
382
         projectDetail: { posters, buildingId, poster, price, buildingRestaurant, createDate, buildingName, tel, buildingTag, uvList = {} }
409
         projectDetail: { posters, buildingId, poster, price, buildingRestaurant, createDate, buildingName, tel, buildingTag, uvList = {} }
383
       } = this.props
410
       } = this.props
384
       const { total = 0 } = uvList
411
       const { total = 0 } = uvList
385
-      const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
386
-      const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
387
-      const phoneNum = person.phone || person.tel
388
-      const payload = {
389
-        "scene": `id=${buildingId}&from=building_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}&consultantId=${consultantId}`,
390
-        "page": 'pages/project/detail/index',
391
-      }
412
+
413
+      const [page, scene] = this.currentPageAndParams();   
414
+      const payload = {page, scene}
415
+
392
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
416
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
393
 
417
 
394
       getMiniQrcode(payload).then(qrcode => {
418
       getMiniQrcode(payload).then(qrcode => {

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

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>

+ 3
- 3
src/pages/project/index.js View File

138
     let defaultCity = cityList.filter(item => {
138
     let defaultCity = cityList.filter(item => {
139
       return item.id == org.defaultCityId
139
       return item.id == org.defaultCityId
140
     })[0]
140
     })[0]
141
-    console.log('-----defaultCity-->', defaultCity)
141
+    // console.log('-----defaultCity-->', defaultCity)
142
 
142
 
143
     Taro.getLocation().then(location => {
143
     Taro.getLocation().then(location => {
144
       Taro.setStorageSync('lat', location.latitude)
144
       Taro.setStorageSync('lat', location.latitude)
151
         let curCity = cityList.filter(item => {
151
         let curCity = cityList.filter(item => {
152
           return item.name == res.name || ''
152
           return item.name == res.name || ''
153
         })
153
         })
154
-        console.log('-----curCity-->', curCity)
154
+        // console.log('-----curCity-->', curCity)
155
         this.updateCity(curCity[0] || defaultCity)
155
         this.updateCity(curCity[0] || defaultCity)
156
       }).catch(err => {
156
       }).catch(err => {
157
         Taro.showToast({
157
         Taro.showToast({
463
     const { proList: { records = [] } } = this.props
463
     const { proList: { records = [] } } = this.props
464
 
464
 
465
     const list = records.filter(item => item.isMain === 1)
465
     const list = records.filter(item => item.isMain === 1)
466
-    console.log(records, 'proList')
466
+    // console.log(records, 'proList')
467
     return (
467
     return (
468
       <Block>
468
       <Block>
469
         {
469
         {

+ 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>}

+ 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) {