This commit is contained in:
whitechiina 2026-07-17 16:03:12 +08:00
parent f0d2f6dfca
commit dad1523bb7
12 changed files with 51 additions and 21 deletions

View File

@ -12,10 +12,15 @@
</u-badge> </u-badge>
</view> </view>
<view class="price"> <view class="price">
<view>
<text class="yang"></text> <text class="yang"></text>
<!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> --> <!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> -->
<text class="amount">{{__amount(totalPrice)}}</text> <text class="amount">{{__amount(totalPrice)}}</text>
</view> </view>
<view class="yuanjia">
¥{{__amount(lastPrice)}}
</view>
</view>
</view> </view>
<view class="right" @tap="create" :class="[Shoplength > 0?'right2':'']"> <view class="right" @tap="create" :class="[Shoplength > 0?'right2':'']">
{{Shoplength > 0?'选好了':'未选择商品'}} {{Shoplength > 0?'选好了':'未选择商品'}}
@ -179,10 +184,15 @@
</u-badge> </u-badge>
</view> </view>
<view class="MDL-Cart-left-price"> <view class="MDL-Cart-left-price">
<view>
<text class="yang"></text> <text class="yang"></text>
<!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> --> <!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> -->
<text class="amount">{{__amount(totalPrice)}}</text> <text class="amount">{{__amount(totalPrice)}}</text>
</view> </view>
<view class="yuanjia">
¥{{__amount(lastPrice)}}
</view>
</view>
</view> </view>
<view class="MDL-Cart-right theme-Union-Class-5-1" @tap="create" :class="[Shoplength > 0?'right2':'']"> <view class="MDL-Cart-right theme-Union-Class-5-1" @tap="create" :class="[Shoplength > 0?'right2':'']">
{{Shoplength > 0?'结算':'未选择商品'}} {{Shoplength > 0?'结算':'未选择商品'}}
@ -259,10 +269,15 @@
</u-badge> </u-badge>
</view> </view>
<view class="XBK-Cart-left-price"> <view class="XBK-Cart-left-price">
<view>
<text class="yang"></text> <text class="yang"></text>
<!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> --> <!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> -->
<text class="amount">{{__amount(totalPrice)}}</text> <text class="amount">{{__amount(totalPrice)}}</text>
</view> </view>
<view class="yuanjia">
¥{{__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?'结算':'未选择商品'}}
@ -348,9 +363,14 @@
</u-badge> </u-badge>
</view> </view>
<view class="RX-Cart-left-price"> <view class="RX-Cart-left-price">
<view>
<text class="yang"></text> <text class="yang"></text>
<text class="amount">{{__amount(totalPrice)}}</text> <text class="amount">{{__amount(totalPrice)}}</text>
</view> </view>
<view class="yuanjia">
¥{{__amount(lastPrice)}}
</view>
</view>
</view> </view>
<view class="RX-Cart-right" @tap="create" :class="[Shoplength > 0?'right2':'']"> <view class="RX-Cart-right" @tap="create" :class="[Shoplength > 0?'right2':'']">
{{Shoplength > 0?'结算':'未选择商品'}} {{Shoplength > 0?'结算':'未选择商品'}}
@ -466,6 +486,7 @@
MealList: [], MealList: [],
// //
totalPrice: 0, totalPrice: 0,
lastPrice: 0,
// //
shoppingshow: false, shoppingshow: false,
// //
@ -529,6 +550,7 @@
let shoparr = []; let shoparr = [];
let newArr = []; let newArr = [];
let Price = 0; let Price = 0;
let lastPrice = 0;
this['tabbar'].map(item => { this['tabbar'].map(item => {
shoparr.push(...item['foods']) shoparr.push(...item['foods'])
}); });
@ -560,6 +582,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'];
newArr.push(item); newArr.push(item);
console.log(this['GetCartList'][id],'是否规格商品'); console.log(this['GetCartList'][id],'是否规格商品');
// //
@ -580,6 +603,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'];
this['GetCartList'][id]['Differentskulist'][i] = _item; this['GetCartList'][id]['Differentskulist'][i] = _item;
}; };
newArr.push(...this['GetCartList'][id]['Differentskulist']); newArr.push(...this['GetCartList'][id]['Differentskulist']);
@ -593,6 +617,7 @@
console.log(newArr, 'newArrnewArrnewArrnewArr'); console.log(newArr, 'newArrnewArrnewArrnewArr');
this['MealList'] = newArr; this['MealList'] = newArr;
this['totalPrice'] = Price; this['totalPrice'] = Price;
this['lastPrice'] = lastPrice;
// 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){
@ -798,5 +823,9 @@
font-weight: 500; font-weight: 500;
} }
} }
.yuanjia {
color: gray;
padding-left: 20rpx;
text-decoration: line-through;
}
</style> </style>

View File

@ -381,6 +381,7 @@
text-decoration: line-through; text-decoration: line-through;
.price { .price {
font-size: 24rpx !important; font-size: 24rpx !important;
font-weight: 300 !important;
} }
} }

View File

@ -125,7 +125,7 @@
<text lines="1" class="text_24">实际付款</text> <text lines="1" class="text_24">实际付款</text>
<text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{realPayment}}</text> <text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{realPayment}}</text>
</view> </view>
<view class="text-wrapper_4 itemamount" v-if="!isWx"> <view class="text-wrapper_4 itemamount" v-if="!isWx && Number(computedTotal.integral)">
<text lines="1" class="text_24">积分</text> <text lines="1" class="text_24">积分</text>
<text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{computedTotal.integral}}</text> <text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{computedTotal.integral}}</text>
</view> </view>

View File

@ -144,7 +144,7 @@
<text lines="1" class="text_24">实际付款</text> <text lines="1" class="text_24">实际付款</text>
<text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{realPayment}}</text> <text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{realPayment}}</text>
</view> </view>
<view class="text-wrapper_4 itemamount" v-if="!isWx"> <view class="text-wrapper_4 itemamount" v-if="!isWx && Number(computedTotal.integral)">
<text lines="1" class="text_24">积分</text> <text lines="1" class="text_24">积分</text>
<text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{computedTotal.integral}}</text> <text lines="1" class="text_25" :style="{color:Brand()['ThemeColor']}">{{computedTotal.integral}}</text>
</view> </view>

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.04e4b496.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.150fc6e5.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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long