소스 검색

添加对接日志

bill 1 년 전
부모
커밋
df77c25382
1개의 변경된 파일12개의 추가작업 그리고 7개의 파일을 삭제
  1. 12 7
      src/store/sync.ts

+ 12 - 7
src/store/sync.ts

@@ -22,13 +22,16 @@ const global = window as any;
 const getFilesIng = [];
 const getFilesSuccess = [];
 setInterval(() => {
-  // console.log(
-  //   "请求资源数:" + getFilesIng.length,
-  //   "响应结果数:" + getFilesSuccess.length
-  // );
-  // console.log(
-  //   "未返回资源:" + getFilesIng.filter((url) => !getFilesSuccess.includes(url))
-  // );
+  if (getFilesSuccess.length !== getFilesIng.length) {
+    console.log(
+      "请求资源数:" + getFilesIng.length,
+      "响应结果数:" + getFilesSuccess.length
+    );
+    console.log(
+      "未返回资源:" +
+        getFilesIng.filter((url) => !getFilesSuccess.includes(url))
+    );
+  }
 }, 1000);
 const normalImage = async (url: string) => {
   const getUrl = await api.getFile(url);
@@ -204,7 +207,9 @@ export const api = !global.android
       downloadImage(file: File) {
         return new Promise<boolean>(async (resolve) => {
           const apiName = `downloadImageCallback${global.count++}`;
+          console.log("download ing fileName ", file.name, "apiName ", apiName);
           global[apiName] = () => {
+            console.log("download success fileName", file.name);
             resolve(true);
             delete global[apiName];
           };