2 次代码提交

作者 SHA1 备注 提交日期
  许静 8ff5954dad Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into v3.5.1 5 年前
  许静 154ade0cd1 bug修复 5 年前

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

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
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
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
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
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

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

63
         <Image className="avatar_img" src={user.avatar} />
63
         <Image className="avatar_img" src={user.avatar} />
64
         <View className="user_name">{user.nickname}</View>
64
         <View className="user_name">{user.nickname}</View>
65
         <Button className='auth-btn' open-type="getPhoneNumber" onGetphonenumber={this.getPhoneNumber}>微信授权一键登录</Button>
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
       </View>
67
       </View>
68
     )
68
     )
69
   }
69
   }

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

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

+ 35
- 11
src/pages/card/index.js 查看文件

7
 import getUserPhone from '@utils/getUserPhone'
7
 import getUserPhone from '@utils/getUserPhone'
8
 import ready from '@utils/ready'
8
 import ready from '@utils/ready'
9
 import AchievePhone from '@components/achievePhone'
9
 import AchievePhone from '@components/achievePhone'
10
+import AchieveAvatar from '@components/achieveAvatar'
10
 import { sceneInShare } from '@utils/tools'
11
 import { sceneInShare } from '@utils/tools'
11
 import { ROLE_CODE } from '@constants/user'
12
 import { ROLE_CODE } from '@constants/user'
12
 import { addCardUv, addCardShareNum, favorCard, cancelFavorCard } from '@services/card'
13
 import { addCardUv, addCardShareNum, favorCard, cancelFavorCard } from '@services/card'
38
     bound: false,
39
     bound: false,
39
     modalStatus: false,
40
     modalStatus: false,
40
     grantPhoneVisible: false, // 授权手机弹框
41
     grantPhoneVisible: false, // 授权手机弹框
42
+    grantAvatarVisible: false, // 授权头像弹框
41
   }
43
   }
42
 
44
 
43
   componentWillMount() {
45
   componentWillMount() {
62
       this.initPageData()
64
       this.initPageData()
63
     })
65
     })
64
   }
66
   }
67
+  
65
   initPageData() {
68
   initPageData() {
66
     const router = Taro.getStorageSync('router')
69
     const router = Taro.getStorageSync('router')
67
     const id = this.$router.params.id || router.query.id
70
     const id = this.$router.params.id || router.query.id
143
   }
146
   }
144
 
147
 
145
   getLocation = () => {
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
     Taro.getLocation({ //返回可以用于Taro.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息  
154
     Taro.getLocation({ //返回可以用于Taro.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息  
148
       success: function (res) {
155
       success: function (res) {
149
         Taro.openLocation({
156
         Taro.openLocation({
150
-          latitude: 31.979190,
151
-          longitude: 118.733660,
157
+          latitude,
158
+          longitude,
152
           name: company,
159
           name: company,
153
           address
160
           address
154
         })
161
         })
441
     })
448
     })
442
   }
449
   }
443
   handleAuthPhoneSuccess = (phone) => {
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
     this.initPageData()
459
     this.initPageData()
452
     // this.handleModalConfirm(phone)
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
   handeAuthPhoneFail = () => {
475
   handeAuthPhoneFail = () => {
456
     Taro.showToast({
476
     Taro.showToast({
457
       title: '未授权手机号无法成为报备客户',
477
       title: '未授权手机号无法成为报备客户',
459
     })
479
     })
460
   }
480
   }
461
   render() {
481
   render() {
462
-    const { makePosterStatus, posterData, modalStatus, grantPhoneVisible } = this.state
482
+    const { makePosterStatus, posterData, modalStatus, grantPhoneVisible,grantAvatarVisible } = this.state
463
     const { userInfo, cardInfo, projectDetail } = this.props
483
     const { userInfo, cardInfo, projectDetail } = this.props
464
     const { person: { personType, personId, phone, tel } } = userInfo
484
     const { person: { personType, personId, phone, tel } } = userInfo
465
     const { unReadNum, picture, visitors, id, isReport } = cardInfo
485
     const { unReadNum, picture, visitors, id, isReport } = cardInfo
483
           showAuthPhone &&
503
           showAuthPhone &&
484
           <AchievePhone user={userInfo.person} onCancel={this.handeAuthPhoneFail} onSuccess={this.handleAuthPhoneSuccess}></AchievePhone>
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
           // !showAuthPhone && visibleConfirmModal && (
511
           // !showAuthPhone && visibleConfirmModal && (
488
           //   <View className="modal">
512
           //   <View className="modal">

+ 7
- 7
src/pages/card/poster.js 查看文件

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

+ 1
- 1
src/pages/news/item.scss 查看文件

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

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

48
         <Image className="avatar_img" src={person.avatarurl}/>
48
         <Image className="avatar_img" src={person.avatarurl}/>
49
         <View className="user_name">{person.nickname}</View>
49
         <View className="user_name">{person.nickname}</View>
50
         <Button  className='auth-btn' open-type="getPhoneNumber" onGetphonenumber={this.getPhoneNumber}>微信授权一键登录</Button>
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
       </View>
52
       </View>
53
     )
53
     )
54
   }
54
   }

+ 10
- 9
src/pages/person/customerAnalysis/index.js 查看文件

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

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

406
       })
406
       })
407
     } else {
407
     } else {
408
       Taro.navigateTo({
408
       Taro.navigateTo({
409
-        url: `/pages/agent/recommend/index`
409
+        url: `/pages/agent/recommend/index?type=projectDeatil` 
410
       })
410
       })
411
     }
411
     }
412
   }
412
   }