async onLaunch() {
const cart = new Cart()
if (!cart.isEmpty()) {
wx.setTabBarBadge({
index: 2,
text: String(cart.getCartItemTotalSkuCount())
})
}
const token = new Token()
await token.checkOrGet()
const isSuperMember = await IStore.checkIsSuperMember()
if (isSuperMember) {
wx.setTabBarItem({
index: 4,
text: '我的',
iconPath: '/images/tabbar/my@dis.png',
selectedIconPath: imagePath.tangerineTabbarVip,
success: () => {
console.log('setTabbarItemSuccess')
}
})
wx.setTabBarStyle({
color: '#333333',
selectedColor: '#B78E61',
backgroundColor: '#FFF7EB',
success: () => {
console.log('setTabbarStyleSuccess')
}
})
}
this.checkUpdate()
},
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。