'use strict'; const Controller = require('egg').Controller; class PageController extends Controller { async create() { const { ctx } = this; const res = await ctx.service.page.create(ctx.request.body); ctx.body = res; } async update() { const { ctx } = this; const res = await ctx.service.page.update(ctx.request.body); ctx.body = res; } async del() { const { ctx } = this; const res = await ctx.service.page.del(ctx.params); ctx.body = res; } async query() { const { ctx } = this; const res = await ctx.service.page.query(ctx.query); ctx.body = res; } async details() { const { ctx } = this; const res = await ctx.service.page.details(ctx.params); ctx.body = res; } async detailscode() { const { ctx } = this; const res = await ctx.service.page.detailscode(ctx.params); ctx.body = res; } } module.exports = PageController;