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

!17057 【挑单3.2】【应用帐号】api9接口示例代码整改

Merge pull request !17057 from lichenchen/0410_mr
...@@ -2099,7 +2099,7 @@ getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>): ...@@ -2099,7 +2099,7 @@ getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>):
var sessionId = want.parameters[account_appAccount.Constants.KEY_SESSION_ID]; var sessionId = want.parameters[account_appAccount.Constants.KEY_SESSION_ID];
try { try {
appAccountManager.getAuthCallback(sessionId, (err, callback) => { appAccountManager.getAuthCallback(sessionId, (err, callback) => {
if (err.code != account_appAccount.ResultCode.SUCCESS) { if (err != null) {
console.log("getAuthCallback err: " + JSON.stringify(err)); console.log("getAuthCallback err: " + JSON.stringify(err));
return; return;
} }
...@@ -2113,7 +2113,7 @@ getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>): ...@@ -2113,7 +2113,7 @@ getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>):
authType: "getSocialData" authType: "getSocialData"
} }
}; };
callback.onResult(account_appAccount.ResultCode.SUCCESS, result); callback.onResult(0, result);
}); });
} catch (err) { } catch (err) {
console.log("getAuthCallback exception: " + JSON.stringify(err)); console.log("getAuthCallback exception: " + JSON.stringify(err));
...@@ -2170,7 +2170,7 @@ getAuthCallback(sessionId: string): Promise<AuthCallback> ...@@ -2170,7 +2170,7 @@ getAuthCallback(sessionId: string): Promise<AuthCallback>
authType: "getSocialData" authType: "getSocialData"
} }
}; };
callback.onResult(account_appAccount.ResultCode.SUCCESS, result); callback.onResult(0, result);
}).catch((err) => { }).catch((err) => {
console.log("getAuthCallback err: " + JSON.stringify(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.
先完成此消息的编辑!
想要评论请 注册