浏览代码

优化

master
suyanyan 1 个月前
父节点
当前提交
f4ba697433
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. +3
    -1
      SafeCampus.WEB/src/api/modules/sysconfig/ability.ts
  2. +3
    -3
      SafeCampus.WEB/src/api/request/instance.ts

+ 3
- 1
SafeCampus.WEB/src/api/modules/sysconfig/ability.ts 查看文件

@@ -28,7 +28,9 @@ const abilityApi = {
},
/* 预警分析报告导出 */
reportExport(params: any) {
return http1.download("reportExport", params);
return http1.download("reportExport", params, {
showHeader: true
});
}
};



+ 3
- 3
SafeCampus.WEB/src/api/request/instance.ts 查看文件

@@ -112,7 +112,7 @@ export default class RequestHttp {
(response: AxiosResponse) => {
// 检查并存储授权信息
this.checkAndStoreAuthentication(response);
const { data, config } = response;
const { data, config }: any = response;
const userStore = useUserStore();
axiosCanceler.removePending(config);
tryHideFullScreenLoading();
@@ -141,8 +141,8 @@ export default class RequestHttp {
});
}
// 成功请求(在页面上除非特殊情况,否则不用处理失败逻辑)
if (`${config.baseURL}${config.url}` == "/api/violation/analysis/reportExport") {
return response;
if (config.showHeader) {
return response; //平时用在打印、导出、下载的时候使用
} else {
return data;
}


正在加载...
取消
保存