霸王餐更改

This commit is contained in:
wwz
2025-03-25 21:58:59 +08:00
parent 1169e300df
commit 3a6fa55234
14 changed files with 130 additions and 100 deletions

View File

@@ -43,7 +43,7 @@
<view class="price">
<view class="priceAmount">
{{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?item.memberPrice:item.price}}
{{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item.memberPrice||item.price):item.price}}
</view>
<view class="num">x{{item.num}}</view>
</view>
@@ -74,7 +74,7 @@
</view>
</view>
<text
class="price">{{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?item.memberPrice:item.salePrice}}</text>
class="price">{{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item.memberPrice||item.salePrice):item.salePrice}}</text>
</view>
<!-- 餐位费 -->
@@ -218,10 +218,11 @@
// 是否启用会员价 0否1是
if (shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1) {
// memberPrice会员价
return total + (parseFloat(item.memberPrice) * parseFloat(item.num - item.returnNum));
return total + (parseFloat(item.memberPrice || item.price) * parseFloat(item.num - item
.returnNum));
} else {
// salePrice销售价
return total + (parseFloat(item.price) * parseFloat(item.num - item.returnNum));
return total + (parseFloat(item.price || 0) * parseFloat(item.num - item.returnNum));
}
}, 0);
// 购物车总数价格
@@ -229,10 +230,11 @@
// 是否启用会员价 0否1是
if (shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1) {
// memberPrice会员价
return total + parseFloat(item.memberPrice) * parseFloat(item.cartNumber);
return total + parseFloat(item.memberPrice || item.salePrice) * parseFloat(item
.cartNumber);
} else {
// salePrice销售价
return total + parseFloat(item.salePrice) * parseFloat(item.cartNumber);
return total + parseFloat(item.salePrice || 0) * parseFloat(item.cartNumber);
}
}, 0);
cart = cartone + cart
@@ -416,6 +418,7 @@
border-radius: 30rpx 30rpx 0 0;
max-height: 80vh;
overflow: auto;
.scroll-view {
max-height: 80vh;
margin-bottom: 190rpx;