export type GetProviderSuccess = { /** * 服务类型 * - payment: 支付 * @type 'payment' */ service : 'payment', /** * 得到的服务供应商 * @type PlusShareShareService['id'][] | PlusPushClientInfo['id'][] | PlusOauthAuthService['id'][] | PlusPaymentPaymentChannel['id'][] */ provider : string[], /** * 得到的服务供应商服务对象 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "4.18" * }, * "ios": { * "osVer": "9.0", * "uniVer": "√", * "unixVer": "4.18" * } * }, * "web": { * "uniVer": "x", * "unixVer": "x" * } * } */ providers : UniProvider[], /** * 错误信息 */ errMsg : string }; export type GetProviderSuccessCallback = (result : GetProviderSuccess) => void; export type GetProviderFail = UniError; export type GetProviderFailCallback = (result : GetProviderFail) => void; export type GetProviderComplete = any; export type GetProviderCompleteCallback = (result : GetProviderComplete) => void; export type GetProviderOptions = { /** * 服务类型,可取值“payment” * - payment: 支付 (Alipay、Wxpay) * @type 'payment' */ service : 'payment', /** * 接口调用成功的回调 */ success ?: GetProviderSuccessCallback | null, /** * 接口调用失败的回调函数 */ fail ?: GetProviderFailCallback | null, /** * 接口调用结束的回调函数(调用成功、失败都会执行) */ complete ?: GetProviderCompleteCallback | null }; export type GetProvider = (options : GetProviderOptions) => void; export interface Uni { /** * 获取服务供应商 * @param {GetProviderOptions} options * @return {void} * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-provider.html * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "4.11" * }, * "ios": { * "osVer": "9.0", * "uniVer": "√", * "unixVer": "4.18" * } * }, * "web": { * "uniVer": "x", * "unixVer": "x" * } * } * @example ```typescript uni.getProvider({service: ''}) ``` */ getProvider(options : GetProviderOptions) : void; }