瀏覽代碼

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

张延森 5 年之前
父節點
當前提交
b6bb9a2f2f

+ 4
- 4
config/dev.js 查看文件

@@ -5,12 +5,12 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    // HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
8
+    HOST:  '"https://dev.jinchengjiaye.com"',//测试
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.0.84:8080"',
13
-    WSS_HOST: '"ws://192.168.0.84:8080"',
12
+    // HOST: '"http://192.168.0.84:8080"',
13
+    // WSS_HOST: '"ws://192.168.0.84:8080"',
14 14
   },
15 15
   weapp: {},
16 16
   h5: {}

+ 1
- 0
src/components/achievePhone/index.js 查看文件

@@ -12,6 +12,7 @@ export default class Index extends Component {
12 12
 
13 13
   componentDidMount() {
14 14
     const { user = {}} = this.props
15
+    console.log('111')
15 16
     if (user.phone && typeof this.props.onSuccess === 'function') {
16 17
       this.props.onSuccess();
17 18
     }

+ 14
- 7
src/components/authorize/index.js 查看文件

@@ -11,7 +11,7 @@ export default class Index extends Component {
11 11
     navigationBarTitleText: '我的'
12 12
   }
13 13
   state = {
14
-    user:{}
14
+    user: {}
15 15
   }
16 16
   componentWillMount() {
17 17
     this.loadUserInfo()
@@ -25,11 +25,18 @@ export default class Index extends Component {
25 25
           icon: 'none'
26 26
         })
27 27
         return
28
-      }else{
28
+      } else {
29 29
         this.props.dispatchUpdateUserInfoNew(this.state.user.id)
30
-        Taro.reLaunch({
30
+        if (this.props.from) {
31
+          Taro.reLaunch({
32
+            url: this.props.from
33
+          })
34
+        } else {
35
+          Taro.reLaunch({
31 36
             url: '/pages/person/index'
32
-         })
37
+          })
38
+        }
39
+
33 40
       }
34 41
     })
35 42
   }
@@ -49,12 +56,12 @@ export default class Index extends Component {
49 56
   }
50 57
 
51 58
   render() {
52
-    const {user}=this.state
59
+    const { user } = this.state
53 60
     return (
54 61
       <View className='auth-page'>
55
-        <Image className="avatar_img" src={user.avatar}/>
62
+        <Image className="avatar_img" src={user.avatar} />
56 63
         <View className="user_name">{user.nickname}</View>
57
-        <Button  className='auth-btn' open-type="getPhoneNumber" onGetphonenumber={this.getPhoneNumber}>微信授权一键登录</Button>
64
+        <Button className='auth-btn' open-type="getPhoneNumber" onGetphonenumber={this.getPhoneNumber}>微信授权一键登录</Button>
58 65
         <View className='adver-btn' onClick={this.handleLogin}><Text>我是置业顾问,立即登录~</Text></View>
59 66
       </View>
60 67
     )

+ 1
- 1
src/pages/activity/activity.js 查看文件

@@ -52,7 +52,7 @@ export default class active extends Component {
52 52
   }
53 53
 
54 54
   renderLogin() {
55
-    return <Authorize></Authorize>
55
+    return <Authorize from="/pages/activity/activity"></Authorize>
56 56
   }
57 57
 
58 58
   render() {

+ 16
- 1
src/pages/agent/recommend/index.js 查看文件

@@ -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 from="/pages/agent/recommend/index"></Authorize>
421
+  }
422
+
423
+  renderDetail() {
418 424
     const { reType } = this.state
419 425
     return (
420 426
       <View className='recommend__customers'>
@@ -473,4 +479,13 @@ 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
+    {console.log(this.props.userInfo,'this.props.userInfo')}
487
+      {(!phone && !tel) ? this.renderLogin() : this.renderDetail()}
488
+    </View>
489
+    );
490
+  }
476 491
 }

+ 1
- 1
src/pages/person/index.js 查看文件

@@ -160,7 +160,7 @@ export default class Person extends Component {
160 160
   }
161 161
 
162 162
   renderLogin () {
163
-    return <Authorize></Authorize>
163
+    return <Authorize from="/pages/person/index"></Authorize>
164 164
   }
