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

钉钉登录参数调整

上级 36af3ee9
......@@ -84,8 +84,8 @@ export class DingTalkService {
*/
public async login(): Promise<any> {
const access_token :any= await this.get(`/uaa/open/dingtalk/access_token`);
if(access_token.status == 200 && access_token.data && access_token.data.regionid){
const res: any= await dd.runtime.permission.requestAuthCode({ corpId: access_token.data.regionid });
if(access_token.status == 200 && access_token.data && access_token.data.corp_id){
const res: any= await dd.runtime.permission.requestAuthCode({ corpId: access_token.data.corp_id });
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){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册