| | |
| | | <template> |
| | | <view class="details" v-if="info"> |
| | | <template v-if="info.isdeleted === 0"> |
| | | <u-swiper :list="info.banner" height="375" @click="preview"></u-swiper> |
| | | <u-swiper :list="info.banner" height="375" indicator indicatorMode="dot" @click="preview"></u-swiper> |
| | | <view class="info"> |
| | | <view class="info-title"> |
| | | {{info.name}} |
| | |
| | | <text>.{{info.minPrice[1]}}</text> |
| | | </view> |
| | | <view class="commodity-item-box-price-b"> |
| | | 原价¥{{info.linePrice}} |
| | | 原价¥{{info.linePrice || 0}} |
| | | </view> |
| | | </view> |
| | | <view class="info-num"> |
| | | <text>已售 {{info.shou}}+</text> |
| | | <text>库存 {{info.stock}}</text> |
| | | <text>库存 {{info.stock >= 0 ? info.stock : '不限制'}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="content"> |
| | |
| | | </view> |
| | | <view class="edit-btn"> |
| | | <template v-if="info.status === 0"> |
| | | <!-- addCard(info) --> |
| | | <view class="edit-btn-a" @click="show = true">加入购物车</view> |
| | | <view class="edit-btn-a" @click="openCart">加入购物车</view> |
| | | <view class="edit-btn-b" @click="submit">立即购买</view> |
| | | </template> |
| | | <template v-else> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="goods-info-kc"> |
| | | 库存 210 |
| | | 库存 {{info.stock >= 0 ? info.stock : '不限制'}} |
| | | </view> |
| | | <u-number-box v-model="num"></u-number-box> |
| | | </view> |
| | |
| | | url: '/pages/confirm-order/confirm-order' |
| | | }) |
| | | }, |
| | | addCard(e) { |
| | | openCart() { |
| | | if (!this.userInfo) { |
| | | this.$refs.login.open() |
| | | return |
| | | } |
| | | this.show = true |
| | | }, |
| | | addCard(e) { |
| | | this.$u.api.addCart({ |
| | | goodsId: e.id, |
| | | goodsSkuId: e.goodsSkuResponseList[0].id, |