This commit is contained in:
dzj 2024-05-31 11:58:28 +08:00
parent 1b04eddf41
commit 60298a7b15

View File

@ -108,6 +108,10 @@ export default{
getnews({'page':this.page}).then((res)=>{
// console.log(res)
for(let i=0;i<res.data.content.length;i++){
res.data.content[i].content= res.data.content[i].content.replace(/<[^>]+>/g, '').trim();
res.data.content[i].day=res.data.content[i].releaseTime.slice(-2)
res.data.content[i].year=res.data.content[i].releaseTime.slice(0,7)
this.rest.push(res.data.content[i])
}