2 Revize

Autor SHA1 Zpráva Datum
  许静 8ff5954dad Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into v3.5.1 před 5 roky
  许静 154ade0cd1 bug修复 před 5 roky

+ 4
- 4
config/dev.js Zobrazit soubor

@@ -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.218:8080"',
13
-    // WSS_HOST: '"ws://192.168.0.218: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
- 1
src/components/authorize/index.js Zobrazit soubor

@@ -63,7 +63,7 @@ export default class Index extends Component {
63 63
         <Image className="avatar_img" src={user.avatar} />
64 64
         <View className="user_name">{user.nickname}</View>
65 65
         <Button className='auth-btn' open-type="getPhoneNumber" onGetphonenumber={this.getPhoneNumber}>微信授权一键登录</Button>
66
-        <View className='adver-btn' onClick={this.handleLogin}><Text>我是置业顾问,立即登录~</Text></View>
66
+        {/* <View className='adver-btn' onClick={this.handleLogin}><Text>我是置业顾问,立即登录~</Text></View> */}
67 67
       </View>
68 68
     )
69 69
   }

+ 4
- 4
src/pages/agent/recommend/index.js Zobrazit soubor

@@ -66,12 +66,12 @@ export default class Index extends Component {
66 66
     const { type } = this.$router.params
67 67
 
68 68
     this.setState({
69
-      reType: type,
69
+      reType: type || "",
70 70
 
71 71
     }, () => {
72 72
       console.log(this.state.sex, "sex")
73 73
       console.log('buildingName' + this.props.proList.records[0].buildingName)
74
-      if (this.state.reType != 'index') {
74
+      if (this.state.reType == 'projectDeatil') {
75 75
         this.setState({
76 76
           intention: this.props.projectDetail.buildingName ? this.props.projectDetail.buildingName : this.props.proList.records[0].buildingName,
77 77
           floor: this.props.projectDetail.buildingId ? this.props.projectDetail.buildingId : this.props.proList.records[0].buildingId
@@ -422,7 +422,7 @@ export default class Index extends Component {
422 422
 
423 423
   renderDetail() {
424 424
     const { reType, name, phone, floorArray, floorID, floorColor, intention, adviserArray, adviserID, adviserColor, remarks, radioList } = this.state
425
- 
425
+
426 426
     return (
427 427
       <View className='recommend__customers'>
428 428
         <View className='submit__infor ani'>
@@ -451,7 +451,7 @@ export default class Index extends Component {
451 451
           <View className='info info__4'>
452 452
             <Text className='customers__txt'>意向楼盘</Text>
453 453
             {
454
-              reType == 'index' ? (<Picker className='input customers__name' onChange={this.bindFloorChange} value={floorID} range={floorArray} range-key="buildingName">
454
+              reType != 'projectDeatil' ? (<Picker className='input customers__name' onChange={this.bindFloorChange} value={floorID} range={floorArray} range-key="buildingName">
455 455
                 <View class="picker overtext" style={floorColor}>
456 456
                   {floorArray[floorID].buildingName}
457 457
                 </View>

+ 35
- 11
src/pages/card/index.js Zobrazit soubor

@@ -7,6 +7,7 @@ import BackHomeBtn from '@components/BackHomeBtn'
7 7
 import getUserPhone from '@utils/getUserPhone'
8 8
 import ready from '@utils/ready'
9 9
 import AchievePhone from '@components/achievePhone'
10
+import AchieveAvatar from '@components/achieveAvatar'
10 11
 import { sceneInShare } from '@utils/tools'
11 12
 import { ROLE_CODE } from '@constants/user'
12 13
 import { addCardUv, addCardShareNum, favorCard, cancelFavorCard } from '@services/card'
@@ -38,6 +39,7 @@ export default class Index extends Component {
38 39
     bound: false,
39 40
     modalStatus: false,
40 41
     grantPhoneVisible: false, // 授权手机弹框
42
+    grantAvatarVisible: false, // 授权头像弹框
41 43
   }
42 44
 
43 45
   componentWillMount() {
@@ -62,6 +64,7 @@ export default class Index extends Component {
62 64
       this.initPageData()
63 65
     })
64 66
   }
67
+  
65 68
   initPageData() {
66 69
     const router = Taro.getStorageSync('router')
67 70
     const id = this.$router.params.id || router.query.id
@@ -143,12 +146,16 @@ export default class Index extends Component {
143 146
   }
144 147
 
145 148
   getLocation = () => {
146
-    const { cardInfo: { address, company } } = this.props
149
+    const { cardInfo: { address, company,coordinate } } = this.props
150
+    const coord = coordinate.split(',')
151
+    const latitude = parseFloat(coord[0])
152
+    const longitude = parseFloat(coord[1])
153
+    
147 154
     Taro.getLocation({ //返回可以用于Taro.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息  
148 155
       success: function (res) {
149 156
         Taro.openLocation({
150
-          latitude: 31.979190,
151
-          longitude: 118.733660,
157
+          latitude,
158
+          longitude,
152 159
           name: company,
153 160
           address
154 161
         })
@@ -441,17 +448,30 @@ export default class Index extends Component {
441 448
     })
442 449
   }
443 450
   handleAuthPhoneSuccess = (phone) => {
444
-    const { person = {} } = this.props.userInfo || {}
445
-    if ((person.avatarurl || '').indexOf('wx.qlogo.cn') === -1) {
446
-      Taro.reLaunch({ url: '/pages/auth/index' })
447
-      return
448
-    }
449
-
450
-    this.setState({ grantPhoneVisible: false })
451
+    // const { person = {} } = this.props.userInfo || {}
452
+    // if ((person.avatarurl || '').indexOf('wx.qlogo.cn') === -1) {
453
+    //   Taro.reLaunch({ url: '/pages/auth/index' })
454
+    //   return
455
+    // }
456
+
457
+    // this.setState({ grantPhoneVisible: false })
458
+    this.toggleGrantAvatar()
451 459
     this.initPageData()
452 460
     // this.handleModalConfirm(phone)
453 461
   }
462
+ // 调起授权头像
463
+ toggleGrantAvatar = () => {
464
+  const { userInfo: { person: { avatarurl } } } = this.props
465
+
466
+  if (!avatarurl || avatarurl.indexOf('wx.qlogo.cn') === -1) {
467
+    this.setState({ grantAvatarVisible: true })
468
+    return false
469
+  }
454 470
 
471
+  console.log(avatarurl,"avatarurl")
472
+  console.log(this.props.userInfo,"this.props")
473
+  return true
474
+}
455 475
   handeAuthPhoneFail = () => {
456 476
     Taro.showToast({
457 477
       title: '未授权手机号无法成为报备客户',
@@ -459,7 +479,7 @@ export default class Index extends Component {
459 479
     })
460 480
   }
461 481
   render() {
462
-    const { makePosterStatus, posterData, modalStatus, grantPhoneVisible } = this.state
482
+    const { makePosterStatus, posterData, modalStatus, grantPhoneVisible,grantAvatarVisible } = this.state
463 483
     const { userInfo, cardInfo, projectDetail } = this.props
464 484
     const { person: { personType, personId, phone, tel } } = userInfo
465 485
     const { unReadNum, picture, visitors, id, isReport } = cardInfo
@@ -483,6 +503,10 @@ export default class Index extends Component {
483 503
           showAuthPhone &&
484 504
           <AchievePhone user={userInfo.person} onCancel={this.handeAuthPhoneFail} onSuccess={this.handleAuthPhoneSuccess}></AchievePhone>
485 505
         }
506
+        {
507
+          grantAvatarVisible &&
508
+          <AchieveAvatar user={userInfo.person} onSuccess={() => { this.setState({ grantAvatarVisible: false }) }} ></AchieveAvatar>
509
+        }
486 510
         {
487 511
           // !showAuthPhone && visibleConfirmModal && (
488 512
           //   <View className="modal">

+ 7
- 7
src/pages/card/poster.js Zobrazit soubor

@@ -94,7 +94,7 @@ export default class Index extends Component {
94 94
         zIndex: 999
95 95
       },
96 96
       {
97
-        x: 100,
97
+        x: 80,
98 98
         y: 710,
99 99
         text: '长按识别小程序码',
100 100
         fontSize: 26,
@@ -105,7 +105,7 @@ export default class Index extends Component {
105 105
         zIndex: 100
106 106
       },
107 107
       {
108
-        x: 100,
108
+        x: 80,
109 109
         y: 755,
110 110
         text: '进入',
111 111
         fontSize: 26,
@@ -116,18 +116,18 @@ export default class Index extends Component {
116 116
         zIndex: 100
117 117
       },
118 118
       {
119
-        x: 170,
119
+        x: 140,
120 120
         y: 755,
121 121
         text: data.miniAppName,
122 122
         fontSize: 34,
123 123
         color: 'red',
124 124
         baseLine: 'middle',
125 125
         lineHeight: 48,
126
-        width: (data.miniAppName || '').length * 30 + 60,
126
+        width: (data.miniAppName || '').length * 30 + 50,
127 127
         zIndex: 100
128 128
       },
129 129
       {
130
-        x: (data.miniAppName || '').length * 30 + 200,
130
+        x: (data.miniAppName || '').length * 30 + 156,
131 131
         y: 755,
132 132
         text: '查看',
133 133
         fontSize: 26,
@@ -160,9 +160,9 @@ export default class Index extends Component {
160 160
         borderRadius: 40,
161 161
       },
162 162
       {
163
-        width: 520,
163
+        width: 540,
164 164
         height: 160,
165
-        x: 60,
165
+        x: 50,
166 166
         y: 650,
167 167
         backgroundColor: '#F8F8F8',
168 168
         borderRadius: 10,

+ 1
- 1
src/pages/news/item.scss Zobrazit soubor

@@ -14,7 +14,7 @@
14 14
   }
15 15
 
16 16
   &-con {
17
-    width:450px;
17
+    width:430px;
18 18
     display: flex;
19 19
     flex-direction: column;
20 20
     justify-content: space-between;

+ 1
- 1
src/pages/person/authorize/index.js Zobrazit soubor

@@ -48,7 +48,7 @@ export default class Index extends Component {
48 48
         <Image className="avatar_img" src={person.avatarurl}/>
49 49
         <View className="user_name">{person.nickname}</View>
50 50
         <Button  className='auth-btn' open-type="getPhoneNumber" onGetphonenumber={this.getPhoneNumber}>微信授权一键登录</Button>
51
-        <View className='adver-btn' onClick={this.handleLogin}><Text>我是置业顾问,立即登录~</Text></View>
51
+        {/* <View className='adver-btn' onClick={this.handleLogin}><Text>我是置业顾问,立即登录~</Text></View> */}
52 52
       </View>
53 53
     )
54 54
   }

+ 10
- 9
src/pages/person/customerAnalysis/index.js Zobrazit soubor

@@ -59,18 +59,11 @@ export default class customer extends Taro.Component {
59 59
   }
60 60
 
61 61
   render() {
62
-    const tabList = [{ title: '客户分析' }, { title: '我的客户' }]
62
+    const tabList = [{ title: '我的客户' },{ title: '客户分析' }]
63 63
     const { customerNum, current } = this.state
64 64
     return (
65 65
       <AtTabs  className="tab-box overflow-tab" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable={false}>
66
-        <AtTabsPane current={current} index={0} >
67
-          <View >
68
-            {
69
-              current != 1 && <Analysis></Analysis>
70
-            }
71
-          </View>
72
-        </AtTabsPane>
73
-        <AtTabsPane current={current} index={1}>
66
+         <AtTabsPane current={current} index={0}>
74 67
           <View style="padding:10px 20px; display: flex;flex-wrap: wrap;align-content: flex-start;justify-content: space-between;">
75 68
             <View className="my-customer" onClick={this.toFollowUpCustomer} style="border-right:1px solid rgba(0,0,0,0.12)">
76 69
               <Image mode="widthFix" src={require('@assets/person/genjin.png')} className='img'></Image>
@@ -84,6 +77,14 @@ export default class customer extends Taro.Component {
84 77
             </View>
85 78
           </View>
86 79
         </AtTabsPane>
80
+        <AtTabsPane current={current} index={1} >
81
+          <View >
82
+            {
83
+              current != 0 && <Analysis></Analysis>
84
+            }
85
+          </View>
86
+        </AtTabsPane>
87
+       
87 88
       </AtTabs>
88 89
     )
89 90
   }

+ 1
- 1
src/pages/project/detail/index.js Zobrazit soubor

@@ -406,7 +406,7 @@ export default class Index extends Component {
406 406
       })
407 407
     } else {
408 408
       Taro.navigateTo({
409
-        url: `/pages/agent/recommend/index`
409
+        url: `/pages/agent/recommend/index?type=projectDeatil` 
410 410
       })
411 411
     }
412 412
   }