'use strict';

/**
 * 指标对比控制器
 *
 * @author Mai
 * @data 2018/4/19
 * @version
 */

const libConst = require('../const/lib');
module.exports = app => {
    class CompareController extends app.BaseController {
        /**
         * 指标对比页面
         *
         * @param {object} ctx - egg全局context
         * @return {void}
         */
        async index (ctx) {
            const libList = await ctx.service.quotaLib.getList(libConst.status.enter);
            const renderData = {
                libList
            };
            await this.layout('compare/index.ejs', renderData, 'compare/modal.ejs');
        }
    }

    return CompareController;
}