|
|
|
@ -1,8 +1,7 @@
|
|
|
|
|
import React, {Component} from 'react';
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
import './public-path';
|
|
|
|
|
import logo from './logo.svg';
|
|
|
|
|
import './App.css';
|
|
|
|
|
import {ConfigProvider} from 'antd'
|
|
|
|
|
import { ConfigProvider } from 'antd'
|
|
|
|
|
import zhCN from 'antd/lib/locale-provider/zh_CN';
|
|
|
|
|
import {
|
|
|
|
|
BrowserRouter as Router,
|
|
|
|
@ -21,9 +20,7 @@ import Trialapplicationreview from './modules/user/Trialapplicationreview';
|
|
|
|
|
import Addcourses from "./modules/courses/coursesPublic/Addcourses";
|
|
|
|
|
import AccountProfile from "./modules/user/AccountProfile";
|
|
|
|
|
import Accountnewprofile from './modules/user/Accountnewprofile';
|
|
|
|
|
import Trialapplication from './modules/login/Trialapplication';
|
|
|
|
|
import Certifiedprofessional from './modules/modals/Certifiedprofessional';
|
|
|
|
|
import NotFoundPage from './NotFoundPage'
|
|
|
|
|
|
|
|
|
|
import Loading from './Loading'
|
|
|
|
|
|
|
|
|
@ -32,18 +29,18 @@ import Loadable from 'react-loadable';
|
|
|
|
|
|
|
|
|
|
import moment from 'moment'
|
|
|
|
|
|
|
|
|
|
import {MuiThemeProvider, createMuiTheme} from 'material-ui/styles';
|
|
|
|
|
import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles';
|
|
|
|
|
|
|
|
|
|
// import './AppConfig'
|
|
|
|
|
|
|
|
|
|
import history from './history';
|
|
|
|
|
|
|
|
|
|
import {SnackbarHOC} from 'educoder'
|
|
|
|
|
import {initAxiosInterceptors} from './AppConfig'
|
|
|
|
|
import { SnackbarHOC } from 'educoder'
|
|
|
|
|
import { initAxiosInterceptors } from './AppConfig'
|
|
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
|
import configureStore from './redux/stores/configureStore';
|
|
|
|
|
// !!!tpi需要这个来加载css
|
|
|
|
|
import {TPMIndexHOC} from './modules/tpm/TPMIndexHOC';
|
|
|
|
|
import { TPMIndexHOC } from './modules/tpm/TPMIndexHOC';
|
|
|
|
|
const store = configureStore();
|
|
|
|
|
|
|
|
|
|
const theme = createMuiTheme({
|
|
|
|
@ -52,7 +49,7 @@ const theme = createMuiTheme({
|
|
|
|
|
main: '#4CACFF',
|
|
|
|
|
contrastText: 'rgba(255, 255, 255, 0.87)'
|
|
|
|
|
},
|
|
|
|
|
secondary: {main: '#4CACFF'}, // #11cb5f This is just green.A700 as hex.
|
|
|
|
|
secondary: { main: '#4CACFF' }, // #11cb5f This is just green.A700 as hex.
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
//
|
|
|
|
@ -68,23 +65,23 @@ const EducoderLogin = Loadable({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//微信登录
|
|
|
|
|
const Otherlogin=Loadable({
|
|
|
|
|
const Otherlogin = Loadable({
|
|
|
|
|
loader: () => import('./modules/login/Otherlogin'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//微信登录
|
|
|
|
|
const Loginqq=Loadable({
|
|
|
|
|
const Loginqq = Loadable({
|
|
|
|
|
loader: () => import('./modules/login/Loginqq'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Otherloginstart=Loadable({
|
|
|
|
|
const Otherloginstart = Loadable({
|
|
|
|
|
loader: () => import('./modules/login/Otherloginstart'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
const Otherloginsqq=Loadable({
|
|
|
|
|
const Otherloginsqq = Loadable({
|
|
|
|
|
loader: () => import('./modules/login/Otherloginqq'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
@ -103,24 +100,6 @@ const CommentComponent = Loadable({
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// const TestMaterialDesignComponent = Loadable({
|
|
|
|
|
// loader: () => import('./modules/test/md/TestMaterialDesign'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
// const TestCodeMirrorComponent = Loadable({
|
|
|
|
|
// loader: () => import('./modules/test/codemirror/TestCodeMirror'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
// const TestComponent = Loadable({
|
|
|
|
|
// loader: () => import('./modules/test/TestRC'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
// const TestUrlQueryComponent = Loadable({
|
|
|
|
|
// loader: () => import('./modules/test/urlquery/TestUrlQuery'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
const TPMIndexComponent = Loadable({
|
|
|
|
|
loader: () => import('./modules/tpm/TPMIndex'),
|
|
|
|
|
loading: Loading,
|
|
|
|
@ -254,7 +233,7 @@ const BanksIndex = Loadable({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 教学案例
|
|
|
|
|
const MoopCases = Loadable({
|
|
|
|
|
const MoopCases = Loadable({
|
|
|
|
|
loader: () => import('./modules/moop_cases/index'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
@ -272,23 +251,23 @@ const Interestpage = Loadable({
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
//竞赛
|
|
|
|
|
const NewCompetitions=Loadable({
|
|
|
|
|
const NewCompetitions = Loadable({
|
|
|
|
|
loader: () => import('./modules/competitions/Competitions'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//黑客松定制竞赛
|
|
|
|
|
const Osshackathon=Loadable({
|
|
|
|
|
const Osshackathon = Loadable({
|
|
|
|
|
loader: () => import('./modules/osshackathon/Osshackathon'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const Messagerouting= Loadable({
|
|
|
|
|
const Messagerouting = Loadable({
|
|
|
|
|
loader: () => import('./modules/message/js/Messagerouting'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const Topicbank= Loadable({
|
|
|
|
|
const Topicbank = Loadable({
|
|
|
|
|
loader: () => import('./modules/topic_bank/Topic_bank'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
@ -321,28 +300,28 @@ const Questionitem_banks = Loadable({
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//试卷库
|
|
|
|
|
const Testpaperlibrary= Loadable({
|
|
|
|
|
const Testpaperlibrary = Loadable({
|
|
|
|
|
loader: () => import('./modules/testpaper/Testpaperlibrary'),
|
|
|
|
|
loading: Loading
|
|
|
|
|
})
|
|
|
|
|
//试卷编辑
|
|
|
|
|
const Paperlibraryeditid= Loadable({
|
|
|
|
|
const Paperlibraryeditid = Loadable({
|
|
|
|
|
loader: () => import('./modules/testpaper/Paperlibraryeditid'),
|
|
|
|
|
loading: Loading
|
|
|
|
|
})
|
|
|
|
|
//试卷查看
|
|
|
|
|
const Paperlibraryseeid= Loadable({
|
|
|
|
|
const Paperlibraryseeid = Loadable({
|
|
|
|
|
loader: () => import('./modules/testpaper/Paperlibraryseeid'),
|
|
|
|
|
loading: Loading
|
|
|
|
|
})
|
|
|
|
|
//人工组卷
|
|
|
|
|
const Paperreview= Loadable({
|
|
|
|
|
const Paperreview = Loadable({
|
|
|
|
|
loader: () => import('./modules/question/Paperreview'),
|
|
|
|
|
loading: Loading
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//智能组卷
|
|
|
|
|
const Integeneration= Loadable({
|
|
|
|
|
const Integeneration = Loadable({
|
|
|
|
|
loader: () => import('./modules/testpaper/Intecomponents'),
|
|
|
|
|
loading: Loading
|
|
|
|
|
})
|
|
|
|
@ -387,44 +366,44 @@ class App extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props)
|
|
|
|
|
this.state = {
|
|
|
|
|
Addcoursestype:false,
|
|
|
|
|
Addcoursestypes:false,
|
|
|
|
|
mydisplay:false,
|
|
|
|
|
occupation:0,
|
|
|
|
|
Addcoursestype: false,
|
|
|
|
|
Addcoursestypes: false,
|
|
|
|
|
mydisplay: false,
|
|
|
|
|
occupation: 0,
|
|
|
|
|
mygetHelmetapi: null,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
HideAddcoursestypess=(i)=>{
|
|
|
|
|
HideAddcoursestypess = (i) => {
|
|
|
|
|
console.log("调用了");
|
|
|
|
|
this.setState({
|
|
|
|
|
Addcoursestype:false,
|
|
|
|
|
Addcoursestypes:false,
|
|
|
|
|
mydisplay:true,
|
|
|
|
|
occupation:i,
|
|
|
|
|
Addcoursestype: false,
|
|
|
|
|
Addcoursestypes: false,
|
|
|
|
|
mydisplay: true,
|
|
|
|
|
occupation: i,
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
hideAddcoursestypes=()=>{
|
|
|
|
|
hideAddcoursestypes = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
Addcoursestypes:false
|
|
|
|
|
Addcoursestypes: false
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
ModalCancelsy=()=>{
|
|
|
|
|
ModalCancelsy = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
mydisplay:false,
|
|
|
|
|
mydisplay: false,
|
|
|
|
|
})
|
|
|
|
|
window.location.href = "/";
|
|
|
|
|
};
|
|
|
|
|
ModalshowCancelsy=()=>{
|
|
|
|
|
ModalshowCancelsy = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
mydisplay:true,
|
|
|
|
|
mydisplay: true,
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
disableVideoContextMenu = () => {
|
|
|
|
|
window.$( "body" ).on( "mousedown", "video", function(event) {
|
|
|
|
|
if(event.which === 3) {
|
|
|
|
|
window.$('video').bind('contextmenu',function () { return false; });
|
|
|
|
|
window.$("body").on("mousedown", "video", function (event) {
|
|
|
|
|
if (event.which === 3) {
|
|
|
|
|
window.$('video').bind('contextmenu', function () { return false; });
|
|
|
|
|
} else {
|
|
|
|
|
window.$('video').unbind('contextmenu');
|
|
|
|
|
}
|
|
|
|
@ -442,7 +421,7 @@ class App extends Component {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
initAxiosInterceptors(this.props);
|
|
|
|
|
this.getAppdata();
|
|
|
|
|
this.getAppdata();
|
|
|
|
|
//
|
|
|
|
|
// axios.interceptors.response.use((response) => {
|
|
|
|
|
// // console.log("response"+response);
|
|
|
|
@ -464,9 +443,9 @@ class App extends Component {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//修改登录方法
|
|
|
|
|
Modifyloginvalue=()=>{
|
|
|
|
|
Modifyloginvalue = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
isRender:false,
|
|
|
|
|
isRender: false,
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -500,20 +479,20 @@ class App extends Component {
|
|
|
|
|
}
|
|
|
|
|
document.head.appendChild(link);
|
|
|
|
|
}
|
|
|
|
|
//获取当前定制信息
|
|
|
|
|
getAppdata=()=>{
|
|
|
|
|
//获取当前定制信息
|
|
|
|
|
getAppdata = () => {
|
|
|
|
|
let url = "/setting.json";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
// console.log("app.js开始请求/setting.json");
|
|
|
|
|
// console.log("获取当前定制信息");
|
|
|
|
|
if(response){
|
|
|
|
|
if(response.data){
|
|
|
|
|
if (response) {
|
|
|
|
|
if (response.data) {
|
|
|
|
|
this.setState({
|
|
|
|
|
mygetHelmetapi:response.data.setting
|
|
|
|
|
mygetHelmetapi: response.data.setting
|
|
|
|
|
});
|
|
|
|
|
//存储配置到游览器
|
|
|
|
|
localStorage.setItem('chromesetting',JSON.stringify(response.data.setting));
|
|
|
|
|
localStorage.setItem('chromesettingresponse',JSON.stringify(response));
|
|
|
|
|
localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
|
|
|
|
|
localStorage.setItem('chromesettingresponse', JSON.stringify(response));
|
|
|
|
|
try {
|
|
|
|
|
if (response.data.setting.tab_logo_url) {
|
|
|
|
|
this.gettablogourldata(response);
|
|
|
|
@ -543,57 +522,57 @@ class App extends Component {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let{mygetHelmetapi}=this.state;
|
|
|
|
|
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>
|
|
|
|
|
<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}/>
|
|
|
|
|
<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) => {
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
|
|
|
|
|
return (<Topicbank {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
return (<Topicbank {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
{/*题库*/}
|
|
|
|
|
<Route path="/topicbank/:topicstype"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
|
|
|
|
|
return (<Topicbank {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
return (<Topicbank {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
{/*/!*众包创新*!/*/}
|
|
|
|
|
{/*<Route path={"/crowdsourcing"} component={ProjectPackages}/>*/}
|
|
|
|
|
{/*竞赛*/}
|
|
|
|
|
<Route path={"/competitions"}
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
|
|
|
|
|
return (<NewCompetitions {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
return (<NewCompetitions {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
{/*黑客松定制竞赛*/}
|
|
|
|
|
<Route
|
|
|
|
|
path={"/osshackathon"}
|
|
|
|
|
render={
|
|
|
|
|
(props)=>{
|
|
|
|
|
return(
|
|
|
|
|
(props) => {
|
|
|
|
|
return (
|
|
|
|
|
<Osshackathon {...this.props} {...props} {...this.state} />
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
@ -601,17 +580,17 @@ class App extends Component {
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{/*认证*/}
|
|
|
|
|
<Route path="/account" component={AccountPage}/>
|
|
|
|
|
<Route path="/account" component={AccountPage} />
|
|
|
|
|
|
|
|
|
|
{/*403*/}
|
|
|
|
|
<Route path="/403" component={Shixunauthority}/>
|
|
|
|
|
<Route path="/403" component={Shixunauthority} />
|
|
|
|
|
|
|
|
|
|
<Route path="/500" component={http500}/>
|
|
|
|
|
<Route path="/500" component={http500} />
|
|
|
|
|
|
|
|
|
|
{/*404*/}
|
|
|
|
|
<Route path="/nopage" component={Shixunnopage}/>
|
|
|
|
|
<Route path="/nopage" component={Shixunnopage} />
|
|
|
|
|
|
|
|
|
|
<Route path="/compatibility" component={CompatibilityPageLoadable}/>
|
|
|
|
|
<Route path="/compatibility" component={CompatibilityPageLoadable} />
|
|
|
|
|
<Route
|
|
|
|
|
path="/login"
|
|
|
|
|
render={
|
|
|
|
@ -649,19 +628,19 @@ class App extends Component {
|
|
|
|
|
|
|
|
|
|
return (<InfosIndex {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
<Route path="/banks"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
return (<BanksIndex {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}></Route>
|
|
|
|
|
}></Route>
|
|
|
|
|
{/*<Route*/}
|
|
|
|
|
{/*path="/personalcompetit"*/}
|
|
|
|
|
{/*render={*/}
|
|
|
|
|
{/*(props) => (<PersonalCompetit {...this.props} {...props} {...this.state}></PersonalCompetit>)*/}
|
|
|
|
|
{/*}*/}
|
|
|
|
|
{/*path="/personalcompetit"*/}
|
|
|
|
|
{/*render={*/}
|
|
|
|
|
{/*(props) => (<PersonalCompetit {...this.props} {...props} {...this.state}></PersonalCompetit>)*/}
|
|
|
|
|
{/*}*/}
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
<Route
|
|
|
|
|
path="/changepassword"
|
|
|
|
@ -679,93 +658,82 @@ class App extends Component {
|
|
|
|
|
<Route path="/shixuns/new" component={Newshixuns}>
|
|
|
|
|
</Route>
|
|
|
|
|
<Route path="/colleges/:id/statistics"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<College {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<College {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
{/* jupyter */}
|
|
|
|
|
<Route path="/tasks/:identifier/jupyter/"
|
|
|
|
|
render={
|
|
|
|
|
(props) => {
|
|
|
|
|
return (<JupyterTPI {...this.props} {...props} {...this.state}/>)
|
|
|
|
|
return (<JupyterTPI {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<Route path="/tasks/:stageId" component={IndexWrapperComponent}/>
|
|
|
|
|
<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>)
|
|
|
|
|
}
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<TPMIndexComponent {...this.props} {...props} {...this.state}></TPMIndexComponent>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
{/*列表页 实训项目列表*/}
|
|
|
|
|
{/*<Route path="/shixuns" component={TPMShixunsIndexComponent}/>*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns"
|
|
|
|
|
render={
|
|
|
|
|
(props)=>(<TPMShixunsIndexComponent {...this.props} {...props} {...this.state}></TPMShixunsIndexComponent>)
|
|
|
|
|
}
|
|
|
|
|
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>)
|
|
|
|
|
}
|
|
|
|
|
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="/moop_cases" render={
|
|
|
|
|
(props) => (<MoopCases {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/forums"
|
|
|
|
|
render={
|
|
|
|
|
(props)=>(<ForumsIndexComponent {...this.props} {...props} {...this.state}></ForumsIndexComponent>)
|
|
|
|
|
(props) => (<ForumsIndexComponent {...this.props} {...props} {...this.state}></ForumsIndexComponent>)
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
</Route>
|
|
|
|
|
<Route path="/comment" component={CommentComponent}/>
|
|
|
|
|
<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>)*/}
|
|
|
|
|
{/*}*/}
|
|
|
|
|
{/*path="/registration"*/}
|
|
|
|
|
{/*render={*/}
|
|
|
|
|
{/*(props) => (<Registration {...this.props} {...props} {...this.state}></Registration>)*/}
|
|
|
|
|
{/*}*/}
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
|
|
|
|
|
<Route path="/messages"
|
|
|
|
|
render={
|
|
|
|
|
(props)=>(<Messagerouting {...this.props} {...props} {...this.state}></Messagerouting>)
|
|
|
|
|
}
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Messagerouting {...this.props} {...props} {...this.state}></Messagerouting>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
<Route path="/help/:type"
|
|
|
|
|
render={
|
|
|
|
|
(props)=>(<Help {...this.props} {...props} {...this.state}></Help>)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Help {...this.props} {...props} {...this.state}></Help>)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/ecs"
|
|
|
|
|
render={
|
|
|
|
|
(props)=>(<Ecs {...this.props} {...props} {...this.state}></Ecs>)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Ecs {...this.props} {...props} {...this.state}></Ecs>)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/problems/new/:id?"
|
|
|
|
|
render={
|
|
|
|
@ -776,9 +744,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"
|
|
|
|
@ -786,71 +754,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} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/question/edit/:id"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/question/newitem"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/question/:type"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/problemset/edit/:id"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/problemset/newitem"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
<Route path="/problemset/:type"
|
|
|
|
|
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} />)
|
|
|
|
|
}/>
|
|
|
|
|
|
|
|
|
|
<Route path="/question"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}/>
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<Developer {...this.props} {...props} {...this.state} />)
|
|
|
|
|
} />
|
|
|
|
|
|
|
|
|
|
<Route path="/problemset"
|
|
|
|
|
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>
|
|
|
|
@ -972,4 +940,4 @@ moment.defineLocale('zh-cn', {
|
|
|
|
|
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
export default SnackbarHOC()(App) ;
|
|
|
|
|
export default SnackbarHOC()(App);
|
|
|
|
|