|
@@ -4,30 +4,37 @@ import './index.scss'
|
4
|
4
|
export default function ConsultantItem(props) {
|
5
|
5
|
|
6
|
6
|
const { data = {}, style, type, tips } = props
|
7
|
|
-
|
|
7
|
+ const handleHomepage = (e) => {
|
|
8
|
+ e.stopPropagation()
|
|
9
|
+ if (props.onHomepage) {
|
|
10
|
+ props.onHomepage()
|
|
11
|
+ }
|
|
12
|
+ }
|
8
|
13
|
return (
|
9
|
14
|
<Block>
|
10
|
15
|
{(!data || !data.id) && tips == 'show' && (<View style="margin-top: 20px; text-align: center">暂无数据</View>)}
|
11
|
16
|
{
|
12
|
17
|
(data && (data.id || data.consultantPersonId)) &&
|
13
|
18
|
(
|
14
|
|
- <View className="card-item" style={style}>
|
15
|
|
- <View onClick={() => props.onClick && props.onClick(data)}>
|
|
19
|
+ <View className="card-item" style={style} onClick={() => props.onClick && props.onClick(data)}>
|
|
20
|
+
|
|
21
|
+ <View className="flex-info" >
|
16
|
22
|
<Image src={data.photo || data.avatar} className='avatar' ></Image>
|
17
|
|
- {
|
18
|
|
- (data.name || data.userName) &&
|
19
|
|
- (
|
|
23
|
+ <View>
|
|
24
|
+ {
|
|
25
|
+ (data.name || data.userName) &&
|
20
|
26
|
<View className="name">
|
21
|
27
|
{data.name || data.userName}
|
22
|
28
|
<Image src={require('@/assets/person/card.png')} className='card' ></Image>
|
23
|
29
|
{type == 'raiseProfile' && <View className="tip">您的专属置业顾问</View>}
|
24
|
30
|
</View>
|
25
|
|
- )
|
26
|
|
- }
|
27
|
|
- <View className="phone">{data.phone}</View>
|
|
31
|
+ }
|
|
32
|
+ <View className="phone">{data.phone}</View>
|
|
33
|
+ </View>
|
28
|
34
|
</View>
|
29
|
|
- {!type && <View className="home" onClick={props.onHomepage}>主页</View>}
|
30
|
|
- {type == 'raiseProfile' && <View className="contact" onClick={props.contactClick}>联系我<Text className="right-icon"></Text></View>}
|
|
35
|
+
|
|
36
|
+ {!type && <View className="home" onClick={handleHomepage}>主页</View>}
|
|
37
|
+ {type == 'raiseProfile' && <View className="contact" onClick={}>联系我<Text className="right-icon"></Text></View>}
|
31
|
38
|
</View >
|
32
|
39
|
)
|
33
|
40
|
}
|