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

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

上级 a9f284a2
......@@ -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;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册