student.js 474 B

1234567891011121314151617
  1. 'use strict';
  2. const Controller = require('egg').Controller;
  3. const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
  4. // 学生视图接口
  5. class StudentController extends Controller {
  6. constructor(ctx) {
  7. super(ctx);
  8. this.service = this.ctx.service.view.student;
  9. }
  10. async lessonList() {
  11. const data = await this.service.lessonList(this.ctx.query);
  12. this.ctx.ok(data);
  13. }
  14. }
  15. module.exports = CrudController(StudentController, {});