From 0c87ae6c4be2995bb1d95880cdfed9e17b5e85df Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Thu, 14 Feb 2019 11:22:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=B7=BB=E5=8A=A0=E7=B2=BE?= =?UTF-8?q?=E5=93=81=E6=8E=A8=E8=8D=90=E3=80=81=E6=96=B0=E5=93=81=E3=80=81?= =?UTF-8?q?=E7=83=AD=E5=8D=96=E3=80=81=E4=BF=83=E9=94=80=E6=8E=A8=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wap/view/first/index/index.html | 81 ++++++++++++++++++++- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/application/wap/view/first/index/index.html b/application/wap/view/first/index/index.html index 732e6111..8d3a509b 100644 --- a/application/wap/view/first/index/index.html +++ b/application/wap/view/first/index/index.html @@ -84,6 +84,58 @@ 查看更多 > + +
+
+ 精品推荐
+ +
+ +
+
+ 首发新品
+ +
+ +
+
+ 热卖单品
+ +
+ +
+
+ 特价专区
+ +
{notempty name="storeSeckill"}
@@ -157,7 +209,8 @@ class="count">已售{{pro.sales}}{{pro.unit_name || '件'}}

- + +
新品推荐
@@ -247,6 +300,10 @@ data: { couponList: [], cateGroupList: [], + is_bestList: [],//精品推荐 + is_newList:[],//首发新品 + is_hotList: [],//热卖单品 + is_benefitList:[],//促销 page: {first: 0, limit: 20, list: [], loaded: false}, loading: false, scroll: null, @@ -377,13 +434,33 @@ that.loading = false }); }, + getproductList: function (type) { + var that = this; + storeApi.getPublicProductList({first:0, limit: 4,type:type}, function (res) { + if(type=='is_best') + that.is_bestList = res.data.data; + if(type=='is_hot') + that.is_hotList = res.data.data; + if(type=='is_new') + that.is_newList = res.data.data; + if(type=='is_benefit') + that.is_benefitList = res.data.data; + }, function () { + + }); + }, }, mounted: function () { var that = this; this.elInit(); this.getIssueCouponList(); + this.getproductList('is_best');//精品 + this.getproductList('is_hot');//热卖 + this.getproductList('is_benefit');//促销 + this.getproductList('is_new');//首发新品 + this.getIssueCouponList(); this.getCateData(); - this.getCombinationList(); + this.getCombinationList();//猜猜喜欢 setTimeout(function() { that.getList(); },0);