python学习

This commit is contained in:
2020-11-17 18:52:15 +08:00
parent 780443e7d1
commit 51fd976127
329 changed files with 14341 additions and 358 deletions

22
native/utils/tools.js Normal file
View File

@@ -0,0 +1,22 @@
// 显示购物车tabBar的Badge
function showTabBarBadge(){
wx.getStorage({
key: 'shopCarInfo',
success: function (res) {
if (res.data.shopNum > 0) {
wx.setTabBarBadge({
index: 2,
text: `${res.data.shopNum}`
});
} else {
wx.removeTabBarBadge({
index: 2
});
}
}
});
}
module.exports = {
showTabBarBadge: showTabBarBadge
}