Commit d4e3b118 by 莫晓莉

法院新闻

parent 874ec18f
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<!--<span class="fist-text" style=""></span> <!--<span class="fist-text" style=""></span>
<span>日头条</span>--> <span>日头条</span>-->
<div class="btns-switch"> <div class="btns-switch">
<el-button @click.native="switchBtn(0)" :class="['btn-item',{'sanjiao':activeItem==0}]">最新消息</el-button> <el-button @click.native="switchBtn(3)" :class="['btn-item',{'sanjiao':activeItem==3}]">最新消息</el-button>
<el-button @click.native="switchBtn(1)" :class="['btn-item',{'sanjiao':activeItem==1}]">关注自己的法院</el-button> <el-button @click.native="switchBtn(1)" :class="['btn-item',{'sanjiao':activeItem==1}]">关注自己的法院</el-button>
</div> </div>
<div style="font-size:12px;color: #999999;"> <div style="font-size:12px;color: #999999;">
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</div> </div>
</div> </div>
<!--今日头条开始--> <!--今日头条开始-->
<div v-if="activeItem==0"> <div v-if="activeItem==3">
<div class="mt-10 mb-5 k-flex k-align-center"> <div class="mt-10 mb-5 k-flex k-align-center">
<img class="mr-5 gong-icon" style="" src="../../assets/home/gonggao.png"></img> <img class="mr-5 gong-icon" style="" src="../../assets/home/gonggao.png"></img>
<div class="gonggao-text"> <div class="gonggao-text">
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</div> --> </div> -->
</div> </div>
<div v-if="activeItem==1" class="mt-10"> <div v-if="activeItem==1" class="mt-10">
<div v-for="(item,index) in newestList" :key="index" class="k-flex k-space-between top-list"> <div v-for="(item,index) in newsConernList" :key="index" class="k-flex k-space-between top-list">
<div class="article-name"> <div class="article-name">
<span class="right-line"> <span class="right-line">
{{item.boardName}} {{item.boardName}}
...@@ -274,6 +274,7 @@ export default { ...@@ -274,6 +274,7 @@ export default {
size:6, size:6,
}, },
newestList:[],//最新消息 newestList:[],//最新消息
newsConernList:[],//关注自己的法院
newsRankList:[],//法院新闻排行 newsRankList:[],//法院新闻排行
newsGanList:[],//干警作品 newsGanList:[],//干警作品
imagesBox:[ imagesBox:[
...@@ -286,7 +287,7 @@ export default { ...@@ -286,7 +287,7 @@ export default {
{id:2,idView:require("../../assets/2.png")}, {id:2,idView:require("../../assets/2.png")},
{id:3,idView:require("../../assets/3.png")}, {id:3,idView:require("../../assets/3.png")},
], ],
activeItem:0, activeItem:3,
topList:[ topList:[
{ {
name:'开展司法教助全集中发放活动尽量克服冠军费德勒冠军费德勒空军航空发货过来会考虑好看', name:'开展司法教助全集中发放活动尽量克服冠军费德勒冠军费德勒空军航空发货过来会考虑好看',
...@@ -450,13 +451,20 @@ export default { ...@@ -450,13 +451,20 @@ export default {
// 法院新闻类型,1本院,2全市,3全区 即最新消息是3 关注是1;fyId是写死的默认高院 // 法院新闻类型,1本院,2全市,3全区 即最新消息是3 关注是1;fyId是写死的默认高院
fyxwfromCourt({fyId:32,page:1,size:10,type:type}).then(res=>{ fyxwfromCourt({fyId:32,page:1,size:10,type:type}).then(res=>{
if(res.success){ if(res.success){
this.newestList=res.data.records; // this.newestList=res.data.records;
this.newestList.forEach(item=>{ res.data.records.forEach(item=>{
// let myDate=new Date(item.newsTime); // let myDate=new Date(item.newsTime);
// (myDate.getMonth()+1)+'-'+myDate.getMonth() // (myDate.getMonth()+1)+'-'+myDate.getMonth()
item.date=(item.newsTime).substring(5,10); item.date=(item.newsTime).substring(5,10);
}) })
console.log('this.newestList==',this.newestList); if(type==3){
this.newestList=res.data.records;
console.log('this.newestList==',this.newestList);
}else if(type==1){
this.newsConernList=res.data.records;
console.log('this.newsConernList==',this.newsConernList);
}
} }
}) })
}, },
...@@ -513,7 +521,7 @@ export default { ...@@ -513,7 +521,7 @@ export default {
switchBtn(i){ switchBtn(i){
console.log('111===', i) console.log('111===', i)
this.activeItem=i; this.activeItem=i;
this.fyxwfromCourt(1); this.fyxwfromCourt(i);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment