更换新接口

This commit is contained in:
邓洁
2023-02-26 22:10:49 +08:00
parent b439c3dd7a
commit b0d3372b7c
3 changed files with 20 additions and 14 deletions

View File

@@ -43,11 +43,14 @@
}).then(res => {
let newsData = res.data.data
console.log('新闻', newsData);
for (const item of newsData) {
item.pub_time_str = dateFormat(item.pub_time_str)
if (newsData) {
for (const item of newsData) {
item.pub_time_str = dateFormat(item.pub_time_str)
}
// newsData = newsData.slice(0, 3)
this.newsList = newsData
}
// newsData = newsData.slice(0, 3)
this.newsList = newsData
}).finally(_ => {})
},
// 跳转到新闻详情页