zhaoxiaohai 3 years ago
parent
commit
22632d1c41
1 changed files with 5 additions and 3 deletions
  1. 5 3
      custom-tab-bar/index.js

+ 5 - 3
custom-tab-bar/index.js

@@ -29,7 +29,8 @@ Component({
                 })
                 if (auth2.length == 1) list.push('营销物料');
                 this.setData({
-                    Permission: list
+                    Permission: list,
+                    auth
                 })
             }
         },
@@ -48,6 +49,7 @@ Component({
     data: {
         active: 'home',
         Permission: ['首页'],
+        auth: [], //个人信息和消息信息的权限
         tabbarList: [{
                 icon: 'icon-a-biaoqianlanshouyexuanzhong',
                 text: '首页',
@@ -81,8 +83,8 @@ Component({
     methods: {
         /* tabbar */
         onChange(event) {
-            let active = event.detail;
-            let obj = this.data.tabbarList.find(v => v.name == active);
+            let active = event.detail,
+                obj = this.data.tabbarList.find(v => v.name == active);
             wx.switchTab({
                 url: obj.url
             });