From d4f707990862606374a3f13b853a5bccf1d21464 Mon Sep 17 00:00:00 2001 From: Hokin <568050969@qq.com> Date: Sat, 27 Jul 2024 18:12:55 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/detail.vue | 18 +++++++++--------- src/views/news.vue | 17 +++++++++-------- 2 files changed, 18 insertions(+), 17 deletions(-) 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 + // }) + // } } }