|
|
|
@ -334,6 +334,23 @@ class App extends Component {
|
|
|
|
|
|
|
|
|
|
initAxiosInterceptors(this.props);
|
|
|
|
|
this.getAppdata();
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
=======
|
|
|
|
|
//
|
|
|
|
|
// axios.interceptors.response.use((response) => {
|
|
|
|
|
// // console.log("response"+response);
|
|
|
|
|
// if(response!=undefined)
|
|
|
|
|
// // console.log("response"+response.data.statu);
|
|
|
|
|
// if (response&&response.data.status === 407) {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// isRenders: true,
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// return response;
|
|
|
|
|
// }, (error) => {
|
|
|
|
|
// //TODO 这里如果样式变了会出现css不加载的情况
|
|
|
|
|
// });
|
|
|
|
|
>>>>>>> a190075... 实训增加搜索并调整新增
|
|
|
|
|
|
|
|
|
|
window.addEventListener('error', (event) => {
|
|
|
|
|
const msg = `${event.type}: ${event.message}`;
|
|
|
|
@ -381,6 +398,11 @@ class App extends Component {
|
|
|
|
|
getAppdata = () => {
|
|
|
|
|
let url = "/setting.json";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
=======
|
|
|
|
|
// console.log("app.js开始请求/setting.json");
|
|
|
|
|
// console.log("获取当前定制信息");
|
|
|
|
|
>>>>>>> a190075... 实训增加搜索并调整新增
|
|
|
|
|
if (response) {
|
|
|
|
|
if (response.data) {
|
|
|
|
|
this.setState({
|
|
|
|
@ -418,6 +440,7 @@ class App extends Component {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
return (
|
|
|
|
|
<Provider store={store}>
|
|
|
|
|
<ConfigProvider locale={zhCN}>
|
|
|
|
@ -453,11 +476,138 @@ class App extends Component {
|
|
|
|
|
<Route path={"/competitions"}
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
=======
|
|
|
|
|
let { mygetHelmetapi } = this.state;
|
|
|
|
|
// console.log("appappapp");
|
|
|
|
|
// console.log(mygetHelmetapi);
|
|
|
|
|
return (
|
|
|
|
|
<Provider store={store}>
|
|
|
|
|
<ConfigProvider locale={zhCN}>
|
|
|
|
|
<MuiThemeProvider theme={theme}>
|
|
|
|
|
<Accountnewprofile {...this.props}{...this.state} />
|
|
|
|
|
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={() => this.Modifyloginvalue()}></LoginDialog>
|
|
|
|
|
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
|
|
|
|
|
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>
|
|
|
|
|
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
|
|
|
|
|
<Addcourses {...this.props} {...this.state} HideAddcoursestypess={(i) => this.HideAddcoursestypess(i)} />
|
|
|
|
|
<AccountProfile {...this.props} {...this.state} />
|
|
|
|
|
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} ModalshowCancelsy={this.ModalshowCancelsy} />
|
|
|
|
|
<Router>
|
|
|
|
|
<Switch>
|
|
|
|
|
|
|
|
|
|
{/*题库*/}
|
|
|
|
|
<Route path="/topicbank/:username/:topicstype"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
|
|
|
|
|
return (<Topicbank {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
{/*题库*/}
|
|
|
|
|
<Route path="/topicbank/:topicstype"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
|
|
|
|
|
return (<Topicbank {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
{/*/!*众包创新*!/*/}
|
|
|
|
|
{/*<Route path={"/crowdsourcing"} component={ProjectPackages}/>*/}
|
|
|
|
|
{/*竞赛*/}
|
|
|
|
|
<Route path={"/competitions"}
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
|
|
|
|
|
return (<NewCompetitions {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
{/*黑客松定制竞赛*/}
|
|
|
|
|
<Route
|
|
|
|
|
path={"/osshackathon"}
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
return (
|
|
|
|
|
<Osshackathon {...this.props} {...props} {...this.state} />
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{/*认证*/}
|
|
|
|
|
<Route path="/account" component={AccountPage} />
|
|
|
|
|
|
|
|
|
|
{/*403*/}
|
|
|
|
|
<Route path="/403" component={Shixunauthority} />
|
|
|
|
|
|
|
|
|
|
<Route path="/500" component={http500} />
|
|
|
|
|
|
|
|
|
|
{/*404*/}
|
|
|
|
|
<Route path="/nopage" component={Shixunnopage} />
|
|
|
|
|
|
|
|
|
|
<Route path="/compatibility" component={CompatibilityPageLoadable} />
|
|
|
|
|
<Route
|
|
|
|
|
path="/login"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
|
|
|
|
|
return (<EducoderLogin {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<Route
|
|
|
|
|
path="/register"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
|
|
|
|
|
return (<EducoderLogin {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<Route
|
|
|
|
|
path="/otherloginstart" component={Otherloginstart}
|
|
|
|
|
/>
|
|
|
|
|
<Route
|
|
|
|
|
path={"/otherloginqq"} component={Otherloginsqq}
|
|
|
|
|
/>
|
|
|
|
|
<Route
|
|
|
|
|
path="/otherlogin" component={Otherlogin}
|
|
|
|
|
/>
|
|
|
|
|
<Route
|
|
|
|
|
path="/loginqq" component={Loginqq}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<Route path="/users/:username"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
|
|
|
|
|
return (<InfosIndex {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
<Route path="/banks"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
return (<BanksIndex {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
{/*<Route*/}
|
|
|
|
|
{/*path="/personalcompetit"*/}
|
|
|
|
|
{/*render={*/}
|
|
|
|
|
{/*(props) => (<PersonalCompetit {...this.props} {...props} {...this.state}></PersonalCompetit>)*/}
|
|
|
|
|
{/*}*/}
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
<Route
|
|
|
|
|
path="/changepassword"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
>>>>>>> a190075... 实训增加搜索并调整新增
|
|
|
|
|
|
|
|
|
|
return (<NewCompetitions {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
{/*黑客松定制竞赛*/}
|
|
|
|
|
<Route
|
|
|
|
|
path={"/osshackathon"}
|
|
|
|
@ -531,6 +681,88 @@ class App extends Component {
|
|
|
|
|
path="/changepassword"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
=======
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
<Route path="/shixuns/new" component={Newshixuns}>
|
|
|
|
|
</Route>
|
|
|
|
|
<Route path="/colleges/:id/statistics"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<College {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
{/* jupyter */}
|
|
|
|
|
<Route path="/tasks/:identifier/jupyter/"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
return (<JupyterTPI {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<Route path="/tasks/:stageId" component={IndexWrapperComponent} />
|
|
|
|
|
|
|
|
|
|
{/*<Route path="/shixuns/:shixunId" component={TPMIndexComponent}>*/}
|
|
|
|
|
{/*</Route>*/}
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<TPMIndexComponent {...this.props} {...props} {...this.state}></TPMIndexComponent>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
<Route path="/shixuns"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<TPMShixunsIndexComponent {...this.props} {...props} {...this.state}></TPMShixunsIndexComponent>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
{/*实训课程(原实训路径)*/}
|
|
|
|
|
<Route path="/paths" component={ShixunPaths}></Route>
|
|
|
|
|
<Route path="/search"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<SearchPage {...this.props} {...props} {...this.state}></SearchPage>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
{/*课堂*/}
|
|
|
|
|
<Route path="/courses" component={CoursesIndex} {...this.props} {...this.state}></Route>
|
|
|
|
|
|
|
|
|
|
{/* <Route path="/forums" component={ForumsIndexComponent}>
|
|
|
|
|
</Route> */}
|
|
|
|
|
{/* 教学案例 */}
|
|
|
|
|
<Route path="/moop_cases" render={
|
|
|
|
|
(props) => (<MoopCases {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/forums"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<ForumsIndexComponent {...this.props} {...props} {...this.state}></ForumsIndexComponent>)
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
</Route>
|
|
|
|
|
<Route path="/comment" component={CommentComponent} />
|
|
|
|
|
{/*<Route path="/testMaterial" component={TestMaterialDesignComponent}/>*/}
|
|
|
|
|
{/*<Route path="/test" component={TestIndex}/>*/}
|
|
|
|
|
{/*<Route path="/testCodeMirror" component={TestCodeMirrorComponent}/>*/}
|
|
|
|
|
{/*<Route path="/testRCComponent" component={TestComponent}/>*/}
|
|
|
|
|
{/*<Route path="/testUrlQuery" component={TestUrlQueryComponent}/>*/}
|
|
|
|
|
{/*<Route*/}
|
|
|
|
|
{/*path="/registration"*/}
|
|
|
|
|
{/*render={*/}
|
|
|
|
|
{/*(props) => (<Registration {...this.props} {...props} {...this.state}></Registration>)*/}
|
|
|
|
|
{/*}*/}
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
|
|
|
|
|
<Route path="/messages"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Messagerouting {...this.props} {...props} {...this.state}></Messagerouting>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
<Route path="/help/:type"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Help {...this.props} {...props} {...this.state}></Help>)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/ecs"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Ecs {...this.props} {...props} {...this.state}></Ecs>)
|
|
|
|
|
} />
|
|
|
|
|
>>>>>>> a190075... 实训增加搜索并调整新增
|
|
|
|
|
|
|
|
|
|
return (<EducoderLogin {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
@ -555,9 +787,9 @@ class App extends Component {
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<Route path="/myproblems/record_detail/:id"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<RecordDetail {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<RecordDetail {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<Route
|
|
|
|
|
path="/problems/:id/edit"
|
|
|
|
@ -565,71 +797,71 @@ class App extends Component {
|
|
|
|
|
(props) => (<NewOrEditTask {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/Integeneration/:type/:id"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Paperreview {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Paperreview {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/paperreview/:type"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Paperreview {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Paperreview {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/paperlibrary/edit/:id"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Paperlibraryeditid {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Paperlibraryeditid {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/paperlibrary/see/:id"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Paperlibraryseeid {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Paperlibraryseeid {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/myproblems/:id/:tab?"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/question/edit/:id"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/question/newitem"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/question/:type"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/paperlibrary"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Testpaperlibrary {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Testpaperlibrary {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/Integeneration"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Integeneration {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Integeneration {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/problems"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Developer {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Developer {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/question"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
{/*<Route path="/wxcode/:identifier?" component={WXCode}*/}
|
|
|
|
|
{/* render={*/}
|
|
|
|
|
{/* (props)=>(<WXCode {...this.props} {...props} {...this.state}></WXCode>)*/}
|
|
|
|
|
{/* }*/}
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
<Route exact path="/"
|
|
|
|
|
// component={ShixunsHome}
|
|
|
|
|
render={
|
|
|
|
|
(props)=>(<ShixunsHome {...this.props} {...props} {...this.state}></ShixunsHome>)
|
|
|
|
|
}
|
|
|
|
|
// component={ShixunsHome}
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<ShixunsHome {...this.props} {...props} {...this.state}></ShixunsHome>)
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<Route component={Shixunnopage}/>
|
|
|
|
|
<Route component={Shixunnopage} />
|
|
|
|
|
|
|
|
|
|
</Switch>
|
|
|
|
|
</Router>
|
|
|
|
|