diff --git a/pages/API/get-location/get-location.uvue b/pages/API/get-location/get-location.uvue index 6fcc96831df07ee6cc4ef0d7d82ee29d34e0aa82..d54925cd1f53302023194667067eccc9ce97c1e2 100644 --- a/pages/API/get-location/get-location.uvue +++ b/pages/API/get-location/get-location.uvue @@ -88,17 +88,17 @@ uni.getProvider({ service: "location", success: (e) => { - console.log("location success:" + JSON.stringify(e), e.providers.length); - let array = e.provider as string[] + console.log("location success:" + JSON.stringify(e), e.providerObjects.length); + let array = e.providerIds as string[] array.forEach((value : string) => { - let locationProvider = e.providers.find((item) : boolean => { + let locationProvider = e.providerObjects.find((item) : boolean => { return item.id == value }) if (locationProvider != null) { this.providerList.push({ name: locationProvider.description, id: locationProvider.id, - provider: e.providers.find((item) : boolean => { + provider: e.providerObjects.find((item) : boolean => { return item.id == locationProvider.id }) } as LocationItem); diff --git a/pages/API/request-payment/request-payment.uvue b/pages/API/request-payment/request-payment.uvue index 675496aec3a6424753b5b927406d8092a5d8ca12..3bcc8fa290ab0fcb115a0e66ce72731f4cbbaa33 100644 --- a/pages/API/request-payment/request-payment.uvue +++ b/pages/API/request-payment/request-payment.uvue @@ -26,14 +26,14 @@ service: "payment", success: (e) => { console.log("payment success:" + JSON.stringify(e)); - let array = e.provider as string[] + let array = e.providerIds as string[] array.forEach((value : string) => { switch (value) { case 'alipay': this.providerList.push({ name: '支付宝', id: "alipay", - provider: e.providers.find((item) : boolean => { + provider: e.providerObjects.find((item) : boolean => { return item.id == 'alipay' }) } as PayItem); @@ -42,7 +42,7 @@ this.providerList.push({ name: '微信', id: "wxpay", - provider: e.providers.find((item) : boolean => { + provider: e.providerObjects.find((item) : boolean => { return item.id == 'wxpay' }) } as PayItem);