底部显示消费补贴

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