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',