qcloud-iotexplorer-common-libs
Advanced tools
Comparing version 3.0.0-alpha.20230507b003 to 3.0.0-alpha.20240118b004
@@ -89,3 +89,3 @@ "use strict"; | ||
exports.hexArrayTo128BleAdvertUUIDStr = hexArrayTo128BleAdvertUUIDStr; | ||
const downloadFile = (url, { onProgress = exports.noop } = {}) => new Promise((resolve) => { | ||
const downloadFile = (url, { onProgress = exports.noop } = {}) => new Promise((resolve, reject) => { | ||
// 换种下载方式,可以获取下载进度 | ||
@@ -108,4 +108,10 @@ const downloadTask = wx.downloadFile({ | ||
}, | ||
fail(err) { | ||
reject(err); | ||
}, | ||
}); | ||
}, | ||
fail(err) { | ||
reject(err); | ||
}, | ||
}); | ||
@@ -112,0 +118,0 @@ downloadTask.onProgressUpdate(res => onProgress(res)); |
@@ -73,3 +73,3 @@ import SparkMD5 from 'spark-md5'; | ||
}; | ||
export const downloadFile = (url, { onProgress = noop } = {}) => new Promise((resolve) => { | ||
export const downloadFile = (url, { onProgress = noop } = {}) => new Promise((resolve, reject) => { | ||
// 换种下载方式,可以获取下载进度 | ||
@@ -92,4 +92,10 @@ const downloadTask = wx.downloadFile({ | ||
}, | ||
fail(err) { | ||
reject(err); | ||
}, | ||
}); | ||
}, | ||
fail(err) { | ||
reject(err); | ||
}, | ||
}); | ||
@@ -96,0 +102,0 @@ downloadTask.onProgressUpdate(res => onProgress(res)); |
{ | ||
"name": "qcloud-iotexplorer-common-libs", | ||
"version": "3.0.0-alpha.20230507b003", | ||
"version": "3.0.0-alpha.20240118b004", | ||
"description": "腾讯云IOT前端通用工具库", | ||
@@ -21,3 +21,3 @@ "bugs": { | ||
"dependencies": { | ||
"qcloud-iotexplorer-logger": "3.0.0-alpha.20230507b003", | ||
"qcloud-iotexplorer-logger": "3.0.0-alpha.20240118b004", | ||
"rxjs": "^7.8.0", | ||
@@ -31,3 +31,3 @@ "shortid-for-miniprogram": "^2.2.15", | ||
}, | ||
"gitHead": "b64540d610a6b02a5400cb1e6e404949d378e5eb" | ||
"gitHead": "6beca018526e761fba4197634612bd6c71179181" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
88
1007376
14844
+ Addedqcloud-iotexplorer-logger@3.0.0-alpha.20240118b004(transitive)
- Removedqcloud-iotexplorer-logger@3.0.0-alpha.20230507b003(transitive)