Browse Source

fix: 修正消息tab红点索引

huoyi 3 days ago
parent
commit
ea96d18f09
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/utils/common.js

+ 2 - 2
src/utils/common.js

@@ -307,7 +307,7 @@ export async function showMessageTabRedDot() {
307 307
     if (total > 0) {
308 308
       // 消息tab在tabBar列表中的索引是1(从0开始)
309 309
       uni.showTabBarRedDot({
310
-        index: 1,
310
+        index: 0,
311 311
         success: () => {
312 312
           // console.log('消息tab红点显示成功')
313 313
         },
@@ -319,7 +319,7 @@ export async function showMessageTabRedDot() {
319 319
     } else {
320 320
       // 当total等于0时,取消消息tab上的红点显示
321 321
       uni.hideTabBarRedDot({
322
-        index: 1,
322
+        index: 0,
323 323
         success: () => {
324 324
           console.log('消息tab红点隐藏成功')
325 325
         },