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", "version": "0.1.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,

View File

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

View File

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

View File

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