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, // count: 1, //
imgIndex: 0, // imgIndex: 0, //
currentSelceted: [], // sku currentSelceted: [], // sku
imgList: [{ url: "" }], // imgList: [], //
skuDetail: { skuDetail: {
specList: [], specList: [],
}, // sku }, // sku
@ -580,12 +580,13 @@ export default {
swiperGoodsImg() { swiperGoodsImg() {
this.skuDetail.specList.forEach((e) => { this.skuDetail.specList.forEach((e) => {
if (e.specName === "images") { 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) { if (!this.imgList) {
this.imgList = [this.skuDetail.original]; this.imgList = [this.skuDetail.original];
} }
console.log(this.imgList);
}, },
}, },