feat(portal): 优化游戏跳转逻辑,改为子目录方式

- 修改游戏跳转URL为同域名子目录 (/game)
- 更新返回URL为Portal首页路由
- 修改AppID为本地打包专用ID

优点:
- 用户始终停留在同一域名下
- 无需跨域跳转,体验更流畅
- 便于使用软链接部署

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
li
2026-01-17 23:14:40 +08:00
co-authored by Claude Sonnet 4.5
parent e9cc67dcc4
commit a722170d16
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name" : "Online Gaming",
"appid" : "__UNI__6DF0A08",
"appid" : "__UNI__08554FB",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
+3 -3
View File
@@ -266,9 +266,9 @@ export default {
return '准备中';
},
enterGame(item) {
// 直接进入游戏桌,并标记来源为 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}`;
// 跳转到同域名下的 /game 子目录
const portalUrl = window.location.origin + '/#/pages/index';
const url = `/game/?token=${this.userInfo.api_token}&language=${this.language}&from=portal&returnUrl=${encodeURIComponent(portalUrl)}#/play?id=${item.id}`;
window.location.href = url;
}
}