From 80080cc0f5b3cffe193ad33c16d91cdcf3d33dd9 Mon Sep 17 00:00:00 2001 From: dzj <1140318653@qq.com> Date: Mon, 17 Jun 2024 09:40:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=A1=8C=E4=B8=9A=E5=8A=A8?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/HomeView.vue | 84 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index df94179..19ff21f 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -54,6 +54,10 @@

{{ newsitem.content }}

@@ -80,19 +84,37 @@
-
+

行业动态

INDUSTRY TRENDS
-
- +
+
+
+ {{ hydata[textindex].name }} +
+
<>
- - +
+ +
+
+ +
+
+
@@ -194,12 +216,15 @@ import { achievementPic, hyDtai, swiperimg, getnews, backgroundText, smallPictur export default { data() { return { - hydata: { src: '' }, + index:0, + hydata: [], imgarr: [], achievementarr: [], newsitem: {}, bgtextitem: {}, - smallPicturearr: [] + smallPicturearr: [], + swipe:null, + textindex:0 } }, @@ -232,9 +257,23 @@ export default { //行业动态 hyDtai().then((res) => { - this.hydata.src = res.data[0].picture - this.hydata.content = res.data[0].content - this.hydata.url=res.data[0].url + 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', { + loop: true, + // autoplay: { + // delay: 4100, + // disableOnInteraction: false, + // }, + + + } + ) + }) }) //背景图文轮播图 smallPicture().then((res) => { @@ -306,6 +345,25 @@ export default { }, methods: { + next(){ + this.swipe.slideNext() + if(this.textindex0){ + this.textindex=this.textindex-1 + }else{ + this.textindex=this.hydata.length-1 + } + + }, switchto() { this.$router.push({ path: '/aboutus', @@ -559,4 +617,10 @@ h6 { color: rgba(255, 255, 255, .5); font-weight: bold; } +.flow{ + +} +.a::after{ + background-color: unset; +}