提交 b269711e 编写于 作者: KK's avatar KK

调试

上级 d30cf0ca
......@@ -145,12 +145,12 @@ export class DingTalkService {
localStorage.setItem("access_token", JSON.stringify(Object.assign(access_token, new Date().getTime)));
this.corpId = access_token.data.corp_id;
const res: any = await dd.runtime.permission.requestAuthCode({ corpId: this.corpId });
this.doAuthentication();
if (res && res.code) {
const userInfo: any = await this.get(`/uaa/open/dingtalk/auth/${res.code}`);
if (userInfo.status == 200 && userInfo.data.token && userInfo.data.user) {
localStorage.setItem("token", userInfo.data.token);
localStorage.setItem("user", JSON.stringify(userInfo.data.user));
this.doAuthentication();
return { issuccess: true, message: "" };
} else if (userInfo.status == 400) {
return { issuccess: false, message: userInfo.data.message };
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册