This commit is contained in:
dzj 2024-05-29 17:59:21 +08:00
parent 55559a557d
commit 76e8ba8c5d
3 changed files with 20 additions and 9 deletions

View File

@ -166,6 +166,9 @@
</div> </div>
<div v-if="!honorList.length" style="height: 400px;display: flex;justify-content: center;align-items: center;">
<div style="color: #999;">该年份暂无内容展示</div>
</div>
</div> </div>
<div v-show="activeName == 'fourth'" style="margin-bottom: -50px;"> <div v-show="activeName == 'fourth'" style="margin-bottom: -50px;">
<div style="height: 50px;"></div> <div style="height: 50px;"></div>

View File

@ -38,7 +38,7 @@
<div style="width: 80%;margin: auto;"> <div style="width: 80%;margin: auto;">
<div v-for="item in rest" class="newsitem" style="overflow: hidden; padding: 30px 0 24px;position: relative;cursor: pointer;display: flex;" @click="changeto(item.id)"> <div v-for="item in rest" class="newsitem" style="overflow: hidden; padding: 30px 0 24px;position: relative;cursor: pointer;display: flex;" @click="changeto(item.id)">
<div class="date1" style=""><img :src="item.pic" style="width: 236px;height: 157px;"></img></div> <div class="date1" style=""><img :src="item.pic" style="width: 236px;height: 157px;"></img></div>
<div class="" style=" width: 65%;margin-left: 35px;"> <div class="" style=" width: 65%;margin-left: 35px;overflow: hidden;">
<div style=" font-size: 18px; <div style=" font-size: 18px;
color: #000; color: #000;
font-weight: bold; font-weight: bold;
@ -53,8 +53,10 @@
<div style="font-size: 14px; <div style="font-size: 14px;
color: #666666; color: #666666;
margin-top: 10px;"> height: 79px;
{{item.source}} -webkit-box-orient:vertical;
margin-top: 10px;" v-html="item.content">
</div> </div>
</div> </div>
</div> </div>
@ -82,15 +84,17 @@ export default{
}, },
mounted(){ mounted(){
getnews({'page':0}).then((res)=>{ getnews({'page':0}).then((res)=>{
// richText
res.data.content.forEach(item => {
//
item.content = item.content.replace(/<[^>]+>/g, '').trim();
});
this.newslist=res.data.content this.newslist=res.data.content
let arr=this.newslist.slice(0,3) let arr=this.newslist.slice(0,3)
// richText
arr.forEach(item => {
//
item.content = item.content.replace(/<[^>]+>/g, '').trim();
});
this.newshow=arr this.newshow=arr
}) })

View File

@ -52,7 +52,7 @@ export default{
return{ return{
activeName:'first', activeName:'first',
radio3:'1', radio3:'1',
PrijectList:[], PrijectList:[{},{},{},{},{},{}],
total:40, total:40,
params: { params: {
type: '房屋建筑', type: '房屋建筑',
@ -268,6 +268,10 @@ li {
.l { .l {
float: left; float: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 90%;
} }
b, strong { b, strong {
font-weight: 700; font-weight: 700;