diff --git a/pages/API/request-payment/request-payment.uvue b/pages/API/request-payment/request-payment.uvue index 2b248747166d532b307c9e421bdb37fbe9b23621..3dfe4a44c502c637569b299aa1f52296e3764c36 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,