From b70de87d49e3d89c20f2a0af552e94908aa8dd5b Mon Sep 17 00:00:00 2001 From: whitechiina <1293616053@qq.com> Date: Tue, 8 Apr 2025 11:27:54 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop_home/components/shop-cart/kdj.scss | 21 +++++++----- .../shop_home/components/shop-cart/mdl.scss | 20 +++++++----- .../shop_home/components/shop-cart/rx.scss | 20 +++++++----- .../shop_home/components/shop-cart/xbk.scss | 21 +++++++----- .../shop_home/shop-combo/mdl-shop-combo.vue | 24 ++++++++------ .../orders-settlement/orders-settlement.vue | 6 ++-- .../order/orders-settlement/settlement.vue | 32 +++++++++++++++++-- static/js/mixin/PayMixin.js | 25 +++++++++++---- 8 files changed, 115 insertions(+), 54 deletions(-) diff --git a/pages/restaurant/home/shop_home/components/shop-cart/kdj.scss b/pages/restaurant/home/shop_home/components/shop-cart/kdj.scss index 400d681..4e84186 100644 --- a/pages/restaurant/home/shop_home/components/shop-cart/kdj.scss +++ b/pages/restaurant/home/shop_home/components/shop-cart/kdj.scss @@ -1,19 +1,24 @@ // 肯德基 .KDJ-Cart { - width: 100%; - display: flex; - justify-content: space-between; - position: relative; - z-index: 20075; - background-color: #333333; + background-color: #333333; + box-shadow: 0px 0px 18px 0px rgba(0, 0, 0, 0.1); + border-radius: 20rpx 20rpx 0 0; + width: 100%; + height: 210rpx; + flex-direction: row; + display: flex; + position: fixed; + bottom: 0; + left: 0; + z-index: 10; .left { flex: 1; height: 100rpx; display: flex; align-items: center; - padding-left: 50rpx; - + padding: 50rpx; + &-img { position: relative; diff --git a/pages/restaurant/home/shop_home/components/shop-cart/mdl.scss b/pages/restaurant/home/shop_home/components/shop-cart/mdl.scss index 99a3521..e9bc904 100644 --- a/pages/restaurant/home/shop_home/components/shop-cart/mdl.scss +++ b/pages/restaurant/home/shop_home/components/shop-cart/mdl.scss @@ -1,13 +1,17 @@ // 肯德基 .MDL-Cart { - width: 100%; - display: flex; - justify-content: space-between; - position: relative; - z-index: 20075; - background-color: #ffffff; - align-items: center; - padding: 0 32rpx; + box-shadow: 0px 0px 18px 0px rgba(0, 0, 0, 0.1); + background-color: white; + border-radius: 20rpx 20rpx 0 0; + width: 100%; + height: 210rpx; + flex-direction: row; + display: flex; + position: fixed; + bottom: 0; + left: 0; + z-index: 10; + padding: 20rpx 32rpx; &-left { flex: 1; diff --git a/pages/restaurant/home/shop_home/components/shop-cart/rx.scss b/pages/restaurant/home/shop_home/components/shop-cart/rx.scss index 8582bcc..e0c82c5 100644 --- a/pages/restaurant/home/shop_home/components/shop-cart/rx.scss +++ b/pages/restaurant/home/shop_home/components/shop-cart/rx.scss @@ -1,13 +1,17 @@ // 星巴克 .RX-Cart { - width: 100%; - display: flex; - justify-content: space-between; - position: relative; - z-index: 20075; - background-color: #ffffff; - align-items: center; - padding: 0 32rpx; + box-shadow: 0px 0px 18px 0px rgba(0, 0, 0, 0.1); + background-color: white; + border-radius: 20rpx 20rpx 0 0; + width: 100%; + height: 210rpx; + flex-direction: row; + display: flex; + position: fixed; + bottom: 0; + left: 0; + z-index: 10; + padding: 20rpx 32rpx; &-left { flex: 1; diff --git a/pages/restaurant/home/shop_home/components/shop-cart/xbk.scss b/pages/restaurant/home/shop_home/components/shop-cart/xbk.scss index 205a826..1ae782a 100644 --- a/pages/restaurant/home/shop_home/components/shop-cart/xbk.scss +++ b/pages/restaurant/home/shop_home/components/shop-cart/xbk.scss @@ -1,13 +1,18 @@ // 星巴克 .XBK-Cart { - width: 100%; - display: flex; - justify-content: space-between; - position: relative; - z-index: 20075; - background-color: #ffffff; - align-items: center; - padding: 0 32rpx; + box-shadow: 0px 0px 18px 0px rgba(0, 0, 0, 0.1); + background-color: white; + border-radius: 20rpx 20rpx 0 0; + width: 100%; + height: 210rpx; + flex-direction: row; + display: flex; + position: fixed; + bottom: 0; + left: 0; + z-index: 10; + padding: 20rpx 32rpx; + &-left { flex: 1; diff --git a/pages/restaurant/home/shop_home/shop-combo/mdl-shop-combo.vue b/pages/restaurant/home/shop_home/shop-combo/mdl-shop-combo.vue index 583cc5c..6d5ec87 100644 --- a/pages/restaurant/home/shop_home/shop-combo/mdl-shop-combo.vue +++ b/pages/restaurant/home/shop_home/shop-combo/mdl-shop-combo.vue @@ -143,7 +143,8 @@ }, // 计算价格 Selectedpay() { - try{ + try{ + console.log(this.Selected) if (this['Selected']['length'] > 0) { const _addpay = this['Selected'].map(e => { if (e['price']) { @@ -405,15 +406,18 @@ // 购物车样式 .shoppingcart { - width: 100%; - display: flex; - justify-content: space-between; - position: relative; - z-index: 20075; - background-color: #ffffff; - align-items: center; - padding: 0 32rpx; - + box-shadow: 0px 0px 18px 0px rgba(0, 0, 0, 0.1); + background-color: white; + border-radius: 20rpx 20rpx 0 0; + width: 100%; + height: 210rpx; + flex-direction: row; + display: flex; + position: fixed; + bottom: 0; + left: 0; + z-index: 10; + padding: 20rpx 32rpx; &-left { flex: 1; height: 100rpx; diff --git a/pages/restaurant/order/orders-settlement/orders-settlement.vue b/pages/restaurant/order/orders-settlement/orders-settlement.vue index 19c976b..36f1460 100644 --- a/pages/restaurant/order/orders-settlement/orders-settlement.vue +++ b/pages/restaurant/order/orders-settlement/orders-settlement.vue @@ -71,7 +71,7 @@ --> 应付 - ¥{{ (calculationamount.prices).toFixed(2) }} + ¥{{ YingPrice }} @@ -88,7 +88,7 @@ 抵用券 - (¥{{ YingPrice }} ) + (¥{{ computedTotal.coin_balance }} ) @@ -385,13 +385,11 @@ // 是否使用券 isCoin() { this.use_coin = !this.use_coin; - if (this.use_broker) this.use_broker = false; this.getCart() }, isBroker() { this.use_broker = !this.use_broker; - if (this.use_coin) this.use_coin = false; this.getCart() }, diff --git a/pages/restaurant/order/orders-settlement/settlement.vue b/pages/restaurant/order/orders-settlement/settlement.vue index 70dac00..b112bf8 100644 --- a/pages/restaurant/order/orders-settlement/settlement.vue +++ b/pages/restaurant/order/orders-settlement/settlement.vue @@ -90,6 +90,12 @@ + + + 应付: + ¥{{ YingPrice }} + + @@ -177,7 +183,9 @@ - + + + @@ -198,7 +206,8 @@ export default { mixins: [mixin, restaurantmixins, calculationamountmixin], data() { - return { + return { + loading: true, show: true, zeroshow: false, FormInfor: { @@ -390,6 +399,13 @@ } else { this.$Payment.H5TOWX_Payment({ datas: res['data'], + GetShopInfor: { + name: this.GetShopInfor.restaurant_name, + shop: this.BrandInfor.brand_name, + id: this.BrandInfor.brand_id, + }, + payData: FormInfor, + HeadersData: this.GetShopInfor, shopInfo: FormInfor.products, return_url:`/pages/restaurant/order/order-details/details?order_sn=${res.data.order_sn}` }); @@ -1033,5 +1049,17 @@ font-size: 32rpx; font-weight: bold; } + } + .loading { + width: 100%; + height: 100%; + background-color: #000; + opacity: .5; + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: 999; } diff --git a/static/js/mixin/PayMixin.js b/static/js/mixin/PayMixin.js index 189f2ef..88379e4 100644 --- a/static/js/mixin/PayMixin.js +++ b/static/js/mixin/PayMixin.js @@ -42,20 +42,33 @@ class Payment { const ShopInfo = shopInfo; // 判断是微信支付还是支付宝支付 - console.log(store.getters.GetToken) if(PAY_TYPE == '1'){ // 微信内嵌WEBVIEW方式进入H5页面 OrderData['WechatRetreat'] = true; // 先跳转至微信支付页面 try{ - // 地区码 - data.HeadersData.adcode = state['getters']['GetcityInfor']['adcode'] + // 地区码带入 + if (data.HeadersData && state.getters?.GetcityInfor?.adcode) { + data.HeadersData.adcode = state.getters.GetcityInfor.adcode; + } + + const navigateParams = { + data: OrderData, + shopInfo: shopInfo, + GetShopInfor: GetShopInfor, + token: store.getters.GetToken, + payData: data.payData, + HeadersData: data.HeadersData + }; + + const queryString = Object.entries(navigateParams) + .map(([key, value]) => `${key}=${encodeURIComponent(JSON.stringify(value))}`) + .join('&'); - console.log(data.HeadersData) - console.log(data.payData, '00000000000') wx.miniProgram.navigateTo({ - url: `/pages/extension/shop/wxPay/wxPay?data=${encodeURIComponent(JSON.stringify(OrderData))}&shopInfo=${encodeURIComponent(JSON.stringify(shopInfo))}&GetShopInfor=${encodeURIComponent(JSON.stringify(GetShopInfor))}&token=${JSON.stringify(store.getters.GetToken)}&payData=${encodeURIComponent(JSON.stringify(data.payData))}&HeadersData=${encodeURIComponent(JSON.stringify(data.HeadersData))}` + url: `/pages/extension/shop/wxPay/wxPay?${queryString}` }); + // 延迟两秒后H5内部跳转 setTimeout(()=>{ uni.hideLoading();