|
|
@@ -15,6 +15,7 @@ import axios from 'axios';
|
|
|
import moment from 'moment';
|
|
|
import 'moment/locale/zh-cn';
|
|
|
import zhCN from 'antd/lib/locale-provider/zh_CN';
|
|
|
+import Solutions from "./solution/Solutions";
|
|
|
axios.defaults.withCredentials = true;
|
|
|
const {Header, Content} = Layout;
|
|
|
|
|
|
@@ -30,21 +31,21 @@ class BasicVersion extends Component {
|
|
|
avatar: ''
|
|
|
};
|
|
|
// console.log('BasicVersion props',props);
|
|
|
- if(props.location) {
|
|
|
- let tabMenu = props.location.pathname.split('/')[2] || 'example';
|
|
|
- // console.log('tabMenu',tabMenu);
|
|
|
- switch(tabMenu) {
|
|
|
- case 'deploy':
|
|
|
- this.state.menuLevel1 = 'my-deploy';
|
|
|
- break;
|
|
|
- case 'contact':
|
|
|
- this.state.menuLevel1 = 'contact';
|
|
|
- break;
|
|
|
- default:
|
|
|
- this.state.menuLevel1 = 'example';
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ // if(props.location) {
|
|
|
+ // let tabMenu = props.location.pathname.split('/')[2] || 'example';
|
|
|
+ // // console.log('tabMenu',tabMenu);
|
|
|
+ // switch(tabMenu) {
|
|
|
+ // case 'deploy':
|
|
|
+ // this.state.menuLevel1 = 'my-deploy';
|
|
|
+ // break;
|
|
|
+ // case 'contact':
|
|
|
+ // this.state.menuLevel1 = 'contact';
|
|
|
+ // break;
|
|
|
+ // default:
|
|
|
+ // this.state.menuLevel1 = 'example';
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
componentWillReceiveProps(props){
|
|
|
@@ -55,6 +56,9 @@ class BasicVersion extends Component {
|
|
|
case 'deploy':
|
|
|
this.setState({menuLevel1: 'my-deploy'});
|
|
|
break;
|
|
|
+ case 'solution':
|
|
|
+ this.setState({menuLevel1: 'solution'});
|
|
|
+ break;
|
|
|
case 'contact':
|
|
|
this.setState({menuLevel1: 'contact'});
|
|
|
break;
|
|
|
@@ -169,7 +173,9 @@ class BasicVersion extends Component {
|
|
|
:
|
|
|
''
|
|
|
}
|
|
|
-
|
|
|
+ <Menu.Item key="solution">
|
|
|
+ <Link to="/common/solution"><FormattedMessage id="Solution"/></Link>
|
|
|
+ </Menu.Item>
|
|
|
<Menu.Item key="contact">
|
|
|
<Link to="/common/contact"><FormattedMessage id="Contact"/></Link>
|
|
|
</Menu.Item>
|
|
|
@@ -196,6 +202,7 @@ class BasicVersion extends Component {
|
|
|
<Layout style={{marginTop: '64px', zIndex: '0'}}>
|
|
|
<Switch>
|
|
|
<Route path="/common" exact component={CaseShow}/>
|
|
|
+ <Route path="/common/solution" exact component={Solutions}/>
|
|
|
<Route path="/common/example" exact component={CaseShow}/>
|
|
|
<Route path="/common/deploy" component={MyDeploy}/>
|
|
|
<Route path="/common/contact" component={Contact}/>
|