Commit 86da5d17 authored by sxl's avatar sxl 💬

fix:轮播图数据优化

parent 0a5188f2
......@@ -59,7 +59,7 @@
item1.lifeCycleName
}}</span>
</div>
<!-- <div class="items-class" v-if="item.children.length % 2 == 1"></div> -->
<div class="items-class" v-if="item.children.length % 2 == 1"></div>
</div>
</div>
</div>
......@@ -70,8 +70,7 @@
<div class="scroll-outer">
<div id="certificationOrg">
<div :class="['mySwiper-item', { 'active': currentIndex === index }]"
v-for="(item, index) in lifeServiceList.concat(lifeServiceList)" :key="index + '-'"
@click="handleItemClick(index)">
v-for="(item, index) in lifeServiceList" :key="index + '-'" @click="handleItemClick(index)">
<span>
<img :src="`${baseApi}${currentIndex === index ? item.revealIcon : item.hiddenIcon}`" alt="" />
{{ item.lifeCycleName }}
......
......@@ -129,9 +129,9 @@
</div>
</div>
<div class="swiper-button-next" tabindex="0" role="button" aria-label="Next slide"
aria-controls="certificationList" aria-disabled="false"></div>
<div class="swiper-button-prev swiper-button-disabled" tabindex="-1" role="button"
aria-label="Previous slide" aria-controls="certificationList" aria-disabled="true"></div>
aria-controls="certificationList" aria-disabled="false" @click="handleNextClick"></div>
<div class="swiper-button-prev" tabindex="-1" role="button" aria-label="Previous slide"
aria-controls="certificationList" aria-disabled="false" @click="handlePrevClick"></div>
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
</div>
......@@ -342,6 +342,7 @@ import HorizontalMenu from "~/components/header/HorizontalMenu.vue";
import Header from "~/components/header/Header.vue";
import CommonDialog from "~/components/dialog/CommonDialog.vue";
import Gis from "~/components/ChiFeng/Gis/index.vue";
import Swiper from "swiper";
export default {
components: {
sendRequest,
......@@ -456,7 +457,8 @@ export default {
}, {
value: '融资需求',
label: '融资需求'
},]
},],
swiper3: null,
};
},
watch: {
......@@ -472,7 +474,7 @@ export default {
this.$wow.init({ animateClass: "animate__animated" });
setTimeout(() => {
var swiper3 = new Swiper(".mySwiper3", {
this.swiper3 = new Swiper(".mySwiper3", {
spaceBetween: 10,
direction: "horizontal",
navigation: {
......@@ -686,6 +688,16 @@ export default {
return item;
});
},
handleNextClick() {
if (this.swiper3) {
this.swiper3.slideNext();
}
},
handlePrevClick() {
if (this.swiper3) {
this.swiper3.slidePrev();
}
},
async getDictData() {
const dictOperating = await sendRequest("/system/dict/data/list", "get", {
dictType: "cfkq_operating_system",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment