更新c端轮播循环

This commit is contained in:
red-deng-deng 2021-11-29 20:36:51 +08:00
parent 2d43f0c828
commit 79ddf9d6f6
1 changed files with 3 additions and 1 deletions

View File

@ -228,6 +228,7 @@
popboxshow: false,
popboxtype: '兑换',
topImg: '',
goodsShow:false,
goodsNum: false,
exchangeCommity: {}, //兑换选择的商品
bgcolor: '',
@ -266,6 +267,7 @@
req.axiosPostproducts('/key/products', data).then(res => {
if (res.code == 200) {
self.swiperDataList = res.data;
self.goodsShow=res.data.length>=3;
if (res.data&&res.data.length>0) {
self.goodsNum = true;
self.onSelected(res.data[0])
@ -276,7 +278,7 @@
centeredSlides: true,
observer: true,
observeParents: true,
loop: true,
loop: self.goodsShow,
onSlideChangeEnd: function (swiper) {
let row = res.data[swiper.realIndex];
self.onSelected(res.data[swiper.realIndex])