|
@@ -1,10 +1,12 @@
|
1
|
1
|
import { isFunction, isEmpty } from '@/utils/tools'
|
2
|
2
|
import allIcons from './icons'
|
3
|
3
|
import './index.scss'
|
|
4
|
+import { ROLE_CODE } from '@/constants/user'
|
4
|
5
|
|
5
|
6
|
const defaultIcons = allIcons.filter(x => x.default)
|
6
|
7
|
|
7
|
8
|
export default function (props) {
|
|
9
|
+
|
8
|
10
|
const iconList = props.iconList && props.iconList.length ? props.iconList : defaultIcons
|
9
|
11
|
const showIcons = iconList.map((icon) => {
|
10
|
12
|
const defIcon = allIcons.filter(x => icon.iconCode === x.iconCode)[0]
|
|
@@ -38,19 +40,23 @@ export default function (props) {
|
38
|
40
|
}
|
39
|
41
|
}
|
40
|
42
|
|
|
43
|
+ const latsIcons = props.personType == ROLE_CODE['CONSULTANT'] ? showIcons.filter(item => item.iconCode != 'refercustomers') : showIcons
|
41
|
44
|
return (
|
42
|
|
- <View className="navicons" style={showIcons.length == 3 ? "padding:0 8%" : ""}>
|
43
|
|
- {showIcons.map((item) => (
|
44
|
|
- <View onClick={() => naviTo(item)} className="nav-item" key={item.iconCode}>
|
45
|
|
- <Image className="icon" src={item.iconUrl} ></Image>
|
46
|
|
- <View className="nav-text">
|
47
|
|
- <Text>{item.iconName}</Text>
|
48
|
|
- { item.iconCode== 'refercustomers' &&
|
49
|
|
- <Image style="width:30rpx;height:30rpx;margin-left:4rpx" src={require('@/assets/award.png')} ></Image>
|
50
|
|
- }
|
51
|
|
- </View>
|
|
45
|
+
|
|
46
|
+ < View className="navicons" style={latsIcons.length == 3 ? "padding:0 8%" : ""} >
|
|
47
|
+ {
|
|
48
|
+ latsIcons.map((item) => (
|
|
49
|
+ <View onClick={() => naviTo(item)} className="nav-item" key={item.iconCode}>
|
|
50
|
+ <Image className="icon" src={item.iconUrl} ></Image>
|
|
51
|
+ <View className="nav-text">
|
|
52
|
+ <Text>{item.iconName}</Text>
|
|
53
|
+ {item.iconCode == 'refercustomers' &&
|
|
54
|
+ <Image style="width:30rpx;height:30rpx;margin-left:4rpx" src={require('@/assets/award.png')} ></Image>
|
|
55
|
+ }
|
52
|
56
|
</View>
|
53
|
|
- ))}
|
54
|
|
- </View>
|
|
57
|
+ </View>
|
|
58
|
+ ))
|
|
59
|
+ }
|
|
60
|
+ </View >
|
55
|
61
|
)
|
56
|
62
|
}
|