'use strict'; const Controller = require('egg').Controller; // 登录管理 class LoginController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.login; } async login() { const res = await this.service.login(this.ctx.request.body); this.ctx.ok({ data: res }); } async token() { const res = await this.service.token(this.ctx.request.body); this.ctx.ok({ data: res }); } async destroy() { const res = await this.service.destroy(this.ctx.request.body); this.ctx.ok({ data: res }); } async wxlogin() { const res = await this.service.wxlogin(this.ctx.request.body); this.ctx.ok({ data: res }); } } module.exports = LoginController;