|
@@ -22,13 +22,16 @@ const global = window as any;
|
|
const getFilesIng = [];
|
|
const getFilesIng = [];
|
|
const getFilesSuccess = [];
|
|
const getFilesSuccess = [];
|
|
setInterval(() => {
|
|
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);
|
|
}, 1000);
|
|
const normalImage = async (url: string) => {
|
|
const normalImage = async (url: string) => {
|
|
const getUrl = await api.getFile(url);
|
|
const getUrl = await api.getFile(url);
|
|
@@ -204,7 +207,9 @@ export const api = !global.android
|
|
downloadImage(file: File) {
|
|
downloadImage(file: File) {
|
|
return new Promise<boolean>(async (resolve) => {
|
|
return new Promise<boolean>(async (resolve) => {
|
|
const apiName = `downloadImageCallback${global.count++}`;
|
|
const apiName = `downloadImageCallback${global.count++}`;
|
|
|
|
+ console.log("download ing fileName ", file.name, "apiName ", apiName);
|
|
global[apiName] = () => {
|
|
global[apiName] = () => {
|
|
|
|
+ console.log("download success fileName", file.name);
|
|
resolve(true);
|
|
resolve(true);
|
|
delete global[apiName];
|
|
delete global[apiName];
|
|
};
|
|
};
|