|
@@ -75,21 +75,12 @@ export default class Person extends Component {
|
75
|
75
|
})
|
76
|
76
|
}
|
77
|
77
|
|
78
|
|
- toClientPage() {
|
79
|
|
- const { user: { customerNum } } = this.state
|
80
|
|
-
|
81
|
|
- if (customerNum <= 0) {
|
82
|
|
- Taro.showToast({ title: '暂无客户', icon: 'none' })
|
83
|
|
- return
|
|
78
|
+ redirectTo = (url) => {
|
|
79
|
+ if (typeof url === 'function') {
|
|
80
|
+ Taro.navigateTo({ url: url(this.state.user) })
|
|
81
|
+ } else {
|
|
82
|
+ Taro.navigateTo({ url })
|
84
|
83
|
}
|
85
|
|
-
|
86
|
|
- Taro.navigateTo({
|
87
|
|
- url: '/pages/person/myGuest/index'
|
88
|
|
- })
|
89
|
|
- }
|
90
|
|
-
|
91
|
|
- redirectTo(url) {
|
92
|
|
- Taro.navigateTo({ url })
|
93
|
84
|
}
|
94
|
85
|
|
95
|
86
|
getRoleName(type) {
|
|
@@ -138,6 +129,7 @@ export default class Person extends Component {
|
138
|
129
|
|
139
|
130
|
renderDetail() {
|
140
|
131
|
const { user, menus, isAgent, consultant, tourist } = this.state
|
|
132
|
+ const showQRCode = user.personType === ROLE_CODE['CONSULTANT'] || ROLE_CODE['ESTATE_AGENT'] || ROLE_CODE['CHANNEL_AGENT']
|
141
|
133
|
// const isConsultant = user.personType == ROLE_CODE['CONSULTANT']
|
142
|
134
|
// const isConsultant = user.personType
|
143
|
135
|
return (
|
|
@@ -153,13 +145,17 @@ export default class Person extends Component {
|
153
|
145
|
</View>
|
154
|
146
|
|
155
|
147
|
<View className="info-text" onClick={this.goPersonDetail}>
|
156
|
|
- <View className="info-text__name">{user.name ? user.name : user.nickname} {/* <Text className="iconfont icon-more"></Text> */}</View>
|
|
148
|
+ <View className="info-text__name">{user.name ? user.name : user.nickname}</View>
|
157
|
149
|
<View className="info-text__intro">积分 {user.points || 0}</View>
|
158
|
150
|
</View>
|
159
|
|
- <Navigator url={`/pages/person/spread/index`} className="tuiguang">
|
160
|
|
- <Image style="width:40px;height:36px" src={require('@assets/mine/tuiguangma.png')} ></Image>
|
161
|
|
- <View className="info-text__intro" style="margin:4px 0 0 4px">推广码</View>
|
162
|
|
- </Navigator>
|
|
151
|
+ {
|
|
152
|
+ showQRCode && (
|
|
153
|
+ <Navigator url={`/pages/person/spread/index`} className="tuiguang">
|
|
154
|
+ <Image style="width:40px;height:36px" src={require('@assets/mine/tuiguangma.png')} ></Image>
|
|
155
|
+ <View className="info-text__intro" style="margin:4px 0 0 4px">推广码</View>
|
|
156
|
+ </Navigator>
|
|
157
|
+ )
|
|
158
|
+ }
|
163
|
159
|
</View>
|
164
|
160
|
{/* <View
|
165
|
161
|
className={`sign__btn ${user.havaSigned && 'signed'}`}
|