提交 2ebe2f33 编写于 作者: zhaofengliang920817's avatar zhaofengliang920817

App 平台|调整provider 示例。#5843

上级 4e22bbe8
......@@ -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({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册