diff --git a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js index a57d6ecc6..4b098eb5a 100644 --- a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js +++ b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js @@ -7,8 +7,6 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr const scope = this; this.teststomp = new StompClient(); - let traintopnow = null; - let traindownnow = null; let topic = '/user/queue/simulation/jl3d/'+routegroup; let header = {'X-Token': getToken() }; @@ -62,7 +60,7 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr } } if(data.body.type == "TRAIN_DOOR"){ - if(traintopnow == data.body.code){ + if(toptrain.nowcode == data.body.code){ if(data.body.open == "0"){ closetraindoor(toptrain,data.body.doorCode,"top"); @@ -73,7 +71,7 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr } } - if(traindownnow == data.body.code){ + if(downtrain.nowcode == data.body.code){ // console.log(data.body); if(data.body.open == "0"){ closetraindoor(downtrain,data.body.doorCode,"down"); @@ -91,8 +89,8 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr for(let i=0,leni = data.body.length;i=0;an--){ diff --git a/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js b/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js index 414834057..c98b74945 100644 --- a/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js +++ b/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js @@ -482,6 +482,9 @@ export function Jl3dpassflow(dom,skinCode,routegroup) { //下车控制开关 toppasseron = false; downpasseron = false; + + toptrain.nowcode = null; + downtrain.nowcode = null; // humanlist = new THREE.Group(); for(let j=0; j