Commit b7ec7017 by Zhang Xin

联调登录部分

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