修改路由路径

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>) (props)=>(<Ecs {...this.props} {...props} {...this.state}></Ecs>)
}/> }/>
<Route path="/developer/neworedittask/:id?" component={NewOrEditTask} /> <Route path="/problems/neworedittask/:id?" component={NewOrEditTask} />
<Route path="/developer/studentstudy/:id?" component={StudentStudy} /> <Route path="/problems/studentstudy/:id?" component={StudentStudy} />
<Route path="/developer/:id?" component={Developer}/> <Route path="/problems" component={Developer}/>
<Route exact path="/" <Route exact path="/"
// component={ShixunsHome} // component={ShixunsHome}

@ -107,7 +107,7 @@ const options = {
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Button type="primary"> <Button type="primary">
<Link to={`/developer/neworedittask/${record.identifier}`}>编辑</Link> <Link to={`/problems/neworedittask/${record.identifier}`}>编辑</Link>
</Button> </Button>
</span> </span>
), ),
@ -116,7 +116,7 @@ const columns = [
{ {
title: '标题', title: '标题',
dataIndex: 'name', 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: '分类', title: '分类',
@ -178,7 +178,6 @@ class DeveloperHome extends Component {
}; };
componentDidMount() { componentDidMount() {
console.log('==============>>>>>>>>>>>>>>>', this.props);
const { isMySource } = this.props; const { isMySource } = this.props;
if (isMySource) { if (isMySource) {
// this.handleFilterSearch() // 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) => { handleTableChange = (pagination, filters, sorter) => {
// console.log(pagination, filters, sorter); // console.log(pagination, filters, sorter);
const {field, order} = sorter; const {field, order} = sorter;
@ -318,7 +302,7 @@ class DeveloperHome extends Component {
<MultipTags type="error" text="困难" numb={diff_count}/> <MultipTags type="error" text="困难" numb={diff_count}/>
</div> </div>
<Button type="primary"> <Button type="primary">
<Link to="/developer/neworedittask">新建</Link> <Link to="/problems/neworedittask">新建</Link>
</Button> </Button>
</div> </div>
</div> </div>

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

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

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

Loading…
Cancel
Save