Commit 86da5d17 authored by sxl's avatar sxl 💬

fix:轮播图数据优化

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