mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-18 23:36:44 +08:00
提交
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div id="container" style="z-index:99;" v-if="resonimg.length == 1">
|
||||
<!-- 当轮播图等于一张时 -->
|
||||
<swiper :options="swiperOptiontwo" >
|
||||
<swiper-slide style="margin: 0 auto;" v-for="(item , idx ) in resonimg" :key="idx" class="swiper-slide games" :class="{'swiper-no-swiping':resonimg.length < 1}">
|
||||
<swiper-slide style="margin: 0 auto;" v-for="(item , idx ) in resonimg" :key="idx" class="swiper-slide games">
|
||||
<div class="bannbox" :style="{ 'background': `url(${fileBaseUrl + item.image}) no-repeat 100% / 100%`}">
|
||||
</div>
|
||||
<img class="banner-img" style=" margin: 0 auto;" :src=" fileBaseUrl + item.image" alt="">
|
||||
@@ -13,8 +13,8 @@
|
||||
</swiper>
|
||||
</div>
|
||||
<div id="container" style="z-index:99;" v-else>
|
||||
<swiper :options="swiperOption" ref="mySwiper" >
|
||||
<swiper-slide style="margin: 0 auto;" v-for="(item , idx ) in resonimg" :key="idx" class="swiper-slide games" :class="{'swiper-no-swiping':resonimg.length < 1}">
|
||||
<swiper :options="swiperOption" ref="mySwiper" v-if="resonimg.length > 1">
|
||||
<swiper-slide style="margin: 0 auto;" v-for="(item , idx ) in resonimg" :key="idx" class="swiper-slide games">
|
||||
<div class="bannbox" :style="{ 'background': `url(${fileBaseUrl + item.image}) no-repeat 100% / 100%`}">
|
||||
</div>
|
||||
<img class="banner-img" style=" margin: 0 auto;" :src=" fileBaseUrl + item.image" alt="">
|
||||
@@ -488,14 +488,13 @@
|
||||
resonimg: [],
|
||||
swiperOptiontwo: {
|
||||
autoplay: false,
|
||||
noSwiping: true,
|
||||
// noSwiping: true,
|
||||
},
|
||||
swiperOption: {
|
||||
autoplay:{
|
||||
delay:2000,
|
||||
disableOnInteraction:false, //解决滑动后不能轮播的问题
|
||||
},
|
||||
noSwiping: true,
|
||||
speed: 3000, //切换速度,即slider自动滑动开始到结束的时间(单位ms)
|
||||
loop: true, //循环切换
|
||||
peed: 300, //循环速度
|
||||
@@ -696,13 +695,7 @@
|
||||
let key = 'index';
|
||||
apiPlace.detail(key).then(res => {
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
console.log(lmj.length,'测试')
|
||||
|
||||
// if(lmj.length > 1){
|
||||
this.resonimg = lmj;
|
||||
// }
|
||||
|
||||
|
||||
this.resonimg = lmj;
|
||||
})
|
||||
},
|
||||
jumUX() {
|
||||
|
||||
Reference in New Issue
Block a user