forked from Gitlink/forgeplus-react
进入老版本
This commit is contained in:
parent
520f035afc
commit
b8daab01e6
|
@ -4005,7 +4005,7 @@ html>body #ajax-indicator {
|
|||
margin-right: 0px
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav li.active a {
|
||||
.head-nav ul#header-nav li.active a:first-child {
|
||||
color: #459be5 !important;
|
||||
}
|
||||
|
||||
|
|
536
src/App.js
536
src/App.js
|
@ -8,7 +8,6 @@ import {
|
|||
Switch
|
||||
} from 'react-router-dom';
|
||||
import axios from 'axios';
|
||||
|
||||
import LoginDialog from './modules/login/LoginDialog';
|
||||
import Notcompletedysl from './modules/user/Notcompletedysl';
|
||||
import Trialapplicationysl from './modules/login/Trialapplicationysl';
|
||||
|
@ -44,98 +43,12 @@ const theme = createMuiTheme({
|
|||
secondary: { main: '#4CACFF' }, // #11cb5f This is just green.A700 as hex.
|
||||
},
|
||||
});
|
||||
//登入
|
||||
const EducoderLogin = Loadable({
|
||||
loader: () => import('./modules/login/EducoderLogin'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
|
||||
//微信登录
|
||||
const Otherlogin = Loadable({
|
||||
loader: () => import('./modules/login/Otherlogin'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//微信登录
|
||||
const Loginqq = Loadable({
|
||||
loader: () => import('./modules/login/Loginqq'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
|
||||
const Otherloginstart = Loadable({
|
||||
loader: () => import('./modules/login/Otherloginstart'),
|
||||
loading: Loading,
|
||||
})
|
||||
const Otherloginsqq = Loadable({
|
||||
loader: () => import('./modules/login/Otherloginqq'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const IndexWrapperComponent = Loadable({
|
||||
loader: () => import('./modules/page/IndexWrapper'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const CommentComponent = Loadable({
|
||||
loader: () => import('./modules/comment/CommentContainer'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const TPMIndexComponent = Loadable({
|
||||
loader: () => import('./modules/tpm/TPMIndex'),
|
||||
loading: Loading,
|
||||
})
|
||||
const TPMShixunsIndexComponent = Loadable({
|
||||
loader: () => import('./modules/tpm/shixuns/ShixunsIndex'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//实训课程(原实训路径)
|
||||
const ShixunPaths = Loadable({
|
||||
loader: () => import('./modules/paths/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
//forge项目
|
||||
const Projects = Loadable({
|
||||
loader: () => import('./forge/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//在线课堂
|
||||
const CoursesIndex = Loadable({
|
||||
loader: () => import('./modules/courses/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
const SearchPage = Loadable({
|
||||
loader: () => import('./search/SearchPage'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
|
||||
const ForumsIndexComponent = Loadable({
|
||||
loader: () => import('./modules/forums/ForumsIndex'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
|
||||
//新建实训
|
||||
const Newshixuns = Loadable({
|
||||
loader: () => import('./modules/tpm/newshixuns/Newshixuns'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const ShixunsHome = Loadable({
|
||||
loader: () => import('./modules/home'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const CompatibilityPageLoadable = Loadable({
|
||||
loader: () => import('./modules/common/CompatibilityPage'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//403页面
|
||||
const Shixunauthority = Loadable({
|
||||
loader: () => import('./modules/403/Shixunauthority'),
|
||||
|
@ -155,173 +68,6 @@ const http500 = Loadable({
|
|||
loading: Loading,
|
||||
})
|
||||
|
||||
// 登录注册
|
||||
const LoginRegisterPage = Loadable({
|
||||
loader: () => import('./modules/user/LoginRegisterPage'),
|
||||
loading: Loading,
|
||||
})
|
||||
const AccountPage = Loadable({
|
||||
loader: () => import('./modules/user/AccountPage'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
// 个人主页
|
||||
const UsersInfo = Loadable({
|
||||
loader: () => import('./modules/user/usersInfo/Infos'),
|
||||
loading: Loading,
|
||||
})
|
||||
const InfosIndex = Loadable({
|
||||
loader: () => import('./modules/user/usersInfo/InfosIndex'),
|
||||
loading: Loading,
|
||||
})
|
||||
// 题库
|
||||
const BanksIndex = Loadable({
|
||||
loader: () => import('./modules/user/usersInfo/banks/BanksIndex'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
|
||||
// 教学案例
|
||||
const MoopCases = Loadable({
|
||||
loader: () => import('./modules/moop_cases/index'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
// 兴趣页面
|
||||
const Interestpage = Loadable({
|
||||
loader: () => import('./modules/login/EducoderInteresse'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//众包创新
|
||||
// const ProjectPackages=Loadable({
|
||||
// loader: () => import('./modules/projectPackages/ProjectPackageIndex'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
|
||||
//竞赛
|
||||
const NewCompetitions = Loadable({
|
||||
loader: () => import('./modules/competitions/Competitions'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//黑客松定制竞赛
|
||||
const Osshackathon = Loadable({
|
||||
loader: () => import('./modules/osshackathon/Osshackathon'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const Messagerouting = Loadable({
|
||||
loader: () => import('./modules/message/js/Messagerouting'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const Topicbank = Loadable({
|
||||
loader: () => import('./modules/topic_bank/Topic_bank'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const Help = Loadable({
|
||||
loader: () => import('./modules/help/Help'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const Ecs = Loadable({
|
||||
loader: () => import('./modules/ecs/Ecs'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
// 添加开发者社区
|
||||
const Developer = Loadable({
|
||||
loader: () => import('./modules/developer'),
|
||||
loading: Loading
|
||||
})
|
||||
// 试题库
|
||||
const Headplugselection = Loadable({
|
||||
loader: () => import('./modules/question/Question'),
|
||||
loading: Loading
|
||||
})
|
||||
|
||||
//试题库新建 //题库编辑
|
||||
const Questionitem_banks = Loadable({
|
||||
loader: () => import('./modules/question/Questionitem_banks'),
|
||||
loading: Loading
|
||||
})
|
||||
|
||||
//试卷库
|
||||
const Testpaperlibrary = Loadable({
|
||||
loader: () => import('./modules/testpaper/Testpaperlibrary'),
|
||||
loading: Loading
|
||||
})
|
||||
//试卷编辑
|
||||
const Paperlibraryeditid = Loadable({
|
||||
loader: () => import('./modules/testpaper/Paperlibraryeditid'),
|
||||
loading: Loading
|
||||
})
|
||||
//试卷查看
|
||||
const Paperlibraryseeid = Loadable({
|
||||
loader: () => import('./modules/testpaper/Paperlibraryseeid'),
|
||||
loading: Loading
|
||||
})
|
||||
//人工组卷
|
||||
const Paperreview = Loadable({
|
||||
loader: () => import('./modules/question/Paperreview'),
|
||||
loading: Loading
|
||||
})
|
||||
|
||||
//智能组卷
|
||||
const Integeneration = Loadable({
|
||||
loader: () => import('./modules/testpaper/Intecomponents'),
|
||||
loading: Loading
|
||||
})
|
||||
|
||||
// 学院统计
|
||||
const College = Loadable({
|
||||
loader: () => import('./college/College'),
|
||||
loading: Loading
|
||||
})
|
||||
|
||||
// 开发者编辑模块
|
||||
const NewOrEditTask = Loadable({
|
||||
loader: () => import('./modules/developer/newOrEditTask'),
|
||||
loading: Loading
|
||||
});
|
||||
// 学员学习
|
||||
const StudentStudy = Loadable({
|
||||
loader: () => import('./modules/developer/studentStudy'),
|
||||
loading: Loading
|
||||
});
|
||||
// 提交记录详情
|
||||
const RecordDetail = Loadable({
|
||||
loader: () => import('./modules/developer/recordDetail'),
|
||||
loading: Loading
|
||||
});
|
||||
// jupyter tpi
|
||||
const JupyterTPI = Loadable({
|
||||
loader: () => import('./modules/tpm/jupyter'),
|
||||
loading: Loading
|
||||
});
|
||||
//我的简历
|
||||
const Tecruitment= Loadable({
|
||||
loader: () => import('./modules/recruitment/Tecruitment'),
|
||||
loading: Loading
|
||||
});
|
||||
//编辑简历
|
||||
const EditResume= Loadable({
|
||||
loader: () => import('./modules/recruitment/EditResume'),
|
||||
loading: Loading
|
||||
});
|
||||
|
||||
// 微信代码编辑器
|
||||
// const WXCode = Loadable({
|
||||
// loader: () => import('./modules/wxcode'),
|
||||
// loading: Loading
|
||||
// });
|
||||
// //个人竞赛报名
|
||||
// const PersonalCompetit = Loadable({
|
||||
// loader: () => import('./modules/competition/personal/PersonalCompetit.js'),
|
||||
// loading: Loading,
|
||||
// });
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
@ -335,7 +81,6 @@ class App extends Component {
|
|||
|
||||
}
|
||||
HideAddcoursestypess = (i) => {
|
||||
console.log("调用了");
|
||||
this.setState({
|
||||
Addcoursestype: false,
|
||||
Addcoursestypes: false,
|
||||
|
@ -372,34 +117,17 @@ class App extends Component {
|
|||
componentDidMount() {
|
||||
document.title = "loading...";
|
||||
this.disableVideoContextMenu();
|
||||
// force an update if the URL changes
|
||||
history.listen(() => {
|
||||
this.forceUpdate()
|
||||
const $ = window.$
|
||||
// https://www.trustie.net/issues/21919 可能会有问题
|
||||
$("html").animate({ scrollTop: $('html').scrollTop() - 0 })
|
||||
});
|
||||
|
||||
initAxiosInterceptors(this.props);
|
||||
this.getAppdata();
|
||||
//
|
||||
// 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不加载的情况
|
||||
// });
|
||||
|
||||
window.addEventListener('error', (event) => {
|
||||
const msg = `${event.type}: ${event.message}`;
|
||||
// console.log(msg)
|
||||
});
|
||||
}
|
||||
//修改登录方法
|
||||
|
@ -508,77 +236,6 @@ class App extends Component {
|
|||
}
|
||||
}>
|
||||
</Route>
|
||||
{/*求职招聘*/}
|
||||
<Route
|
||||
path={"/recruitment"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<Tecruitment {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}
|
||||
|
||||
></Route>
|
||||
{/*编辑简历*/}
|
||||
<Route
|
||||
path={"/editresume"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<EditResume {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}
|
||||
></Route>
|
||||
|
||||
|
||||
{/*题库*/}
|
||||
<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={"/recruitment"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<Tecruitment {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}
|
||||
></Route>
|
||||
{/*认证*/}
|
||||
<Route path="/account" component={AccountPage} />
|
||||
|
||||
{/*403*/}
|
||||
<Route path="/403" component={Shixunauthority} />
|
||||
|
||||
|
@ -587,199 +244,6 @@ class App extends Component {
|
|||
{/*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="/changepassword"
|
||||
render={
|
||||
(props) => {
|
||||
|
||||
return (<EducoderLogin {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}
|
||||
/>
|
||||
<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"
|
||||
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="/classrooms" 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="/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>)
|
||||
} />
|
||||
|
||||
<Route path="/problems/new/:id?"
|
||||
render={
|
||||
(props) => {
|
||||
return (<NewOrEditTask {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
<Route path="/myproblems/record_detail/:id"
|
||||
render={
|
||||
(props) => (<RecordDetail {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/problems/:id/edit"
|
||||
render={
|
||||
(props) => (<NewOrEditTask {...this.props} {...props} {...this.state} />)
|
||||
} />
|
||||
<Route path="/Integeneration/:type/:id"
|
||||
render={
|
||||
(props) => (<Paperreview {...this.props} {...props} {...this.state} />)
|
||||
} />
|
||||
<Route path="/paperreview/:type"
|
||||
render={
|
||||
(props) => (<Paperreview {...this.props} {...props} {...this.state} />)
|
||||
} />
|
||||
<Route path="/paperlibrary/edit/:id"
|
||||
render={
|
||||
(props) => (<Paperlibraryeditid {...this.props} {...props} {...this.state} />)
|
||||
} />
|
||||
|
||||
<Route path="/paperlibrary/see/:id"
|
||||
render={
|
||||
(props) => (<Paperlibraryseeid {...this.props} {...props} {...this.state} />)
|
||||
} />
|
||||
|
||||
<Route path="/myproblems/:id/:tab?"
|
||||
render={
|
||||
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
|
||||
} />
|
||||
<Route path="/problemset/:type/: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} />)
|
||||
} />
|
||||
|
||||
<Route path="/Integeneration"
|
||||
render={
|
||||
(props) => (<Integeneration {...this.props} {...props} {...this.state} />)
|
||||
} />
|
||||
|
||||
<Route path="/problems"
|
||||
render={
|
||||
(props) => (<Developer {...this.props} {...props} {...this.state} />)
|
||||
} />
|
||||
|
||||
<Route path="/problemset"
|
||||
render={
|
||||
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
|
||||
} />
|
||||
<Route exact path="/"
|
||||
render={
|
||||
(props) => (<Projects {...this.props} {...props} {...this.state}></Projects>)
|
||||
|
|
|
@ -829,11 +829,17 @@ submittojoinclass=(value)=>{
|
|||
}
|
||||
}
|
||||
return(
|
||||
<li key={key} onClick={()=>this.headtypesonClick(item.link,true)} className={`${this.matchpaths(item.link)===true?'pr active':'pr'}`} style={!is_hidden?{display: 'block'}:{display: 'none'}}>
|
||||
<li key={key} onClick={()=>this.headtypesonClick(item.link,true)} className={`${this.matchpaths(item.link)===true?'pr active':'pr'}`} style={!is_hidden?{display: 'flex'}:{display: 'none'}}>
|
||||
{
|
||||
strbool?
|
||||
<Link to={item.link}>{item.name}</Link>
|
||||
|
||||
strbool?
|
||||
<React.Fragment>
|
||||
<Link to={item.link}>{item.name}</Link>
|
||||
{
|
||||
mygetHelmetapi2.old_projects_url ?
|
||||
<Link to={mygetHelmetapi2.old_projects_url} className="color-orange">(进入老版本)</Link>
|
||||
:""
|
||||
}
|
||||
</React.Fragment>
|
||||
:
|
||||
<a href={new_link} target='_blank'>{item.name}</a>
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue