代客人下单增加过滤掉下架的单规格商品

This commit is contained in:
YeMingfei666 2024-08-26 17:51:59 +08:00
parent 770c369ebd
commit c70a6b2f68
1 changed files with 3 additions and 3 deletions

View File

@ -2384,16 +2384,16 @@ export default {
},
async getGoods() {
const res = await getGoodsLists(this.goods.query);
console.log(res);
this.goods.list = res.records.filter((v) => {
const goods= res.records.filter((v) => {
let isShow = true;
if (v.typeEnum !== "sku") {
isShow = v.specList.length >= 1;
}
return isShow;
});
this.goods.list =goods
this.goods.total = res.total;
this.$goodsData = res;
this.$goodsData = goods;
},
async open(item) {
this.table = item;