修改路由路径

dev_forge
tangjiang 6 years ago
parent 2512676406
commit 090354b5a4

@ -666,9 +666,9 @@ class App extends Component {
(props)=>(<Ecs {...this.props} {...props} {...this.state}></Ecs>)
}/>
<Route path="/developer/neworedittask/:id?" component={NewOrEditTask} />
<Route path="/developer/studentstudy/:id?" component={StudentStudy} />
<Route path="/developer/:id?" component={Developer}/>
<Route path="/problems/neworedittask/:id?" component={NewOrEditTask} />
<Route path="/problems/studentstudy/:id?" component={StudentStudy} />
<Route path="/problems" component={Developer}/>
<Route exact path="/"
// component={ShixunsHome}

@ -107,7 +107,7 @@ const options = {
render: (text, record) => (
<span>
<Button type="primary">
<Link to={`/developer/neworedittask/${record.identifier}`}>编辑</Link>
<Link to={`/problems/neworedittask/${record.identifier}`}>编辑</Link>
</Button>
</span>
),
@ -116,7 +116,7 @@ const columns = [
{
title: '标题',
dataIndex: 'name',
render: (name, record) => <Link style={{ color: '#459be5' }} to={`/developer/studentstudy/${record.identifier}`}>{name}</Link>
render: (name, record) => <Link style={{ color: '#459be5' }} to={`/problems/studentstudy/${record.identifier}`}>{name}</Link>
},
{
title: '分类',
@ -178,7 +178,6 @@ class DeveloperHome extends Component {
};
componentDidMount() {
console.log('==============>>>>>>>>>>>>>>>', this.props);
const { isMySource } = this.props;
if (isMySource) {
// this.handleFilterSearch()
@ -199,21 +198,6 @@ class DeveloperHome extends Component {
});
}
componentDidUpdate (nextProps) {
// if (nextProps.isMySource !== this.isMySource) {
// // this.handleFilterSearch({come_from: nextProps.isMySource ? 'mine' : 'all'});
// if (nextProps.isMySource !== 'all') {
// let _columns = columns.concat([options]);
// this.setState({
// columns: _columns
// });
// } else {
// this.setState({
// columns: columns
// })
// }
// }
}
handleTableChange = (pagination, filters, sorter) => {
// console.log(pagination, filters, sorter);
const {field, order} = sorter;
@ -318,7 +302,7 @@ class DeveloperHome extends Component {
<MultipTags type="error" text="困难" numb={diff_count}/>
</div>
<Button type="primary">
<Link to="/developer/neworedittask">新建</Link>
<Link to="/problems/neworedittask">新建</Link>
</Button>
</div>
</div>

@ -62,7 +62,7 @@ const NewOrEditTask = (props) => {
return (
<div className={'new_add_task_wrap'}>
<div className={'task_header'}>
<Link to="/developer" className={'header_btn'} >
<Link to="/problems" className={'header_btn'} >
<Icon type="left" style={{ marginRight: '5px'}}/>后退
</Link>
<span className={'header_title'}>{props.name || ''}</span>

@ -135,7 +135,7 @@ const RightPaneCode = (props) => {
<Fragment>
<div className={'right_pane_code_wrap'}>
<div className={'code-title'}>
<span>已保存</span>
<span></span>
<Icon className={'code-icon'} type="setting" onClick={handleShowDrawer}/>
</div>
{/** 代码编辑器 */}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-23 10:53:19
* @LastEditors: tangjiang
* @LastEditTime: 2019-11-28 16:04:10
* @LastEditTime: 2019-11-29 08:56:18
*/
import './index.scss';
import React, { useEffect } from 'react';
@ -38,7 +38,7 @@ const StudentStudy = (props) => {
</div>
<div className={'study_quit'}>
<Button>
<Link to="/developer">退出</Link>
<Link to="/problems">退出</Link>
</Button>
</div>
</div>

Loading…
Cancel
Save