Commit 3361c689 authored by yaya's avatar yaya

feat:修改列表图片展示问题

parent 9261dafc
......@@ -140,14 +140,18 @@ export default {
listGoods(this.listQuery).then(response => {
this.list = response.data.data.items
this.list = (response.data.data.items || []).map((e, index) => {
let imageList = e.images || []
if (e.topImage && imageList.indexOf(e.topImage) === -1) {
imageList = [e.topImage].concat(imageList)
}
return {
...e,
imageList: e.topImage && e.images.indexOf(e.topImage) === -1 ? [e.topImage].concat(e.images) : e.images || []
imageList: imageList
}
})
this.total = response.data.data.total
this.listLoading = false
}).catch(() => {
}).catch((e) => {
this.list = []
this.total = 0
this.listLoading = false
......
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