首页行业动态

This commit is contained in:
dzj 2024-06-17 09:40:00 +08:00
parent 63a42b8be0
commit 80080cc0f5

View File

@ -54,6 +54,10 @@
<p style=" color: rgba(115, 115, 124, .6); font-size: 13px; <p style=" color: rgba(115, 115, 124, .6); font-size: 13px;
color: #95959d; color: #95959d;
line-height: 24px; line-height: 24px;
-webkit-line-clamp: 3;
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
text-align: justify;">{{ newsitem.content }} text-align: justify;">{{ newsitem.content }}
</p> </p>
</div> </div>
@ -80,19 +84,37 @@
</div> </div>
<div class="index_2" style="padding-bottom: 75px;width: 80%;margin: 0 auto;"> <div class="index_2" style="padding-bottom: 75px;width: 80%;margin: 0 auto;">
<div style="display: flex;"> <div style="display: flex;">
<div class="content2-left"> <div class="content2-left flow" style="position: relative;">
<div> <div>
<h3>行业动态</h3> <h3>行业动态</h3>
<h6>INDUSTRY TRENDS</h6> <h6>INDUSTRY TRENDS</h6>
</div> </div>
<div class="textbox" v-html="hydata.content"> <div class="textbox" v-html="hydata[index].content">
</div> </div>
<div class="textbox" style="line-height: 26px;width: 80%;-webkit-line-clamp: 5;
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;" >
{{ hydata[textindex].name }}
</div>
<div style="color: skyblue;font-size: 50px;position: absolute;bottom: 0;"><span style="margin-right: 20px;cursor: pointer;" @click="back"><</span><span style="cursor: pointer;" @click="next">></span></div>
</div> </div>
<div class="content2-right" style="cursor: pointer;"> <div class="content2-right" style="cursor: pointer;">
<a :href="hydata.url" target="_blank"> <div ref="swipe" class="swiper-container swiper7" style="height: 300px;">
<img :src="hydata.src" style="width: 100%;object-fit: contain;"> <div class="swiper-wrapper" >
<div class="swiper-slide a" v-for="item in hydata"> <a :href="item.url" target="_blank">
<img :src="item.picture" style="width: 100%;object-fit: contain;">
</a> </a>
</div>
</div>
<div class="swiper-pagination"></div>
<div style="position: relative;">
</div>
</div>
</div> </div>
</div> </div>
@ -194,12 +216,15 @@ import { achievementPic, hyDtai, swiperimg, getnews, backgroundText, smallPictur
export default { export default {
data() { data() {
return { return {
hydata: { src: '' }, index:0,
hydata: [],
imgarr: [], imgarr: [],
achievementarr: [], achievementarr: [],
newsitem: {}, newsitem: {},
bgtextitem: {}, bgtextitem: {},
smallPicturearr: [] smallPicturearr: [],
swipe:null,
textindex:0
} }
}, },
@ -232,9 +257,23 @@ export default {
// //
hyDtai().then((res) => { hyDtai().then((res) => {
this.hydata.src = res.data[0].picture this.hydata=res.data
this.hydata.content = res.data[0].content // this.hydata.src = res.data[0].picture
this.hydata.url=res.data[0].url // 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', {
loop: true,
// autoplay: {
// delay: 4100,
// disableOnInteraction: false,
// },
}
)
})
}) })
// //
smallPicture().then((res) => { smallPicture().then((res) => {
@ -306,6 +345,25 @@ export default {
}, },
methods: { methods: {
next(){
this.swipe.slideNext()
if(this.textindex<this.hydata.length-1){
this.textindex=this.textindex+1
}else{
this.textindex=0
}
},
back(){
this.swipe.slidePrev()
if(this.textindex>0){
this.textindex=this.textindex-1
}else{
this.textindex=this.hydata.length-1
}
},
switchto() { switchto() {
this.$router.push({ this.$router.push({
path: '/aboutus', path: '/aboutus',
@ -559,4 +617,10 @@ h6 {
color: rgba(255, 255, 255, .5); color: rgba(255, 255, 255, .5);
font-weight: bold; font-weight: bold;
} }
.flow{
}
.a::after{
background-color: unset;
}
</style> </style>