From 73b874c72ad55eb9eef21c36160ac0de58f0189e Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Thu, 05 Feb 2026 10:30:43 +0800
Subject: [PATCH] 优化名片
---
mobile/common/pay.js | 37 ++++++++++++++++++++++++++-----------
1 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/mobile/common/pay.js b/mobile/common/pay.js
index 3b73160..cd6d65c 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
}
@@ -61,10 +61,18 @@
if (result.data.pay_type == 10) {
paySuccess(result, self, success);
}
+ // 激活码支付
+ if (result.data.pay_type == 50) {
+ paySuccess(result, self, success);
+ }
+ // 联盟币支付
+ if (result.data.pay_type == 60) {
+ paySuccess(result, self, success);
+ }
// 支付宝支付
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 +86,7 @@
/*跳到支付成功页*/
function paySuccess(result, self, success) {
- if(success){
+ if (success) {
success(result);
return;
}
@@ -86,14 +94,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 +117,7 @@
});
}
-function wxAppPay(result, self,success, fail){
+function wxAppPay(result, self, success, fail) {
// 获取支付通道
plus.payment.getChannels(function(channels) {
self.channel = channels[0];
@@ -125,7 +140,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