From f2027aeb5ab0a6820f08212e64fa74498bdc904b Mon Sep 17 00:00:00 2001 From: VK <370725567@qq.com> Date: Thu, 31 Oct 2024 11:31:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Duni-pay=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BANaN?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uni-pay-x/pages/success/success.uvue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/uni_modules/uni-pay-x/pages/success/success.uvue b/uni_modules/uni-pay-x/pages/success/success.uvue index 714e2d32..549957f8 100644 --- a/uni_modules/uni-pay-x/pages/success/success.uvue +++ b/uni_modules/uni-pay-x/pages/success/success.uvue @@ -40,7 +40,7 @@ adpid: "", order_no: "", out_trade_no: "", - total_fee: null, + total_fee: 0, pay_date: "", return_url: "" } as UTSJSONObject, @@ -55,9 +55,11 @@ // 监听 - 页面每次【加载时】执行(如:前进) onLoad(options) { this.myOptions['adpid'] = options['adpid']; - this.myOptions['order_no'] = options['order_no']; + this.myOptions['order_no'] = options['order_no'] != null ? options['order_no'] : "-"; this.myOptions['out_trade_no'] = options['out_trade_no']; - this.myOptions['total_fee'] = parseFloat(options['total_fee'] as string); + if (options['total_fee'] != null) { + this.myOptions['total_fee'] = parseFloat(options['total_fee'] as string); + } this.myOptions['pay_date'] = options['pay_date']; this.myOptions['return_url'] = options['return_url']; }, @@ -84,7 +86,7 @@ console.log("ad-error", e); }, amountFormat(totalFee : number | null) :string{ - if (totalFee == null) { + if (totalFee == null || totalFee == 0) { return "0"; } else { return (totalFee / 100).toFixed(2) -- GitLab