统一推荐页游客运行态与切换队列

统一推荐页各玩法正式 runtime 的游客鉴权透传。

收口推荐页首页展示队列和嵌入运行态切换队列。

补齐未登录读档、签名资产和个人数据读取的游客态处理。

新增运行态 HUD 小尺寸 logo 资源并更新拼图与抓鹅展示。

补充推荐切换、runtime guest 启动和客户端请求回归测试。

更新玩法链路、后端契约和团队记忆文档。
This commit is contained in:
2026-06-10 22:00:19 +08:00
parent e29992cf01
commit 7dd53e95d8
41 changed files with 1372 additions and 376 deletions

View File

@@ -49,11 +49,15 @@ export function startSquareHoleRun(
/**
* 读取方洞挑战运行态快照。
*/
export function getSquareHoleRun(runId: string) {
export function getSquareHoleRun(
runId: string,
options: SquareHoleRuntimeRequestOptions = {},
) {
return requestRuntimeJson<SquareHoleRunResponse>({
url: buildRuntimeApiPath(SQUARE_HOLE_RUNTIME_API_BASE, 'runs', runId),
fallbackMessage: '读取方洞挑战运行快照失败',
retry: SQUARE_HOLE_RUNTIME_READ_RETRY,
requestOptions: options,
});
}
@@ -63,6 +67,7 @@ export function getSquareHoleRun(runId: string) {
export function dropSquareHoleShape(
runId: string,
payload: DropSquareHoleShapeRequest,
options: SquareHoleRuntimeRequestOptions = {},
) {
return requestRuntimeJson<SquareHoleDropResponse>({
url: buildRuntimeApiPath(
@@ -78,6 +83,7 @@ export function dropSquareHoleShape(
},
fallbackMessage: '确认方洞挑战投入失败',
retry: SQUARE_HOLE_RUNTIME_WRITE_RETRY,
requestOptions: options,
});
}
@@ -89,6 +95,7 @@ export function stopSquareHoleRun(
payload: StopSquareHoleRunRequest = {
clientActionId: `square-hole-stop-${Date.now()}`,
},
options: SquareHoleRuntimeRequestOptions = {},
) {
return requestRuntimeJson<SquareHoleRunResponse>({
url: buildRuntimeApiPath(SQUARE_HOLE_RUNTIME_API_BASE, 'runs', runId, 'stop'),
@@ -96,13 +103,17 @@ export function stopSquareHoleRun(
jsonBody: payload,
fallbackMessage: '停止方洞挑战失败',
retry: SQUARE_HOLE_RUNTIME_WRITE_RETRY,
requestOptions: options,
});
}
/**
* 基于当前 run 重开一局。
*/
export function restartSquareHoleRun(runId: string) {
export function restartSquareHoleRun(
runId: string,
options: SquareHoleRuntimeRequestOptions = {},
) {
return requestRuntimeJson<SquareHoleRunResponse>({
url: buildRuntimeApiPath(
SQUARE_HOLE_RUNTIME_API_BASE,
@@ -113,13 +124,17 @@ export function restartSquareHoleRun(runId: string) {
method: 'POST',
fallbackMessage: '重新开始方洞挑战失败',
retry: SQUARE_HOLE_RUNTIME_WRITE_RETRY,
requestOptions: options,
});
}
/**
* 前端倒计时归零后通知后端确认失败状态。
*/
export function finishSquareHoleTimeUp(runId: string) {
export function finishSquareHoleTimeUp(
runId: string,
options: SquareHoleRuntimeRequestOptions = {},
) {
return requestRuntimeJson<SquareHoleRunResponse>({
url: buildRuntimeApiPath(
SQUARE_HOLE_RUNTIME_API_BASE,
@@ -130,6 +145,7 @@ export function finishSquareHoleTimeUp(runId: string) {
method: 'POST',
fallbackMessage: '同步方洞挑战倒计时失败',
retry: SQUARE_HOLE_RUNTIME_WRITE_RETRY,
requestOptions: options,
});
}