From d73acc544cac755b6633bc21b96fd74770b8fa4f Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Mon, 29 Aug 2022 12:34:03 +0000 Subject: [PATCH] bug fixed --- .../beteran/component/home.component.ts | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/app/modules/beteran/component/home.component.ts b/src/app/modules/beteran/component/home.component.ts index 340af5a..2d93740 100644 --- a/src/app/modules/beteran/component/home.component.ts +++ b/src/app/modules/beteran/component/home.component.ts @@ -84,7 +84,7 @@ export class HomeComponent implements OnInit { private _router: Router, private _matDialog: MatDialog, private _vendorService: VendorService, - private _gameService: GameService + private __gameService: GameService ) {} ngOnInit(): void { @@ -173,7 +173,7 @@ export class HomeComponent implements OnInit { private async getGameByParentId( parenId: number ): Promise { - return await this._gameService.listGames(parenId); + return await this.__gameService.listGames(parenId); } onClickGame(vendor: Vendor): void { @@ -185,12 +185,21 @@ export class HomeComponent implements OnInit { return; } const game = gameList[0]; - const url = `/game/?vendor_key=${vendor.getKey()}&game_key=${game.getKey()}`; - window.open( - url, - 'gamepopup', - 'width=1400, height=900, toolbar=no, menubar=no, scrollbars=no, resizable=yes' - ); + + let r = this.__gameService + .getGameUrl(vendor.getKey(), game.getKey()) + .then((r) => { + console.log('success', r.getUrl()); + + window.open( + r.getUrl(), + 'gamepopup', + 'width=1400, height=900, toolbar=no, menubar=no, scrollbars=no, resizable=yes' + ); + }) + .catch((e) => { + console.log('fail', e); + }); }); // window.open( // '/game/?vendor_key=pragmatic_casino&game_key=101',