/**
 * 公共资源
 */
import * as enumConfig from '../config/enum';

const config = {
    "/public/selectparam":enumConfig.SELECTPARAM, //企业搜索下拉框选择
}

export function publicRouter(req, res) {
    let ret:any = {};

    ret['selectparam'] = getEnumItf(config['/public/selectparam']);

    res.send(ret);
}


/**
 * 
 * @param req 
 * @param res 
 */
function getEnumItf(enumCof) {
    let dataList = [];
    for (let key in enumCof) {
        let anyKey:any = key;
        if (isNaN(anyKey)) {
            dataList.push({key, value:enumCof[key]});
        }
    }

    return dataList;
}