165 165
 
166 166
   renderDetail () {

+ 6
- 1
src/pages/project/detail/index.js 查看文件

@@ -946,7 +946,11 @@ export default class Index extends Component {
946 946
     // })
947 947
     videoContext.play()
948 948
   }
949
-
949
+  bindended(){
950
+    let videoContext = wx.createVideoContext('myVideo')
951
+    console.log()
952
+    videoContext.seek(1)
953
+  }
950 954
   // onPlay () {
951 955
   //   console.log()
952 956
   //   this.setState({
@@ -983,6 +987,7 @@ export default class Index extends Component {
983 987
           }}
984 988
           id='myVideo'
985 989
           controls={true}
990
+          bindended={this.bindended}
986 991
           // autoplay={false}
987 992
           // initialTime='0'
988 993
           // loop={true}

+ 2
- 0
src/pages/project/detail/index.scss 查看文件

@@ -399,6 +399,8 @@
399 399
       .bold {
400 400
         font-size: 40px;
401 401
         font-weight: bold;
402
+        max-width: 560px;
403
+        white-space: normal;
402 404
       }
403 405
 
404 406
       .favor-btn {

+ 32
- 45
src/pages/project/index.js 查看文件

@@ -20,6 +20,7 @@ import * as actions from '@actions/project'
20 20
 import { getThumbnail } from '@utils/tools'
21 21
 import QQMapWX from '@lib/qqmap-wx-jssdk.min'
22 22
 import Notice from '@components/Notice'
23
+import Authorize from '@components/authorize'
23 24
 
24 25
 const accountInfo = wx.getAccountInfoSync();
25 26
 
@@ -27,7 +28,6 @@ const accountInfo = wx.getAccountInfoSync();
27 28
   state => ({ ...state.project, ...state.city, ...state.user }),
28 29
   { ...actions, dispatchCitySelected }
29 30
 )
