周立森 5 gadus atpakaļ
vecāks
revīzija
82717de94e

+ 15
- 1
src/pages/agent/recommend/index.js Parādīt failu

@@ -5,6 +5,8 @@ import { getItemList } from '@services/item'
5 5
 import { getCardList } from '@services/card'
6 6
 import { savePoint, updatePoint } from '@services/common'
7 7
 
8
+import Authorize from '@components/authorize'
9
+
8 10
 import { connect } from '@tarojs/redux'
9 11
 @connect(({ user, card, project }) => ({ ...user, ...card, ...project }))
10 12
 export default class Index extends Component {
@@ -414,7 +416,11 @@ export default class Index extends Component {
414 416
       sex: e.detail.value
415 417
     })
416 418
   }
417
-  render() {
419
+  renderLogin () {
420
+    return <Authorize></Authorize>
421
+  }
422
+
423
+  renderDetail() {
418 424
     const { reType } = this.state
419 425
     return (
420 426
       <View className='recommend__customers'>
@@ -473,4 +479,12 @@ export default class Index extends Component {
473 479
       </View>
474 480
     );
475 481
   }
482
+  render() {
483
+    const { person: { phone, tel } } = this.props.userInfo
484
+    return (
485
+      <View style="width:100%;height:100%">
486
+      {!phone && !tel ? this.renderLogin() : this.renderDetail()}
487
+    </View>
488
+    );
489
+  }
476 490
 }

+ 16
- 17
src/pages/project/index.js Parādīt failu

@@ -28,7 +28,6 @@ const accountInfo = wx.getAccountInfoSync();
28 28
   state => ({ ...state.project, ...state.city, ...state.user }),
29 29
   { ...actions, dispatchCitySelected }
30 30
 )
31
-
32 31
 export default class Index extends Component {
33 32
   config = {
34 33
     navigationBarTitleText: '橙蕉'
@@ -103,7 +102,7 @@ export default class Index extends Component {
103 102
       const payload = { location: `${location.longitude},${location.latitude}` }
104 103
 
105 104
       getLocationCity(payload).then(res => {
106
-        console.log(res,"!!!!!!!!!!!!!!!!!11res=========")
105
+        console.log(res, "!!!!!!!!!!!!!!!!!11res=========")
107 106
         let curCity = cityList.filter(item => {
108 107
           return item.name == res.name || ''
109 108
         })
@@ -134,7 +133,7 @@ export default class Index extends Component {
134 133
       this.updateCity(defaultCity)
135 134
     })
136 135
   }
137
-  updateCity(payload) {
136
+  updateCity (payload) {
138 137
     const NanJing = {
139 138
       citycode: "025",
140 139
       id: 320100,
@@ -443,14 +442,14 @@ export default class Index extends Component {
443 442
 
444 443
     if (personType === ROLE_CODE['DRIFT'] || !personType) {
445 444
       // 游客或者客户 区别是否有电话
446
-      this.setState({
447
-        achieve: true
448
-      })
449
-      // Taro.navigateTo({
450
-      //   url: `/pages/agent/become/index`
445
+      // this.setState({
446
+      //   achieve: true
451 447
       // })
448
+      Taro.navigateTo({
449
+        url: `/pages/agent/recommend/index?type=index&cityId=` + this.props.curCity.id
450
+      })
452 451
     } else {
453
-      
452
+
454 453
       Taro.navigateTo({
455 454
         url: `/pages/agent/recommend/index?type=index&cityId=` + this.props.curCity.id
456 455
       })
@@ -464,12 +463,12 @@ export default class Index extends Component {
464 463
   }
465 464
 
466 465
   handleAuthPhoneSuccess (curCity) {
467
-   
468
-    console.log(curCity,'curCity')
469
-    
470
-   Taro.navigateTo({
471
-        url: `/pages/agent/recommend/index?type=index&cityId=` + curCity.id
472
-      })
466
+
467
+    console.log(curCity, 'curCity')
468
+
469
+    Taro.navigateTo({
470
+      url: `/pages/agent/recommend/index?type=index&cityId=` + curCity.id
471
+    })
473 472
   }
474 473
 
475 474
 
@@ -619,8 +618,8 @@ export default class Index extends Component {
619 618
               {this.renderProjectList()}
620 619
 
621 620
             </ScrollView>}
622
-          {/* user={person} onSuccess={()=>this.handleAuthPhoneSuccess(curCity) */}
623
-            {achieve && <Authorize ></Authorize>}
621
+            {/* user={person} onSuccess={()=>this.handleAuthPhoneSuccess(curCity) */}
622
+            {/* {achieve && <View style="width:100%;height:100%"><Authorize ></Authorize>  </View>} */}
624 623
             {this.state.maskVisible && this.renderMaskBanner()}
625 624
           </View >
626 625
         )}

+ 2
- 5
src/pages/project/index.scss Parādīt failu

@@ -3,13 +3,10 @@
3 3
 
4 4
 .page {
5 5
   width: 100vw;
6
-  // height: 100vh;
6
+  height: 100vh;
7 7
   background: #fff;
8 8
 }
9
-.wrap{
10
-  width: 100%;
11
-  height: 100%;
12
-}
9
+
13 10
 .flex {
14 11
   display: flex;
15 12
   justify-content: space-between;