From 42d599122a9dd661ebebe219d0d28338549ed282 Mon Sep 17 00:00:00 2001 From: Ge Hao Date: Thu, 1 Dec 2016 11:26:42 +0800 Subject: [PATCH] new_index --- pages/index/index.js | 6 +++--- pages/index/index.wxml | 6 +++--- pages/index/index.wxss | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 326369c..e691dd9 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -44,9 +44,9 @@ Page({ var data = app.store.sync(result.data) that.setData({ items: data, - popularity_products: data.filter(product => product.flag === '最热'), - new_products: data.filter(product => product.flag === '新品'), - hot_products: data.filter(product => product.flag === '火爆'), + popularity_products: data.filter(product => (product.flag === '最热' && product['promotion-url'])), + new_products: data.filter(product => (product.flag === '新品' && product['promotion-url'])), + hot_products: data.filter(product => (product.flag === '火爆' && product['promotion-url'])), }) wx.setStorageSync('products', data) }) diff --git a/pages/index/index.wxml b/pages/index/index.wxml index d279757..8fb87fd 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -27,7 +27,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -53,7 +53,7 @@ - + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index afd61ff..b388a5c 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -53,6 +53,7 @@ image.head-img { width: 100%; + height: 335rpx; } text {