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