diff --git a/pages/index/index/index.js b/pages/index/index/index.js index 6d00fb1..b30c650 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -298,6 +298,9 @@ Page({ }, async onShow() { + this.getTabBar().setData({ + cartGoodsNum: getApp().globalData.cartGoodsNum + }) var th = this; //-- 登录回来判断弹框 -- var user_id=getApp().globalData.user_id; diff --git a/pages/user/index/index.js b/pages/user/index/index.js index d326f5d..935d344 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -58,6 +58,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function(options) { + var th=this; //-- 读取会员中心按钮列表 -- getApp().request.get("/api/weshop/userTool/page?pageSize=100", { @@ -98,6 +99,9 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function() { + this.getTabBar().setData({ + cartGoodsNum: getApp().globalData.cartGoodsNum, + }) //看一下小程序是不是过期了 getApp().getConfig2(function(config2){ if(config2 && config2.is_overdue==1){