ty.p2p.P2PSDKInit
P2P SDK 初始化
需引入
P2PKit
,且在>=0.0.1
版本才可使用
参数
Object object
属性 | 类型 | 默认值 | 必填 | 说明 |
---|---|---|---|---|
userId | string |
是 | 用户id | |
complete | function |
否 | 接口调用结束的回调函数(调用成功、失败都会执行) | |
success | function |
否 | 接口调用成功的回调函数 | |
fail | function |
否 | 接口调用失败的回调函数 |
函数定义示例
/**
* P2P SDK 初始化
*/
export function P2PSDKInit(params: {
/** 用户id */
userId: string
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
complete?: () => void
/** 接口调用成功的回调函数 */
success?: (params: null) => void
/** 接口调用失败的回调函数 */
fail?: (params: {
errorMsg: string
errorCode: string | number
innerError: {
errorCode: string | number
errorMsg: string
}
}) => void
}): void
ty.p2p.deInitSDK
P2P SDK 反初始化
需引入
P2PKit
,且在>=0.0.1
版本才可使用
参数
Object object
属性 | 类型 | 默认值 | 必填 | 说明 |
---|---|---|---|---|
complete | function |
否 | 接口调用结束的回调函数(调用成功、失败都会执行) | |
success | function |
否 | 接口调用成功的回调函数 | |
fail |
|