Commit 7aad9a9a06480304fe832a53e63ace969c7753c4

Authored by yvan.ni
1 parent 98f4b5c7

1. 当一个商品同时勾选了 推荐,热销,等, 也要再推荐的列表中显示

components/diy_goodsGroup/diy_goodsGroup.js
@@ -178,16 +178,18 @@ Component({ @@ -178,16 +178,18 @@ Component({
178 break; 178 break;
179 case "2": 179 case "2":
180 var item = {}; 180 var item = {};
  181 + var r_data={
  182 + store_id: os.stoid ,
  183 + pageSize: th.data.goodscount,
  184 + page: th.data.currentPage,
  185 + isonsale: 1,
  186 + };
  187 + if(th.data.is_recommend) r_data.is_recommend=th.data.is_recommend;
  188 + if(th.data.is_hot) r_data.is_hot=th.data.is_hot;
  189 + if(th.data.is_new) r_data.is_new=th.data.is_new;
  190 +
181 app.request.promiseGet("/api/weshop/goods/page", { 191 app.request.promiseGet("/api/weshop/goods/page", {
182 - data: {  
183 - store_id: os.stoid ,  
184 - is_recommend: th.data.is_recommend,  
185 - is_hot: th.data.is_hot,  
186 - is_new: th.data.is_new,  
187 - pageSize: th.data.goodscount,  
188 - page: th.data.currentPage,  
189 - isonsale: 1,  
190 - } 192 + data:r_data
191 }).then(res => { 193 }).then(res => {
192 //商品地址 194 //商品地址
193 var goods = res.data.data.pageData; 195 var goods = res.data.data.pageData;