diff --git a/components/authorization-userinfor/authorization-userinfor.vue b/components/authorization-userinfor/authorization-userinfor.vue
index 838c64b..c7d8a9d 100644
--- a/components/authorization-userinfor/authorization-userinfor.vue
+++ b/components/authorization-userinfor/authorization-userinfor.vue
@@ -16,7 +16,6 @@
-
diff --git a/pages/restaurant/order/orders-settlement/orders-settlement.vue b/pages/restaurant/order/orders-settlement/orders-settlement.vue
index afeeecf..f699eba 100644
--- a/pages/restaurant/order/orders-settlement/orders-settlement.vue
+++ b/pages/restaurant/order/orders-settlement/orders-settlement.vue
@@ -165,15 +165,15 @@
抵用券抵扣
- -
- {{computedTotal.used_broker}}
+ -
+ {{computedTotal.used_coin}}
余额抵扣
- -
- {{computedTotal.used_coin}}
+ -
+ {{computedTotal.used_broker}}
@@ -202,7 +202,9 @@
-
+
+
+
@@ -217,7 +219,10 @@
conWalletInfoAPI,
getPhoneAPI,
createFoodOrder
- } from '@/request/restaurant/index.js';
+ } from '@/request/restaurant/index.js';
+ import {
+ mapGetters,
+ } from 'vuex';
// 商品组件
import bRxCommodityItem from '@/components/b-rx-commodity-item/b-rx-commodity-item.vue'
let self;
@@ -227,7 +232,8 @@
bRxCommodityItem
},
data() {
- return {
+ return {
+ loading: true,
show: false,
zeroshow: false,
FormInfor: {
@@ -289,6 +295,14 @@
},
onShow() {
this.init();
+ },
+ computed: {
+ ...mapGetters({
+ // 获取餐厅信息
+ GetShopInfor: 'shopping/GetShopInfor',
+ // 获取品牌Id
+ BrandInfor: 'shopping/BrandInfor',
+ }),
},
methods: {
init() {
@@ -442,6 +456,13 @@
uni.showLoading({ title: '支付成功, 跳转订单页' });
this.$Payment.H5TOWX_Payment({
datas: res['data'],
+ GetShopInfor: {
+ name: this.GetShopInfor.restaurant_name,
+ shop: this.BrandInfor.brand_name,
+ id: this.BrandInfor.brand_id,
+ },
+ payData: from,
+ HeadersData: this.GetShopInfor,
shopInfo: from.products,
return_url:`/pages/restaurant/order/order-details/details?order_sn=${res.data.order_sn}`
});
@@ -1038,5 +1059,18 @@
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 a66e635..189f2ef 100644
--- a/static/js/mixin/PayMixin.js
+++ b/static/js/mixin/PayMixin.js
@@ -3,7 +3,10 @@ import {
GetPaypackageInfor,
makeMinUrlAPI,
getPayParamsAPI
-} from '@/request/pay/index.js';
+} from '@/request/pay/index.js';
+import store from '@/store/index';
+import state from '@/store/index';
+
class Payment {
static order_sn = 0
/**
@@ -15,6 +18,7 @@ class Payment {
* 该方法没有支付失败和成功回调函数必须由微信支付完成之后跳转至指定页面去查询订单状态然后根据订单状态再跳转值业务页面
*/
H5TOWX_Payment(data) {
+ console.log(data, '111111')
uni.showLoading({
title: '支付中...'
});
@@ -22,33 +26,35 @@ class Payment {
const {
datas,
shopInfo,
+ computedTotal,
+ GetShopInfor,
return_url,
+ payData,
+ HeadersData,
redirect=false,
PAY_TYPE='1',
success = () => {},
file = () => {}
} = data;
- // if (!pay_price) throw new Error('缺少支付金额');
- // if (!order_sn) throw new Error('缺少订单号');
- // if (!type) throw new Error('缺少支付类型');
-
// 下单信息
const OrderData = datas;
const ShopInfo = shopInfo;
// 判断是微信支付还是支付宝支付
+ console.log(store.getters.GetToken)
if(PAY_TYPE == '1'){
// 微信内嵌WEBVIEW方式进入H5页面
- if(getApp()['globalData']['parameters']?.isWechat){
OrderData['WechatRetreat'] = true;
// 先跳转至微信支付页面
try{
- // wx.miniProgram.navigateTo({
- // url: `/pages/wxpay/h5pay/h5pay?data=${encodeURIComponent(JSON.stringify(OrderData))}`
- // });
+ // 地区码
+ data.HeadersData.adcode = state['getters']['GetcityInfor']['adcode']
+
+ 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))}`
+ 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))}`
});
// 延迟两秒后H5内部跳转
setTimeout(()=>{
@@ -76,49 +82,6 @@ class Payment {
icon:'none'
})
}
-
- }else{
- OrderData['WechatRetreat'] = false;
- openMiniProgram({
- path: `pages/wxpay/h5pay/h5pay?data=${encodeURIComponent(JSON.stringify(OrderData))}`,
- id: 'gh_faaea9b90759',
- // type: 'release',
- type: 'preview'
- })
- // 其他方式进入H5页面(APP)
- // 反之使用跳转连接进入
- // makeMinUrlAPI({
- // path :'/pages/wxpay/h5pay/h5pay',
- // query:`data=${encodeURIComponent(JSON.stringify(OrderData))}`,
- // // uu_id:17551,
- // // release 正式版
- // // trial 测试版
- // // develop 开发板
- // env_version:'develop',
- // }).then(res=>{
- // // console.log(res);
- // console.log(res['data']['openlink'],'openlink');
- // // return
- // location.href = res['data']['openlink'];
- // // 延迟两秒后H5内部跳转
- // setTimeout(()=>{
- // uni.hideLoading();
- // if(return_url){
- // // 是否需要关闭调起支付的页面
- // if(redirect){
- // uni.redirectTo({
- // url:return_url
- // });
- // }else{
- // uni.navigateTo({
- // url:return_url
- // })
- // }
- // }
- // },2000)
- // })
- uni.hideLoading();
- }
}else{
OrderData['WechatRetreat'] = true;
window.location.href=`https://ds.alipay.com/?scheme=${encodeURIComponent(`alipays://platformapi/startapp?appId=2021003130603407&page=pages/wxpay/h5pay/h5pay?data=${encodeURIComponent(JSON.stringify(OrderData))}`)}`
diff --git a/static/js/mixin/restaurantmixins.js b/static/js/mixin/restaurantmixins.js
index 05ea2f2..f8720e5 100644
--- a/static/js/mixin/restaurantmixins.js
+++ b/static/js/mixin/restaurantmixins.js
@@ -310,6 +310,7 @@ const restaurantmixins = {
computedOrder() {
// 佣金计算
computedOfflineOrder(this.FormInfor).then(res => {
+ this.loading = false;
this.computedTotal = res.data;
if (!res.data.used_broker) {
this.use_broker = false
@@ -317,6 +318,12 @@ const restaurantmixins = {
if (!res.data.used_coin) {
this.use_coin = false
}
+ }).catch(res => {
+ this.loading = false;
+ uni.showToast({
+ title:res,
+ icon:'none'
+ })
})
},
diff --git a/unpackage/dist/.DS_Store b/unpackage/dist/.DS_Store
index 8f70268..5d1d41c 100644
Binary files a/unpackage/dist/.DS_Store and b/unpackage/dist/.DS_Store differ
diff --git a/unpackage/dist/build/.DS_Store b/unpackage/dist/build/.DS_Store
index 1209531..77a57ad 100644
Binary files a/unpackage/dist/build/.DS_Store and b/unpackage/dist/build/.DS_Store differ
diff --git a/unpackage/dist/build/web.zip b/unpackage/dist/build/web.zip
index 84e53c2..fb7cac5 100644
Binary files a/unpackage/dist/build/web.zip and b/unpackage/dist/build/web.zip differ
diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html
index 6afedc7..b6bf459 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('')