Showing
1 changed file
with
33 additions
and
2 deletions
... | ... | @@ -81,6 +81,7 @@ export default { |
81 | 81 | systemInfo: base.systemInfo, |
82 | 82 | tabIndex: 0, |
83 | 83 | path: '', //当前路径 |
84 | + //#ifdef MP | |
84 | 85 | list: [ |
85 | 86 | { |
86 | 87 | name: '首页', |
... | ... | @@ -107,7 +108,37 @@ export default { |
107 | 108 | icon: '../../../static/my-un.png', |
108 | 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 | 144 | created() { |
... | ... | @@ -125,7 +156,7 @@ export default { |
125 | 156 | }, |
126 | 157 | methods: { |
127 | 158 | onTabbar(index) { |
128 | - this.list[2].badge =this.$store.state.badgeInfo | |
159 | + this.list[2].badge = this.$store.state.badgeInfo; | |
129 | 160 | |
130 | 161 | if (this.list[index].url) { |
131 | 162 | if (this.path !== this.list[index].url) { |
... | ... | @@ -147,4 +178,4 @@ export default { |
147 | 178 | right: 0; |
148 | 179 | z-index: 1000; |
149 | 180 | } |
150 | -</style> | |
181 | +</style> | ... | ... |