底部显示消费补贴

This commit is contained in:
whitechiina 2026-07-17 16:43:28 +08:00
parent dad1523bb7
commit 0a0c659219
5 changed files with 73 additions and 36 deletions

View File

@ -12,13 +12,19 @@
</u-badge> </u-badge>
</view> </view>
<view class="price"> <view class="price">
<view> <view class="flex flex-space-between" style="flex-direction: column">
<text class="yang"></text> <view class="flex flex-center" style="align-items: baseline">
<!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> --> <view>
<text class="amount">{{__amount(totalPrice)}}</text> <text class="yang"></text>
</view> <text class="amount">{{__amount(totalPrice)}}</text>
<view class="yuanjia"> </view>
¥{{__amount(lastPrice)}} <view class="yuanjia">
¥{{__amount(lastPrice)}}
</view>
</view>
<view class="xfbt" style="color: #fff" v-if="Number(cardbtPrice)">
消费补贴¥{{cardbtPrice}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -184,13 +190,19 @@
</u-badge> </u-badge>
</view> </view>
<view class="MDL-Cart-left-price"> <view class="MDL-Cart-left-price">
<view> <view class="flex flex-space-between" style="flex-direction: column">
<text class="yang"></text> <view class="flex flex-center" style="align-items: baseline">
<!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> --> <view>
<text class="amount">{{__amount(totalPrice)}}</text> <text class="yang"></text>
</view> <text class="amount">{{__amount(totalPrice)}}</text>
<view class="yuanjia"> </view>
¥{{__amount(lastPrice)}} <view class="yuanjia">
¥{{__amount(lastPrice)}}
</view>
</view>
<view class="xfbt" v-if="Number(cardbtPrice)">
消费补贴¥{{cardbtPrice}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -269,13 +281,19 @@
</u-badge> </u-badge>
</view> </view>
<view class="XBK-Cart-left-price"> <view class="XBK-Cart-left-price">
<view> <view class="flex flex-space-between" style="flex-direction: column">
<text class="yang"></text> <view class="flex flex-center" style="align-items: baseline">
<!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> --> <view>
<text class="amount">{{__amount(totalPrice)}}</text> <text class="yang"></text>
</view> <text class="amount">{{__amount(totalPrice)}}</text>
<view class="yuanjia"> </view>
¥{{__amount(lastPrice)}} <view class="yuanjia">
¥{{__amount(lastPrice)}}
</view>
</view>
<view class="xfbt" v-if="Number(cardbtPrice)">
消费补贴¥{{cardbtPrice}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -363,12 +381,19 @@
</u-badge> </u-badge>
</view> </view>
<view class="RX-Cart-left-price"> <view class="RX-Cart-left-price">
<view> <view class="flex flex-space-between" style="flex-direction: column">
<text class="yang"></text> <view class="flex flex-center" style="align-items: baseline">
<text class="amount">{{__amount(totalPrice)}}</text> <view>
</view> <text class="yang"></text>
<view class="yuanjia"> <text class="amount">{{__amount(totalPrice)}}</text>
¥{{__amount(lastPrice)}} </view>
<view class="yuanjia">
¥{{__amount(lastPrice)}}
</view>
</view>
<view class="xfbt" v-if="Number(cardbtPrice)">
消费补贴¥{{cardbtPrice}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -487,6 +512,7 @@
// //
totalPrice: 0, totalPrice: 0,
lastPrice: 0, lastPrice: 0,
cardbtPrice: 0,
// //
shoppingshow: false, shoppingshow: false,
// //
@ -551,6 +577,7 @@
let newArr = []; let newArr = [];
let Price = 0; let Price = 0;
let lastPrice = 0; let lastPrice = 0;
let cardbtPrice = 0;
this['tabbar'].map(item => { this['tabbar'].map(item => {
shoparr.push(...item['foods']) shoparr.push(...item['foods'])
}); });
@ -583,6 +610,7 @@
item['adj_pay'] = (+item['product_price']) + (+item['add_price']); item['adj_pay'] = (+item['product_price']) + (+item['add_price']);
Price += item['bt_price'] * item['num']; Price += item['bt_price'] * item['num'];
lastPrice += item['adj_pay'] * item['num']; lastPrice += item['adj_pay'] * item['num'];
cardbtPrice += item['subsidy_card_price'] * item['num'];
newArr.push(item); newArr.push(item);
console.log(this['GetCartList'][id],'是否规格商品'); console.log(this['GetCartList'][id],'是否规格商品');
// //
@ -604,6 +632,7 @@
_item['adj_pay'] = (+_item['product_price']) + (+_item['add_price']); _item['adj_pay'] = (+_item['product_price']) + (+_item['add_price']);
Price += _item['bt_price'] * _item['num']; Price += _item['bt_price'] * _item['num'];
lastPrice += _item['adj_pay'] * _item['num']; lastPrice += _item['adj_pay'] * _item['num'];
cardbtPrice += item['subsidy_card_price'] * item['num'];
this['GetCartList'][id]['Differentskulist'][i] = _item; this['GetCartList'][id]['Differentskulist'][i] = _item;
}; };
newArr.push(...this['GetCartList'][id]['Differentskulist']); newArr.push(...this['GetCartList'][id]['Differentskulist']);
@ -618,6 +647,7 @@
this['MealList'] = newArr; this['MealList'] = newArr;
this['totalPrice'] = Price; this['totalPrice'] = Price;
this['lastPrice'] = lastPrice; this['lastPrice'] = lastPrice;
this['cardbtPrice'] = cardbtPrice;
// console.timeEnd() // console.timeEnd()
console.log('结束initCategoryNum'); console.log('结束initCategoryNum');
// if(this['BrandInfor']['brand_id'] == 1 || this['BrandInfor']['brand_id'] == 2 || this['BrandInfor']['brand_id'] == 5 || this['BrandInfor']['brand_id'] == 10 || this['BrandInfor']['brand_id'] == 13){ // if(this['BrandInfor']['brand_id'] == 1 || this['BrandInfor']['brand_id'] == 2 || this['BrandInfor']['brand_id'] == 5 || this['BrandInfor']['brand_id'] == 10 || this['BrandInfor']['brand_id'] == 13){
@ -828,4 +858,11 @@
padding-left: 20rpx; padding-left: 20rpx;
text-decoration: line-through; text-decoration: line-through;
} }
.xfbt {
padding-left: 26rpx;
color: gray;
font-size: 24rpx;
color: #000;
font-weight: 400;
}
</style> </style>

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>在线点餐</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>在线点餐</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.883130ca.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.05bba68b.js></script><script src=/privilege/static/js/index.150fc6e5.js></script></body></html> document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.883130ca.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.05bba68b.js></script><script src=/privilege/static/js/index.439a5d9a.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long