智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/0d/0d96a51a53567c47a9a658b54a3...

28 lines
517 B

import {
isFn
} from 'uni-shared'
import providers from 'uni-platform/runtime/api/providers'
export function getProvider ({
service,
success,
fail,
complete
}) {
let res = false
if (providers[service]) {
res = {
errMsg: 'getProvider:ok',
service,
provider: providers[service]
}
isFn(success) && success(res)
} else {
res = {
errMsg: 'getProvider:fail:服务[' + service + ']不存在'
}
isFn(fail) && fail(res)
}
isFn(complete) && complete(res)
}