'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {

    /**
     * 我的信用首页
     */
    async home() {
        const { ctx } = this;
        let ret = await ctx.service.credit.home.home();
        ctx.success(ret);
    }

    async test() {
        const { ctx } = this;
        const orderSn = await ctx.query.sn;
        const yys_report_data = await ctx.service.credit.yys.getData(orderSn);//拉取报告数据
        // const stream1 = await ctx.getFileStream();
        // await pump(stream, writeStream);
        ctx.success(yys_report_data);
    }

}

module.exports = HomeController;
