From 3c6689b4e106cdd3b0c2d825a8606365d0ddd9c8 Mon Sep 17 00:00:00 2001 From: VK <370725567@qq.com> Date: Thu, 4 Apr 2024 19:11:14 +0800 Subject: [PATCH] =?UTF-8?q?update:=20HBX4.11=E8=B5=B7=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uni-pay-x/components/uni-pay/uni-pay.uvue | 23 ++++++++----------- .../cloudfunctions/uni-pay-co/index.obj.js | 11 +++++---- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/uni_modules/uni-pay-x/components/uni-pay/uni-pay.uvue b/uni_modules/uni-pay-x/components/uni-pay/uni-pay.uvue index 0de19932..61c52fd3 100644 --- a/uni_modules/uni-pay-x/components/uni-pay/uni-pay.uvue +++ b/uni_modules/uni-pay-x/components/uni-pay/uni-pay.uvue @@ -282,12 +282,14 @@ } // #ifdef APP if (options['provider'] == "wxpay") { - uni.showModal({ - title: "提示", - content: "uni-pay 的 uni-app x 版本暂未适配微信支付", - showCancel: false - }) - return; + // #ifdef uniVersion < 4.11 + uni.showModal({ + title: "提示", + content: "请先升级HBX至4.11", + showCancel: false + }) + return; + // #endif } // #endif @@ -341,13 +343,6 @@ // 调起支付 orderPayment(res : UTSJSONObject) { this.orderRes = res; - let _order = res.get('order'); - let orderStr = ""; - if (typeof _order == "string") { - orderStr = res.get('order') as string; - } else { - //order = res.get('order') as UTSJSONObject; - } if (res['qr_code'] != null && res['qr_code'] != "") { this.$emit("qrcode", res); } @@ -379,6 +374,8 @@ } // #endif // #ifndef H5 + let _order = res.get('order'); + let orderStr = typeof _order == "string" ? _order as string : JSON.stringify(_order) as string; uni.requestPayment({ provider: res['provider'] as string, orderInfo: orderStr, diff --git a/uni_modules/uni-pay-x/uniCloud/cloudfunctions/uni-pay-co/index.obj.js b/uni_modules/uni-pay-x/uniCloud/cloudfunctions/uni-pay-co/index.obj.js index 19ddb619..59608911 100644 --- a/uni_modules/uni-pay-x/uniCloud/cloudfunctions/uni-pay-co/index.obj.js +++ b/uni_modules/uni-pay-x/uniCloud/cloudfunctions/uni-pay-co/index.obj.js @@ -119,7 +119,10 @@ module.exports = { cloudInfo, wxpay_virtual, }); - + // uniappx-特殊处理 + if (typeof res.order === "object" && typeof res.order["timestamp"] === "string") { + res.order["timestamp"] = parseFloat(res.order["timestamp"]); + } return res; }, /** @@ -256,7 +259,7 @@ module.exports = { }; } }, - + /** * 验证iosIap苹果内购支付凭据 */ @@ -272,7 +275,7 @@ module.exports = { transaction_identifier }); }, - + /** * 接收微信小程序虚拟支付异步通知 */ @@ -286,5 +289,5 @@ module.exports = { cloudInfo }); }, - + } -- GitLab