首页拼团商品显示不全

This commit is contained in:
ghusermoon 2020-08-20 12:05:15 +08:00
parent 16c2c1fa71
commit a91fa4708b
2 changed files with 10 additions and 8 deletions

View File

@ -13,7 +13,7 @@
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 340rpx;">
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
<!-- 最多显示3个 -->
<view v-if="groupList[i]">
<view v-if="groupList[i]" class="group-container">
<sitem :info="info" v-for="(info, index) in groupList[i].slice(0, 3)" :key="index"></sitem>
</view>
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList[i] || !groupList[i].length" style="margin: 0 auto;"></u-empty>
@ -61,7 +61,7 @@ export default {
gc_id: id,
}).then(res => {
this.groupList[this.current] = res.data;
// console.log(this.groupList);
console.log(this.groupList);
this.$forceUpdate();
})
},
@ -105,10 +105,12 @@ export default {
.list {
box-sizing: border-box;
padding: 0 30rpx;
display: flex;
> view {
&:not(:nth-child(3n)) {
margin-right: 20rpx;
.group-container {
display: flex;
> view {
&:not(:nth-child(3n)) {
margin-right: 20rpx;
}
}
}
}

View File

@ -12,8 +12,8 @@
</view>
<view class="version-view">
<text class="title">版本更新</text>
<text class="tips" v-if="0">已是最新版本</text>
<text class="tips" v-else @click="updateVersion">1.1.10</text>
<text class="tips" v-if="1">已是最新版本</text>
<text class="tips" v-else @click="updateVersion">发现新版本</text>
</view>
</view>
</view>