新issues 分支改动

dev_auth
杨树林 6 years ago
parent 4bac2e5243
commit 28fbfa82cb

@ -1,5 +1,6 @@
# README # README
https://www.trustie.net/issues/24719
[云上实验室] Logo、导航、底部备案信息定制化
This README would normally document whatever steps are necessary to get the This README would normally document whatever steps are necessary to get the
application up and running. application up and running.

@ -68,6 +68,7 @@
"react-content-loader": "^3.1.1", "react-content-loader": "^3.1.1",
"react-dev-utils": "^5.0.0", "react-dev-utils": "^5.0.0",
"react-dom": "^16.9.0", "react-dom": "^16.9.0",
"react-helmet": "^5.2.1",
"react-hot-loader": "^4.0.0", "react-hot-loader": "^4.0.0",
"react-infinite-scroller": "^1.2.4", "react-infinite-scroller": "^1.2.4",
"react-loadable": "^5.3.1", "react-loadable": "^5.3.1",

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

@ -67,11 +67,14 @@ class NewHeader extends Component {
occupation:0, occupation:0,
mydisplay:false mydisplay:false
} }
// console.log("176") console.log("176")
// console.log(props); // console.log(props);
console.log("NewHeader1234567890");
console.log(this.props);
} }
componentDidMount() { componentDidMount() {
window._header_componentHandler = this; window._header_componentHandler = this;
//下拉框的显示隐藏 //下拉框的显示隐藏

@ -644,6 +644,7 @@ export function TPMIndexHOC(WrappedComponent) {
</Spin> </Spin>
<NewFooter <NewFooter
{...this.state} {...this.props}
Footerdown={Footerdown} Footerdown={Footerdown}
/> />

Loading…
Cancel
Save