1.修复自动创建下一期bug
This commit is contained in:
@@ -18,7 +18,8 @@ export default {
|
||||
push_connected: 'Realtime connection established',
|
||||
push_disconnected: 'Polling mode enabled (push removed)',
|
||||
ws_connected: 'Connected to real-time match',
|
||||
ws_disconnected: 'Service unavailable, please check backend service',
|
||||
ws_disconnected: 'Realtime push disconnected, using polling',
|
||||
snapshot_load_failed: 'Failed to load match snapshot, please retry',
|
||||
ws_panel_title: 'Admin WebSocket (vs. mobile lightweight stream)',
|
||||
ws_reload_config: 'Load WS config',
|
||||
ws_connect: 'Connect WS',
|
||||
|
||||
@@ -18,7 +18,8 @@ export default {
|
||||
push_connected: '实时连接已建立',
|
||||
push_disconnected: '已切换为轮询模式(无推送)',
|
||||
ws_connected: '已连接实时对局',
|
||||
ws_disconnected: '服务异常,请检查服务端',
|
||||
ws_disconnected: '实时推送未连接,已使用轮询刷新',
|
||||
snapshot_load_failed: '对局快照加载失败,请稍后重试',
|
||||
ws_panel_title: '后台 WebSocket 连接(区别于前端轻量流)',
|
||||
ws_reload_config: '加载WS配置',
|
||||
ws_connect: '连接WS',
|
||||
|
||||
@@ -825,6 +825,7 @@ async function loadSnapshot(options?: { force?: boolean }): Promise<void> {
|
||||
const res = await createAxios({
|
||||
url: '/admin/game.Live/snapshot',
|
||||
method: 'get',
|
||||
timeout: 30 * 1000,
|
||||
showCodeMessage: false,
|
||||
showErrorMessage: false,
|
||||
cancelDuplicateRequest: false,
|
||||
@@ -996,7 +997,11 @@ onMounted(async () => {
|
||||
void loadSnapshot({ force: true })
|
||||
}
|
||||
}, 15000)
|
||||
await loadSnapshot({ force: true })
|
||||
try {
|
||||
await loadSnapshot({ force: true })
|
||||
} catch {
|
||||
ElMessage.warning(t('game.live.snapshot_load_failed'))
|
||||
}
|
||||
await reloadWsConfig()
|
||||
connectWs()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user