Commit 1cf72d19 by 赵雅纹

购物车和立即购买条件判断

parent 6c8d519e
......@@ -137,18 +137,16 @@
bindsubmit="addCart"
report-submit
name='nav'
wx:if="{{!fromZc && productInfo.productStatus == 2}}"
>
<button disabled="" class="cart-button get-formId--btn" formType="submit">加入购物车</button>
<button disabled="{{fromZc || productInfo.productStatus != 2}}" class="cart-button get-formId--btn {{(fromZc || productInfo.productStatus != 2) ? 'btn-default' : 'btn-cart'}}" formType="submit">加入购物车</button>
</form>
<form
wx:if="{{productInfo.productStatus == 2}}"
class='get-formId get-formId--form'
bindsubmit="goBuy"
report-submit
name='nav'
>
<button class="buy-button get-formId--btn" formType="submit">立即购买</button>
<button disabled="{{productInfo.productStatus != 2}}" class="buy-button get-formId--btn {{productInfo.productStatus != 2 ? 'btn-default' : 'btn-buy'}}" formType="submit">立即购买</button>
</form>
</block>
......
......@@ -223,13 +223,18 @@ page{
background: #cccccc; }
.product-footer .footer-buttons button.cart-button {
background: rgba(203,60,60,0.71);
width: 240rpx;
}
.product-footer .footer-buttons button.btn-cart {
background: rgba(203,60,60,0.71);
}
.product-footer .footer-buttons button.buy-button {
background: #cb3c3c;
width: 214rpx;
}
.product-footer .footer-buttons button.btn-buy {
background: #cb3c3c;
}
.product-footer .footer-buttons button::after {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment