From 0a0c659219505047809c11fdf0ae663c6b314e5b Mon Sep 17 00:00:00 2001
From: whitechiina <1293616053@qq.com>
Date: Fri, 17 Jul 2026 16:43:28 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BA=95=E9=83=A8=E6=98=BE=E7=A4=BA=E6=B6=88?=
=?UTF-8?q?=E8=B4=B9=E8=A1=A5=E8=B4=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/shop-cart/shop-cart.vue | 103 ++++++++++++------
unpackage/dist/build/web/index.html | 2 +-
.../{index.150fc6e5.js => index.439a5d9a.js} | 2 +-
...urant-home-shop_home-shop_home.77bd7ffe.js | 1 -
...urant-home-shop_home-shop_home.af4df29e.js | 1 +
5 files changed, 73 insertions(+), 36 deletions(-)
rename unpackage/dist/build/web/static/js/{index.150fc6e5.js => index.439a5d9a.js} (99%)
delete mode 100644 unpackage/dist/build/web/static/js/pages-restaurant-home-shop_home-shop_home.77bd7ffe.js
create mode 100644 unpackage/dist/build/web/static/js/pages-restaurant-home-shop_home-shop_home.af4df29e.js
diff --git a/pages/restaurant/home/shop_home/components/shop-cart/shop-cart.vue b/pages/restaurant/home/shop_home/components/shop-cart/shop-cart.vue
index 0e463c9..d1dc4c8 100644
--- a/pages/restaurant/home/shop_home/components/shop-cart/shop-cart.vue
+++ b/pages/restaurant/home/shop_home/components/shop-cart/shop-cart.vue
@@ -12,13 +12,19 @@
-
- ¥
-
- {{__amount(totalPrice)}}
-
-
- ¥{{__amount(lastPrice)}}
+
+
+
+ ¥
+ {{__amount(totalPrice)}}
+
+
+ ¥{{__amount(lastPrice)}}
+
+
+
+ 消费补贴:¥{{cardbtPrice}}
+
@@ -184,13 +190,19 @@
-
- ¥
-
- {{__amount(totalPrice)}}
-
-
- ¥{{__amount(lastPrice)}}
+
+
+
+ ¥
+ {{__amount(totalPrice)}}
+
+
+ ¥{{__amount(lastPrice)}}
+
+
+
+ 消费补贴:¥{{cardbtPrice}}
+
@@ -269,15 +281,21 @@
-
- ¥
-
- {{__amount(totalPrice)}}
+
+
+
+ ¥
+ {{__amount(totalPrice)}}
+
+
+ ¥{{__amount(lastPrice)}}
+
+
+
+ 消费补贴:¥{{cardbtPrice}}
+
-
- ¥{{__amount(lastPrice)}}
-
-
+
{{Shoplength > 0?'结算':'未选择商品'}}
@@ -363,12 +381,19 @@
-
- ¥
- {{__amount(totalPrice)}}
-
-
- ¥{{__amount(lastPrice)}}
+
+
+
+ ¥
+ {{__amount(totalPrice)}}
+
+
+ ¥{{__amount(lastPrice)}}
+
+
+
+ 消费补贴:¥{{cardbtPrice}}
+
@@ -486,7 +511,8 @@
MealList: [],
// 购物车合计
totalPrice: 0,
- lastPrice: 0,
+ lastPrice: 0,
+ cardbtPrice: 0,
// 购物车弹框显示变量
shoppingshow: false,
// 购物车弹框距离购物车定位距离
@@ -550,7 +576,8 @@
let shoparr = [];
let newArr = [];
let Price = 0;
- let lastPrice = 0;
+ let lastPrice = 0;
+ let cardbtPrice = 0;
this['tabbar'].map(item => {
shoparr.push(...item['foods'])
});
@@ -582,9 +609,10 @@
// 原价 + 加料价格
item['adj_pay'] = (+item['product_price']) + (+item['add_price']);
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);
- console.log(this['GetCartList'][id],'是否规格商品');
+ console.log(this['GetCartList'][id],'是否规格商品');
// 此处逻辑是将同商品下的不同规格数据取出来
if (this['GetCartList'][id]['Differentskulist'] && this['GetCartList'][id]['Differentskulist']['length'] > 0) {
console.log('多规格');
@@ -603,7 +631,8 @@
};
_item['adj_pay'] = (+_item['product_price']) + (+_item['add_price']);
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;
};
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){
@@ -827,5 +857,12 @@
color: gray;
padding-left: 20rpx;
text-decoration: line-through;
+ }
+ .xfbt {
+ padding-left: 26rpx;
+ color: gray;
+ font-size: 24rpx;
+ color: #000;
+ font-weight: 400;
}
diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html
index 62a6f66..fa13b5e 100644
--- a/unpackage/dist/build/web/index.html
+++ b/unpackage/dist/build/web/index.html
@@ -1,2 +1,2 @@
在线点餐
\ No newline at end of file
+ document.write('')