|
@@ -1655,10 +1655,14 @@ const saveDownload = async () => {
|
|
|
list.map(async (item: any) => {
|
|
|
if (item.url) {
|
|
|
//接口请求
|
|
|
- const res: Blob = await axios.get(item.url.startsWith('/')?(cdn+item.url):item.url, {
|
|
|
- responseType: 'blob',
|
|
|
- });
|
|
|
- zip.file(item.path, res, { createFolders: true });
|
|
|
+ try{
|
|
|
+ const res: Blob = await axios.get(item.url.startsWith('/')?(cdn+item.url):item.url, {
|
|
|
+ responseType: 'blob',
|
|
|
+ });
|
|
|
+ zip.file(item.path, res, { createFolders: true });
|
|
|
+ }catch(e){
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
} else if (item.data) {
|
|
|
//直接写数据
|
|
|
zip.file(item.path, item.data, { createFolders: true });
|