init
This commit is contained in:
parent
1b04eddf41
commit
60298a7b15
@ -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])
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user