30
-
31 31
 export default class Index extends Component {
32 32
   config = {
33 33
     navigationBarTitleText: '橙蕉'
@@ -46,7 +46,8 @@ export default class Index extends Component {
46 46
     recordId: null,
47 47
     visBanner: false,
48 48
     indicatorDots: false,
49
-    vertical: true
49
+    vertical: true,
50
+    achieve: false
50 51
   }
51 52
 
52 53
   componentWillMount () {
@@ -101,9 +102,9 @@ export default class Index extends Component {
101 102
       const payload = { location: `${location.longitude},${location.latitude}` }
102 103
 
103 104
       getLocationCity(payload).then(res => {
104
-        console.log(res,"!!!!!!!!!!!!!!!!!11res=========")
105
+      
105 106
         let curCity = cityList.filter(item => {
106
-          return item.name == res.name
107
+          return item.name == res.name || ''
107 108
         })
108 109
 
109 110
         console.log('-----curCity-->', curCity)
@@ -132,37 +133,8 @@ export default class Index extends Component {
132 133
       this.updateCity(defaultCity)
133 134
     })
134 135
   }
135
-  updateCity(payload) {
136
-    const NanJing = {
137
-      citycode: "025",
138
-      id: 320100,
139
-      initial: "N",
140
-      lat: "32.041544",
141
-      leveltype: 2,
142
-      lng: "118.767413",
143
-      name: "南京市",
144
-      parentid: 320000,
145
-      pinyin: "Nanjing",
146
-      shortname: "南京",
147
-      status: 1,
148
-      zipcode: "320100"
149
-    }
150
-
151
-    const appId = accountInfo.miniProgram.appId;
152
-    let params;
153
-
154
-    switch (appId) {
155
-      // 知与行联调
156
-      case 'wxd9ee3a9480a4e544':
157
-        params = NanJing;
158
-        break;
159
-
160
-      default:
161
-        params = payload;
162
-        break;
163
-    }
164
-
165
-    this.props.dispatchCitySelected(params).then(res => {
136
+  updateCity (payload) {
137
+    this.props.dispatchCitySelected(payload).then(res => {
166 138
       this.loadData()
167 139
     })
168 140
   }
@@ -284,9 +256,9 @@ export default class Index extends Component {
284 256
           title: '当前城市暂无楼盘',
285 257
           icon: 'none'
286 258
         })
287
-     
259
+
288 260
       }
289
-    
261
+
290 262
       Taro.hideLoading()
291 263
       this.setState({
292 264
         loaded: true
@@ -438,12 +410,17 @@ export default class Index extends Component {
438 410
     const {
439 411
       userInfo: { person: { personType } }
440 412
     } = this.props
413
+
441 414
     if (personType === ROLE_CODE['DRIFT'] || !personType) {
442 415
       // 游客或者客户 区别是否有电话
416
+      // this.setState({
417
+      //   achieve: true
418
+      // })
443 419
       Taro.navigateTo({
444
-        url: `/pages/agent/become/index`
420
+        url: `/pages/agent/recommend/index?type=index&cityId=` + this.props.curCity.id
445 421
       })
446 422
     } else {
423
+
447 424
       Taro.navigateTo({
448 425
         url: `/pages/agent/recommend/index?type=index&cityId=` + this.props.curCity.id
449 426
       })
@@ -456,9 +433,18 @@ export default class Index extends Component {
456 433
     })
457 434
   }
458 435
 
436
+  handleAuthPhoneSuccess (curCity) {
437
+
438
+    console.log(curCity, 'curCity')
439
+
440
+    Taro.navigateTo({
441
+      url: `/pages/agent/recommend/index?type=index&cityId=` + curCity.id
442
+    })
443
+  }
444
+
459 445
 
460 446
   renderProjectList () {
461
-    const { proList: { records } } = this.props
447
+    const { proList: { records = [] } } = this.props
462 448
     const { helpGroupList } = this.state
463 449
     const list = records.filter(item => item.isMain === 1)
464 450
     console.log(records, 'proList')
@@ -537,15 +523,15 @@ export default class Index extends Component {
537 523
 
538 524
   render () {
539 525
     const { curCity } = this.props
540
-    const { newsList } = this.state
541
-    const { userInfo: { person: { personType } } } = this.props
542
-
526
+    const { newsList, achieve } = this.state
527
+    const { userInfo: { person: { personType, phone } } } = this.props
528
+    const { userInfo: { person } } = this.props
543 529
     return (
544 530
       <Block>
545 531
         {this.state.loaded && (
546 532
           <View className="page">
547 533
             <Notice></Notice>
548
-            <ScrollView
534
+            {!achieve && <ScrollView
549 535
               scrollY
550 536
               className='home'>
551 537
               <View className="section section-top" style={{ marginTop: 0, paddingTop: 0 }}>
@@ -602,8 +588,9 @@ export default class Index extends Component {
602 588
               {/* 推荐楼盘 */}
603 589
               {this.renderProjectList()}
604 590
 
605
-            </ScrollView>
606
-
591
+            </ScrollView>}
592
+            {/* user={person} onSuccess={()=>this.handleAuthPhoneSuccess(curCity) */}
593
+            {/* {achieve && <View style="width:100%;height:100%"><Authorize ></Authorize>  </View>} */}
607 594
             {this.state.maskVisible && this.renderMaskBanner()}
608 595
           </View >
609 596
         )}

+ 1
- 1
src/pages/project/index.scss 查看文件

@@ -3,7 +3,7 @@
3 3
 
4 4
 .page {
5 5
   width: 100vw;
6
-  // height: 100vh;
6
+  height: 100vh;
7 7
   background: #fff;
8 8
 }
9 9
 

+ 2
- 0
src/pages/project/item/index.scss 查看文件

@@ -51,6 +51,8 @@
51 51
       &__title {
52 52
         font-size: 32px;
53 53
         font-weight: bold;
54
+        max-width: 500px;
55
+        @include text-ellipsis;
54 56
       }
55 57
 
56 58
       &__price {

+ 1
- 1
src/pages/shop/index.js 查看文件

@@ -197,7 +197,7 @@ export default class Shop extends Component {
197 197
   }
198 198
 
199 199
   renderLogin () {
200
-    return <Authorize></Authorize>
200
+    return <Authorize from="/pages/shop/index"></Authorize>
201 201
   }
202 202
   handleBannerClick = (item) => {
203 203
     console.log(this, "this")