Commit 0e73ddb1 authored by yaya's avatar yaya

feat:钱币设置添加设置主图功能功能bugfix

parent dc5fc299
...@@ -331,12 +331,18 @@ export default { ...@@ -331,12 +331,18 @@ export default {
} }
this.imageList = this.goodsParams.images this.imageList = this.goodsParams.images
if (this.goodsParams.topImage && this.goodsParams.topImage.length > 0) { if (this.goodsParams.topImage && this.goodsParams.topImage.length > 0) {
this.imageList = this.imageList.filter((item) => {
if (item !== this.goodsParams.topImage) {
return item
}
})
const list = [this.goodsParams.topImage] const list = [this.goodsParams.topImage]
if (this.imageList && this.imageList.length > 0) { if (this.imageList && this.imageList.length > 0) {
this.imageList = list.concat(this.imageList) this.imageList = list.concat(this.imageList)
} else { } else {
this.imageList = list this.imageList = list
} }
this.imageMainPosition = 0
} }
}) })
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment