Commit 83bb3475 by Zhang Xin

add storeinfo

parent bad1eacb
import fetch from 'isomorphic-fetch';
import actionTypes from '../actiontype/store'
const domain = ENV.domain;
const saveStoreInfo = (data)=>{
return{
type:actionTypes.SAVESTORE,
data
}
};
const getStoreInfo = ()=>{
return(dispatch)=>{
fetch(domain + '/web/pad_warehouse/getMachineData.action',{
credentials : 'include',
method : 'POST',
mode : 'cors',
body : {}
}).then((response)=>response.json())
.then(json=>{
console.log(json);
}).catch(e=>{console.error(e)})
}
}
export {getStoreInfo}
const actionTypes = {
SAVESTORE : 'SAVESTORE',
}
export default actionTypes
\ No newline at end of file
......@@ -41,7 +41,7 @@ class PageContainer extends React.Component {
super(props);
// UTILPATH.socket.getIp();
this.state = {
showPage : showPage[9],
showPage : showPage[1],
page : null,
popupInfo : defaultPopupInfo,
pageStyle : {
......
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