fix:添加购物车

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

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

Loading…
Cancel
Save