Procházet zdrojové kódy

feat:下载失败问题

ananzhusen před 1 měsícem
rodič
revize
aa39c016c3
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      src/services/project.ts

+ 4 - 4
src/services/project.ts

@@ -1113,10 +1113,10 @@ const saveZip = async (list: any[], fileName: string = '工程下载') => {
   );
   console.log("results",results);
   let errorLen = results.map((item) => item && item.error);
-  // if (errorLen.length > 5) {
-  //   MessagePlugin.error('下载失败,请确保网络畅通');
-  //   return 'error';
-  // }
+  if (errorLen.length) {
+    MessagePlugin.error('部分文件下载失败,请确保网络畅通');
+    return 'error';
+  }
   //清除本地存储
   list.forEach((item) => {
     localforage.removeItem(item.path);