提交修改购物车bug

master
lemon橪 2022-05-05 15:11:45 +08:00
parent 6f60cc6afb
commit a6a8a5d583
1 changed files with 6 additions and 4 deletions

View File

@ -51,7 +51,7 @@
<view class="goods-row" :class="{ invalid: isInvalid(skuItem) }"> <view class="goods-row" :class="{ invalid: isInvalid(skuItem) }">
<view class="goods-config"> <view class="goods-config">
<view> <view>
<u-checkbox-group v-if="skuItem.invalid == 0"> <u-checkbox-group v-if="skuItem.invalid == 0 && !skuItem.errorMessage">
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
<u-checkbox shape="circle" :active-color="lightColor" class="c-left" v-model="skuItem.checked" <u-checkbox shape="circle" :active-color="lightColor" class="c-left" v-model="skuItem.checked"
@change="checkboxChange(skuItem)"></u-checkbox> @change="checkboxChange(skuItem)"></u-checkbox>
@ -110,7 +110,9 @@
预估到手价 <span>{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[0]}}</span> 预估到手价 <span>{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[0]}}</span>
<span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span> <span>.{{ formatPrice(skuItem.priceDetailDTO.flowPrice)[1] }} </span>
</div> </div>
<div style='margin-left: 20rpx;' v-if="!skuItem.checked && skuItem.errorMessage">
{{skuItem.errorMessage}}
</div>
</view> </view>
</view> </view>
</u-swipe-action> </u-swipe-action>
@ -192,8 +194,8 @@ export default {
}, },
], ],
isInvalid(val) { isInvalid(val) {
// ///
if (val.invalid == 1) { if (val.invalid == 1 || (!val.checked && val.errorMessage)) {
return true; return true;
} else { } else {
return false; return false;