未验证 提交 3351d1d3 编写于 作者: O openharmony_ci 提交者: Gitee

!17055 【应用帐号】api9接口示例代码整改

Merge pull request !17055 from lichenchen/master
......@@ -2092,7 +2092,7 @@ getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>):
var sessionId = want.parameters[account_appAccount.Constants.KEY_SESSION_ID];
try {
appAccountManager.getAuthCallback(sessionId, (err, callback) => {
if (err.code != account_appAccount.ResultCode.SUCCESS) {
if (err != null) {
console.log("getAuthCallback err: " + JSON.stringify(err));
return;
}
......@@ -2106,7 +2106,7 @@ getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>):
authType: "getSocialData"
}
};
callback.onResult(account_appAccount.ResultCode.SUCCESS, result);
callback.onResult(0, result);
});
} catch (err) {
console.log("getAuthCallback exception: " + JSON.stringify(err));
......@@ -2163,7 +2163,7 @@ getAuthCallback(sessionId: string): Promise<AuthCallback>
authType: "getSocialData"
}
};
callback.onResult(account_appAccount.ResultCode.SUCCESS, result);
callback.onResult(0, result);
}).catch((err) => {
console.log("getAuthCallback err: " + JSON.stringify(err));
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册