fix:添加购物车

merge-requests/42/merge
张征 3 years ago
parent 7cabe4e455
commit d3f1bc392e

@ -136,7 +136,7 @@
<span>此商品暂无库存啦~看看其他的吧</span>
</div>
<div class="main__details-pay">
<UiButton type="yellow_line">加入购物</UiButton>
<UiButton type="yellow_line" @click="addCart"></UiButton>
<UiButton type="yellow_panel" @click="buyNow"></UiButton>
</div>
</article>
@ -263,6 +263,9 @@ export default {
},
},
methods: {
addCart(){
this.$router.push(`/orderSubmit?mode=cart&ids=` + [this.detailData.id])
},
isStock() {
return this.skuData.some((item) => item.stock > 0);
},

Loading…
Cancel
Save