[new feature] Sku 支持隐藏售罄规格 (#2472)

* [new feature] Sku 支持隐藏售罄规格
This commit is contained in:
wny
2019-01-09 11:03:35 +08:00
committed by GitHub
parent 4f8a592836
commit d74147dad0
7 changed files with 77 additions and 15 deletions
+2 -6
View File
@@ -54,14 +54,10 @@ export default create({
// 目前skuImg都挂载在skuTree中s1那类sku上
const treeItem = this.sku.tree.filter(item => item.k_s === 's1')[0] || {};
if (!treeItem.v) {
return;
}
if (!treeItem.v) return;
const matchedSku = treeItem.v.filter(skuValue => skuValue.id === id)[0];
if (matchedSku && matchedSku.imgUrl) {
return matchedSku.imgUrl;
}
if (matchedSku) return (matchedSku.imgUrl || matchedSku.img_url);
},
previewImage() {