From 52122fffa33aac4988bf111090d05b76478803f6 Mon Sep 17 00:00:00 2001 From: zhaofengliang Date: Wed, 15 May 2024 19:54:32 +0800 Subject: [PATCH] =?UTF-8?q?iOS=EF=BD=9Cpayment=EF=BD=9C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98=E7=9A=84=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=87=91=E9=A2=9D=EF=BC=8C=20=E5=85=BC=E5=AE=B9iOS=E7=9A=84bun?= =?UTF-8?q?dleId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/request-payment/request-payment.uvue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pages/API/request-payment/request-payment.uvue b/pages/API/request-payment/request-payment.uvue index 2b248747..3dfe4a44 100644 --- a/pages/API/request-payment/request-payment.uvue +++ b/pages/API/request-payment/request-payment.uvue @@ -117,10 +117,20 @@ uni.showLoading({ title: "请求中..." }) - let url = 'https://demo.dcloud.net.cn/payment/wxpayv3.__UNI__uniappx/?total=1' - const res = uni.getAppBaseInfo(); - if (res.packageName == 'io.dcloud.hellouniappx') {//hello uniappx - url = 'https://demo.dcloud.net.cn/payment/wxpayv3.__UNI__HelloUniAppX/?total=1' + let url = 'https://demo.dcloud.net.cn/payment/wxpayv3.__UNI__uniappx/?total=0.01' + const res = uni.getAppBaseInfo(); + let packageName = '' + + // #ifdef APP-ANDROID + packageName = res.packageName + // #endif + + // #ifdef APP-IOS + packageName = res.bundleId + // #endif + + if (packageName == 'io.dcloud.hellouniappx') {//hello uniappx + url = 'https://demo.dcloud.net.cn/payment/wxpayv3.__UNI__HelloUniAppX/?total=0.01' } uni.request({ url: url, -- GitLab