mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-23 23:39:47 +08:00
fix(projects): added responseType judgment. #396
This commit is contained in:
@ -48,7 +48,9 @@ function createCommonRequest<ResponseData = any>(
|
||||
|
||||
instance.interceptors.response.use(
|
||||
async response => {
|
||||
if (opts.isBackendSuccess(response)) {
|
||||
const responseType: ResponseType = (response.config?.responseType as ResponseType) || 'json';
|
||||
|
||||
if (responseType !== 'json' || opts.isBackendSuccess(response)) {
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user