@ives_xxz/framework 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -84,7 +84,11 @@ export default class FWHotUpdateManager extends FWManager implements FW.HotUpdat
|
|
|
84
84
|
FWLog.debug('checkHotUpdate3', this.assetMgr.getLocalManifest());
|
|
85
85
|
FWLog.debug('checkHotUpdate4', this.assetMgr.getLocalManifest().isLoaded());
|
|
86
86
|
if (!this.assetMgr.getLocalManifest() || !this.assetMgr.getLocalManifest().isLoaded()) {
|
|
87
|
-
|
|
87
|
+
this.assetMgr.loadLocalManifest(this.localManifest.nativeUrl);
|
|
88
|
+
if (!this.assetMgr.getLocalManifest() || !this.assetMgr.getLocalManifest().isLoaded()) {
|
|
89
|
+
FWLog.error('Failed to load local manifest');
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
88
92
|
}
|
|
89
93
|
this.assetMgr.setEventCallback(this.checkEventHandle.bind(this));
|
|
90
94
|
this.assetMgr.checkUpdate();
|
|
@@ -181,6 +185,16 @@ export default class FWHotUpdateManager extends FWManager implements FW.HotUpdat
|
|
|
181
185
|
failed = true;
|
|
182
186
|
break;
|
|
183
187
|
case jsb.EventAssetsManager.UPDATE_FINISHED:
|
|
188
|
+
if (event.getPercent() > 0) {
|
|
189
|
+
downloadedFiles = event.getDownloadedFiles();
|
|
190
|
+
totalFiles = event.getTotalFiles();
|
|
191
|
+
downloadedBytes = event.getDownloadedBytes();
|
|
192
|
+
totalBytes = event.getTotalBytes();
|
|
193
|
+
convertDownloadedBytes = this.convertBytes(downloadedBytes);
|
|
194
|
+
convertTotalBytes = this.convertBytes(totalBytes);
|
|
195
|
+
percent = event.getPercent();
|
|
196
|
+
FWLog.debug('正在更新完成 -> ', '下载文件数量:', downloadedFiles, ',下载文件总数量:', totalFiles, ',已下载大小:', convertDownloadedBytes, ',下载总大小:', convertTotalBytes);
|
|
197
|
+
}
|
|
184
198
|
str = 'UPDATE_FINISHED';
|
|
185
199
|
needRestart = true;
|
|
186
200
|
break;
|