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