import request from '/@/utils/request';

/**
 * 公共参数
 * @method getPki 获取后端公共密钥
 * @method getcaptcha 获取后端公共密钥
 */
export function getAll() {
    return {
        syslogApi: (params?: object) => {//系统日志
            return request({
                url: '/system/logger/servers',
                method: 'GET',
                params,
            });
        },
        codeApi: (params?: object) => {//区县接口
            return request({
                url: '/system/dictItem/v1/type/sys_area_code',
                method: 'GET',
                params,
            });
        },
        getPki: (params?: object) => {
            return request({
                url: 'guest/pki',
                method: 'get',
                params,
            });
        },
        getCaptcha: (params?: object) => {
            return request({
                url: 'guest/captcha',
                method: 'get',
                params,
            });
        },
        download: (urls: string) => {
            return request({
                url: urls,
                method: 'get',
                responseType: 'blob',
            });
        },
    };
}

