fix: 兼容旧版本图片格式

master
misworga831 2024-01-22 14:39:43 +08:00
parent de89249d3e
commit 83beb81a3b
1 changed files with 3 additions and 2 deletions

View File

@ -354,7 +354,7 @@ export default {
count: 1, //
imgIndex: 0, //
currentSelceted: [], // sku
imgList: [{ url: "" }], //
imgList: [], //
skuDetail: {
specList: [],
}, // sku
@ -580,12 +580,13 @@ export default {
swiperGoodsImg() {
this.skuDetail.specList.forEach((e) => {
if (e.specName === "images") {
this.imgList = this.skuDetail.goodsGalleryList;
this.imgList = this.skuDetail.goodsGalleryList.filter(i => i.indexOf("\"url\":") === -1 && i.indexOf("\"status\":") === -1);
}
});
if (!this.imgList) {
this.imgList = [this.skuDetail.original];
}
console.log(this.imgList);
},
},