'use strict'; const _ = require('lodash'); const meta = require('./.loanfollow.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); //小微数贷授信 class LoanoFollowController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.loanfollow; } //授信接口 async credit() { const res = await this.service.getCredit(this.ctx.request.body); this.ctx.ok({ data: res }); } //小微数贷授信列表接口 orcredit:0 未授信 1:已授信 async loanfList() { const res = await this.service.getLoanfList(this.ctx.request.body); this.ctx.ok({ ...res }); } //小微贷款授信详情 async loanfOne() { const res = await this.service.getLoanfOne(this.ctx.request.body); this.ctx.ok({ data: res }); } //小微投递前请求的接口 async beforefollow() { const res = await this.service.getBeforefollow(this.ctx.request.body); this.ctx.ok({ data: res }); } } module.exports = CrudController(LoanoFollowController, meta);