Commit 6cca1416 by Zhang Xin

完善代码

parent 22f5ab91
...@@ -15,7 +15,7 @@ const getBarCodeProductInfo = (data)=>{ ...@@ -15,7 +15,7 @@ const getBarCodeProductInfo = (data)=>{
let url=`${domain}machine_pad/barcode/${storeId}/${taskId}/${area}/${currentTaskType}/${barcode}` let url=`${domain}machine_pad/barcode/${storeId}/${taskId}/${area}/${currentTaskType}/${barcode}`
return (dispatch)=>{ return (dispatch)=>{
fetch(url,{ fetch(url,{
// credentials : 'include', credentials : 'include',
method : 'GET', method : 'GET',
mode : 'cors' mode : 'cors'
}).then((response)=>response.json()) }).then((response)=>response.json())
......
...@@ -11,7 +11,7 @@ const willCloseDoor=(data)=>{ ...@@ -11,7 +11,7 @@ const willCloseDoor=(data)=>{
let bodyData={area,storeId:machineId,taskId,userId,taskType:currentTaskType} let bodyData={area,storeId:machineId,taskId,userId,taskType:currentTaskType}
return (dispatch)=>{ return (dispatch)=>{
fetch(url,{ fetch(url,{
// credentials : 'include', credentials : 'include',
method : 'POST', method : 'POST',
mode : 'cors', mode : 'cors',
headers:{ headers:{
...@@ -21,7 +21,7 @@ const willCloseDoor=(data)=>{ ...@@ -21,7 +21,7 @@ const willCloseDoor=(data)=>{
body:JSON.stringify(bodyData) body:JSON.stringify(bodyData)
}).then((response)=>response.json()) }).then((response)=>response.json())
.then((json)=>{ .then((json)=>{
dispatch(closeDoorSuccess(data)); // dispatch(closeDoorSuccess(data));
}) })
} }
} }
...@@ -36,7 +36,7 @@ const closeDoorSuccess=(data)=>{ ...@@ -36,7 +36,7 @@ const closeDoorSuccess=(data)=>{
let url=domain+'machine_pad/update_door_status.action' let url=domain+'machine_pad/update_door_status.action'
return (dispatch)=>{ return (dispatch)=>{
fetch(url,{ fetch(url,{
// credentials : 'include', credentials : 'include',
method : 'POST', method : 'POST',
mode : 'cors', mode : 'cors',
headers:{ headers:{
......
...@@ -39,8 +39,8 @@ export default class HomePageContainer extends React.Component{ ...@@ -39,8 +39,8 @@ export default class HomePageContainer extends React.Component{
logout(){ logout(){
this.props.willCloseDoor(); this.props.willCloseDoor();
let msg={type:'WILL_CLOSEDOOR'}; // let msg={type:'WILL_CLOSEDOOR'};
sendMsg(JSON.stringify(msg)) // sendMsg(JSON.stringify(msg))
this.props.tempLogout() this.props.tempLogout()
} }
......
...@@ -536,13 +536,7 @@ class PageContainer extends React.Component { ...@@ -536,13 +536,7 @@ class PageContainer extends React.Component {
//二期临时退出 //二期临时退出
tempLogout(){ tempLogout(){
let {dispatch,state} = this.props; this.handleCloseDoor()
let {commonInfo={}} = state;
dispatch(willCloseDoor(commonInfo));
this.hidePopup();
// this.setState({
// showPage : showPage[initPage],
// });
} }
/** /**
......
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