角色管理
This commit is contained in:
@@ -21,6 +21,7 @@ const config = {
|
||||
withCredentials: true,
|
||||
// post请求指定数据类型以及编码
|
||||
headers: { 'Content-Type': 'application/json;charset=utf-8' }
|
||||
//headers : {'Content-Type': 'multipart/form-data'}
|
||||
};
|
||||
|
||||
class RequestHttp {
|
||||
@@ -107,6 +108,16 @@ class RequestHttp {
|
||||
download(url: string, params?: object, _object = {}): Promise<BlobPart> {
|
||||
return this.service.post(url, params, { ..._object, responseType: "blob" });
|
||||
}
|
||||
/**
|
||||
* @description 批量导入专用请求方法
|
||||
*/
|
||||
batchImport<T>(url: string, formData: FormData, _object = {}): Promise<ResultData<T>> {
|
||||
return this.service.post(url, formData, {
|
||||
..._object,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default new RequestHttp(config);
|
||||
|
||||
Reference in New Issue
Block a user