登录:绑定、服务器列表

This commit is contained in:
luying
2021-03-03 17:47:00 +08:00
parent c9dbb16adc
commit bbdc20240d
8 changed files with 227 additions and 48 deletions

View File

@@ -28,8 +28,8 @@ export default class AccountController extends Controller {
public async pwLogin() {
const { ctx } = this;
const { tel, deviceId, pw } = ctx.request.body;
ctx.body = await ctx.service.auth.pwLogin(tel, deviceId, pw);
const { tel, deviceId, password } = ctx.request.body;
ctx.body = await ctx.service.auth.pwLogin(tel, deviceId, password);
}
public async checkRole() {
@@ -43,4 +43,16 @@ export default class AccountController extends Controller {
const { serverId, roleName } = ctx.request.body;
ctx.body = await ctx.service.auth.createRole(serverId, roleName);
}
public async bind() {
const { ctx } = this;
const { tel, code, password } = ctx.request.body;
ctx.body = await ctx.service.auth.bind(tel, code, password);
}
public async authentication() {
const { ctx } = this;
const { name, idNum } = ctx.request.body;
ctx.body = await ctx.service.auth.authentication(name, idNum);
}
}