|
|
|
@ -9,7 +9,7 @@ import {
|
|
|
|
|
Route,
|
|
|
|
|
Switch
|
|
|
|
|
} from 'react-router-dom';
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import '@icedesign/base/dist/ICEDesignBase.css';
|
|
|
|
|
|
|
|
|
|
import '@icedesign/base/index.scss';
|
|
|
|
@ -275,6 +275,7 @@ class App extends Component {
|
|
|
|
|
Addcoursestypes:false,
|
|
|
|
|
mydisplay:false,
|
|
|
|
|
occupation:0,
|
|
|
|
|
getapi:undefined,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -315,7 +316,6 @@ class App extends Component {
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
this.disableVideoContextMenu();
|
|
|
|
|
|
|
|
|
|
// force an update if the URL changes
|
|
|
|
|
history.listen(() => {
|
|
|
|
|
this.forceUpdate()
|
|
|
|
@ -324,7 +324,8 @@ class App extends Component {
|
|
|
|
|
$("html").animate({ scrollTop: $('html').scrollTop() - 0 })
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
initAxiosInterceptors(this.props)
|
|
|
|
|
initAxiosInterceptors(this.props);
|
|
|
|
|
this.getAppdata();
|
|
|
|
|
//
|
|
|
|
|
// axios.interceptors.response.use((response) => {
|
|
|
|
|
// // console.log("response"+response);
|
|
|
|
@ -350,6 +351,20 @@ class App extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
isRender:false,
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
//获取当前定制信息
|
|
|
|
|
getAppdata=()=>{
|
|
|
|
|
let url = "/setting.json";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if(response){
|
|
|
|
|
this.setState({
|
|
|
|
|
getapi:response.data.setting
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
@ -450,7 +465,7 @@ class App extends Component {
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
{/*课堂*/}
|
|
|
|
|
<Route path="/courses" component={CoursesIndex} {...this.props}></Route>
|
|
|
|
|
<Route path="/courses" component={CoursesIndex} {...this.props} {...this.state}></Route>
|
|
|
|
|
|
|
|
|
|
{/* <Route path="/forums" component={ForumsIndexComponent}>
|
|
|
|
|
</Route> */}
|
|
|
|
@ -484,7 +499,12 @@ class App extends Component {
|
|
|
|
|
render={
|
|
|
|
|
(props)=>(<Ecs {...this.props} {...props} {...this.state}></Ecs>)
|
|
|
|
|
}/>
|
|
|
|
|
<Route exact path="/" component={ShixunsHome}/>
|
|
|
|
|
<Route exact path="/"
|
|
|
|
|
// component={ShixunsHome}
|
|
|
|
|
render={
|
|
|
|
|
(props)=>(<ShixunsHome {...this.props} {...props} {...this.state}></ShixunsHome>)
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<Route component={Shixunnopage}/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|