用户授权
API 调用
QN.sso(options)
获取用户的授权信息
API 调用入参
名称 | 类型 | 是否可选 | 含义 |
---|---|---|---|
options |
Object |
选项 | |
options.success |
Function |
optional |
调用成功的回调函数 |
options.error |
Function |
optional |
调用失败的回调函数 |
API 响应结果
名称 | 类型 | 是否必须返回 | 含义 |
---|---|---|---|
result |
Object |
响应对象 | |
result.errorCode |
Number |
错误码,成功为0,失败为非0 | |
result.errorMsg |
String |
错误信息 | |
result.auth |
Object |
授权信息 |
调用示例
QN.sso({
success(result) {
console.log(result);
},
error(error) {
console.log(error);
}
}).then(result => {
console.log(result);
}, error => {
console.log(error);
});