storeShop.js 596 B

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