今天试用2.10.2出现「hideTabBarRedDot:fail not TabBar pag」
发布于 6 年前 作者 chengang 5936 次浏览 来自 官方Issues
具体错误提示信息:
Uncaught (in promise) thirdScriptError
{"errMsg":"hideTabBarRedDot:fail not TabBar page"}
Object
console.error @ VM1164:1
errorReport @ VM1170 WAService.js:2
thirdErrorReport @ VM1170 WAService.js:2
(anonymous) @ VM1170 WAService.js:2
c @ VM1170 WAService.js:2
i @ VM1170 WAService.js:2
(anonymous) @ VM1170 WAService.js:2
value @ VM1170 WAService.js:2
t @ VM1170 WAService.js:2
(anonymous) @ VM1170 WAService.js:2

2.10.1版本的基础库和之前的基础库印象中从未出现过这个错误。

提示这个错误不影响正常功能的使用。

没操作他时也会默默的提示这个错误。

应该是下面代码在非tabBar(我的tabBar是官方非自定义tabBar)的page里调用时导致报错:

      let bShowRedDot = result.data.sum > 0;
      if (bShowRedDot) {
        wx.showTabBarRedDot({
          index: 3,
        });
      } else {
        wx.hideTabBarRedDot({
          index: 3,
        });
      }
1 回复

现在还能复现吗?有使用该api吗?

回到顶部