|
@@ -17,7 +17,14 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- const response = await fetch(url);
|
|
|
+ const response = await fetch(url, {
|
|
|
+ method: 'GET',
|
|
|
+ credentials: 'include', // 包含 cookies
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
if (!response.ok) {
|
|
|
Message.error('下载失败');
|
|
|
return false;
|