[mod] 熱更新調整
This commit is contained in:
@@ -30,6 +30,7 @@ export default class HUDM extends cc.Component {
|
||||
private _updating: boolean = false;
|
||||
private _canRetry: boolean = false;
|
||||
private _isChangeUrl: boolean = false;
|
||||
private _isNewBundle: boolean = false;
|
||||
private _path: string = "Bundle";
|
||||
private _customManifest: string = "";
|
||||
private _storagePath: string = "";
|
||||
@@ -46,6 +47,7 @@ export default class HUDM extends cc.Component {
|
||||
}
|
||||
HUDM._instance = this;
|
||||
this._updatePanel = params[0];
|
||||
this._isNewBundle = params[1];
|
||||
// let packageUrl: string = `https://jianmiau.tk/Resources/App/JMKA/update/remote-assets/${BusinessTypeSetting.COMPILE_VERSION}`;
|
||||
let packageUrl: string = BusinessTypeSetting.UsePatch;
|
||||
|
||||
@@ -201,7 +203,7 @@ export default class HUDM extends cc.Component {
|
||||
while (this._needUpdateData === null) {
|
||||
yield null;
|
||||
}
|
||||
if (this._isChangeUrl && ((!this._needUpdateData.IsNeedUpdate && this._needUpdateData.TotalBytes !== "failed") || this._needUpdateData.TotalBytes === "0 B")) {
|
||||
if ((this._isChangeUrl || this._isNewBundle) && ((!this._needUpdateData.IsNeedUpdate && this._needUpdateData.TotalBytes !== "failed") || this._needUpdateData.TotalBytes === "0 B")) {
|
||||
if (jsb.fileUtils.isFileExist(this._storagePath)) {
|
||||
let isremoveDirectory: boolean = jsb.fileUtils.removeDirectory(this._storagePath);
|
||||
let isremoveDirectory_temp: boolean = jsb.fileUtils.removeDirectory(this._storagePath + "_temp");
|
||||
|
Reference in New Issue
Block a user