bug修复
This commit is contained in:
parent
2f8199108c
commit
d4f7079908
@ -54,21 +54,21 @@ changeto(){
|
||||
},
|
||||
mounted(){
|
||||
|
||||
if(this.$route.query.type=='1'){
|
||||
msgdetail({id:this.$route.query.id}).then((res)=>{
|
||||
// if(this.$route.query.type=='1'){
|
||||
msgdetail({id:this.$route.query.id,articleType:this.$route.query.type}).then((res)=>{
|
||||
this.content=res.data.content
|
||||
this.name=res.data.name
|
||||
this.time=res.data.releaseTime
|
||||
|
||||
})
|
||||
}else{
|
||||
newsdetail({id:this.$route.query.id}).then((res)=>{
|
||||
this.content=res.data.content
|
||||
this.name=res.data.name
|
||||
this.time=res.data.releaseTime
|
||||
// }else{
|
||||
// newsdetail({id:this.$route.query.id}).then((res)=>{
|
||||
// this.content=res.data.content
|
||||
// this.name=res.data.name
|
||||
// this.time=res.data.releaseTime
|
||||
|
||||
})
|
||||
}
|
||||
// })
|
||||
// }
|
||||
|
||||
},
|
||||
}
|
||||
|
@ -115,6 +115,7 @@ export default{
|
||||
methods:{
|
||||
|
||||
handleClick(){
|
||||
this.page = 0;
|
||||
console.log(1111)
|
||||
this.rest=[]
|
||||
let loadingInstance = Loading.service('loading');
|
||||
@ -155,7 +156,7 @@ export default{
|
||||
addnews(){
|
||||
this.page=this.page+1
|
||||
// if(this.activeName=='新闻资讯'){
|
||||
getmsg({'page':this.page}).then((res)=>{
|
||||
getmsg({'page':this.page,'articleType':this.activeName}).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();
|
||||
@ -182,15 +183,15 @@ export default{
|
||||
|
||||
},
|
||||
changeto(id){
|
||||
if(this.activeName=='新闻资讯'){
|
||||
// if(this.activeName=='新闻资讯'){
|
||||
this.$router.push({
|
||||
path:'/detail?type=1&&id='+id
|
||||
path:'/detail?type='+this.activeName+'&&id='+id
|
||||
})
|
||||
}else if(this.activeName=='企业新闻'){
|
||||
this.$router.push({
|
||||
path:'/detail?type=2&&id='+id
|
||||
})
|
||||
}
|
||||
// }else if(this.activeName=='企业新闻'){
|
||||
// this.$router.push({
|
||||
// path:'/detail?type=2&&id='+id
|
||||
// })
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user