|
@@ -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
|
}
|