Merge pull request 'Branch_csl' (#1) from Branch_csl into master

Reviewed-on: http://120.46.37.243:3000/cms/feiyang-web/pulls/1
This commit is contained in:
root 2024-08-01 06:28:09 +00:00
commit 8e4760cf5d
4 changed files with 1347 additions and 1202 deletions

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{
"name": "feiyang",
"name": "feiyang-web",
"version": "0.1.0",
"lockfileVersion": 2,
"requires": true,

View File

@ -4,7 +4,7 @@
<div class="bd" style="height: 581px;position: relative;">
<div class="swiper-container swiper5">
<div class="swiper-wrapper" >
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="item in imgarr" :key="item.id"><img :src="item.url"
style="width: 100%;height:100%;"></div>
@ -31,10 +31,11 @@
</div>
<div class="content-right">
<div class="index-top" @click="changeto(indexNew[0]?.id)" style="cursor: pointer;">
<h3 style=" font-size: 24px;
<h3 style="font-size: 24px;
color: #3c3c48;
color: rgba(60, 60, 72, .8);
line-height: 30px;">{{indexNew[0]?.subTitle||'' }}</h3>
line-height: 30px;">{{indexNew[0]?.subTitle||'' }}
</h3>
<div style=" color: rgba(115, 115, 124, .6); font-size: 13px;
color: #95959d;
@ -44,7 +45,6 @@
overflow: hidden;
-webkit-box-orient: vertical;
text-align: justify;" v-html=" indexNew[0]?.subContent||''">
</div>
</div>
<div style="overflow: hidden;">
@ -70,25 +70,30 @@
</div>
<div class="index_1" style="width: 80%;margin: 0 auto;padding: 85px 0;">
<div class="content-top">
<div class="content-left">
<div class="content-left" style=" padding-right: 36px; position: relative;">
<h3>{{newscatagary[1]?.name}}</h3>
<h6>{{newscatagary[1]?.enName}}</h6>
<h3 style="font-size: 14.5px; color: #293d48;">{{ indexinfo[textindex]?.subTitle }}</h3>
<h5 style=" color: #8e8e95;margin-top: 18px;font-size: 100%;font-weight: normal;line-height: 22px;">{{ indexinfo[textindex]?.subContent }}</h5>
<h3 style="margin-top:15px;font-size: 14.5px; color: #293d48;">
{{ indexinfo[textindex]?.subTitle }}</h3>
<h5
style=" color: #8e8e95;margin-top: 18px;font-size: 100%;font-weight: normal;line-height: 22px;">
{{ indexinfo[textindex]?.subContent }}
</h5>
<div style="width: 50%;"></div>
<div class="swiper-button-prev" @click="back"></div><!--左箭头如果放置在swiper外面需要自定义样式-->
<div class="swiper-button-next" @click="next"></div><!--右箭头如果放置在swiper外面需要自定义样式-->
</div>
<div class="content-right">
<div class="swiper-container swiper6">
<div class="swiper-wrapper" >
<div class="swiper-slide yanshi" v-for="item in indexinfo" :key="item.id"><img :src="item.pic"
style="width: 851px;height:320px;cursor: pointer;" @click="routerTo(item.id)"></div>
<div class="swiper-wrapper">
<div class="swiper-slide yanshi" v-for="item in indexinfo" :key="item.id"><img
:src="item.pic" style="width: 100%;height:320px;cursor: pointer;"
@click="routerTo(item.id)"></div>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-prev" @click="back"></div><!--左箭头如果放置在swiper外面需要自定义样式-->
<div class="swiper-button-next" @click="next"></div><!--右箭头如果放置在swiper外面需要自定义样式-->
</div>
@ -120,10 +125,14 @@
z-index: 2;
width: 80vw;">
<div class="swiper2" style="max-width: 80vw;overflow: hidden;height: 100%;">
<div class="swiper-wrapper swiper9" >
<div class="swiper-wrapper swiper9">
<div class="swiper-slide" style="cursor: pointer;height: 316px;" v-for="item in smallPicturearr" :key="item.id" v-if="item.state=='true'" @click="projecto(item.id)" >
<img :src="item.picture" style=" width: 100%;height:100%;margin: auto;border-radius: 5%;"></div>
<div class="swiper-slide" style="cursor: pointer;height: 316px;"
v-for="item in smallPicturearr" :key="item.id" v-if="item.state=='true'"
@click="projecto(item.id)">
<img :src="item.picture"
style=" width: 100%;height:100%;margin: auto;border-radius: 5%;">
</div>
</div>
<div class="swiper-pagination2" style="text-align: center;"></div>
@ -151,7 +160,8 @@
<!-- <h3></h3> -->
<h5 style="line-height: 20px;">
{{componydata[0]?.content}}<span style="color:RGB(48, 113, 183);float: right;font-weight: bold;cursor: pointer;"
{{componydata[0]?.content}}<span
style="color:RGB(48, 113, 183);float: right;font-weight: bold;cursor: pointer;"
@click="switchto">MORE...</span>
</h5>
<!-- <h5></h5> -->
@ -165,10 +175,11 @@
<div style="max-width: 80vw;overflow: hidden;height: 100%;margin: auto;">
<div class="swiper3">
<div class="swiper-wrapper swiper9">
<div class="swiper-slide" v-for="item in achievementarr" :key="item.id" v-if="item.state=='true'"
@click="honorto(item.id)"
<div class="swiper-slide" v-for="item in achievementarr" :key="item.id"
v-if="item.state=='true'" @click="honorto(item.id)"
style="background-color: rgb(240,246,250);border-radius: 10px;padding: 20px;box-sizing: border-box;cursor: pointer;">
<img :src="item.picture" style=" height:239px ;margin: auto;display: block;"></div>
<img :src="item.picture" style=" height:239px ;margin: auto;display: block;">
</div>
</div>
<div class="swiper-pagination1" style="text-align: center;"></div>
@ -181,29 +192,40 @@
</template>
<script>
// @ is an alias to /src
// import Swiper from 'swiper';
// @ is an alias to /src
// import Swiper from 'swiper';
import Swiper from 'swiper'
import 'swiper/css/swiper.min.css'
import { achievementPic,NewCategary, hyDtai, swiperimg, backgroundText, smallPicture,honor,componyhonor,indexNews,indexInformation } from '@/api'
export default {
import Swiper from 'swiper'
import 'swiper/css/swiper.min.css'
import {
achievementPic,
NewCategary,
hyDtai,
swiperimg,
backgroundText,
smallPicture,
honor,
componyhonor,
indexNews,
indexInformation
} from '@/api'
export default {
data() {
return {
index:0,
index: 0,
hydata: [],
imgarr: ['','',''],
imgarr: ['', '', ''],
achievementarr: [],
newsitem: {},
bgtextitem: {},
smallPicturearr: [],
swipe:null,
textindex:0,
componydata:[],
newscatagary:[],
indexNew:[],
indexinfo:[]
swipe: null,
textindex: 0,
componydata: [],
newscatagary: [],
indexNew: [],
indexinfo: []
}
},
@ -230,23 +252,22 @@ export default {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
}
)
})
})
})
//
hyDtai().then((res) => {
this.hydata=res.data
this.hydata = res.data
// this.hydata.src = res.data[0].picture
// this.hydata.content = res.data[0].content
// this.hydata.url=res.data[0].url
// this.hydata.name=res.data[0].name
this.$nextTick(() => {
this.swipe= new Swiper('.swiper7', {
this.swipe = new Swiper('.swiper7', {
loop: true,
allowTouchMove:false,
allowTouchMove: false,
// autoplay: {
// delay: 4100,
// disableOnInteraction: false,
@ -256,16 +277,15 @@ export default {
prevEl: '.swiper-button-prev',
},
}
)
})
})
})
//
smallPicture().then((res) => {
let newarr= res.data.filter((item)=>{
return item.state=='true'
let newarr = res.data.filter((item) => {
return item.state == 'true'
})
this.smallPicturearr = newarr
@ -281,7 +301,9 @@ export default {
})
})
//
honor({'year':'all'}).then((res) => {
honor({
'year': 'all'
}).then((res) => {
this.achievementarr = res.data
this.$nextTick(() => {
new Swiper('.swiper3', {
@ -306,14 +328,16 @@ export default {
this.bgtextitem = res.data[0]
}),
componyhonor().then((res)=>{
this.componydata=res.data
componyhonor().then((res) => {
this.componydata = res.data
})
NewCategary().then((res)=>{
this.newscatagary=res.data
NewCategary().then((res) => {
this.newscatagary = res.data
indexInformation({articleType:res.data[1]?.name}).then((res)=>{
this.indexinfo=res.data
indexInformation({
articleType: res.data[1]?.name
}).then((res) => {
this.indexinfo = res.data
this.$nextTick(() => {
new Swiper('.swiper6', {
loop: true,
@ -333,9 +357,11 @@ export default {
})
})
})
indexNews({articleType:res.data[0]?.name}).then((res)=>{
indexNews({
articleType: res.data[0]?.name
}).then((res) => {
console.log(1111)
this.indexNew=res.data
this.indexNew = res.data
})
})
@ -366,20 +392,20 @@ export default {
next(){
next() {
// if(this.textindex<this.hydata.length-1){
// this.textindex=this.textindex+1
// }else{
// this.textindex=0
// }
if(this.textindex>=this.indexinfo.length-1){
if (this.textindex >= this.indexinfo.length - 1) {
this.textindex = 0
}else{
this.textindex=this.textindex+1
} else {
this.textindex = this.textindex + 1
}
},
back(){
back() {
// if(this.textindex>0){
// this.textindex=this.textindex-1
@ -387,16 +413,18 @@ export default {
// this.textindex=this.hydata.length-1
// }
this.textindex=this.textindex-1
if(this.textindex<0){
this.textindex= this.indexinfo.length-1
this.textindex = this.textindex - 1
if (this.textindex < 0) {
this.textindex = this.indexinfo.length - 1
}
},
switchto() {
this.$router.push({
path: '/aboutus',
query:{'category':'honor'}
query: {
'category': 'honor'
}
})
},
changeto(id) {
@ -413,25 +441,25 @@ export default {
}
},
routerTo(id){
routerTo(id) {
if (id) {
this.$router.push({
this.$router.push({
path: '/detail?type=1&id=' + id
})
} else {
console.log(id)
this.$router.push({
})
} else {
console.log(id)
this.$router.push({
path: '/news'
})
}
})
}
},
honorto(id){
honorto(id) {
this.$router.push({
path: '/honordetail?id=' + id
})
},
projecto(id){
projecto(id) {
this.$router.push({
path: '/projectdetail?id=' + id
})
@ -446,11 +474,10 @@ this.$router.push({
// });
// }
}
}
}
</script>
<style scoped>
.banner {
.banner {
width: 100%;
margin: 0 auto !important;
overflow: hidden;
@ -461,45 +488,45 @@ this.$router.push({
left: 0;
right: 0;
background-color: black;
}
}
.banner .bd {
.banner .bd {
width: 100%;
}
}
.Wrapper {
.Wrapper {
position: relative;
background-color: #fff;
z-index: 100;
}
}
.content {
.content {
width: 1280px;
margin: 0 auto;
}
}
/* 样式可根据需求自定义 */
.swiper-container {
/* 样式可根据需求自定义 */
.swiper-container {
width: 100%;
height: 100%;
}
}
.swiper-slide1 {
.swiper-slide1 {
min-width: calc(26.66666vw - 14px);
max-width: calc(26.66666vw - 14px);
margin-right: 14px;
}
}
.swiper-slide2 {
.swiper-slide2 {
width: 100%;
}
}
.swiper-slide::after {
.swiper-slide::after {
content: '';
left: 0px;
position: absolute;
@ -508,22 +535,22 @@ this.$router.push({
height: 4px;
background-color: #DDCAB8;
transition: width ease-in-out 4s;
}
}
.swiper-slide-active::after {
.swiper-slide-active::after {
width: 100%;
}
}
h3 {
h3 {
font-size: 30px;
color: RGB(48, 113, 183);
line-height: 1;
font-weight: lighter;
margin-bottom: 9px;
font-weight: 400;
}
}
h6 {
h6 {
font-family: 'Rajdhani';
font-size: 15px;
color: #c0a988;
@ -531,17 +558,17 @@ h6 {
text-transform: uppercase;
font-weight: bold;
margin: 0;
}
}
.content-left {
.content-left {
width: 33.5%;
}
}
.content-right {
.content-right {
width: 66%;
}
}
.shares h5 {
.shares h5 {
font-family: 'Rajdhani';
font-size: 20px;
color: #474747;
@ -552,10 +579,10 @@ h6 {
padding-left: 12px;
margin-left: 14px;
display: inline-block;
}
}
.shares h5:before {
.shares h5:before {
content: '';
width: 2px;
height: 30px;
@ -563,77 +590,77 @@ h6 {
position: absolute;
left: 0;
top: 8px;
}
}
.index-top {
.index-top {
position: relative;
padding-bottom: 24px;
margin-bottom: 24px;
border-bottom: 2px solid #c9c9c9;
border-bottom: 2px solid rgba(201, 201, 201, .5);
}
}
.content-top {
.content-top {
display: flex;
}
}
.content2-left {
.content2-left {
padding-top: 14px;
width: 33%;
}
}
.content2-left .textbox h3 {
.content2-left .textbox h3 {
font-size: 14.5px;
color: #293d48
}
}
.content2-left .textbox h5 {
.content2-left .textbox h5 {
color: #8e8e95;
margin-top: 18px;
font-weight: normal;
}
}
.content2-right {
.content2-right {
width: 66.5%;
float: right;
}
}
.index_3 {
.index_3 {
padding-top: 140px;
width: 100%;
height: 604px;
background-attachment: fixed;
background-size: cover;
}
}
.tiltle h3 {
.tiltle h3 {
font-size: 48px;
color: RGB(48, 113, 183);
line-height: 60px;
margin-top: 48px;
margin-bottom: 14px;
font-weight: lighter;
}
}
.tiltle p {
.tiltle p {
font-size: 16px;
line-height: 24px;
color: rgba(255, 255, 255, .5);
font-weight: bold;
}
}
.swiper9 .swiper-slide::after {
.swiper9 .swiper-slide::after {
all: initial
}
}
.swiper-slide9 img {
.swiper-slide9 img {
width: 100%;
}
}
.dot_box .i {
.dot_box .i {
display: inline-block;
width: 6px;
height: 6px;
@ -641,31 +668,48 @@ h6 {
background-color: RGB(48, 113, 183);
border-radius: 50%;
margin: 0 2px;
}
}
.text {
.text {
font-size: 14.5px;
color: RGB(48, 113, 183);
display: inline-block;
}
}
.init p {
.init p {
margin: 0 !important;
}
}
.init2 {
.init2 {
font-size: 16px;
line-height: 24px;
color: rgba(255, 255, 255, .5);
font-weight: bold;
}
.flow{
}
}
.a::after{
.flow {}
.a::after {
background-color: unset;
}
.yanshi::after{
}
.yanshi::after {
width: 0px !important;
}
}
.swiper-button-prev,
.swiper-container-rtl .swiper-button-next {
left: 10px;
right: auto;
top: auto;
bottom: 0 !important;
}
.swiper-button-next,
.swiper-container-rtl .swiper-button-prev {
right: 36px;
left: auto;
top: auto;
bottom: 0 !important;
}
</style>

View File

@ -8,7 +8,7 @@
<a style="padding: 0;" href="news">新闻内容</a> <a href="javascript:;">企业新闻</a>
</div>
<div class="list" style="bottom:-15px">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName">
<el-tab-pane label="新闻详情" name="first"></el-tab-pane>
</el-tabs>
@ -26,113 +26,165 @@
<div class="divider "></div>
<div class="cont" v-html="content"></div>
</div>
<div style="width: 80%;margin: auto;text-align: right; color: #333;font-weight: bold;font-size: 14px;cursor: pointer;" @click="changeto">返回列表</div>
<div class="xk" @click="changeto">返回列表</div>
<div class="black">
<div class="black-sub" @click="changetoUS(upId)"> <span v-if="upId">< 上一篇</span> </div>
<div class="black-top" @click="changetoUS(downId)"> <span v-if="downId">下一篇 ></span> </div>
</div>
<div class="con">
</div>
</div>
</div>
</template>
<script>
import { newsdetail,msgdetail } from '@/api';
// import 'react-quill/dist/quill.snow.css';
import {
newsdetail,
msgdetail
} from '@/api';
// import 'react-quill/dist/quill.snow.css';
export default{
data(){
return{
name:'',
content:'',
time:''
export default {
data() {
return {
activeName:'企业新闻',
name: '',
content: '',
time: '',
upId:'',//
downId:''//
}
},
methods:{
changeto(){
this.$router.push({path:'news'})
}
watch:{
'$route'(to, from){
this.kk();
}
},
mounted(){
// 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
methods: {
changetoUS(id){
// if(this.activeName==''){
this.$router.push({
path:'/detail?type='+this.activeName+'&&id='+id
})
}
,
changeto() {
this.$router.push({
path: 'news'
})
},
kk(){
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
this.downId = res.data.downId//
this.upId = res.data.upId//
})
// }else{
// newsdetail({id:this.$route.query.id}).then((res)=>{
// this.content=res.data.content
// this.name=res.data.name
// this.time=res.data.releaseTime
// })
// }
}
},
}
mounted() {
this.kk();
}
}
</script>
<style scoped>
.xk {
width: 80%;
margin: auto;
text-align: right;
color: #333;
font-weight: bold;
font-size: 14px;
cursor: pointer;
}
.black {
width: 80%;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
}
.black>div {
cursor: pointer;
}
.black-sub {}
.divider {
width: 100%;
height: 3px;
/* background-color: #0059a7; */
position: static;
margin-bottom: 28px;
}
.name {
}
.name {
font-size: 30px;
color: #0007a9;
color: rgba(0, 7, 169, .8);
line-height: 36px;
}
.news_d {
}
.news_d {
padding: 60px 0 90px;
overflow: hidden;
}
.Wrapper {
}
.Wrapper {
position: relative;
background-color: #fff;
z-index: 100;
}
/* .news_d .name {
}
/* .news_d .name {
font-size: 30px;
color: #0007a9;
color: rgba(0, 7, 169, .8);
line-height: 36px;
} */
::v-deep .el-tabs__item {
::v-deep .el-tabs__item {
color: rgba(255, 255, 255, 0.8);
border: none;
}
color: rgba(255, 255, 255, 0.8);
border: none;
}
::v-deep .el-tabs__nav-wrap::after {
background-color: transparent;
}
.news_d .con p {
::v-deep .el-tabs__nav-wrap::after {
background-color: transparent;
}
.news_d .con p {
font-size: 14.5px;
color: #8e8e95;
line-height: 26px;
margin-bottom: 26px;
text-align: justify;
}
}
.compbg {
.compbg {
background-image: url('../assets/images/banner.png');
}
}
.page_ban {
.page_ban {
height: 404px;
position: relative;
text-align: center;
z-index: 101;
}
}
.page_ban .img {
.page_ban .img {
width: 100%;
height: 100%;
@ -141,14 +193,17 @@ background-color: transparent;
left: 0;
top: 0;
z-index: -1;
}
.top-box{
}
.top-box {
margin: 16px 0 30px;
}
::v-deep .ql-editor{
}
::v-deep .ql-editor {
white-space: normal;
}
.date{
}
.date {
font-size: 26px;
color: #dfd4c3;
@ -157,38 +212,41 @@ background-color: transparent;
bottom: 20px;
padding: 0 30px;
width: 100%;
}
.page_ban .content {
}
.page_ban .content {
position: relative;
height: 100%;
}
.content {
}
.content {
width: 80%;
margin: 0 auto;
}
}
.page_nav {
.page_nav {
width: 100%;
position: absolute;
left: 0;
bottom: 0;
}
div,
li {
}
div,
li {
box-sizing: border-box;
}
}
.page_nav .name {
.page_nav .name {
float: left;
}
}
.page_nav .list {
.page_nav .list {
position: relative;
float: right;
margin-right: -35px;
}
}
.page_nav a {
.page_nav a {
float: left;
line-height: 76px;
position: relative;
@ -197,26 +255,26 @@ li {
color: white;
font-weight: bold;
text-decoration: none;
}
}
.page_nav .name a {
.page_nav .name a {
padding-left: 30px;
/* background: url() no-repeat left 30px; */
}
}
.page_nav .list {
.page_nav .list {
position: relative;
float: right;
margin-right: -35px;
}
}
.page_nav .list a {
.page_nav .list a {
color: #e7dfd2;
color: rgba(231, 223, 210, .7);
margin-right: 35px;
}
}
.page_nav a {
.page_nav a {
float: left;
line-height: 76px;
position: relative;
@ -224,8 +282,12 @@ li {
color: rgba(255, 255, 255, 0.8);
font-weight: bold;
}
/* .cont >>> img{
}
.dwlwt{
cursor: not-allowed !important;
pointer-events:none;
}
/* .cont >>> img{
max-width: 500px;
} */
</style>

View File

@ -22,24 +22,29 @@
<div style="width: 80%;margin: auto;">
<el-row style="display: flex;flex-wrap: wrap;">
<el-col :span="8" v-for="item in newshow" :key="item.id" class="colitem" style="cursor: pointer;" >
<el-col :span="8" v-for="item in newshow" :key="item.id" class="colitem" style="cursor: pointer;">
<div @click="changeto(item.id)">
<el-card :body-style="{ padding: '0px' }" >
<div class="card_img1 mark" :style="{ 'background-image': 'url(' + item.pic + ')' }" >
<el-card :body-style="{ padding: '0px' }">
<div class="card_img1 mark" :style="{ 'background-image': 'url(' + item.pic + ')' }">
<!-- <div class="date">{{item.releaseTime}}</div> -->
</div>
<div>
<div class="news_li_con"><div class="title">{{item.name}}</div> <div class="introduction" v-html="item.content"></div> </div>
<div class="news_li_con">
<div class="title">{{item.name}}</div>
<div class="introduction" v-html="item.content"></div>
</div>
</div>
</el-card>
</div>
</div>
</el-col>
</el-row>
</el-row>
</div>
<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="" style=" margin-left: 35px;overflow: hidden;">
<div style=" font-size: 18px;
@ -47,7 +52,7 @@
font-weight: bold;
margin-top: 15px;">
{{item.name}}
</div>
</div>
<!-- <div style="font-size: 14px;
margin-top: 7px;
color: #ababab;">
@ -61,108 +66,118 @@
-webkit-box-orient:vertical;
margin-top: 10px;" v-html="item.content">
</div>
</div>
</div>
</div>
</div>
<div style="height: 40px;"></div>
<div class="page_more wow fadeInUp animated" data-wow-delay=".2s" id="More" style="visibility: visible; animation-delay: 0.2s; animation-name: fadeInUp;" @click="addnews">
<div class="page_more wow fadeInUp animated" data-wow-delay=".2s" id="More"
style="visibility: visible; animation-delay: 0.2s; animation-name: fadeInUp;" @click="addnews">
<em>更多新闻</em>
</div>
<div style="height: 60px;"></div>
</div>
</div>
</div>
</template>
<script>
import '@/assets/images/news1.png'
import { getnews,getmsg,NewCategary} from '@/api';
import { Loading } from 'element-ui';
export default{
data(){
return{
activeName:'企业新闻',
newshow:[],
rest:[],
newslist:[],
newscatagary:[],
page:0,
content:''
import '@/assets/images/news1.png'
import {
getnews,
getmsg,
NewCategary
} from '@/api';
import {
Loading
} from 'element-ui';
export default {
data() {
return {
activeName: '企业新闻',
newshow: [],
rest: [],
newslist: [],
newscatagary: [],
page: 0,
content: ''
}
},
mounted(){
mounted() {
let loadingInstance = Loading.service('loading');
NewCategary().then((res)=>{
this.newscatagary=res.data
})
getnews({'page':0,'articleType':this.activeName}).then((res)=>{
NewCategary().then((res) => {
this.newscatagary = res.data
})
getnews({
'page': 0,
'articleType': this.activeName
}).then((res) => {
loadingInstance.close();
// richText
res.data.content.forEach(item => {
//
item.content = item.content?.replace(/<[^>]+>/g, '').trim();
});
this.newslist=res.data.content
let arr=this.newslist.slice(0,3)
this.newshow=arr
loadingInstance.close();
});
this.newslist = res.data.content
let arr = this.newslist.slice(0, 3)
this.newshow = arr
})
},
methods:{
methods: {
handleClick(){
handleClick() {
this.page = 0;
console.log(1111)
this.rest=[]
this.rest = []
let loadingInstance = Loading.service('loading');
// if(this.activeName==''){
getmsg({'page':0,'articleType':this.activeName}).then((res)=>{
getmsg({
'page': 0,
'articleType': this.activeName
}).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)
this.newshow=arr
let arr = this.newslist.slice(0, 3)
this.newshow = arr
loadingInstance.close();
})
// }else if(this.activeName==''){
// getnews({'page':0,'articleType':activeName}).then((res)=>{
// }else if(this.activeName==''){
// getnews({'page':0,'articleType':activeName}).then((res)=>{
// res.data.content.forEach(item => {
// res.data.content.forEach(item => {
// item.content = item.content?.replace(/<[^>]+>/g, '').trim();
// });
// this.newslist=res.data.content
// item.content = item.content?.replace(/<[^>]+>/g, '').trim();
// });
// this.newslist=res.data.content
// let arr=this.newslist.slice(0,3)
// let arr=this.newslist.slice(0,3)
// this.newshow=arr
// loadingInstance.close();
// })
// }
// this.newshow=arr
// loadingInstance.close();
// })
// }
},
addnews(){
this.page=this.page+1
addnews() {
this.page = this.page + 1
// if(this.activeName==''){
getmsg({'page':this.page,'articleType':this.activeName}).then((res)=>{
getmsg({
'page': this.page,
'articleType': this.activeName
}).then((res) => {
// console.log(res)
for(let i=0;i<res.data.content.length;i++){
res.data.content[i].content= res.data.content[i].content?.replace(/<[^>]+>/g, '').trim();
for (let i = 0; i < res.data.content.length; i++) {
res.data.content[i].content = res.data.content[i].content?.replace(/<[^>]+>/g, '').trim();
res.data.content[i].day=res.data.content[i].releaseTime.slice(-2)
res.data.content[i].year=res.data.content[i].releaseTime.slice(0,7)
res.data.content[i].day = res.data.content[i].releaseTime.slice(-2)
res.data.content[i].year = res.data.content[i].releaseTime.slice(0, 7)
this.rest.push(res.data.content[i])
}
@ -182,10 +197,10 @@ export default{
// }
},
changeto(id){
changeto(id) {
// if(this.activeName==''){
this.$router.push({
path:'/detail?type='+this.activeName+'&&id='+id
path: '/detail?type=' + this.activeName + '&&id=' + id
})
// }else if(this.activeName==''){
// this.$router.push({
@ -194,22 +209,22 @@ export default{
// }
}
}
}
}
}
</script>
<style scoped>
.compbg {
.compbg {
background-image: url('../assets/images/banner.png');
}
}
.page_ban {
.page_ban {
height: 404px;
position: relative;
text-align: center;
z-index: 101;
}
}
.page_ban .img {
.page_ban .img {
width: 100%;
height: 100%;
@ -218,8 +233,9 @@ export default{
left: 0;
top: 0;
z-index: -1;
}
.date{
}
.date {
font-size: 26px;
color: #dfd4c3;
@ -229,38 +245,41 @@ export default{
bottom: 20px;
padding: 0 30px;
width: 100%;
}
.page_ban .content {
}
.page_ban .content {
position: relative;
height: 100%;
}
.content {
}
.content {
width: 80%;
margin: 0 auto;
}
}
.page_nav {
.page_nav {
width: 100%;
position: absolute;
left: 0;
bottom: 0;
}
div,
li {
}
div,
li {
box-sizing: border-box;
}
}
.page_nav .name {
.page_nav .name {
float: left;
}
}
.page_nav .list {
.page_nav .list {
position: relative;
float: right;
margin-right: -35px;
}
}
.page_nav a {
.page_nav a {
float: left;
line-height: 76px;
position: relative;
@ -269,26 +288,26 @@ li {
color: white;
font-weight: bold;
text-decoration: none;
}
}
.page_nav .name a {
.page_nav .name a {
padding-left: 30px;
/* background: url() no-repeat left 30px; */
}
}
.page_nav .list {
.page_nav .list {
position: relative;
float: right;
margin-right: -35px;
}
}
.page_nav .list a {
.page_nav .list a {
color: #e7dfd2;
color: rgba(231, 223, 210, .7);
margin-right: 35px;
}
}
.page_nav a {
.page_nav a {
float: left;
line-height: 76px;
position: relative;
@ -296,27 +315,28 @@ li {
color: rgba(255, 255, 255, 0.8);
font-weight: bold;
}
}
.page_nav .inner_bor {
.page_nav .inner_bor {
height: 4px;
background: #f23c39;
position: absolute;
bottom: -4px;
left: 0;
display: block;
}
}
::v-deep .el-tabs__item {
::v-deep .el-tabs__item {
color: rgba(255, 255, 255, 0.8);
border: none;
}
}
::v-deep .el-tabs__nav-wrap::after {
::v-deep .el-tabs__nav-wrap::after {
background-color: transparent;
}
.card_img1{
}
.card_img1 {
border-radius: 14px;
position: relative;
@ -326,8 +346,9 @@ li {
background-size: cover;
margin-bottom: 16px;
border-radius: 14px;
}
.card_img2{
}
.card_img2 {
border-radius: 14px;
background-image: url('../assets/images/news2.png');
position: relative;
@ -337,8 +358,9 @@ li {
background-size: cover;
margin-bottom: 16px;
border-radius: 14px;
}
.card_img3{
}
.card_img3 {
border-radius: 14px;
background-image: url('../assets/images/news3.png');
position: relative;
@ -348,12 +370,14 @@ li {
background-size: cover;
margin-bottom: 16px;
border-radius: 14px;
}
.colitem{
display: inline-block;
float: none;
}
.mark::before{
}
.colitem {
display: inline-block;
float: none;
}
.mark::before {
content: '';
width: 100%;
@ -363,34 +387,39 @@ float: none;
bottom: 0;
left: 0;
opacity: .25;
filter: alpha(opacity = 25);
-webkit-filter: alpha(opacity = 25);
filter: alpha(opacity=25);
-webkit-filter: alpha(opacity=25);
border-radius: 14px;
}
::v-deep .el-card.is-always-shadow{
}
::v-deep .el-card.is-always-shadow {
border-radius: 14px;
box-shadow: initial;
}
::v-deep el-card{
border:none
}
.news_li_con {
}
::v-deep el-card {
border: none
}
.news_li_con {
position: relative;
padding-left: 28px;
height: 150px;
overflow: hidden;
}
padding-left: 28px;
height: 150px;
overflow: hidden;
}
.news_li_con:before {
content: '';
width: 6px;
height: 21px;
background-color: rgb(48,113,183);
background-color: rgb(48, 113, 183);
position: absolute;
top: 4px;
left: 0;
}
.title {
}
.title {
font-size: 22px;
color: #3c3c48;
color: rgba(60, 60, 72, .7);
@ -405,7 +434,8 @@ overflow: hidden;
-moz-transition: all .4s;
-ms-transition: all .4s;
-o-transition: all .4s;
}
}
.introduction {
min-height: 72px;
font-size: 14.5px;
@ -417,23 +447,27 @@ overflow: hidden;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
}
.more {
position:absolute;
position: absolute;
bottom: 0;
font-size: 18px;
color: #3958cd;
line-height: 1;
text-transform: uppercase;
letter-spacing: -.4px;
}
div{
}
div {
box-sizing: border-box;
}
.el-col{
}
.el-col {
padding: 0px 8px;
}
.newsitem::before{
}
.newsitem::before {
content: '';
width: 100%;
height: 2px;
@ -441,16 +475,18 @@ div{
position: absolute;
bottom: 0;
left: 0;
}
.newsitem .date1{
}
.newsitem .date1 {
width: 236px;
float: left;
font-family: 'Rajdhani';
font-size: 26px;
color: rgb(48,113,183);
color: rgb(48, 113, 183);
line-height: 1;
}
.title1{
}
.title1 {
font-size: 20px;
color: #3c3c48;
color: rgba(60, 60, 72, .7);
@ -466,8 +502,9 @@ div{
-moz-transition: all .4s;
-ms-transition: all .4s;
-o-transition: all .4s;
}
.newsitem .introduction1{
}
.newsitem .introduction1 {
font-size: 14.5px;
color: #848484;
color: rgba(132, 132, 132, .7);
@ -476,13 +513,14 @@ div{
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.page_more {
}
.page_more {
position: relative;
font-size: 18px;
color: #ffffff;
line-height: 70px;
background-color: rgb(48,113,183);
background-color: rgb(48, 113, 183);
text-align: center;
cursor: pointer;
border-radius: 14px;
@ -490,8 +528,9 @@ div{
-moz-border-radius: 14px;
-ms-border-radius: 14px;
-o-border-radius: 14px;
}
::v-deep .el-card{
}
::v-deep .el-card {
border: none;
}
}
</style>