From 98e6190cfa5a1f2b8fd9203e86de2ec63a87b5cf Mon Sep 17 00:00:00 2001 From: jason233 <2389922658@qq.com> Date: Sat, 9 Mar 2019 19:58:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=90=9C=E7=B4=A2=20(#135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 小程序首页增加搜索 --- litemall-wx/pages/index/index.js | 8 +++++++- litemall-wx/pages/index/index.wxml | 6 ++++++ litemall-wx/pages/index/index.wxss | 33 ++++++++++++++++++++++++++++++ litemall-wx/project.config.json | 2 +- 4 files changed, 47 insertions(+), 2 deletions(-) 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}}款好物 + +