Commit 3cbe516b by zhangzhi

Merge branch 'ou' of git.mjitech.com:zhangxin/max_android_panel into ou

parents 254d5c63 14d70e29
import fetch from 'isomorphic-fetch' import fetch from 'isomorphic-fetch'
import actionType from '../actiontype/getIp' import actionType from '../actiontype/getIp'
let domain = 'http://192.168.10.100:7788'; let domain = 'http://192.168.10.100:8088';
let domainIp = '192.168.10.'; let domainIp = '192.168.10.';
...@@ -39,7 +39,7 @@ const testIp = ()=>{ ...@@ -39,7 +39,7 @@ const testIp = ()=>{
const getIp = ()=>{ const getIp = ()=>{
return (dispatch =>{ return (dispatch =>{
for(let i = initIndex; i < (totalIndex + initIndex) ; i++){ for(let i = initIndex; i < (totalIndex + initIndex) ; i++){
let url = 'http://' + domainIp + i + ':7788/testIp'; let url = 'http://' + domainIp + i + ':8088/testIp';
fetch( url ,{ fetch( url ,{
// credentials : 'include', // credentials : 'include',
method : 'POST', method : 'POST',
...@@ -48,7 +48,7 @@ const getIp = ()=>{ ...@@ -48,7 +48,7 @@ const getIp = ()=>{
}).then(checkStatus) }).then(checkStatus)
.then(parseJson) .then(parseJson)
.then((data) => { .then((data) => {
dispatch(saveIp(domainIp + i + ':7788')) dispatch(saveIp(domainIp + i + ':8088'))
}) })
.catch((err) =>{ .catch((err) =>{
failTotal++; failTotal++;
......
import { getQuery } from '../util/common'; import { getQuery } from '../util/common';
const requestInfo = { const requestInfo = {
domainPort : getQuery('monitorPort') || '7788', domainPort : getQuery('monitorPort') || '8088',
domainIp : process.env.PAD_ENV !== 'production' ? '192.168.10.' : '192.168.8.', domainIp : process.env.PAD_ENV !== 'production' ? '192.168.10.' : '192.168.8.',
exactDomainIp: getQuery('localMonitorIP') ? '127.0.0.1' : (localStorage.getItem('monitorIP') || '') exactDomainIp: getQuery('localMonitorIP') ? '127.0.0.1' : (localStorage.getItem('monitorIP') || '')
}; };
......
...@@ -36,9 +36,9 @@ export default class HomePageContainer extends React.Component{ ...@@ -36,9 +36,9 @@ export default class HomePageContainer extends React.Component{
} }
this.setState({ this.setState({
text:text, text:text,
}) })
} }
onConnectionChange(){ onConnectionChange(){
...@@ -60,16 +60,16 @@ export default class HomePageContainer extends React.Component{ ...@@ -60,16 +60,16 @@ export default class HomePageContainer extends React.Component{
// this.props.willCloseDoor().then(()=>{ // this.props.willCloseDoor().then(()=>{
// this.props.endCountBack(); // this.props.endCountBack();
// this.props.tempLogout() // this.props.tempLogout()
// }) // })
this.setState({ closeDoorStatus : 0},()=>{ this.setState({ closeDoorStatus : 0},()=>{
alert('当前无网络连接,稍后重试') alert('当前无网络连接,稍后重试')
}) })
}else{ }else{
//正常调用 //正常调用
try { try {
fetch(domain+'machine_pad/finish_task.action',{ fetch(domain+'machine_pad/finish_task.action',{
credentials : 'include', credentials : 'include',
...@@ -95,9 +95,9 @@ export default class HomePageContainer extends React.Component{ ...@@ -95,9 +95,9 @@ export default class HomePageContainer extends React.Component{
console.log('res',res) console.log('res',res)
this.props.willCloseDoor().then(()=>{ this.props.willCloseDoor().then(()=>{
this.props.endCountBack(); this.props.endCountBack();
this.props.changeIsSend(true);
let msg={type:'WILL_CLOSEDOOR'}; let msg={type:'WILL_CLOSEDOOR'};
sendMsg(JSON.stringify(msg)); sendMsg(JSON.stringify(msg));
this.props.changeIsSend(true);
// this.props.tempLogout() // this.props.tempLogout()
console.log('有网络',this.props) console.log('有网络',this.props)
}) })
...@@ -106,10 +106,10 @@ export default class HomePageContainer extends React.Component{ ...@@ -106,10 +106,10 @@ export default class HomePageContainer extends React.Component{
.catch((err)=>{ .catch((err)=>{
this.setState({ closeDoorStatus : 0},()=>{ this.setState({ closeDoorStatus : 0},()=>{
alert('当前网络不佳,请稍后重试') alert('当前网络不佳,请稍后重试')
}) })
}) })
// this.props.willCloseDoor().then(()=>{ // this.props.willCloseDoor().then(()=>{
// this.props.endCountBack(); // this.props.endCountBack();
// let msg={type:'WILL_CLOSEDOOR'}; // let msg={type:'WILL_CLOSEDOOR'};
...@@ -121,17 +121,17 @@ export default class HomePageContainer extends React.Component{ ...@@ -121,17 +121,17 @@ export default class HomePageContainer extends React.Component{
// }else{ // }else{
// this.setState({ closeDoorStatus : 0},()=>{ // this.setState({ closeDoorStatus : 0},()=>{
// alert('当前网络不佳,请稍后重试') // alert('当前网络不佳,请稍后重试')
// }) // })
// } // }
} catch (error) { } catch (error) {
console.log(error,'cuowu') console.log(error,'cuowu')
} }
} }
}) })
...@@ -216,11 +216,11 @@ export default class HomePageContainer extends React.Component{ ...@@ -216,11 +216,11 @@ export default class HomePageContainer extends React.Component{
getTaskList(); getTaskList();
} }
} }
} }
11 11
HomePageContainer.propTypes = { HomePageContainer.propTypes = {
}; };
HomePageContainer.defaultProps = { HomePageContainer.defaultProps = {
} }
\ No newline at end of file
...@@ -330,7 +330,7 @@ class PageContainer extends React.Component { ...@@ -330,7 +330,7 @@ class PageContainer extends React.Component {
} }
} }
} }
break; break;
} }
} }
...@@ -1098,7 +1098,7 @@ class PageContainer extends React.Component { ...@@ -1098,7 +1098,7 @@ class PageContainer extends React.Component {
let {state} = this.props; let {state} = this.props;
let headerInfo = state.commonInfo; let headerInfo = state.commonInfo;
let ip = headerInfo ? headerInfo.ip : ''; let ip = headerInfo ? headerInfo.ip : '';
let mp3Url = ip ? `http://${ip}:7788/defaultMedia/back.mp3` : ''; let mp3Url = ip ? `http://${ip}:8088/defaultMedia/back.mp3` : '';
return ( return (
<div className={"pageContainer "} onTouchStart={()=>this.handleTouch()}> <div className={"pageContainer "} onTouchStart={()=>this.handleTouch()}>
{ {
...@@ -1130,4 +1130,4 @@ PageContainer.childContextTypes = { ...@@ -1130,4 +1130,4 @@ PageContainer.childContextTypes = {
goBackTask: PropTypes.func goBackTask: PropTypes.func
}; };
export default connect(select)(PageContainer) export default connect(select)(PageContainer)
\ No newline at end of file
...@@ -10,7 +10,7 @@ import refresh_disabled from '../image/refresh_disabled.png'; ...@@ -10,7 +10,7 @@ import refresh_disabled from '../image/refresh_disabled.png';
import overPassIcon from '../image/overPassIcon.png' import overPassIcon from '../image/overPassIcon.png'
import homePage from '../image/homepage.png' import homePage from '../image/homepage.png'
const localHost = 'http://localhost:7788'; const localHost = 'http://localhost:8088';
const devHost = 'http://test.mjitech.com'; const devHost = 'http://test.mjitech.com';
const masterHost = 'http://www.mjitech.com'; const masterHost = 'http://www.mjitech.com';
......
...@@ -52,5 +52,6 @@ ...@@ -52,5 +52,6 @@
"react-dom": "^16.4.1", "react-dom": "^16.4.1",
"react-redux": "^5.0.7", "react-redux": "^5.0.7",
"redux": "^4.0.0" "redux": "^4.0.0"
} },
"homepage": "./"
} }
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