仿真状态判断调整
This commit is contained in:
parent
228c06e61d
commit
94a3693337
@ -103,10 +103,10 @@ function callback(Response) {
|
||||
store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body));
|
||||
} else if (Response.headers.destination.includes('state')) {
|
||||
const msg = JSON.parse(Response.body);
|
||||
if (msg.state) {
|
||||
if (msg.hasOwnProperty('state')) {
|
||||
store.dispatch('socket/handleSimulationState', Number.parseInt(msg.state));
|
||||
}
|
||||
if (msg.speed) {
|
||||
if (msg.hasOwnProperty('speed')) {
|
||||
store.dispatch('socket/setSimulationSpeed', Number.parseInt(msg.speed));
|
||||
}
|
||||
} else if (Response.headers.destination.includes('iscs/psd') || Response.headers.destination.includes('iscs/gate')) {
|
||||
|
@ -9,10 +9,10 @@ export function sysTimeCallback(Response) {
|
||||
}
|
||||
export function stateCallback(Response) {
|
||||
const msg = JSON.parse(Response.body);
|
||||
if (msg.state) {
|
||||
if (msg.hasOwnProperty('state')) {
|
||||
store.dispatch('socket/handleSimulationState', Number.parseInt(msg.state));
|
||||
}
|
||||
if (msg.speed) {
|
||||
if (msg.hasOwnProperty('speed')) {
|
||||
store.dispatch('socket/setSimulationSpeed', Number.parseInt(msg.speed));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user