Ver código fonte

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

xujing 5 anos atrás
pai
commit
bbabec222d

+ 19
- 13
src/app.js Ver arquivo

@@ -5,7 +5,7 @@ import "@styles/icon.scss";
5 5
 import "@components/wxParse/wxParse.scss";
6 6
 import Index from './pages/auth/index'
7 7
 import { Provider } from '@tarojs/redux'
8
-import { getQueryString } from '@utils/tools'
8
+import { parseQueryString } from '@utils/tools'
9 9
 
10 10
 import {
11 11
   getCodeScene,
@@ -176,7 +176,7 @@ class App extends Component {
176 176
     })
177 177
   }
178 178
   componentDidMount() {
179
-    console.info('app componentDidMount')
179
+    // console.info('app componentDidMount')
180 180
   }
181 181
   componentWillMount(params) {
182 182
     // console.info('app componentWillMount', params)
@@ -185,7 +185,7 @@ class App extends Component {
185 185
 
186 186
   initData () {
187 187
     // console.info('app componentDidShow')
188
-    console.info('router1', this.$router.params)
188
+    console.info('router1', this.$router)
189 189
     console.info('ready status1', ready)
190 190
 
191 191
     // 获取城市列表
@@ -229,33 +229,39 @@ class App extends Component {
229 229
   getRouterParams() {
230 230
     return new Promise(resolve => {
231 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 240
       if (paramsId) {
235 241
         // 扫码进入
236 242
         getCodeScene(paramsId).then(res => {
237 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 246
           router.query = Object.assign(router.query, {
247
+            originQuery,
243 248
             id,
244 249
             paramsId,
245 250
             from: _from,
246 251
             recommender: _recommender,
247 252
             params,
248 253
             targetId: id,
249
-            agentCode
254
+            ...left,
250 255
           })
251 256
 
252 257
           resolve(router)
253 258
         })
254 259
       } else {
255 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 267
         resolve(router)

+ 0
- 1
src/components/achieveAvatar/index.js Ver arquivo

@@ -84,7 +84,6 @@ export default class Index extends Component {
84 84
   }
85 85
   render() {
86 86
     const { user = {} } = this.props
87
-    console.log('---------renderMaskBanner--------')
88 87
 
89 88
     return (
90 89
       <Block>

+ 0
- 2
src/components/taro-plugin-canvas/index.js Ver arquivo

@@ -288,8 +288,6 @@ export default class CanvasDrawer extends Component {
288 288
   }
289 289
 
290 290
   render() {
291
-    console.log('------render canvas----')
292
-
293 291
     const { pxWidth, pxHeight, debug } = this.state;
294 292
     if(pxWidth && pxHeight){
295 293
       return (

+ 3
- 3
src/pages/activity/detail/assemble.js Ver arquivo

@@ -367,7 +367,7 @@ export default class Detail extends Component {
367 367
 
368 368
   onShareAppMessage = () => {
369 369
     const { shares, detail: { groupActivityId } } = this.state
370
-    const currentPage = this.currentPageAndParams().join('?')
370
+    const currentPage = `/${this.currentPageAndParams().join('?')}`
371 371
     const { userInfo: { person: { personId, personType, userId } } } = this.props
372 372
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
373 373
 
@@ -609,8 +609,8 @@ export default class Detail extends Component {
609 609
 
610 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 615
     const isJoin = memberList.filter(x => x.personId === userInfo.person.personId)[0] || isStarter
616 616
 

+ 1
- 1
src/pages/activity/detail/assistance.js Ver arquivo

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

+ 2
- 2
src/pages/activity/index.js Ver arquivo

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

+ 0
- 1
src/pages/activity/item/index.js Ver arquivo

@@ -16,7 +16,6 @@ export default class Item extends Component {
16 16
     const { data, style } = this.props
17 17
     return (
18 18
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
19
-        {console.log(data,'----data-----')}
20 19
          <Image className="pic" mode="aspectFill" src={transferImage(data.mainImg ||data.listImgUrl|| data.imgUrl)}></Image>
21 20
         <View className="box">
22 21
           <View className="title">{data.title}</View>

+ 1
- 1
src/pages/checkin/index.js Ver arquivo

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

+ 0
- 2
src/pages/city/index.js Ver arquivo

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

+ 52
- 19
src/pages/news/detail/index.js Ver arquivo

@@ -41,8 +41,10 @@ export default class NewsDetail extends Component {
41 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 49
     console.info('ready status3', ready)
48 50
     ready.queue(() => {
@@ -82,7 +84,8 @@ export default class NewsDetail extends Component {
82 84
 
83 85
     const router = Taro.getStorageSync('router') || { query: {} }
84 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 90
     if (consultant && consultant != personId) {
88 91
       const realPhone = phone || tel
@@ -134,6 +137,30 @@ export default class NewsDetail extends Component {
134 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 164
   onShareAppMessage = () => {
138 165
     const { detail: { shareContents, newsName, newsId, newsImg } } = this.state
139 166
     const { userInfo: { person: { personId, personType, userId } } } = this.props
@@ -152,14 +179,19 @@ export default class NewsDetail extends Component {
152 179
       console.info('资讯详情分享')
153 180
     })
154 181
 
182
+    const shareData = shareContents && shareContents.length ? shareContents[0] : { shareContentTitle: newsName, shareContentImg: newsImg };
183
+
155 184
     // 分享埋点
156 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 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,27 +255,28 @@ export default class NewsDetail extends Component {
223 255
       }
224 256
       const { userInfo: { person, miniApp } } = this.props
225 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 266
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
235 267
 
268
+      const posterDt = posters && posters.length ? posters[0] : { posterTitle: newsName, posterDescription: '', posterImg: newsImg }
269
+
236 270
       getMiniQrcode(payload).then(qrcode => {
237 271
         let data = {
238 272
           qrcode,//小程序二维码
239 273
           nickname,//访问者名字
240 274
           avatarurl: _avatarurl,//访问者头像
241
-          title: posters[0].posterTitle,//资讯海报标题
242
-          posterDescription: posters[0].posterDescription,//资讯海报描述
275
+          title: posterDt.posterTitle,//资讯海报标题
276
+          posterDescription: posterDt.posterDescription,//资讯海报描述
243 277
           createDate: createDate,//资讯时间
244
-          poster: posters[0].posterImg,
278
+          poster: posterDt.posterImg,
245 279
           miniAppName: miniApp.name,
246
-
247 280
         }
248 281
         resolve(data)
249 282
       })

+ 0
- 2
src/pages/project/album/index.js Ver arquivo

@@ -74,8 +74,6 @@ export default class Index extends Component {
74 74
     return (
75 75
       <View className='photos'>
76 76
         <View className="around-tab">
77
-          {console.log(listimg, '-----listimg---------')}
78
-          {console.log(imgList, '-------imgList-------')}
79 77
           {listimg.map((item, index) => {
80 78
             const { apartmentName } = item || {}
81 79
             const buildingImgList = item.buildingImgList || []

+ 1
- 1
src/pages/project/banner/index.js Ver arquivo

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

+ 38
- 14
src/pages/project/detail/index.js Ver arquivo

@@ -109,9 +109,9 @@ export default class Index extends Component {
109 109
     const { recordId } = this.state
110 110
     recordId && updatePoint(recordId)
111 111
   }
112
+
112 113
   // 报备客户
113 114
   reportClientFn() {
114
-
115 115
     const router = Taro.getStorageSync('router') || { query: {} }
116 116
     const consultant = this.$router.params.consultant || router.query.consultant || ""
117 117
     const { userInfo: { person: { phone, tel, personId } } } = this.props
@@ -130,9 +130,33 @@ export default class Index extends Component {
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 157
   onShareAppMessage = () => {
134 158
     const {
135
-      projectDetail: { shareContents, buildingName, buildingId, poster },
159
+      projectDetail: { shareContents, buildingName, buildingId, poster = '' },
136 160
       userInfo: { person: { personId, personType, userId } }
137 161
     } = this.props
138 162
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
@@ -149,11 +173,15 @@ export default class Index extends Component {
149 173
     }).then(res => {
150 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 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,7 +372,6 @@ export default class Index extends Component {
344 372
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
345 373
   }
346 374
 
347
-
348 375
   getPhoneNumber(e, item) {
349 376
     getUserPhone(e, (phoneNumber) => {
350 377
       const { userInfo: { person: { personId, nickname, name } } } = this.props
@@ -382,13 +409,10 @@ export default class Index extends Component {
382 409
         projectDetail: { posters, buildingId, poster, price, buildingRestaurant, createDate, buildingName, tel, buildingTag, uvList = {} }
383 410
       } = this.props
384 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 416
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
393 417
 
394 418
       getMiniQrcode(payload).then(qrcode => {

+ 10
- 10
src/pages/project/h5Page.js Ver arquivo

@@ -67,7 +67,7 @@ export default class Index extends Component {
67 67
   // 分享好友
68 68
   onShareAppMessage = () => {
69 69
     const { pageInfo } = this.state
70
-    const currentPage = this.currentPageAndParams().join('?')
70
+    const currentPage = `/${this.currentPageAndParams().join('?')}`
71 71
     console.log(currentPage)
72 72
     return {
73 73
       title: pageInfo.shareTitle,
@@ -91,12 +91,14 @@ export default class Index extends Component {
91 91
     const { h5Id } = this.state
92 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 96
     const firstShare = this.$router.params.firstShare || router.query.firstShare || person.personId
96 97
 
97 98
     let queryParams = [
98 99
       `sharePersonId=${person.personId}`,
99
-      `consultant=${consultant}`,
100
+      `consultant=${consultantId}`,
101
+      // `consultantId=${consultantId}`,
100 102
       `firstShare=${firstShare}`,
101 103
       `id=${h5Id}`
102 104
     ]
@@ -172,7 +174,6 @@ export default class Index extends Component {
172 174
         console.log(phone, "phone#########")
173 175
         // 头像手机号都有
174 176
         if (phone) {
175
-
176 177
           this.reportClient()
177 178
           this.success()
178 179
           this.setState({
@@ -245,6 +246,7 @@ export default class Index extends Component {
245 246
     }
246 247
     console.log("授权头像成功!")
247 248
   }
249
+
248 250
   // 授权用户信息
249 251
   getUserInfo() {
250 252
     const { dispatchUpdateUserInfo } = this.props
@@ -298,14 +300,12 @@ export default class Index extends Component {
298 300
 
299 301
   // 报备客户
300 302
   reportClient() {
301
-
302 303
     const router = Taro.getStorageSync('router') || { query: {} }
303 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 309
       const realPhone = phone || tel
310 310
       const payload = {
311 311
         realtyConsultant: consultant, //报备人 置业顾问
@@ -358,7 +358,7 @@ export default class Index extends Component {
358 358
 
359 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 363
     return (
364 364
       <Block>

+ 3
- 3
src/pages/project/index.js Ver arquivo

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

+ 0
- 1
src/pages/project/item/index.js Ver arquivo

@@ -25,7 +25,6 @@ export default class Index extends Component {
25 25
     return (
26 26
       <View className='item' onClick={onClick.bind(this, data)}>
27 27
         <View className='item__top'>
28
-          {console.log(data, 'data')}
29 28
           <Image className='item__img' mode="aspectFill" src={transferImage(imgSrc)}></Image>
30 29
           {data.marketStatus &&
31 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 Ver arquivo

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

+ 0
- 1
src/utils/login.js Ver arquivo

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

+ 1
- 21
src/utils/rtLog.js Ver arquivo

@@ -1,19 +1,7 @@
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 4
 function info(...args) {
13
-  if (!logger) {
14
-    logger = getLogger()
15
-  }
16
-
17 5
   // 本地打印
18 6
   console.info(...args)
19 7
 
@@ -24,10 +12,6 @@ function info(...args) {
24 12
 }
25 13
 
26 14
 function error(...args) {
27
-  if (!logger) {
28
-    logger = getLogger()
29
-  }
30
-
31 15
   console.error(...args)
32 16
 
33 17
   if (logger) {
@@ -36,10 +20,6 @@ function error(...args) {
36 20
 }
37 21
 
38 22
 function warn(...args) {
39
-  if (!logger) {
40
-    logger = getLogger()
41
-  }
42
-
43 23
   console.warn(...args)
44 24
 
45 25
   if (logger) {