feat: 添加游戏通用工具文件并更新游戏URL配置。
This commit is contained in:
+4
-6
@@ -266,12 +266,10 @@ export default {
|
||||
return '准备中';
|
||||
},
|
||||
enterGame(item) {
|
||||
let type = 'baccarat';
|
||||
if (item.game_id == 2) type = 'longhu';
|
||||
if (item.game_id == 4) type = 'nn';
|
||||
if (item.game_id == 5) type = 'threecard';
|
||||
|
||||
window.location.href = `${this.$baseApi.gameUrl}/?token=${this.userInfo.api_token}&language=${this.language}#/${type}`;
|
||||
// 直接进入游戏桌,并标记来源为 portal
|
||||
const portalUrl = window.location.origin + window.location.pathname;
|
||||
const url = `${this.$baseApi.gameUrl}/?token=${this.userInfo.api_token}&language=${this.language}&from=portal&returnUrl=${encodeURIComponent(portalUrl)}#/play?id=${item.id}`;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user