Commit d8f3b83e by 莫晓莉

精彩回顾

parent 83de50f3
...@@ -76,3 +76,13 @@ export function fyxwClickRaking(data) { ...@@ -76,3 +76,13 @@ export function fyxwClickRaking(data) {
data, data,
}) })
} }
//精彩回顾
export function highlights(data) {
return request({
url: `websiteCluster/web/highlights`,
method: 'post',
data,
})
}
...@@ -40,7 +40,7 @@ const constantRouterMap = [ ...@@ -40,7 +40,7 @@ const constantRouterMap = [
{ {
path: "/list", path: "/list",
name: 'list', name: 'list',
meta: { title: '工作信息', icon: '' }, meta: { title: '新闻列表', icon: '' },
component: resolve => require(["@/views/list"], resolve), component: resolve => require(["@/views/list"], resolve),
}, },
{ {
......
...@@ -147,42 +147,40 @@ ...@@ -147,42 +147,40 @@
<div class="zone-style"> <div class="zone-style">
<div class="k-flex-between-center"> <div class="k-flex-between-center">
<div class="k-flex k-align-center"> <div class="k-flex k-align-center">
<img <el-image
class="mr-5 gong-icon" class="mr-5 gong-icon"
style="" style=""
src="../../assets/home/gonggao.png" :src="require('../../assets/news/3.png')"
/> ></el-image>
<div>精彩回顾</div> <div>精彩回顾</div>
</div> </div>
<div style="font-size: 12px; color: #999999"> <div style="font-size: 12px; color: #999999">
<span>MORE></span> <span>MORE></span>
</div> </div>
</div> </div>
<div class="mt-10 mb-5 k-flex k-align-center"> <div @click="seeParams(highlightsData[0])" class="mt-10 mb-5 k-flex k-align-center">
<img <img
class="mr-5 gong-icon" class="mr-5 gong-icon"
style="" style=""
src="../../assets/home/gonggao.png" src="../../assets/home/gonggao.png"
/> />
<div class="gonggao-text"> <div class="gonggao-text">
<span>教育整顿进行时</span> <span>{{ highlightsData[0].subject }}</span>
<span <!-- <span v-html="highlightsData[0].content"></span> -->
>鹿心社与自治区级政法机关领导班子成立交付给来访登记过了多久</span
>
</div> </div>
</div> </div>
<div <div
v-for="(item, index) in topList" v-for="item in highlightsData"
:key="index" :key="item.newsId"
class="k-flex k-space-between top-list" class="k-flex k-space-between top-list"
@click="seeParams(item)"> @click="seeParams(item)">
<div class="article-name"> <div class="article-name">
<span class="right-line"> <span class="right-line">
我为群众办实事 {{ item.boardName }}
<span class="line-div"></span> <span class="line-div"></span>
</span> </span>
<span>{{ item.name }}</span> <span>{{item.subject}}</span>
</div> </div>
<div>{{ item.date }}</div> <div>{{ item.date }}</div>
</div> </div>
...@@ -321,12 +319,16 @@ import { removeToken } from "@/utils/auth"; ...@@ -321,12 +319,16 @@ import { removeToken } from "@/utils/auth";
import { createMessage,commentRaking,monthClickRanking } from "@/api/detail"; import { createMessage,commentRaking,monthClickRanking } from "@/api/detail";
// import { getUserInfo } from "@/utils/auth"; // import { getUserInfo } from "@/utils/auth";
import { mapGetters, mapMutations } from "vuex"; import { mapGetters, mapMutations } from "vuex";
import {
highlights,//精彩回顾
} from "@/api/news.js";
export default { export default {
name: "show", name: "show",
data() { data() {
return { return {
highlightsData:[],//精彩回顾集合
commentRankData:[],//本月评论 commentRankData:[],//本月评论
reCommentContent:'',//回复内容 reCommentContent:'',//回复内容
messageDetailData:[],//评论详情 messageDetailData:[],//评论详情
...@@ -411,6 +413,17 @@ export default { ...@@ -411,6 +413,17 @@ export default {
this.breadList=this.$route.matched.filter(item=>item.meta && item.meta.title); this.breadList=this.$route.matched.filter(item=>item.meta && item.meta.title);
console.log('this.breadList==',this.breadList); console.log('this.breadList==',this.breadList);
}, },
// 获取精彩回顾
highlights(){
highlights({page:1,size:5}).then(res=>{
if(res.success){
this.highlightsData=res.data.records;
this.highlightsData.forEach(item=>{
item.date=(item.newsTime).substring(5,10);
})
}
})
},
//本月阅读排行 //本月阅读排行
monthClickRanking(){ monthClickRanking(){
let params={}; let params={};
...@@ -474,6 +487,7 @@ export default { ...@@ -474,6 +487,7 @@ export default {
this.messageDetail(this.$router.history.current.query.newsId);//获取评论详情 this.messageDetail(this.$router.history.current.query.newsId);//获取评论详情
// this.commentRaking();//获取本月评论排行 // this.commentRaking();//获取本月评论排行
this.monthClickRanking();//获取本月阅读排行 this.monthClickRanking();//获取本月阅读排行
this.highlights();//获取精彩回顾
}, },
newsDetailFun(val){ newsDetailFun(val){
newsDetail({newsId:val}).then(res=>{ newsDetail({newsId:val}).then(res=>{
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8" style=""> <el-col :span="8" style="">
<div class="work-tab-list" v-for="(item,index) in WorkButton" :key="index" > <div class="work-tab-list" v-for="(item,index) in WorkButton" :key="index" >
<div class="tab-item" :class="[workActive==index? 'tab-item-active':'']" @click="informationSelection(item,index)"> <div style="font-size:8px;" class="tab-item" :class="[workActive==index? 'tab-item-active':'']" @click="informationSelection(item,index)">
{{item.boardName}} {{item.boardName}}
</div> </div>
...@@ -278,7 +278,8 @@ ...@@ -278,7 +278,8 @@
<el-button @click.native="switchBtnPolice(0)" :class="['btn-item',{'sanjiao':activeItemPolice==0}]">视频点播</el-button> <el-button @click.native="switchBtnPolice(0)" :class="['btn-item',{'sanjiao':activeItemPolice==0}]">视频点播</el-button>
<el-button @click.native="switchBtnPolice(1)" :class="['btn-item',{'sanjiao':activeItemPolice==1}]">全区速递</el-button> <el-button @click.native="switchBtnPolice(1)" :class="['btn-item',{'sanjiao':activeItemPolice==1}]">全区速递</el-button>
</div> </div>
<div style="font-size:12px;color: #999999;"> <!-- 视频点播的id1965 -->
<div @click="toMorelist(1965)" style="font-size:12px;color: #999999;">
<span>MORE></span> <span>MORE></span>
</div> </div>
</div> </div>
...@@ -949,11 +950,12 @@ export default { ...@@ -949,11 +950,12 @@ export default {
margin-top:5px; margin-top:5px;
} }
.work-tab-list .tab-item{ .work-tab-list .tab-item{
padding:7px 0; padding:5px 0;
text-align:center; text-align:center;
background:#ccc; background:#ccc;
cursor: pointer; cursor: pointer;
font-size:10px; // font-size:10px;
font-size:10px !important;
border-radius:5px; border-radius:5px;
color:#fff; color:#fff;
} }
...@@ -1079,9 +1081,8 @@ color:#fff; ...@@ -1079,9 +1081,8 @@ color:#fff;
margin-top:5px; margin-top:5px;
} }
.tab-item{ .tab-item{
// height:45px; // margin: 10px 0;
// line-height:45px; margin: 7px 0;
margin: 10px 0;
padding:10px 0; padding:10px 0;
text-align:center; text-align:center;
background:#ccc; background:#ccc;
......
...@@ -191,19 +191,19 @@ ...@@ -191,19 +191,19 @@
</div> </div>
<el-row class="mt-10 mb-10" :gutter="10"> <el-row class="mt-10 mb-10" :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-image style="" :src="require('../../assets/pic.jpg')"></el-image> <el-image v-if="highlightsData[0].attInfoList[0]" style="" :src="highlightsData[0].attInfoList[0].downloadPath"></el-image>
</el-col :span="12"> </el-col >
<el-col :span="12"> <el-col :span="12">
<div class="re-see"> <div v-if="highlightsData[0]" class="re-see">
结果立刻发动进攻类库的结构来看到付即可购房贷款逛街看到路上经过考虑工具开发架构框架 <!-- 结果立刻发动进攻类库的结构来看到付即可购房贷款逛街看到路上经过考虑工具开发架构框架 -->
<span style="color:red;font-size:10px;">[详细]</span> <div class="hightlight-v" v-html="highlightsData[0].content"></div>
<span @click="setParams(highlightsData[0])" style="color:red;font-size:10px;">[详细]</span>
</div> </div>
</el-col > </el-col >
</el-row> </el-row>
<div v-for="(item,index) in topList" :key="index" class="k-flex k-space-between top-list" @click="setParams(item)"> <div v-for="item in highlightsData" :key="item.newsId" class="k-flex k-space-between top-list" @click="setParams(item)">
<div class="article-name"> <div class="article-name">
<!--<span class="right-line">我为群众办实事</span>--> <span class="right-line">{{item.subject}}</span>
<span class="right-line">{{item.name}}</span>
</div> </div>
<div>{{item.date}}</div> <div>{{item.date}}</div>
</div> </div>
...@@ -260,6 +260,7 @@ ...@@ -260,6 +260,7 @@
import { import {
fyxwfromCourt, //获取法院新闻 fyxwfromCourt, //获取法院新闻
fyxwClickRaking,//法院新闻排行 fyxwClickRaking,//法院新闻排行
highlights,//精彩回顾
} from "@/api/news.js"; } from "@/api/news.js";
import { import {
newsFromBoard, //获取栏目下的新闻列表 newsFromBoard, //获取栏目下的新闻列表
...@@ -269,6 +270,7 @@ import { ...@@ -269,6 +270,7 @@ import {
export default { export default {
data() { data() {
return { return {
highlightsData:[],//精彩回顾集合
activeBtn:1,//新闻分类排行 activeBtn:1,//新闻分类排行
pageInfo:{ pageInfo:{
page:1, page:1,
...@@ -443,6 +445,7 @@ export default { ...@@ -443,6 +445,7 @@ export default {
this.fyxwfromCourt(3);//一加载先获取最新消息 this.fyxwfromCourt(3);//一加载先获取最新消息
this.fyxwClickRaking(1);//获取法院新闻排行 this.fyxwClickRaking(1);//获取法院新闻排行
this.newsFromBoard();//干警作品 this.newsFromBoard();//干警作品
this.highlights();//获取精彩回顾
}, },
methods: { methods: {
...@@ -456,6 +459,17 @@ export default { ...@@ -456,6 +459,17 @@ export default {
}, },
}); });
}, },
// 获取精彩回顾
highlights(){
highlights({page:1,size:5}).then(res=>{
if(res.success){
this.highlightsData=res.data.records;
this.highlightsData.forEach(item=>{
item.date=(item.newsTime).substring(5,10);
})
}
})
},
// 获取最新消息和关注自己法院 // 获取最新消息和关注自己法院
fyxwfromCourt(type){ fyxwfromCourt(type){
...@@ -505,7 +519,7 @@ export default { ...@@ -505,7 +519,7 @@ export default {
if(res.success){ if(res.success){
this.newsRankList=res.data; this.newsRankList=res.data;
this.newsRankList.forEach(item=>{ this.newsRankList.forEach(item=>{
item.date=(item.newsTime).substring(5,10); item.date=(item.newsTime).substring(5,10);
}) })
console.log('this.newsRankList==',this.newsRankList); console.log('this.newsRankList==',this.newsRankList);
} }
...@@ -536,6 +550,7 @@ export default { ...@@ -536,6 +550,7 @@ export default {
}, },
// 查看详情 // 查看详情
setParams(val){ setParams(val){
console.log('val==',val);
this.$router.push({ this.$router.push({
path:'/detail',//跳转路由 path:'/detail',//跳转路由
query:{//参数对象 query:{//参数对象
...@@ -550,6 +565,14 @@ export default { ...@@ -550,6 +565,14 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// 精彩回顾
.hightlight-v{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
::v-deep{ ::v-deep{
// 设置轮播图指示器大小 // 设置轮播图指示器大小
.el-carousel__button{ .el-carousel__button{
......
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