Bläddra i källkod

bug:首页列表,特价显示有问题

lrf 2 år sedan
förälder
incheckning
b48691d8c0
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1 0
      app/service/view/goods.js

+ 1 - 0
app/service/view/goods.js

@@ -283,6 +283,7 @@ class GoodsService extends CrudService {
           let sortList = JSON.parse(JSON.stringify(gjaList));
           sortList = sortList.map(i => ({ ...i, sp_price: _.get(i, 'config.sp_price', 0) }));
           sortList = _.orderBy(sortList, [ 'sp_price' ], [ 'asc' ]);
+          sortList = sortList.filter(f => this.ctx.minus(0, f.sp_price) < 0);
           const lp = _.get(_.head(sortList), 'sp_price');
           if (lp && this.ctx.minus(lp, sell_money) < 0) goods.sell_money = lp;
         } else if (type === '5' && gjaList.length > 0) p_act.push('满减');