去掉首页商品swiper

This commit is contained in:
hupeng
2023-12-16 21:02:00 +08:00
parent 549f945af9
commit 62d21567cd
5 changed files with 95 additions and 105 deletions

View File

@ -9,8 +9,7 @@
</view> </view>
</view> </view>
<view class="goods-box swiper-box x-f"> <view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000"> <block v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f"> <view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id"> <block v-for="mgoods in goods" :key="mgoods.id">
<sh-activity-goods :detail="mgoods" class="goods-item"> <sh-activity-goods :detail="mgoods" class="goods-item">
@ -18,8 +17,7 @@
</sh-activity-goods> </sh-activity-goods>
</block> </block>
</view> </view>
</swiper-item> </block>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1"> <view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" <text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text> :key="index"></text>

View File

@ -8,8 +8,7 @@
</view> </view>
</view> </view>
<view class="goods-box swiper-box x-f"> <view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000"> <block v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f"> <view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id"> <block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" <view class="min-goods"
@ -30,8 +29,7 @@
</view> </view>
</block> </block>
</view> </view>
</swiper-item> </block>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1"> <view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" <text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text> :key="index"></text>

View File

@ -8,8 +8,7 @@
</view> </view>
</view> </view>
<view class="goods-box swiper-box x-f"> <view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000"> <block v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f"> <view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id"> <block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" @tap="jump('/pages/shop/GoodsCon/index',{id:mgoods.id})"> <view class="min-goods" @tap="jump('/pages/shop/GoodsCon/index',{id:mgoods.id})">
@ -29,8 +28,7 @@
</view> </view>
</block> </block>
</view> </view>
</swiper-item> </block>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1"> <view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" <text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text> :key="index"></text>

View File

@ -8,8 +8,7 @@
</view> </view>
</view> </view>
<view class="goods-box swiper-box x-f"> <view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000"> <block v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f"> <view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id"> <block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" @tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })"> <view class="min-goods" @tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })">
@ -29,8 +28,7 @@
</view> </view>
</block> </block>
</view> </view>
</swiper-item> </block>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1"> <view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" <text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text> :key="index"></text>

View File

@ -8,8 +8,7 @@
</view> </view>
</view> </view>
<view class="goods-box swiper-box x-f"> <view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000"> <block v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f"> <view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id"> <block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" <view class="min-goods"
@ -30,8 +29,7 @@
</view> </view>
</block> </block>
</view> </view>
</swiper-item> </block>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1"> <view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" <text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text> :key="index"></text>