- 爲小程序底部的導航設置消息提示
- 小程序官方地址:
https://developers.weixin.qq.com/miniprogram/dev/api/ui/tab-bar/wx.setTabBarBadge.html - api使用:
index:Number | 代表的是消息提示在第幾個導航上 |
text:String | 有多少條未讀消息,必須是string類型 |
success:function | 接口調用成功的回調函數 |
fail | 接口調用失敗的回調函數 |
complete | 接口調用結束的回調函數(調用成功、失敗都會執行) |
` wx.setTabBarBadge({
index:1,
text:'12'
})`