Commit 2fbb5a9f by niuxinyu

关门优化9

parent c6c2347e
......@@ -3,8 +3,7 @@ import HeaderComponent from '../../components/CommonComponent/HeaderComponent/He
import Button from '../../components/CommonComponent/ButtonComponent/ButtonComponent'
import PopModel from '../../components/CommonComponent/PopupComponent/PopupChildComponent'
import {sendMsg} from "../../util/socket";
import axios from 'axios'
axios.defaults.withCredentials=true
import fetch from 'isomorphic-fetch'
require('./index.css');
let domain = ENV.domain;
export default class HomePageContainer extends React.Component{
......@@ -66,17 +65,25 @@ export default class HomePageContainer extends React.Component{
}else{
//正常调用
try {
axios.post(domain+'machine_pad/finish_task.action',{
area:this.props.headerInfo.taskInfo.area,
storeId:this.props.headerInfo.storeInfo.id,
taskId:this.props.headerInfo.taskInfo.taskId,
taskType:this.props.headerInfo.taskInfo.currentTaskType,
userId:this.props.headerInfo.userInfo.employeeId
fetch(domain+'machine_pad/finish_task.action',{
credentials : 'include',
method : 'POST',
mode : 'cors',
headers:{
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json; charset=UTF-8'
},
body:JSON.stringify({
area:this.props.headerInfo.taskInfo.area,
storeId:this.props.headerInfo.storeInfo.id,
taskId:this.props.headerInfo.taskInfo.taskId,
taskType:this.props.headerInfo.taskInfo.currentTaskType,
userId:this.props.headerInfo.userInfo.employeeId})}
}).then((res)=>{
).then((res)=>{
if(res.status!=200){
var error = new Error(response.statusText)
error.response = response
......
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