|
@@ -79,10 +79,10 @@ export default function request(url, options) {
|
|
|
}
|
|
|
}
|
|
|
// download excel
|
|
|
- if ( newOptions.DOWNLOAD ) {
|
|
|
- console.log('download request');
|
|
|
- delete newOptions.DOWNLOAD;
|
|
|
- }
|
|
|
+ // if ( newOptions.DOWNLOAD ) {
|
|
|
+ // console.log('download request');
|
|
|
+ // delete newOptions.DOWNLOAD;
|
|
|
+ // }
|
|
|
|
|
|
console.log('>>>>>>>>>newOptions',newOptions)
|
|
|
return fetch(url, newOptions)
|
|
@@ -91,7 +91,10 @@ export default function request(url, options) {
|
|
|
if (response.status === 204) {
|
|
|
return response.text();
|
|
|
}
|
|
|
- console.log('fetch 中获取的response',response)
|
|
|
+ if ( newOptions.DOWNLOAD ) {
|
|
|
+ delete newOptions.DOWNLOAD;
|
|
|
+ return window.open(response.url);
|
|
|
+ }
|
|
|
return response.json();
|
|
|
|
|
|
})
|