From 372494883079be03b921f6686691271355bfdd14 Mon Sep 17 00:00:00 2001
From: huangsijun <1773182001@qq.com>
Date: Thu, 06 Nov 2025 12:04:52 +0800
Subject: [PATCH] 修改订单保存另外参数 微信支付预下单接口填入的 out_trade_no
---
mobile/common/pay.js | 29 ++++++++++++++++++-----------
1 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/mobile/common/pay.js b/mobile/common/pay.js
index 3b73160..8bd4822 100644
--- a/mobile/common/pay.js
+++ b/mobile/common/pay.js
@@ -30,7 +30,7 @@
// #endif
//公众号支付
// #ifdef H5
- if(self.isWeixin()){
+ if (self.isWeixin()) {
WeixinJSBridge.invoke('getBrandWCPayRequest', JSON.parse(result.data.payment),
function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
@@ -46,14 +46,14 @@
}
}
);
- }else{
+ } else {
window.location.href = result.data.payment.mweb_url + '&redirect_url=' + result.data.return_Url;
return;
}
// #endif
// #ifdef APP-PLUS
//微信支付
- wxAppPay(result, self,success, fail);
+ wxAppPay(result, self, success, fail);
return;
// #endif
}
@@ -64,7 +64,7 @@
// 支付宝支付
if (result.data.pay_type == 30) {
// #ifdef APP-PLUS
- aliAppPay(result, self,success, fail);
+ aliAppPay(result, self, success, fail);
// #endif
// #ifdef H5
const div = document.createElement('formdiv');
@@ -78,7 +78,7 @@
/*跳到支付成功页*/
function paySuccess(result, self, success) {
- if(success){
+ if (success) {
success(result);
return;
}
@@ -86,14 +86,21 @@
}
/*跳到支付成功页*/
function gotoSuccess(result) {
- uni.reLaunch({
- url: '/pages/order/pay-success/pay-success?order_id=' + result.data.order_id
- });
+ if (result.data.order_type == 100) {
+ uni.reLaunch({
+ url: '/pages/plus/business/detail?business_card_id=' + result.data.business_card_id
+ });
+ } else {
+ uni.reLaunch({
+ url: '/pages/order/pay-success/pay-success?order_id=' + result.data.order_id
+ });
+ }
+
}
/*支付失败跳订单详情*/
function payError(result, fail) {
- if(fail){
+ if (fail) {
fail(result);
return;
}
@@ -102,7 +109,7 @@
});
}
-function wxAppPay(result, self,success, fail){
+function wxAppPay(result, self, success, fail) {
// 获取支付通道
plus.payment.getChannels(function(channels) {
self.channel = channels[0];
@@ -125,7 +132,7 @@
});
}
-function aliAppPay(result, self,success, fail){
+function aliAppPay(result, self, success, fail) {
console.log(result.data.payment);
uni.requestPayment({
provider: 'alipay',
--
Gitblit v1.9.2