7/17 添加公区收益
This commit is contained in:
@@ -245,13 +245,13 @@ service.interceptors.response.use(
|
||||
}
|
||||
);
|
||||
// 通用下载方法
|
||||
export function download(url: string, params: any, fileName: string) {
|
||||
export function download(url: string, params: any, fileName: string, format: boolean = true) {
|
||||
downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' });
|
||||
// prettier-ignore
|
||||
return service.post(url, params, {
|
||||
transformRequest: [
|
||||
(params: any) => {
|
||||
return tansParams(params);
|
||||
return format ? tansParams(params) : JSON.stringify(params);
|
||||
}
|
||||
],
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded',silentError: 'true' },
|
||||
|
||||
Reference in New Issue
Block a user