同步前后端联调与文档更新
This commit is contained in:
@@ -29,6 +29,7 @@ export interface GameLaunchEnvelope {
|
||||
|
||||
export interface MapPageLaunchOptions {
|
||||
launchId?: string
|
||||
recoverSession?: string
|
||||
preset?: string
|
||||
configUrl?: string
|
||||
configLabel?: string
|
||||
@@ -181,6 +182,21 @@ export function prepareMapPageUrlForLaunch(envelope: GameLaunchEnvelope): string
|
||||
return buildMapPageUrlWithLaunchId(stashPendingGameLaunchEnvelope(envelope))
|
||||
}
|
||||
|
||||
export function prepareMapPageUrlForRecovery(envelope: GameLaunchEnvelope): string {
|
||||
return `${buildMapPageUrlWithLaunchId(stashPendingGameLaunchEnvelope(envelope))}&recoverSession=1`
|
||||
}
|
||||
|
||||
export function getBackendSessionContextFromLaunchEnvelope(envelope: GameLaunchEnvelope | null | undefined): { sessionId: string; sessionToken: string } | null {
|
||||
if (!envelope || !envelope.business || !envelope.business.sessionId || !envelope.business.sessionToken) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
sessionId: envelope.business.sessionId,
|
||||
sessionToken: envelope.business.sessionToken,
|
||||
}
|
||||
}
|
||||
|
||||
export function resolveGameLaunchEnvelope(options?: MapPageLaunchOptions | null): GameLaunchEnvelope {
|
||||
const launchId = normalizeOptionalString(options ? options.launchId : undefined)
|
||||
if (launchId) {
|
||||
|
||||
Reference in New Issue
Block a user