feat: 添加游戏通用工具文件并更新游戏URL配置。

This commit is contained in:
li
2026-01-17 22:43:41 +08:00
parent 735b40c810
commit e9cc67dcc4
3 changed files with 640 additions and 7 deletions
+4 -6
View File
@@ -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;
}
}
};