Commit f7780c28 authored by yaya's avatar yaya

feat:修改编辑图片展示问题

parent fac05f30
......@@ -177,17 +177,19 @@ export default {
this.goods = response.data.data.goods
this.goods.detail = this.trimHtml(this.goods.detail)
this.categoryIds = response.data.data.categoryIds
this.goods.images = response.data.data.images || []
this.itemImages = []
if (this.goods.topImage && this.goods.images.indexOf(this.goods.topImage) === -1) {
this.itemImages.push({
url: this.goods.topImage
})
}
for (var i = 0; i < this.goods.images.length; i++) {
this.itemImages.push({
url: this.goods.images[i]
})
if (this.goods.images && this.goods.images.length > 0) {
for (var i = 0; i < this.goods.images.length; i++) {
this.itemImages.push({
url: this.goods.images[i]
})
}
}
})
......
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