xujing преди 5 години
родител
ревизия
94de2927a7
променени са 4 файла, в които са добавени 22 реда и са изтрити 16 реда
  1. 2
    2
      config/dev.js
  2. BIN
      src/assets/tabbar/index1.png
  3. 18
    12
      src/pages/project/NavIcons/index.js
  4. 2
    2
      src/pages/project/index.js

+ 2
- 2
config/dev.js Целия файл

@@ -11,8 +11,8 @@ module.exports = {
11 11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
12 12
     // HOST: '"https://lt.pawoma.cn"',
13 13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
14
-    // HOST: '"http://192.168.2.52:8080"',
15
-    // WSS_HOST: '"ws://192.168.2.52:8080"',
14
+    // HOST: '"http://192.168.2.51:8080"',
15
+    // WSS_HOST: '"ws://192.168.2.51:8080"',
16 16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17 17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18 18
     Version: 'V3.5.13'

BIN
src/assets/tabbar/index1.png Целия файл


+ 18
- 12
src/pages/project/NavIcons/index.js Целия файл

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

+ 2
- 2
src/pages/project/index.js Целия файл

@@ -495,7 +495,7 @@ export default class Index extends Component {
495 495
   }
496 496
   render() {
497 497
     const { achieve, helpGroupList, propagandaBanner, newsShow, iconList } = this.state
498
-    const { curCity, unReadNum, userInfo: { person } } = this.props
498
+    const { curCity, unReadNum, userInfo: { person: { personType } } } = this.props
499 499
 
500 500
     return (
501 501
       <Block>
@@ -540,7 +540,7 @@ export default class Index extends Component {
540 540
                 </View>
541 541
               </View>
542 542
               {/* 菜单栏 */}
543
-              <NavIcons city={curCity} person={person} iconList={iconList} ></NavIcons>
543
+              <NavIcons city={curCity} personType={personType} iconList={iconList} ></NavIcons>
544 544
               {/* <View style={propagandaBanner.length > 0 ? "border-bottom:20rpx solid #f5f5f5" : ''}> */}
545 545
               <View style={(newsShow || propagandaBanner.length > 0) ? "border-bottom:20rpx solid #f5f5f5" : ''}>
546 546
                 {/* 展示位轮播图 */}