Commit 84ac3198 by Zhang Xin

test domain

parent b8296cba
import fetch from 'isomorphic-fetch' import fetch from 'isomorphic-fetch'
import getTaskList from './common' import getTaskList from './common'
import barcodeActionType from '../actiontype/barcodeCommon' import barcodeActionType from '../actiontype/barcodeCommon'
import {wrongQrcode,emptyErrorInfo} from './replenish' import replenishAction from './replenish'
let domain = ENV.domain; let domain = ENV.domain;
// const changeStatus = (data)=>{ // const changeStatus = (data)=>{
...@@ -48,7 +48,7 @@ const getBarCodeProductInfo = (data)=>{ ...@@ -48,7 +48,7 @@ const getBarCodeProductInfo = (data)=>{
}).then((response)=>response.json()) }).then((response)=>response.json())
.then((json)=>{ .then((json)=>{
if(json.meta.success&&json.data){ if(json.meta.success&&json.data){
dispatch(emptyErrorInfo()); dispatch(replenishAction.emptyErrorInfo()); //补货清空错误数据
dispatch(saveProductInfo(json.data)) dispatch(saveProductInfo(json.data))
}else{ }else{
switch (taskInfo.currentTaskNum){ switch (taskInfo.currentTaskNum){
...@@ -57,7 +57,7 @@ const getBarCodeProductInfo = (data)=>{ ...@@ -57,7 +57,7 @@ const getBarCodeProductInfo = (data)=>{
break; break;
case 4 : case 4 :
//补货任务 //补货任务
dispatch(wrongQrcode(json)); dispatch(replenishAction.wrongQrcode(json));
break; break;
} }
} }
......
import fetch from 'isomorphic-fetch'; 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 domain1 = ENV.domain;
// domain = 'http://192.168.10.128:8080/web/' let domain = 'http://192.168.10.128:8080/web/'
let myHeaders = new Headers({ let myHeaders = new Headers({
// 'Access-Control-Allow-Origin': '*', // 'Access-Control-Allow-Origin': '*',
...@@ -41,7 +41,7 @@ const getTaskInfo = (data)=>{ ...@@ -41,7 +41,7 @@ const getTaskInfo = (data)=>{
const getStoreInfo = (storeId)=>{ const getStoreInfo = (storeId)=>{
return(dispatch)=>{ return(dispatch)=>{
let bodyData = {storeId}; let bodyData = {storeId};
fetch(domain + 'pad_warehouse/getMachineData.action',{ fetch(domain1 + 'pad_warehouse/getMachineData.action',{
// credentials : 'include', // credentials : 'include',
method : 'POST', method : 'POST',
mode : 'cors', mode : 'cors',
...@@ -87,7 +87,7 @@ const getInfoByBarcode = (data)=>{ ...@@ -87,7 +87,7 @@ const getInfoByBarcode = (data)=>{
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(domain + 'machine_pad/get_alowed_task.action',{ fetch(domain1 + 'machine_pad/get_alowed_task.action',{
// credentials : 'include', // credentials : 'include',
method : 'POST', method : 'POST',
mode : 'cors', mode : 'cors',
......
...@@ -22,4 +22,4 @@ const emptyErrorInfo = ()=>{ ...@@ -22,4 +22,4 @@ const emptyErrorInfo = ()=>{
} }
} }
export {wrongQrcode,emptyErrorInfo} export default {wrongQrcode,emptyErrorInfo}
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
* Created by ruibing on 16/11/2. * Created by ruibing on 16/11/2.
*/ */
module.exports = { module.exports = {
domain: 'http://preprod.mjitech.com/web/', domain: 'http://192.168.10.169:7788/web/',
uploadImg : 'https://preprod.mjitech.com/static/uploadTrouble' uploadImg : 'https://preprod.mjitech.com/static/uploadTrouble'
} }
\ No newline at end of file
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