修改小程序bug
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
this.imgUrl = uni.getStorageSync('img_url')
|
||||
this.getNews()
|
||||
},
|
||||
methods: {
|
||||
@@ -41,8 +41,8 @@
|
||||
pageSize: 3,
|
||||
pageNum: 1
|
||||
}).then(res => {
|
||||
// console.log('行业新闻', res.data.data)
|
||||
let newsData = res.data.data
|
||||
console.log('新闻', newsData);
|
||||
for (const item of newsData) {
|
||||
item.pub_time_str = dateFormat(item.pub_time_str)
|
||||
}
|
||||
|
||||
@@ -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(_ => {
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user