loanpro.js 763 B

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.loanpro.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 债权产品
  7. class LoanproController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.loanpro;
  11. }
  12. //贷款信息列表(后台)
  13. async loanproList(){
  14. const res = await this.service.getLoanproList(this.ctx.request.body);
  15. this.ctx.ok({ ...res });
  16. }
  17. //贷款信息列表(前台)view
  18. async loanproListView(){
  19. const res = await this.service.getLoanproListView(this.ctx.request.body);
  20. this.ctx.ok({ ... res });
  21. }
  22. }
  23. module.exports = CrudController(LoanproController, meta);