sdk: 登录

This commit is contained in:
luying
2021-11-08 17:47:30 +08:00
parent a251ce47fa
commit fb6a5a785e
12 changed files with 291 additions and 60 deletions

View File

@@ -61,4 +61,10 @@ export default class AccountController extends Controller {
const { name, idNum } = ctx.request.body;
ctx.body = await ctx.service.auth.authentication(name, idNum);
}
public async channelLogin() {
const { ctx } = this;
const { channelType, pst, clientId, deviceId, platform, pkgName, serverType, getuiCID } = ctx.request.body;
ctx.body = await ctx.service.auth.channelLogin(channelType, clientId, pst, deviceId, platform, pkgName, serverType, getuiCID);
}
}

View File

@@ -104,7 +104,7 @@ export default class GameController extends Controller {
ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS, { isOK: true });
return;
} catch (e) {
ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS, { isOK: false, err: e.stack });
ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS, { isOK: false, err: (<Error>e).stack });
return;
}
}