| | |
| | | </view> |
| | | </view> |
| | | <view class="list"> |
| | | <image class="list-notfund" src="/static/images/default_search@2x.png" mode="widthFix" v-if="goodsList.length === 0"></image> |
| | | <image class="list-notfund" src="/static/images/default_nodata_white.png" mode="widthFix" v-if="goodsList.length === 0"></image> |
| | | <view class="commodity-item" v-for="(item, i) in goodsList" :key="i" v-else @click="jumpDetails(item)"> |
| | | <view class="commodity-item-image"> |
| | | <image :src="item.imgurl" mode="widthFix"></image> |
| | |
| | | } |
| | | this.$u.api.addCart({ |
| | | goodsId: e.id, |
| | | goodsSkuId: e.skuResponsesList[0].id, |
| | | goodsSkuId: e.goodsSkuResponseList[0].id, |
| | | num: 1 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.cardNum() |
| | | uni.showToast({ title: '添加成功', icon: 'none' }) |
| | | uni.showToast({ title: '添加成功', icon: 'success', mask: true }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | justify-content: center; |
| | | image { |
| | | width: 100%; |
| | | max-height: 330rpx; |
| | | } |
| | | } |
| | | .commodity-item-box { |