Commit d14515d4 by wujiabao

再次改造关门

parent 15b0a1b9
...@@ -212,47 +212,45 @@ class PageContainer extends React.Component { ...@@ -212,47 +212,45 @@ class PageContainer extends React.Component {
}); });
break; break;
case 'SUCCESS_CLOSEDOOR': case 'SUCCESS_CLOSEDOOR':
if(area==="A"){ if(isSend){
if(data.info.left_tread===1){ if(area==="A"){
//关门成功 if(data.info.left_tread===1){
if(isSend){ //关门成功
console.log("closedoor"); console.log("closedoor");
dispatch(logout()); dispatch(logout());
// this.endCountBack(); // this.endCountBack();
// remove(CONFIG.socketType.GETSTOREINFO,this) // remove(CONFIG.socketType.GETSTOREINFO,this)
// remove(CONFIG.socketType.GETSOCKETMSG,this) // remove(CONFIG.socketType.GETSOCKETMSG,this)
dispatch(closeDoorSuccess(state.commonInfo)) dispatch(closeDoorSuccess(state.commonInfo))
this.setState({ this.setState({
showPage : showPage[initPage], showPage : showPage[initPage],
showClock : false, showClock : false,
popupInfo : defaultPopupInfo, popupInfo : defaultPopupInfo,
successCloseDoor : true, successCloseDoor : true,
isSend:false isSend:false
}); });
}else{
sendMsg(JSON.stringify({type:'WILL_CLOSEDOOR'}))
} }
}else{ }else if(area==="B"){
sendMsg(JSON.stringify({type:'WILL_CLOSEDOOR'})) if(data.info.right_tread===1){
} //关门成功
}else if(area==="B"){ console.log("closedoor");
if(data.info.right_tread===1){ dispatch(logout());
//关门成功 // this.endCountBack();
if(isSend){ // remove(CONFIG.socketType.GETSTOREINFO,this)
console.log("closedoor"); // remove(CONFIG.socketType.GETSOCKETMSG,this)
dispatch(logout()); dispatch(closeDoorSuccess(state.commonInfo))
// this.endCountBack(); this.setState({
// remove(CONFIG.socketType.GETSTOREINFO,this) showPage : showPage[initPage],
// remove(CONFIG.socketType.GETSOCKETMSG,this) showClock : false,
dispatch(closeDoorSuccess(state.commonInfo)) popupInfo : defaultPopupInfo,
this.setState({ successCloseDoor : true,
showPage : showPage[initPage], isSend:false
showClock : false, });
popupInfo : defaultPopupInfo, }else{
successCloseDoor : true, sendMsg(JSON.stringify({type:'WILL_CLOSEDOOR'}))
isSend:false
});
} }
}else{
sendMsg(JSON.stringify({type:'WILL_CLOSEDOOR'}))
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment