From 2ebe2f339555a9a8991033adafa479e9c81f9d9e Mon Sep 17 00:00:00 2001 From: zhaofengliang Date: Mon, 5 Aug 2024 20:47:51 +0800 Subject: [PATCH] =?UTF-8?q?App=20=E5=B9=B3=E5=8F=B0=EF=BD=9C=E8=B0=83?= =?UTF-8?q?=E6=95=B4provider=20=E7=A4=BA=E4=BE=8B=E3=80=82#5843?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/provider/provider.uvue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pages/API/provider/provider.uvue b/pages/API/provider/provider.uvue index 48f7e64c..27130c2d 100644 --- a/pages/API/provider/provider.uvue +++ b/pages/API/provider/provider.uvue @@ -54,7 +54,14 @@ } }, methods: { + clearProviderObj() { + this.serviceList.forEach((item : ProviderItem) => { + item.providerObj = [] + item.providerObjMap = [] + }) + }, getProviderSync() { + this.clearProviderObj() this.serviceList.forEach((item : ProviderItem) => { let provider = uni.getProviderSync({ service: item.service @@ -64,6 +71,7 @@ }) }, getProvider() { + this.clearProviderObj() this.serviceList.forEach((item : ProviderItem) => { uni.getProvider({ service: item.service, @@ -90,6 +98,7 @@ this.flag = true this.getProvider() let objList = [] + this.clearProviderObj() this.serviceList.forEach((value) => { value.provider.forEach((provider) => { let obj = uni.getProviderObjectById({ @@ -176,4 +185,4 @@ .btn-get-provider { margin-top: 30px; } - \ No newline at end of file + -- GitLab