notice.js 491 B

123456789101112131415161718
  1. 'use strict';
  2. const meta = require('./config/.notice.js');
  3. const Controller = require('egg').Controller;
  4. const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
  5. //
  6. class NoticeController extends Controller {
  7. constructor(ctx) {
  8. super(ctx);
  9. this.service = this.ctx.service.user.notice;
  10. }
  11. async msgList() {
  12. const res = await this.service.msgList(this.ctx.query);
  13. this.ctx.ok(res);
  14. }
  15. }
  16. module.exports = CrudController(NoticeController, meta);