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