Commit 93dcad0259ea338b167a2047bd5307234018737d

Authored by fengtao
1 parent 7c8b45ca

fix:app端tabbar图标不显示

@@ -81,6 +81,7 @@ export default { @@ -81,6 +81,7 @@ export default {
81 systemInfo: base.systemInfo, 81 systemInfo: base.systemInfo,
82 tabIndex: 0, 82 tabIndex: 0,
83 path: '', //当前路径 83 path: '', //当前路径
  84 + //#ifdef MP
84 list: [ 85 list: [
85 { 86 {
86 name: '首页', 87 name: '首页',
@@ -107,7 +108,37 @@ export default { @@ -107,7 +108,37 @@ export default {
107 icon: '../../../static/my-un.png', 108 icon: '../../../static/my-un.png',
108 iconFill: '../../../static/my-yes.png' 109 iconFill: '../../../static/my-yes.png'
109 } 110 }
  111 + ],
  112 + //#endif
  113 + //#ifdef APP-PLUS
  114 + list: [
  115 + {
  116 + name: '首页',
  117 + url: 'pages/index/index',
  118 + icon: '/static/home-un.png',
  119 + iconFill: '/static/home-yes.png'
  120 + },
  121 + {
  122 + name: '设备',
  123 + url: 'pages/device/device',
  124 + icon: '/static/device-un.png',
  125 + iconFill: '/static/device-yes.png'
  126 + },
  127 + {
  128 + name: '告警',
  129 + url: 'pages/alarm/alarm',
  130 + icon: '/static/alert-un.png',
  131 + iconFill: '/static/alert-yes.png',
  132 + badge: this.$store.state.badgeInfo
  133 + },
  134 + {
  135 + name: '我的',
  136 + url: 'pages/personal/personal',
  137 + icon: '/static/my-un.png',
  138 + iconFill: '/static/my-yes.png'
  139 + }
110 ] 140 ]
  141 + //#endif
111 }; 142 };
112 }, 143 },
113 created() { 144 created() {
@@ -125,7 +156,7 @@ export default { @@ -125,7 +156,7 @@ export default {
125 }, 156 },
126 methods: { 157 methods: {
127 onTabbar(index) { 158 onTabbar(index) {
128 - this.list[2].badge =this.$store.state.badgeInfo 159 + this.list[2].badge = this.$store.state.badgeInfo;
129 160
130 if (this.list[index].url) { 161 if (this.list[index].url) {
131 if (this.path !== this.list[index].url) { 162 if (this.path !== this.list[index].url) {
@@ -147,4 +178,4 @@ export default { @@ -147,4 +178,4 @@ export default {
147 right: 0; 178 right: 0;
148 z-index: 1000; 179 z-index: 1000;
149 } 180 }
150 -</style> 181 +</style>