'use strict'; const Controller = require('egg').Controller; class UtilController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.util; } async utilMethod() { const res = await this.service.utilMethod(this.ctx.query, this.ctx.request.body); this.ctx.ok({ data: res }); } } module.exports = UtilController;