'use strict'; const meta = require('./.expert.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 专家 class ExpertController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.users.expert; } async index() { const { data, total } = await this.service.query(this.ctx.query); this.ctx.ok({ data, total }); } } module.exports = CrudController(ExpertController, meta);