This commit is contained in:
Gdpao
2020-08-04 21:50:12 +08:00
11 changed files with 211 additions and 186 deletions

View File

@@ -93,7 +93,8 @@ export default {
},
setSwiperHeight() {
// height: 230px, margin-bottom: 13
this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (230 + 13) + 'px';
const height = Math.ceil(this.goodsList.length / 2) * (510 + 26);
this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
},
// tabs通知swiper切换
tabsChange(index) {

View File

@@ -2,8 +2,8 @@
<view class="item" @click="toDetailsPage">
<image :src="info.goods_image" mode="aspectFill" class="img"></image>
<view class="info">
<text class="title u-line-1">{{ info.goods_name }}</text>
<text class="jianjie u-line-2">{{ info.goods_advword }}</text>
<text class="title u-line-2">{{ info.goods_name }}</text>
<text class="jianjie u-line-1">{{ info.goods_advword }}</text>
<text class="price">{{ info.goods_price }}</text>
</view>
</view>
@@ -44,7 +44,7 @@ export default {
<style lang="scss" scoped>
.item{
width: 330rpx;
height: 500rpx;
height: 510rpx;
margin-bottom: 26rpx;
background-color: #f8f8f8;
border-radius: 10rpx 10rpx 0rpx 0rpx;
@@ -62,6 +62,7 @@ export default {
flex-direction: column;
justify-content: space-around;
.title{
line-height: 34rpx;
font-size: 30rpx;
color: #333;
margin-bottom: 13rpx;