修改小程序bug

This commit is contained in:
邓洁
2023-02-25 16:32:35 +08:00
parent 8bdb156ec2
commit b439c3dd7a
7 changed files with 36 additions and 31 deletions

View File

@@ -74,14 +74,17 @@
getHistoryOrCollection() {
this.$apiServe.getHistoryOrCollection(this.type).then(res => {
let data = res.data.data
console.log('历史记录或收藏', data);
for (const item of data) {
let tag = item.tags
this.tagsArray = tag.split(',')
item.tags = this.tagsArray[0]
item.create_time = dateFormatHistory(item.create_time)
if (data) {
for (const item of data) {
let tag = item.tags
if (tag) {
this.tagsArray = tag.split(',')
item.tags = this.tagsArray[0]
}
item.create_time = dateFormatHistory(item.create_time)
}
this.productList = data
}
this.productList = data
}).finally(_ => {
})