更新记录
1.0.19(2024-11-05)
下载此版本
修复腾讯一键登录 多次回调问题
1.0.18(2024-07-31)
下载此版本
fix
1.0.17(2024-07-31)
下载此版本
支持安卓端
查看更多
平台兼容性
App |
快应用 |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
HBuilderX 3.6.8,Android:9.0,iOS:12,HarmonyNext:不确定 |
× |
× |
× |
× |
× |
× |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
× |
× |
× |
× |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
× |
× |
× |
× |
× |
× |
× |
× |
× |
fc-api
开发文档
// ================= 腾讯一键登录 ==================
/*
初始化sdk
@param apiId 申请的appid
@param success {
code 0 成功
msg 具体内容
data 响应数据 {
isSuccess : bool
}
}
*/
export type tencentInitLogin = (apiId: string, success:(code: string, msg: string, data?: any) => void) => void
/*
预登录
@param success {
code 0 成功
msg 具体内容
data 响应数据 {
{
"preResultCode" =>'10000',
"operatortype" =>'2',
"traceId" =>
'991cb488d43f723c5f57302c85c0e42a',
"desc" =>''success',
"resultCode" =>'103000',
"scripExpiresIn" =>'600'
}
}
}
*/
export type tencentPreLogin = (success:(code: string, msg: string, data?: any) => void) => void
/*
登录授权页面获取token
@param logoPath app logo /static/logo.png
@param logoBtnBgPath 一键登录按钮背景图 /static/logo.png
@param bgPath 页面背景图 /static/logo.png
@param privacys {
'腾讯协议' : 'https://www.qq.com',
'百度协议' : 'https://www.baidu.com'
}
@param success {
code 0 成功
msg 具体内容
data 响应数据 {
页面拉起回调
{ "loginResultCode" => '200087', "resultMsg" => '成功弹起授权页面', "token" => '' }
点击登录授权获取token
{ "loginResultCode" => '0', "token" => 'EDDCAC0738EA4B9F8F98BAF093CF56B8', "resultMsg" => '成功' }
}
}
*/
export type tencentLoginWithController = (logoPath: string, logoBtnBgPath: string, bgPath: string, privacys: any, success:(code: string, msg: string, data?: any) => void) => void
/*
退出登录页面
@param success {
code 0 成功
msg 具体内容
data 响应数据 {
}
}
*/
export type tencentDismiss = (success:(code: string, msg: string, data?: any) => void) => void
// ================= 证书相关 ==================
/*
注: 每次启动app 都需要注册该方法
clientId 第三方厂商标识 示例: 2015120417541766
@param type 0正式环境 1测试环境
*/
export type ywxStartWithClientId = (clientId: string, type: Number) => void
/*
下载证书
@param phone 手机号码
@param success {
code 0 成功
msg 具体内容
data 响应数据 {"openId":"77f331571192e75bq8af4wdd00y8a025460"}
}
*/
export type ywxCertDownWithPhone = (phone: string, success:(code: string, msg: string, data?: any) => void) => void
/*
下载证书 (安卓不支持)
@param phone 手机号码
@param firmId 子厂商id
@param success {
code 0 成功
msg 具体内容
data 响应数据 {"openId":""}
}
*/
export type ywxCertDownWithPhoneFirmId = (phone: string, firmId:string, success:(code: string, msg: string, data?: any) => void) => void
/*
本地证书是否存在。
data {
isExist BOOL
}
@param success 回调
*/
export type ywxExistsCert = (success:(code: string, msg: string, data?: any) => void) => void
/*
更新证书
@param success 回调
*/
export type ywxCertUpdateWithCompletion = (success:(code: string, msg: string, data?: any) => void) => void
/*
更新证书
@param firmId 子厂商id
@param success 回调
*/
export type ywxCertUpdateWithFirmIdCompletion = (firmId: string, success:(code: string, msg: string, data?: any) => void) => void
/*
重置证书
@param success 回调
*/
export type ywxCertResetPinWithCompletion = (success:(code: string, msg: string, data?: any) => void) => void
/*
重置证书 (安卓不支持)
@param firmId 子厂商id
@param success 回调
*/
export type ywxCertResetPinWithFirmIdCompletion = (firmId:string, success:(code: string, msg: string, data?: any) => void) => void
/*
查看证书详情
@param success 回调
*/
export type ywxShowCertDetailWithCompletion = (success:(code: string, msg: string, data?: any) => void) => void
/*
查看证书详情 (安卓不支持)
@param firmId 子厂商id
@param success 回调
*/
export type ywxShowCertDetailWithFirmIdCompletion = (firmId:string, success:(code: string, msg: string, data?: any) => void) => void
/*
删除本地证书
data {
isSuccess BOOL
}
@param success 回调
*/
export type ywxClearCert = (success:(code: string, msg: string, data?: any) => void) => void
/*
获取用户信息。
data {
用户信息
}
@param success 回调
*/
export type ywxRequestUserInfoWithCompletion = (success:(code: string, msg: string, data?: any) => void) => void
// ================= 签章相关 ==================
/*
签章图片的 base64 字符串,如果签章不存在则为 nil。(医网信APP专用)
data {
signatureBase64 base64 字符串
}
@param success 回调
*/
export type ywxSignatureBase64EncodedString = (success:(code: string, msg: string, data?: any) => void) => void
/*
签章配置
@param success 回调
*/
export type ywxDrawStampWithCompletion = (success:(code: string, msg: string, data?: any) => void) => void
// ================= 二维码相关 ==================
/*
对二维码信息进行识别处理
@param qrString 二维码字符串信息
@param success 回调
*/
export type ywxQrDisposeWithString = (qrString:string, success:(code: string, msg: string, data?: any) => void) => void
/*
对二维码信息进行识别处理
@param qrString 二维码字符串信息
@param isAuth 是否处理授权登录(如果存在授权关系会以错误码的形式抛出)
@param success 回调
*/
export type ywxQrDisposeWithStringHandleGrantOauth = (qrString:string, isAuth: Boolean, success:(code: string, msg: string, data?: any) => void) => void
// ================= 自动签 ==================
/*
开启自动签名
@param sysTag 开启自动签名的系统标识名(需和服务端保持一致)
@param success 回调
*/
export type ywxSignForStartSignAutoWithSysTag = (sysTag:string, success:(code: string, msg: string, data?: any) => void) => void
/*
关闭自动签名
@param sysTag 开启自动签名的系统标识名(需和服务端保持一致)
@param success 回调
*/
export type ywxStopSignAutoWithSysTag = (sysTag:string, success:(code: string, msg: string, data?: any) => void) => void
/*
获取自动签名信息
@param completion 回调
@param success 回调
*/
export type ywxSignAutoInfoWithCompletion = (success:(code: string, msg: string, data?: any) => void) => void
// ================= 免密 ==================
/*
开启免密签名
@param days 单位天(1-60)
@param success 回调
*/
export type ywxKeepPinWithDays = (days: Int, success:(code: string, msg: string, data?: any) => void) => void
/*
关闭免密签名。
@param success 回调
*/
export type ywxClearPin = (success:(code: string, msg: string, data?: any) => void) => void
/*
免密签名状态。
@param success 回调
data {
isPin BOOL
}
*/
export type ywxIsPinExempt = (success:(code: string, msg: string, data?: any) => void) => void
// ================= 生物识别设置 ==================
/*
开启生物识别 (安卓不支持)
@param success 回调
*/
export type ywxStartBiometricAuthenticationForSignWithCompletion = (success:(code: string, msg: string, data?: any) => void) => void
/*
关闭生物识别 (安卓不支持)
@param success 回调
*/
export type ywxStopBiometricAuthenticationForSignWithCompletion = (success:(code: string, msg: string, data?: any) => void) => void
/*
签名的 Touch ID / Face ID 是否开启。 (安卓不支持)
@param success 回调
data {
isEnabled : BOOL
}
*/
export type ywxIsBiometricAuthenticationEnabled = (success:(code: string, msg: string, data?: any) => void) => void
// ================= 授权签名 ==================
/*
开启授权签名 (安卓不支持)
@param firmId 子厂商id
@param grantedUserId 指定授权用户的id
@param hours 单位小时
@param completion 回调
*/
export type ywxGrantSignAuthorizationToFirmId = (firmId:string, grantedUserId:string, hours: Int, success:(code: string, msg: string, data?: any) => void) => void
/*
关闭授权签名 (安卓不支持)
@param firmId 子厂商id
@param grantUniqueId 授权唯一标识id
@param completion 回调
*/
export type ywxStopGrantSignAuthorizationToFirmId = (firmId:string, grantUniqueId:string, success:(code: string, msg: string, data?: any) => void) => void
// ================= 配置 ==================
/*
SDK 当前开发环境的 URL 地址。
@param success 回调
data {
url : URL地址
}
*/
export type ywxCurrentEnvironmentURL = (success:(code: string, msg: string, data?: any) => void) => void
/*
当前版本号。
@param success 回调
data {
version : 版本号
}
*/
export type ywxVersionString = (success:(code: string, msg: string, data?: any) => void) => void
/*
当前显示的语言。(医网信APP专用) 安卓不支持
@param success 回调
data {
language : 语言
}
*/
export type ywxCurrentLanguage = (success:(code: string, msg: string, data?: any) => void) => void
/*
用户的 openID,证书不存在时为 nil。
@param success 回调
data {
openId :
}
*/
export type ywxCurrentOpenId = (success:(code: string, msg: string, data?: any) => void) => void
/*
修改界面语言(医网信APP专用)
@param language 语言字符串 zh-Hans中文en英文
@param success 回调
*/
export type ywxChangePreferredLanguage = (language: string ,success:(code: string, msg: string, data?: any) => void) => void
/*
展示键盘输入页面
@param success 键盘完成回调
*/
export type ywxShowPinWindowWithCompletion = (success:(code: string, msg: string, data?: any) => void) => void
// ================= 签名 ==================
/*
普通签名接口
@param uniqueIdList 签名数据数组 数据同步后返回的uniqueId 数组集合
@param success 回调
*/
export type ywxSignWithUniqueIdList = (uniqueIdList: String[], success:(code: string, msg: string, data?: any) => void) => void