feat(Sku): sku image preview (#4236)

This commit is contained in:
codpoe
2019-08-26 08:05:48 +08:00
committed by neverland
parent 34c5fea967
commit ae53f9b58f
3 changed files with 25 additions and 25 deletions

View File

@@ -191,17 +191,17 @@ export default createComponent({
const imageList = [this.goods.picture];
if (this.skuTree.length > 0) {
const treeItem = this.skuTree.filter(item => item.k_s === 's1')[0] || {};
if (!treeItem.v) {
return imageList;
}
treeItem.v.forEach(vItem => {
const img = vItem.imgUrl || vItem.img_url;
if (img) {
imageList.push(img);
this.skuTree.forEach(treeItem => {
if (!treeItem.v) {
return;
}
treeItem.v.forEach(vItem => {
const img = vItem.imgUrl || vItem.img_url;
if (img) {
imageList.push(img);
}
});
});
}