Commit b7ec7017 by Zhang Xin

联调登录部分

parent 44f719cd
......@@ -2,8 +2,6 @@ import fetch from 'isomorphic-fetch';
import actionType from '../actiontype/common'
import {addErrorInfo} from './uploadError'
let domain = ENV.domain;
let domain2='http://192.168.10.176:8080/web/'
let domain1 = "http://192.168.10.169:7788/web/"
let myHeaders = new Headers({
// 'Access-Control-Allow-Origin': '*',
......@@ -16,11 +14,11 @@ let myHeaders = new Headers({
const getStoreInfo = (storeId)=>{
return(dispatch)=>{
let bodyData = {storeId};
fetch(domain1 + 'pad_warehouse/getMachineData.action',{
// credentials : 'include',
fetch(domain + 'pad_warehouse/getMachineData.action',{
credentials : 'include',
method : 'POST',
mode : 'cors',
headers: myHeaders,
headers:myHeaders,
body: JSON.stringify(bodyData)
}).then((response)=>response.json())
.then(json=>{
......@@ -40,8 +38,8 @@ const getStoreInfo = (storeId)=>{
const getUserinfo = (employeeId,storeId)=>{
let bodyData = Object.assign({},{employeeId,storeId})
return(dispatch)=>{
fetch(domain1 + 'machine_pad/get_alowed_task.action',{
// credentials : 'include',
fetch(domain + 'machine_pad/get_alowed_task.action',{
credentials : 'include',
method : 'POST',
mode : 'cors',
headers:myHeaders,
......@@ -79,7 +77,7 @@ const getTaskList = (data={})=>{
dispatch(addErrorInfo('没有获取区域信息'))
}else {
fetch(url,{
// credentials : 'include',
credentials : 'include',
method : 'GET',
mode : 'cors',
headers: myHeaders
......
......@@ -108,8 +108,8 @@ class PageContainer extends React.Component {
this.taskTypeOption = {
'ER': this.showTroublePage,
'BH': this.showSecondTroubelPage
'FIRST': this.showTroublePage,
'SECOND': this.showSecondTroubelPage
};
}
......@@ -172,9 +172,9 @@ class PageContainer extends React.Component {
){
dispatch(getUserinfo(userinfo.employeeId,storeInfo.id))
}
if(datas.area){
if(info.area){
//区域信息
dispatch(saveCommonInfo(Object.assign({},{taskInfo:{area:datas.area}})))
dispatch(saveCommonInfo(Object.assign({},{taskInfo:{area:info.area}})))
}
this.setState({
......
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