diff --git a/litemall-wx/pages/index/index.js b/litemall-wx/pages/index/index.js index fae28ecf..09ea4360 100644 --- a/litemall-wx/pages/index/index.js +++ b/litemall-wx/pages/index/index.js @@ -15,7 +15,8 @@ Page({ floorGoods: [], banner: [], channel: [], - coupon: [] + coupon: [], + goodsCount: 0 }, onShareAppMessage: function() { @@ -50,6 +51,11 @@ Page({ }); } }); + util.request(api.GoodsCount).then(function (res) { + that.setData({ + goodsCount: res.data.goodsCount + }); + }); }, onLoad: function(options) { diff --git a/litemall-wx/pages/index/index.wxml b/litemall-wx/pages/index/index.wxml index e6b8ea48..7a1a41d6 100644 --- a/litemall-wx/pages/index/index.wxml +++ b/litemall-wx/pages/index/index.wxml @@ -1,5 +1,11 @@ + + + + 商品搜索, 共{{goodsCount}}款好物 + +