林凡 hace 5 años
padre
commit
d433d7114c
Se han modificado 4 ficheros con 39 adiciones y 8 borrados
  1. 4
    4
      config/dev.js
  2. 1
    0
      src/constants/api.js
  3. 27
    3
      src/pages/person/myShare/accessRecord.js
  4. 7
    1
      src/services/person.js

+ 4
- 4
config/dev.js Ver fichero

@@ -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.2.51:8080"',
13
-    // WSS_HOST: '"ws://192.168.2.51:8080"',
12
+    HOST: '"http://192.168.2.51:8080"',
13
+    WSS_HOST: '"ws://192.168.2.51:8080"',
14 14
     Version: 'V3.5.3'
15 15
   },
16 16
   weapp: {},

+ 1
- 0
src/constants/api.js Ver fichero

@@ -186,5 +186,6 @@ export const API_CONSULTANT_VISIT_RECORD = resolvePath('visitRecord')
186 186
 export const API_MORE_ACTIVITY = resolvePath('visitRecord/activity')
187 187
 export const API_SHARE_LIST = resolvePath('shareRecords')
188 188
 export const API_SHARE_INFOLIST = resolvePath('sharePersonInfoList')
189
+export const API_BIND_CUSTOMER = resolvePath('judgeBindCustomer')
189 190
 // 消息模板
190 191
 export const API_TEMPLATE_TYPE = resolvePath('template/of/')

+ 27
- 3
src/pages/person/myShare/accessRecord.js Ver fichero

@@ -2,7 +2,7 @@ import Taro, { Component } from '@tarojs/taro';
2 2
 import ListView from '@components/ListView'
3 3
 import { connect } from '@tarojs/redux'
4 4
 import './index.scss'
5
-import { getSharePersonInfoList } from '@services/person'
5
+import { getSharePersonInfoList,judgeBindCustomer } from '@services/person'
6 6
 import { savePoint, updatePoint } from '@services/common'
7 7
 import * as noticeType from '@constants/common.js'
8 8
 import dayjs from 'dayjs';
@@ -104,6 +104,30 @@ export default class Person extends Component {
104 104
     })
105 105
   }
106 106
 
107
+  goCustomerDetail(customerId,e){
108
+    e.stopPropagation()
109
+    const { userInfo: { person: { personId }}} = this.props
110
+    const payload = {
111
+      personId: personId,
112
+      customerId: customerId
113
+    }
114
+    judgeBindCustomer(payload).then(res=>{
115
+      if(res.data){
116
+        Taro.navigateTo({
117
+          url: `/pages/person/customerAnalysis/myCustomer?
118
+          =` + customerId
119
+        })
120
+      }else{
121
+        Taro.showToast({
122
+          title: 'TA不是你的客户,无法查看详细信息',
123
+          duration: 3000,
124
+          icon: 'none',
125
+        })
126
+      }
127
+    })
128
+    
129
+  }
130
+
107 131
   render() {
108 132
     const { isEmpty, hasMore, recordList } = this.state
109 133
     return (
@@ -125,12 +149,12 @@ export default class Person extends Component {
125 149
                   {item.myCustomer == 1 && <View className="tag">我的客户</View>}
126 150
                   <Image className="touxiang" src={item.avatarurl || require('@assets/default-avatar.png')}></Image>
127 151
                   <View className="info-top">
128
-                    <View className="name">{item.userName || item.nickname || ' '}</View>
152
+                    <View onClick={this.goCustomerDetail.bind(this,item.customerId)} className="name">{item.userName || item.nickname || ' '}</View>
129 153
                     <View style="display: flex;align-items: center;" onClick={this.handleChatClick.bind(this, item)}><Image className="goutong-icon" src={require('@assets/person/zixun.png')}></Image><Text className="goutong">在线沟通</Text></View>
130 154
                   </View>
131 155
                   <View className="activity-time">
132 156
                     {`${dayjs(item.visitTime).format('YYYY-MM-DD HH:mm:ss')}`}
133
-                  </View>
157
+                  </View> 
134 158
                 </View>
135 159
               ))
136 160
             }

+ 7
- 1
src/services/person.js Ver fichero

@@ -13,7 +13,8 @@ import {
13 13
   API_CONSULTANT_VISIT_RECORD,
14 14
   API_MORE_ACTIVITY,
15 15
   API_SHARE_LIST,
16
-  API_SHARE_INFOLIST
16
+  API_SHARE_INFOLIST,
17
+  API_BIND_CUSTOMER
17 18
 } from '@constants/api'
18 19
 
19 20
 
@@ -95,6 +96,11 @@ export const getMoreVisitRecord = (payload) => fetch({ url: API_MORE_ACTIVITY, p
95 96
  * @param {*} payload  
96 97
  */
97 98
 export const getSharePersonList = (payload) => fetch({ url: API_SHARE_LIST, payload })
99
+/**
100
+ * 获取分享人的详细信息
101
+ * @param {*} payload  
102
+ */
103
+export const judgeBindCustomer = (payload) => fetch({ url: API_BIND_CUSTOMER, payload })
98 104
 /**
99 105
  * 获取访问人列表
100 106
  * @param {*} payload