improved: 优化sku编辑

This commit is contained in:
misworga831
2024-01-22 14:09:00 +08:00
parent 77732e766a
commit de89249d3e
4 changed files with 326 additions and 234 deletions

View File

@@ -5,9 +5,8 @@
<div class="item-detail-left">
<!-- 大图放大镜 -->
<!-- <div id="dplayer"></div> -->
<div class="item-detail-big-img">
<pic-zoom :url="imgList[imgIndex].url" :scale="2"></pic-zoom>
<div class="item-detail-big-img" v-if="imgList[imgIndex]">
<pic-zoom :url="imgList[imgIndex].url || imgList[imgIndex]" :scale="2"></pic-zoom>
</div>
<!-- <div id="dplayer"></div> -->
@@ -19,7 +18,7 @@
v-for="(item, index) in imgList"
:key="index"
>
<img :src="item.url" />
<img :src="item.url || item"/>
</div>
</div>
@@ -581,9 +580,12 @@ export default {
swiperGoodsImg() {
this.skuDetail.specList.forEach((e) => {
if (e.specName === "images") {
this.imgList = e.specImage;
this.imgList = this.skuDetail.goodsGalleryList;
}
});
if (!this.imgList) {
this.imgList = [this.skuDetail.original];
}
},
},

View File

@@ -130,6 +130,9 @@ export default {
});
this.categoryBar = cateArr;
this.$set(this, "goodsMsg", res.result);
if (!this.goodsMsg.data.intro) {
this.goodsMsg.data.intro = ''
}
// 判断是否收藏
if (this.Cookies.getItem("userInfo")) {
isStoreCollection("STORE", this.goodsMsg.data.storeId).then((res) => {