diff --git a/pages/index/index.js b/pages/index/index.js index 6bce4c3..03aad73 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 {