From 4768e86d89c51a85fd4fe7bd62714797f0a3549b Mon Sep 17 00:00:00 2001 From: zhaofengliang Date: Thu, 25 Jul 2024 19:41:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4getLocation=E5=92=8CvirtualPa?= =?UTF-8?q?yment=E9=A1=B5=E9=9D=A2=E7=A4=BA=E4=BE=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/get-location/get-location.uvue | 7 ++++++- pages/API/virtual-payment/virtual-payment.uvue | 13 +++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pages/API/get-location/get-location.uvue b/pages/API/get-location/get-location.uvue index cfba499f..6fcc9683 100644 --- a/pages/API/get-location/get-location.uvue +++ b/pages/API/get-location/get-location.uvue @@ -143,7 +143,12 @@ } }, getLocationTap: function () { - if (this.providerList.length == 0) { + if (this.providerList.length == 0) { + uni.showToast({ + title: '未获取到provider,请确定基座中包含location功能', + icon: "error" + }) + console.log("未获取到provider,请确定基座中包含location功能") return } uni.showLoading({ diff --git a/pages/API/virtual-payment/virtual-payment.uvue b/pages/API/virtual-payment/virtual-payment.uvue index f0fad864..b20cc6de 100644 --- a/pages/API/virtual-payment/virtual-payment.uvue +++ b/pages/API/virtual-payment/virtual-payment.uvue @@ -54,15 +54,15 @@ methods: { initProductList() { this.productList.push({ - name: '消耗性产品:个人赞助1元, 数量=5', + name: '消耗性产品:个人赞助1元', id: this.isDebug() ? "uniappx.consumable.sponsor_1" : "uniappx.consumable.sponsor1", - quantity: 5 + quantity: 1 } as PayItem); this.productList.push({ - name: '消耗性产品:金牌赞助50元', + name: '消耗性产品:金牌赞助5元, 数量=2', id: this.isDebug() ? "uniappx.consumable.sponsor_50" : "uniappx.consumable.sponsor50", - quantity: 1 + quantity: 2 } as PayItem); this.productList.push({ @@ -123,10 +123,11 @@ mask: true }); - uni.requestVirtualPayment({ + uni.requestVirtualPayment({ + //需要将orderId转换为如下符合UUID规则的字符串,然后赋值给参数appAccountToken, 传入不符合UUID规则的字符串无效 apple: { productId: e.id, - appAccountToken: "orderId+accountId", + appAccountToken: "123eaaaa-e89b-12d3-a456-42661417400b", quantity: e.quantity ?? 1, }, success: (res) => { -- GitLab