import { http } from '@/utils/http'; /** * @description 得到验证码图像 */ export function GetVerificationCodeImage() { return http.get(`${process.env.VUE_APP_FileServer}?MethodName=login_control-GetVerificationCodeImage`); } /** * @description 得到系统标志 * @param {object} data 请求数据 */ export function GetLogo(data) { return http.post(`${process.env.VUE_APP_FileServer}?MethodName=sys_config_manager-GetLogo`, data); } /** * 得到文件 ID 与 URL 的映射 */ export function GetFileURLMap(data) { return http.post(`${process.env.VUE_APP_FileServer}?MethodName=file_store_manager-GetFileURLMap`, data); } /** * 得到文件存储信息 */ export function GetFileStoreInfo(data) { return http.post(`${process.env.VUE_APP_FileServer}?MethodName=file_store_manager-GetFileStoreInfo`, data); } /** * 得到用户能进入的子系统列表(电脑端) */ export function GetChildSysList_CanEnter_PC(data) { return http.post(`${process.env.VUE_APP_FileServer}?MethodName=login_control-GetChildSysList_CanEnter_PC`, data); } /** * 上传文件 * @param {String} SecurityLevel 保密级别 * @param {object} file 文件对象 */ export function fileUpload(SecurityLevel, file) { let formData = null; if (file instanceof FormData) { formData = file; } else { formData = new FormData(); formData.append(file.filename, file.file, file.file.name); } return http.postForm('/GCLSFileServer/WebFileUpload', formData, { params: { SecurityLevel, }, transformRequest: [ (data) => { return data; }, ], timeout: 0, }); }