Skip to content

Commit

Permalink
Merge pull request layabox#287 from Lurenyiabc/master
Browse files Browse the repository at this point in the history
Update about Adapter
  • Loading branch information
Lurenyiabc authored Jun 5, 2020
2 parents 34b585b + ea3c278 commit 98ac27e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/layaAir/laya/net/Loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class Loader extends EventDispatcher {
* onload、onprocess、onerror必须写在本类
*/
private _loadHttpRequest(url: string, contentType: string, onLoadCaller: Object, onLoad: Function | null, onProcessCaller: any, onProcess: Function | null, onErrorCaller: any, onError: Function): void {
if (Browser.onVVMiniGame) {
if (Browser.onVVMiniGame||Browser.onHWMiniGame) {
this._http = new HttpRequest();//临时修复vivo复用xmlhttprequest的bug
} else {
if (!this._http)
Expand Down
6 changes: 3 additions & 3 deletions src/layaAir/laya/utils/Browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ export class Browser {
}
//华为快游戏
if("hbs" in Browser.window){
(window as any).hbsMiniGame(Laya, Laya);
if (!Laya["HBSMiniAdapter"]) {
(window as any).hwMiniGame(Laya, Laya);
if (!Laya["HWMiniAdapter"]) {
console.error("请先添加小游戏适配库!");
//TODO 教程要改
} else {
Laya["HBSMiniAdapter"].enable();
Laya["HWMiniAdapter"].enable();
}
}

Expand Down

0 comments on commit 98ac27e

Please sign in to comment.