From 7aad9a9a06480304fe832a53e63ace969c7753c4 Mon Sep 17 00:00:00 2001 From: yvan.ni <765199919@qq.com> Date: Fri, 10 Jul 2020 15:02:11 +0800 Subject: [PATCH] 1. 当一个商品同时勾选了 推荐,热销,等, 也要再推荐的列表中显示 --- components/diy_goodsGroup/diy_goodsGroup.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js index 7f4bcb7..e40b4cc 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.js +++ b/components/diy_goodsGroup/diy_goodsGroup.js @@ -178,16 +178,18 @@ Component({ break; case "2": var item = {}; + var r_data={ + store_id: os.stoid , + pageSize: th.data.goodscount, + page: th.data.currentPage, + isonsale: 1, + }; + if(th.data.is_recommend) r_data.is_recommend=th.data.is_recommend; + if(th.data.is_hot) r_data.is_hot=th.data.is_hot; + if(th.data.is_new) r_data.is_new=th.data.is_new; + app.request.promiseGet("/api/weshop/goods/page", { - data: { - store_id: os.stoid , - is_recommend: th.data.is_recommend, - is_hot: th.data.is_hot, - is_new: th.data.is_new, - pageSize: th.data.goodscount, - page: th.data.currentPage, - isonsale: 1, - } + data:r_data }).then(res => { //商品地址 var goods = res.data.data.pageData; -- libgit2 0.21.4