xujing hace 5 años
padre
commit
e5c5d3a439

+ 2
- 2
config/dev.js Ver fichero

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

+ 8
- 26
src/pages/activity/activity.js Ver fichero

@@ -38,32 +38,14 @@ export default class active extends Component {
38 38
       console.log('活动列表')
39 39
     })
40 40
   }
41
-  // componentWillMount() {
42
-  //   console.log(Taro.getApp().props, "Taro.getApp()")
43
-  //   if (Taro.getApp().props.projectIndex) {
44
-  //     this.setState({
45
-  //       current: 1
46
-  //     })
47
-  //   }
48
-  //   else {
49
-  //     this.setState({
50
-  //       current: 0
51
-  //     })
52
-  //   }
53
-  // }
54
-  // componentDidShow() {
55
-  //   if (Taro.getApp().props.projectIndex == 1) {
56
-  //     this.setState({
57
-  //       current: 1
58
-  //     })
59
-  //     Taro.getApp().props.projectIndex = 2
60
-  //   }
61
-  //   else {
62
-  //     this.setState({
63
-  //       current: 0
64
-  //     })
65
-  //   }
66
-  // }
41
+
42
+  componentDidShow() {
43
+    if (Taro.getApp().props.projectIndex == 1) {
44
+      this.setState({
45
+        current: 1
46
+      }, Taro.getApp().props.projectIndex = 0)
47
+    }
48
+  }
67 49
   componentWillUnmount() {
68 50
     const { recordId } = this.state
69 51
     recordId && updatePoint(recordId)

+ 1
- 1
src/pages/person/accessRecord.js Ver fichero

@@ -113,7 +113,7 @@ export default class Person extends Component {
113 113
     e.stopPropagation()
114 114
     const { userInfo: { person: { personId, nickname, name } } } = this.props
115 115
     Taro.navigateTo({
116
-      url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${item.personId}&receiverName=${encodeURIComponent(item.userName)}`
116
+      url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${item.personId}&receiverName=${encodeURIComponent(item.name || item.nickname)}`
117 117
     })
118 118
   }
119 119
   renderPop() {

+ 75
- 77
src/pages/project/detail/index.js Ver fichero

@@ -28,6 +28,7 @@ import { dispatchProjectDetail } from '@actions/project'
28 28
 import getUserPhone from '@utils/getUserPhone'
29 29
 import { ROLE_CODE } from '@constants/user'
30 30
 const buildBg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/buildbg.png'
31
+const dotImg = require('@assets/dot.png')
31 32
 
32 33
 @connect(
33 34
   ({ user, project }) => ({ ...user, ...project }),
@@ -62,7 +63,7 @@ export default class Index extends Component {
62 63
     grantPhoneVisible: false, // 授权手机弹框
63 64
   }
64 65
 
65
-  componentWillMount () {
66
+  componentWillMount() {
66 67
     ready.queue(() => {
67 68
       // 分享场景需要先授权手机, 再授权头像
68 69
       const options = wx.getLaunchOptionsSync()
@@ -80,7 +81,7 @@ export default class Index extends Component {
80 81
         })
81 82
       }
82 83
 
83
-      
84
+
84 85
       const router = Taro.getStorageSync('router')
85 86
       const id = this.$router.params.id || router.query.id
86 87
 
@@ -100,12 +101,12 @@ export default class Index extends Component {
100 101
     })
101 102
   }
102 103
 
103
-  componentWillUnmount () {
104
+  componentWillUnmount() {
104 105
     const { recordId } = this.state
105 106
     recordId && updatePoint(recordId)
106 107
   }
107 108
 
108
-  initPageData (id) {
109
+  initPageData(id) {
109 110
     console.log('----项目ID---->', id)
110 111
 
111 112
     // const id='82b54f4a1f5b981df572253792afbfa1' 
@@ -135,7 +136,7 @@ export default class Index extends Component {
135 136
     })
136 137
   }
137 138
 
138
-  loadHelpGroupList () {
139
+  loadHelpGroupList() {
139 140
     const { buildingId } = this.state
140 141
 
141 142
     queryHelpGroup({ buildingId: buildingId }).then(res => {
@@ -157,7 +158,7 @@ export default class Index extends Component {
157 158
     )
158 159
   }
159 160
 
160
-  loadDetail () {
161
+  loadDetail() {
161 162
     const { buildingId } = this.state
162 163
     const { dispatchProjectDetail } = this.props
163 164
     this.setState({
@@ -185,7 +186,7 @@ export default class Index extends Component {
185 186
     })
186 187
   }
187 188
 
188
-  loadActivityData () {
189
+  loadActivityData() {
189 190
     const { buildingId } = this.state
190 191
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
191 192
     queryActivityList(payload).then(res => {
@@ -196,7 +197,7 @@ export default class Index extends Component {
196 197
     })
197 198
   }
198 199
 
199
-  loadNewsData () {
200
+  loadNewsData() {
200 201
     const { buildingId } = this.state
201 202
     const payload = { pageSize: 2, pageNumber: 1, buildingId }
202 203
     queryNewsList(payload).then(res => {
@@ -206,11 +207,11 @@ export default class Index extends Component {
206 207
     })
207 208
   }
208 209
 
209
-  navigateTo (url) {
210
+  navigateTo(url) {
210 211
     Taro.navigateTo({ url: url })
211 212
   }
212 213
   // 海报预览图
213
-  previewImage (arr) {
214
+  previewImage(arr) {
214 215
     // console.log('arr:' + arr)
215 216
     if (arr[0].length > 1) {
216 217
       Taro.previewImage({
@@ -237,7 +238,7 @@ export default class Index extends Component {
237 238
     })
238 239
   }
239 240
 
240
-  openMap () {
241
+  openMap() {
241 242
     const {
242 243
       buildingName,
243 244
       address,
@@ -264,13 +265,13 @@ export default class Index extends Component {
264 265
     })
265 266
   }
266 267
 
267
-  toViewAlbum (index) {
268
+  toViewAlbum(index) {
268 269
     const { buildingId } = this.state
269 270
     console.log('1111111', index)
270 271
     this.navigateTo(`/pages/project/album/index?id=${buildingId}&current=${index}`)
271 272
   }
272 273
 
273
-  onViewFans () {
274
+  onViewFans() {
274 275
     const { buildingId } = this.state
275 276
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
276 277
   }
@@ -299,7 +300,7 @@ export default class Index extends Component {
299 300
     }
300 301
   }
301 302
 
302
-  getPhoneNumber (e, item) {
303
+  getPhoneNumber(e, item) {
303 304
     getUserPhone(e, (phoneNumber) => {
304 305
       const { userInfo: { person: { personId, nickname, name } } } = this.props
305 306
       Taro.navigateTo({
@@ -308,7 +309,7 @@ export default class Index extends Component {
308 309
     })
309 310
   }
310 311
 
311
-  getPosterData () {
312
+  getPosterData() {
312 313
     return new Promise(resolve => {
313 314
       const { posterData } = this.state
314 315
       if (posterData.qrcode) {
@@ -380,14 +381,14 @@ export default class Index extends Component {
380 381
     })
381 382
   }
382 383
 
383
-  handleTelClick (item, e) {
384
+  handleTelClick(item, e) {
384 385
     e.stopPropagation()
385 386
     Taro.makePhoneCall({
386 387
       phoneNumber: item.phone
387 388
     })
388 389
   }
389 390
 
390
-  handleChatClick (item, e) {
391
+  handleChatClick(item, e) {
391 392
     e.stopPropagation()
392 393
     const { userInfo: { person: { personId, nickname, name } } } = this.props
393 394
     Taro.navigateTo({
@@ -395,24 +396,24 @@ export default class Index extends Component {
395 396
     })
396 397
   }
397 398
 
398
-  handleConsuItemClick (item) {
399
+  handleConsuItemClick(item) {
399 400
     Taro.navigateTo({
400 401
       url: `/pages/card/index?id=${item.id}`
401 402
     })
402 403
   }
403 404
 
404
-  handleMoreClick () {
405
+  handleMoreClick() {
405 406
     // App.zhuge.track('查看置业顾问列表')
406 407
     Taro.navigateTo({
407 408
       url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
408 409
     })
409 410
   }
410 411
 
411
-  handleStopPropagation (e) {
412
+  handleStopPropagation(e) {
412 413
     e.stopPropagation()
413 414
   }
414 415
 
415
-  toRecomonedPage () {
416
+  toRecomonedPage() {
416 417
     const {
417 418
       userInfo: { person: { personType } }
418 419
     } = this.props
@@ -423,55 +424,55 @@ export default class Index extends Component {
423 424
       })
424 425
     } else {
425 426
       Taro.navigateTo({
426
-        url: `/pages/agent/recommend/index?type=projectDeatil` 
427
+        url: `/pages/agent/recommend/index?type=projectDeatil`
427 428
       })
428 429
     }
429 430
   }
430 431
 
431
-  toHome () {
432
+  toHome() {
432 433
     Taro.switchTab({
433 434
       url: `/pages/project/index`
434 435
     })
435 436
   }
436 437
 
437
-  HandleCircumTabClick (id) {
438
+  HandleCircumTabClick(id) {
438 439
     this.setState({
439 440
       curTab: id
440 441
     })
441 442
   }
442 443
 
443
-  handleNewsMoreClick () {
444
+  handleNewsMoreClick() {
444 445
     Taro.navigateTo({
445 446
       url: `/pages/news/index?buildingId=` + this.state.buildingId
446 447
     })
447 448
   }
448 449
 
449
-  handNewsItemClick (id) {
450
+  handNewsItemClick(id) {
450 451
     Taro.navigateTo({
451 452
       url: '/pages/news/detail/index?id=' + id
452 453
     })
453 454
   }
454 455
 
455
-  handleActivityMoreClick () {
456
+  handleActivityMoreClick() {
456 457
     Taro.navigateTo({
457 458
       url: `/pages/activity/index?buildingId=` + this.state.buildingId
458 459
     })
459 460
   }
460 461
 
461
-  handActivityItemClick (item) {
462
+  handActivityItemClick(item) {
462 463
     Taro.navigateTo({
463 464
       url: '/pages/activity/detail/index?id=' + item.dynamicId
464 465
     })
465 466
   }
466 467
 
467
-  handlePreviewHxImage (current, urls) {
468
+  handlePreviewHxImage(current, urls) {
468 469
     Taro.previewImage({
469 470
       current,
470 471
       urls
471 472
     })
472 473
   }
473 474
 
474
-  handleFavor () {
475
+  handleFavor() {
475 476
     const { buildingId, isSaved } = this.state
476 477
     if (isSaved) {
477 478
       cancelFavorProject(buildingId).then(res => {
@@ -501,12 +502,12 @@ export default class Index extends Component {
501 502
       console.log('活动项目收藏')
502 503
     })
503 504
   }
504
-  handleToolsClick () {
505
+  handleToolsClick() {
505 506
     Taro.navigateTo({
506 507
       url: `/pages/toolKit/index`
507 508
     })
508 509
   }
509
-  moreFloor () {
510
+  moreFloor() {
510 511
     Taro.navigateTo({
511 512
       url: `/pages/project/floor/index`
512 513
     })
@@ -522,7 +523,7 @@ export default class Index extends Component {
522 523
     this.initPageData(this.state.buildingId)
523 524
   }
524 525
 
525
-  renderBottomMenu () {
526
+  renderBottomMenu() {
526 527
     const { userInfo: { person: { personType } } } = this.props
527 528
     const { posterShow } = this.state
528 529
     return (
@@ -557,14 +558,14 @@ export default class Index extends Component {
557 558
     )
558 559
   }
559 560
 
560
-  previewHouseImage (current, urls) {
561
+  previewHouseImage(current, urls) {
561 562
     Taro.previewImage({
562 563
       current,
563 564
       urls
564 565
     })
565 566
   }
566 567
 
567
-  renderBuildingProjectTypeList () {
568
+  renderBuildingProjectTypeList() {
568 569
     const { statusOpts } = this.state
569 570
     const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
570 571
     return (
@@ -624,7 +625,7 @@ export default class Index extends Component {
624 625
   }
625 626
 
626 627
 
627
-  renderPhotoAlbum () {
628
+  renderPhotoAlbum() {
628 629
     const { projectDetail: { buildingApartment } } = this.props
629 630
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
630 631
     // const imgList = list.reduce((prev, cur) => {
@@ -685,7 +686,7 @@ export default class Index extends Component {
685 686
       </Block>
686 687
     )
687 688
   }
688
-  rendercircum () {
689
+  rendercircum() {
689 690
     const building = {
690 691
       ...this.props.projectDetail
691 692
     }
@@ -702,7 +703,7 @@ export default class Index extends Component {
702 703
     )
703 704
   }
704 705
 
705
-  renderConsuler () {
706
+  renderConsuler() {
706 707
     const { userInfo: { person: { phone } } } = this.props
707 708
     const { projectDetail: { consultants = [] } } = this.props
708 709
     return (
@@ -745,7 +746,6 @@ export default class Index extends Component {
745 746
                           <Text className="name">{item.userName}</Text>
746 747
                           <Text className='txt'>{item.description || ' '}</Text>
747 748
                         </View>
748
-
749 749
                       </View>
750 750
                       <View className="flex item-btn__box">
751 751
 
@@ -775,7 +775,7 @@ export default class Index extends Component {
775 775
     )
776 776
   }
777 777
 
778
-  renderStatement () {
778
+  renderStatement() {
779 779
     return (
780 780
       <View className='statement'>
781 781
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
@@ -784,7 +784,7 @@ export default class Index extends Component {
784 784
   }
785 785
 
786 786
 
787
-  renderHelp () {
787
+  renderHelp() {
788 788
     const { helpList } = this.state
789 789
     return (
790 790
       <Block>
@@ -805,17 +805,17 @@ export default class Index extends Component {
805 805
     )
806 806
   }
807 807
 
808
-  handleHelpClick (item) {
808
+  handleHelpClick(item) {
809 809
     Taro.navigateTo({
810 810
       url: '/pages/activity/detail/assistance?id=' + item.activityId
811 811
     })
812 812
   }
813
-  handleGroupClick (item) {
813
+  handleGroupClick(item) {
814 814
     Taro.navigateTo({
815 815
       url: '/pages/activity/detail/assemble?id=' + item.activityId
816 816
     })
817 817
   }
818
-  renderGroup () {
818
+  renderGroup() {
819 819
     const { groupList } = this.state
820 820
     return (
821 821
       <Block>
@@ -838,7 +838,7 @@ export default class Index extends Component {
838 838
     )
839 839
   }
840 840
 
841
-  renderHouseTypeList () {
841
+  renderHouseTypeList() {
842 842
     const { statusOpts, statusBgColors } = this.state
843 843
     const { projectDetail: { buildingApartment } } = this.props
844 844
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
@@ -886,7 +886,7 @@ export default class Index extends Component {
886 886
 
887 887
     )
888 888
   }
889
-  renderActivities () {
889
+  renderActivities() {
890 890
 
891 891
 
892 892
     const { activityList } = this.state
@@ -923,7 +923,7 @@ export default class Index extends Component {
923 923
       </Block>
924 924
     )
925 925
   }
926
-  renderNews () {
926
+  renderNews() {
927 927
     const { newsList } = this.state
928 928
     return (
929 929
       <Block>
@@ -955,7 +955,7 @@ export default class Index extends Component {
955 955
     )
956 956
   }
957 957
   // 开始播放
958
-  plagVideo () {
958
+  plagVideo() {
959 959
     let videoContext = wx.createVideoContext('myVideo')
960 960
     console.log()
961 961
     // this.setState({
@@ -963,7 +963,7 @@ export default class Index extends Component {
963 963
     // })
964 964
     videoContext.play()
965 965
   }
966
-  bindended () {
966
+  bindended() {
967 967
     let videoContext = wx.createVideoContext('myVideo')
968 968
     console.log('111111')
969 969
     // videoContext.stop()//停止
@@ -978,15 +978,15 @@ export default class Index extends Component {
978 978
     console.log(e, '111111')
979 979
 
980 980
     let videoContext = wx.createVideoContext('myVideo')
981
-    if (e.detail.fullScreen ) {
981
+    if (e.detail.fullScreen) {
982 982
       console.log(videoContext, '22222')
983
-videoContext.poster = undefined
983
+      videoContext.poster = undefined
984 984
       console.log(videoContext, '22222')
985 985
     }
986 986
     else {
987 987
       console.log(videoContext, '33333')
988 988
       console.log(imgSrc, 'imgSrc')
989
-      videoContext.poster = imgSrc 
989
+      videoContext.poster = imgSrc
990 990
       console.log(videoContext, '33333')
991 991
     }
992 992
     // VideoContext.pause()
@@ -1004,7 +1004,7 @@ videoContext.poster = undefined
1004 1004
   // }
1005 1005
 
1006 1006
 
1007
-  renderVideo () {
1007
+  renderVideo() {
1008 1008
     const { videoPlayShow } = this.state
1009 1009
     const { projectDetail } = this.props
1010 1010
     const { videoImage } = projectDetail
@@ -1035,7 +1035,7 @@ videoContext.poster = undefined
1035 1035
           // muted={false}
1036 1036
 
1037 1037
           showMuteBtn='true'
1038
-        onPlay={this.onPlay}
1038
+          onPlay={this.onPlay}
1039 1039
         // show-center-play-btn='false'
1040 1040
         // onPause= {this.onPause}
1041 1041
 
@@ -1056,14 +1056,14 @@ videoContext.poster = undefined
1056 1056
     )
1057 1057
   }
1058 1058
 
1059
-  changeCurrent (current) {
1060
-    console.log(current,'current')
1059
+  changeCurrent(current) {
1060
+    console.log(current, 'current')
1061 1061
     this.setState({
1062 1062
       current: current + 1
1063 1063
     })
1064 1064
   }
1065 1065
 
1066
-  render () {
1066
+  render() {
1067 1067
     const { posterStatus, posterData, loaded, btnstate, grantPhoneVisible } = this.state
1068 1068
     const { projectDetail, userInfo } = this.props
1069 1069
     const { uvList = {} } = projectDetail
@@ -1081,22 +1081,22 @@ videoContext.poster = undefined
1081 1081
             <View className='detail'>
1082 1082
               <Notice></Notice>
1083 1083
               {/* {(projectDetail.videoUrl == null || btnstate === 0) && ( */}
1084
-                <View
1085
-                  className="pro__banner"
1086
-                  onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
1087
-                  <Banner
1088
-                    list={projectDetail.buildingImg}
1089
-                    indicatorDots={false}
1090
-                    // current
1091
-                    // isChange = {true}
1092
-                    onChange={this.changeCurrent.bind(this)}
1093
-                    style={{
1094
-                      height: '600rpx'
1095
-                    }}
1096
-
1097
-                  ></Banner>
1098
-                  <Text className="pro__banner-text">{this.current}/{(projectDetail.buildingImg && projectDetail.buildingImg.length) || 0}</Text>
1099
-                </View>
1084
+              <View
1085
+                className="pro__banner"
1086
+                onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
1087
+                <Banner
1088
+                  list={projectDetail.buildingImg}
1089
+                  indicatorDots={false}
1090
+                  // current
1091
+                  // isChange = {true}
1092
+                  onChange={this.changeCurrent.bind(this)}
1093
+                  style={{
1094
+                    height: '600rpx'
1095
+                  }}
1096
+
1097
+                ></Banner>
1098
+                <Text className="pro__banner-text">{this.current}/{(projectDetail.buildingImg && projectDetail.buildingImg.length) || 0}</Text>
1099
+              </View>
1100 1100
               {/* )} */}
1101 1101
 
1102 1102
               {/* {btnstate === 1 && projectDetail.videoUrl != null && this.renderVideo()} */}
@@ -1182,17 +1182,15 @@ videoContext.poster = undefined
1182 1182
                         <View className='top__txt'>{projectDetail.pvNum || 0}人围观</View>
1183 1183
                         <View className='bottom__img' onClick={this.onViewFans.bind(this)}>
1184 1184
                           <View className="records">
1185
-                            {records.slice(0, 9).map(item => <Image src={transferImage(item.photoOravatar)} className='user__img' key={item.personId} />)}
1186
-                            {records.length > 9 && <Text> ···</Text>}
1185
+                            {records.slice(0, 8).map(item => <Image src={transferImage(item.photoOravatar)} className='user__img' key={item.personId} />)}
1186
+                            {records.length > 8 && <Image className="dot-img" src={transferImage(dotImg)}></Image>}
1187 1187
                           </View>
1188
-
1189 1188
                           <Text className="iconfont icon-more"></Text>
1190 1189
                         </View>
1191 1190
                       </View>
1192 1191
                       <View className='more-btn' onClick={this.moreFloor}>更多楼盘信息</View>
1193 1192
                     </View>
1194 1193
                   </View>
1195
-
1196 1194
                   {/* 项目顾问 */}
1197 1195
                   {this.renderConsuler()}
1198 1196
 

+ 5
- 0
src/pages/project/detail/index.scss Ver fichero

@@ -638,6 +638,10 @@
638 638
             box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.14);
639 639
             border: 2px solid rgba(255, 255, 255, 1);
640 640
           }
641
+          .dot-img{
642
+            width: 40px;
643
+            height: 30px;
644
+          }
641 645
         }
642 646
 
643 647
         .iconfont {
@@ -681,6 +685,7 @@
681 685
       .name-txt {
682 686
         display: flex;
683 687
         flex-direction: column;
688
+        max-width: 400px;
684 689
 
685 690
         .name {
686 691
           font-size: 32px;

+ 15
- 9
src/pages/project/h5Page.js Ver fichero

@@ -155,9 +155,20 @@ export default class Index extends Component {
155 155
   onAvatarSuccess() {
156 156
     this.setState({
157 157
       avatarVisible: false,
158
-      phoneVisible: true,
159
-    })
160 158
 
159
+    })
160
+    const { userInfo: { person: { phone } } } = this.props
161
+    if (phone) {
162
+      this.setState({
163
+        phoneVisible: false,
164
+        webViewVisible: true,
165
+      })
166
+      this.success()
167
+    } else {
168
+      this.setState({
169
+        phoneVisible: true,
170
+      })
171
+    }
161 172
     console.log("授权头像成功!")
162 173
   }
163 174
   // 授权用户信息
@@ -175,12 +186,6 @@ export default class Index extends Component {
175 186
           this.onAvatarSuccess();
176 187
           console.log('获取用户信息成功')
177 188
           Taro.hideLoading()
178
-          const { userInfo: { person: { phone } } } = this.props
179
-          if (phone) {
180
-            this.setState({
181
-              phoneVisible: false,
182
-            })
183
-          }
184 189
         })
185 190
       },
186 191
       fail: (err) => {
@@ -226,7 +231,8 @@ export default class Index extends Component {
226 231
       const realPhone = phone || tel
227 232
       const payload = {
228 233
         realtyConsultant: consultant, //报备人 置业顾问
229
-        phone: realPhone
234
+        phone: realPhone,
235
+        showToast: false
230 236
       }
231 237
       reportClient(payload).then(res => {
232 238
         console.log('恭喜您绑定成功')

+ 4
- 3
src/pages/project/index.js Ver fichero

@@ -476,10 +476,11 @@ export default class Index extends Component {
476 476
     })
477 477
   }
478 478
   toNewsList() {
479
+    Taro.getApp().props.projectIndex = 1
479 480
     Taro.switchTab({
480
-      url: `/pages/activity/activity?projectIndex=1`,
481
-      success: res => {
482
-        Taro.getApp().props.projectIndex = 1
481
+      url: `/pages/activity/activity`,
482
+      fail: res => {
483
+        Taro.getApp().props.projectIndex = 0
483 484
       }
484 485
     })
485 486
   }

+ 8
- 6
src/utils/request.js Ver fichero

@@ -70,17 +70,19 @@ export const fetch = async (options) => {
70 70
           })
71 71
         }
72 72
       }
73
+      if (showToast) {
73 74
 
74
-      Taro.showToast({
75
-        title: message,
76
-        icon: 'none'
77
-      })
75
+        Taro.showToast({
76
+          title: message,
77
+          icon: 'none'
78
+        })
79
+      }
78 80
 
79 81
       throw res.data
80 82
     }
81 83
   }).catch((err) => {
82
-    console.error(err,url)
83
-    
84
+    console.error(err, url)
85
+
84 86
     let errMessage = `请求失败: ${err.errMsg}`
85 87
     if (err.errMsg) {
86 88
       errMessage = '请检查网络'