优化websocket连接
This commit is contained in:
@@ -305,6 +305,14 @@ function handleWsPayload(raw: unknown): void {
|
||||
mergeLiveSnapshot(parsed.data as anyObj)
|
||||
return
|
||||
}
|
||||
if (event === 'jackpot.hit' && parsed.data && typeof parsed.data === 'object') {
|
||||
const jackpotData = parsed.data as anyObj
|
||||
const hits = Array.isArray(jackpotData.hits) ? jackpotData.hits : []
|
||||
if (hits.length > 0) {
|
||||
ElMessage.success(t('game.live.jackpot_hit_tip'))
|
||||
}
|
||||
return
|
||||
}
|
||||
if (event === 'period.tick' && parsed.data && typeof parsed.data === 'object') {
|
||||
const periodData = parsed.data as anyObj
|
||||
if (typeof periodData.server_time === 'number') {
|
||||
|
||||
Reference in New Issue
Block a user