diff --git a/src/views/detail.vue b/src/views/detail.vue index 9f44185..b9776fb 100644 --- a/src/views/detail.vue +++ b/src/views/detail.vue @@ -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 - }) - } + // }) + // } }, } diff --git a/src/views/news.vue b/src/views/news.vue index 0135735..54d98bb 100644 --- a/src/views/news.vue +++ b/src/views/news.vue @@ -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]+>/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 + // }) + // } } }