loanfollow.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.loanfollow.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. //小微数贷授信
  7. class LoanoFollowController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.loanfollow;
  11. }
  12. //授信接口
  13. async credit() {
  14. const res = await this.service.getCredit(this.ctx.request.body);
  15. this.ctx.ok({ data: res });
  16. }
  17. //小微数贷授信列表接口 orcredit:0 未授信 1:已授信
  18. async loanfList() {
  19. const res = await this.service.getLoanfList(this.ctx.request.body);
  20. this.ctx.ok({ ...res });
  21. }
  22. //小微贷款授信详情
  23. async loanfOne() {
  24. const res = await this.service.getLoanfOne(this.ctx.request.body);
  25. this.ctx.ok({ data: res });
  26. }
  27. //小微投递前请求的接口
  28. async beforefollow() {
  29. const res = await this.service.getBeforefollow(this.ctx.request.body);
  30. this.ctx.ok({ data: res });
  31. }
  32. }
  33. module.exports = CrudController(LoanoFollowController, meta);