Commit 6cca1416 by Zhang Xin

完善代码

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