登录:装备,密码,短信登录
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { Controller } from 'egg';
|
||||
|
||||
export default class AccountController extends Controller {
|
||||
|
||||
public async deviceLogin() {
|
||||
const { ctx } = this;
|
||||
const { token, isGuest, deviceId, platform, pkgName, serverType } = ctx.request.body;
|
||||
ctx.body = await ctx.service.auth.deviceLogin(isGuest, token, deviceId, platform, pkgName, serverType);
|
||||
}
|
||||
|
||||
public async getSms() {
|
||||
const { ctx } = this;
|
||||
const { tel } = ctx.request.body;
|
||||
@@ -9,8 +16,20 @@ export default class AccountController extends Controller {
|
||||
|
||||
public async smsLogin() {
|
||||
const { ctx } = this;
|
||||
const { tel, code, platform, pkgName, serverType } = ctx.request.body;
|
||||
ctx.body = await ctx.service.auth.smsLogin(tel, code, platform, pkgName, serverType);
|
||||
const { tel, code, platform, pkgName, serverType, deviceId } = ctx.request.body;
|
||||
ctx.body = await ctx.service.auth.smsLogin(tel, deviceId, code, platform, pkgName, serverType);
|
||||
}
|
||||
|
||||
public async setPassword() {
|
||||
const { ctx } = this;
|
||||
const { password } = ctx.request.body;
|
||||
ctx.body = await ctx.service.auth.setPassword(password);
|
||||
}
|
||||
|
||||
public async pwLogin() {
|
||||
const { ctx } = this;
|
||||
const { tel, deviceId, pw } = ctx.request.body;
|
||||
ctx.body = await ctx.service.auth.pwLogin(tel, deviceId, pw);
|
||||
}
|
||||
|
||||
public async checkRole() {
|
||||
|
||||
Reference in New Issue
Block a user