底部显示消费补贴
This commit is contained in:
parent
dad1523bb7
commit
0a0c659219
|
|
@ -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,15 +281,21 @@
|
||||||
</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>
|
||||||
|
<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 class="yuanjia">
|
</view>
|
||||||
¥{{__amount(lastPrice)}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="XBK-Cart-right" @tap="create" :class="[Shoplength > 0?'right2':'']">
|
<view class="XBK-Cart-right" @tap="create" :class="[Shoplength > 0?'right2':'']">
|
||||||
{{Shoplength > 0?'结算':'未选择商品'}}
|
{{Shoplength > 0?'结算':'未选择商品'}}
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -486,7 +511,8 @@
|
||||||
MealList: [],
|
MealList: [],
|
||||||
// 购物车合计
|
// 购物车合计
|
||||||
totalPrice: 0,
|
totalPrice: 0,
|
||||||
lastPrice: 0,
|
lastPrice: 0,
|
||||||
|
cardbtPrice: 0,
|
||||||
// 购物车弹框显示变量
|
// 购物车弹框显示变量
|
||||||
shoppingshow: false,
|
shoppingshow: false,
|
||||||
// 购物车弹框距离购物车定位距离
|
// 购物车弹框距离购物车定位距离
|
||||||
|
|
@ -550,7 +576,8 @@
|
||||||
let shoparr = [];
|
let shoparr = [];
|
||||||
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'])
|
||||||
});
|
});
|
||||||
|
|
@ -582,9 +609,10 @@
|
||||||
// 原价 + 加料价格
|
// 原价 + 加料价格
|
||||||
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],'是否规格商品');
|
||||||
// 此处逻辑是将同商品下的不同规格数据取出来
|
// 此处逻辑是将同商品下的不同规格数据取出来
|
||||||
if (this['GetCartList'][id]['Differentskulist'] && this['GetCartList'][id]['Differentskulist']['length'] > 0) {
|
if (this['GetCartList'][id]['Differentskulist'] && this['GetCartList'][id]['Differentskulist']['length'] > 0) {
|
||||||
console.log('多规格');
|
console.log('多规格');
|
||||||
|
|
@ -603,7 +631,8 @@
|
||||||
};
|
};
|
||||||
_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){
|
||||||
|
|
@ -827,5 +857,12 @@
|
||||||
color: gray;
|
color: gray;
|
||||||
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>
|
||||||
|
|
|
||||||
|
|
@ -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
1
unpackage/dist/build/web/static/js/pages-restaurant-home-shop_home-shop_home.af4df29e.js
vendored
Normal file
1
unpackage/dist/build/web/static/js/pages-restaurant-home-shop_home-shop_home.af4df29e.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue