From d14191e8dca552a9c5eff4a1333290d56ed98665 Mon Sep 17 00:00:00 2001 From: TianYu <332368756@qq.com> Date: Fri, 26 May 2023 17:06:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-app/libs/pay.js | 5 +++++ yudao-ui-app/pages/goods_cashier/index.vue | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/yudao-ui-app/libs/pay.js b/yudao-ui-app/libs/pay.js index b97635492..1f09568a4 100644 --- a/yudao-ui-app/libs/pay.js +++ b/yudao-ui-app/libs/pay.js @@ -41,6 +41,11 @@ const unityPay = (options) => { }) } _options.payInfo.openid = openId + if (_options.payType === 'WXPAY') { + _options.payInfo.payChannel = '微信支付' + } else if (_options.payType === 'ALIPAY') { + _options.payInfo.payChannel = '支付宝' + } uni.showLoading({ title: '支付中', mask: true diff --git a/yudao-ui-app/pages/goods_cashier/index.vue b/yudao-ui-app/pages/goods_cashier/index.vue index 0e7b624a1..23f6d671c 100644 --- a/yudao-ui-app/pages/goods_cashier/index.vue +++ b/yudao-ui-app/pages/goods_cashier/index.vue @@ -63,7 +63,8 @@ import AlipayLinkCopy from '@/components/aliPayLinkCopy' import { getOrderDetail, - orderPay + orderPay, + wechatOrderPay } from '@/api/order.js'; import uniPay from '@/libs/pay.js' export default { @@ -191,9 +192,11 @@ title: '支付中' }) uniPay({ - payInfo: that.payInfo, + payInfo: { + orderNo: that.orderId + }, payType: that.paytype, - createOrderFun: memberTopUp, + createOrderFun: wechatOrderPay, payResultHandle: (res) => { return { jsapiResult: res.jsapiConfig,