Commit a4961219 by wujiabao

更改pageContainer

parent b6bfe5b8
...@@ -2,7 +2,7 @@ import fetch from 'isomorphic-fetch'; ...@@ -2,7 +2,7 @@ import fetch from 'isomorphic-fetch';
import actionType from '../actiontype/common' import actionType from '../actiontype/common'
import {addErrorInfo} from './uploadError' import {addErrorInfo} from './uploadError'
let domain1 = ENV.domain; let domain1 = ENV.domain;
let domain = ENV.domain let domain = 'http://192.168.10.37:8080/maxbox/web/'
let myHeaders = new Headers({ let myHeaders = new Headers({
// 'Access-Control-Allow-Origin': '*', // 'Access-Control-Allow-Origin': '*',
......
...@@ -222,18 +222,18 @@ class PageContainer extends React.Component { ...@@ -222,18 +222,18 @@ class PageContainer extends React.Component {
} }
//根据后台数据控制该显示的页面 //根据后台数据控制该显示的页面
if(nextProps.state.commonInfo && nextProps.state.commonInfo.taskInfo){ if(nextProps.state.commonInfo && nextProps.state.commonInfo.taskInfo){
let num=nextProps.state.commonInfo.taskInfo.currentTaskNum; let type=nextProps.state.commonInfo.taskInfo.currentTaskType;
switch(num){ switch(type){
case 1 : case 'LR' :
this.changePages(CONFIG.showPage[5]); this.changePages(CONFIG.showPage[5]);
break; break;
case 2 : case 'CK' :
this.changePages(CONFIG.showPage[6]); this.changePages(CONFIG.showPage[6]);
break; break;
case 3 : case 'RE' :
this.changePages(CONFIG.showPage[10]); this.changePages(CONFIG.showPage[10]);
break; break;
case 4 : case 'ADDR' :
this.changePages(CONFIG.showPage[11]); this.changePages(CONFIG.showPage[11]);
break; break;
} }
......
...@@ -100,6 +100,7 @@ class TakeStokeContaniner extends React.Component { ...@@ -100,6 +100,7 @@ class TakeStokeContaniner extends React.Component {
let {type}=nextProps.TokeStokeState; let {type}=nextProps.TokeStokeState;
switch(type){ switch(type){
case 1 : case 1 :
this.setState({number:1,showButton:true})
break; break;
case 2 : case 2 :
this.setState({number:type}) this.setState({number:type})
......
...@@ -8,6 +8,7 @@ const saveProductInfo = (data,content)=>{ ...@@ -8,6 +8,7 @@ const saveProductInfo = (data,content)=>{
export default function(state={}, action) { export default function(state={}, action) {
switch (action.type) { switch (action.type) {
case barcodeActionType.GETPRODUCTINFO: case barcodeActionType.GETPRODUCTINFO:
console.log(action.data,'吴加宝打印barcode reducer')
return saveProductInfo(state,action.data); return saveProductInfo(state,action.data);
default: default:
return state; return state;
......
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