mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-07 14:16:52 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
fcba2f35fe
2
.gitignore
vendored
2
.gitignore
vendored
@ -37,3 +37,5 @@ node_modules/
|
||||
runtime/
|
||||
prd/
|
||||
dev/
|
||||
.tags
|
||||
.tags1
|
||||
|
@ -56,7 +56,7 @@ export default class App extends Component {
|
||||
<div className="router-main">
|
||||
<Header />
|
||||
<div className="router-container">
|
||||
<Route path="/" component={Home} exact />
|
||||
<Route exact path="/" component={Home} />
|
||||
<Route path="/group" component={requireAuthentication(Group)} />
|
||||
<Route path="/project/:id" component={requireAuthentication(Project)} />
|
||||
<Route path="/user" component={requireAuthentication(User)} />
|
||||
|
@ -2,6 +2,7 @@ import React, { Component } from 'react';
|
||||
import GroupList from './GroupList/GroupList.js';
|
||||
import ProjectList from './ProjectList/ProjectList.js';
|
||||
import Subnav from '../../components/Subnav/Subnav.js';
|
||||
import { Route, Switch, Redirect } from 'react-router-dom';
|
||||
import { Row, Col } from 'antd';
|
||||
|
||||
import './Group.scss'
|
||||
@ -12,6 +13,19 @@ export default class Group extends Component {
|
||||
}
|
||||
|
||||
render () {
|
||||
|
||||
const GroupContent = (
|
||||
<div className="g-row">
|
||||
<Row gutter={16}>
|
||||
<Col span={6}>
|
||||
<GroupList></GroupList>
|
||||
</Col>
|
||||
<Col span={18}>
|
||||
<ProjectList/>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div>
|
||||
<Subnav
|
||||
@ -23,16 +37,10 @@ export default class Group extends Component {
|
||||
name: '我的关注',
|
||||
path: '/follow'
|
||||
}]}/>
|
||||
<div className="g-row">
|
||||
<Row gutter={16}>
|
||||
<Col span={6}>
|
||||
<GroupList></GroupList>
|
||||
</Col>
|
||||
<Col span={18}>
|
||||
<ProjectList/>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<Switch>
|
||||
<Redirect exact from='/group' to='/group/0' />
|
||||
<Route path="/group/:groupId" render={() => GroupContent} />
|
||||
</Switch>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ export default class GroupList extends Component {
|
||||
|
||||
render () {
|
||||
const { match } = this.props;
|
||||
console.log('project')
|
||||
return (
|
||||
<div>
|
||||
<Subnav
|
||||
@ -37,7 +38,7 @@ export default class GroupList extends Component {
|
||||
path: `/project/${match.params.id}/activity`
|
||||
}]}/>
|
||||
<Switch>
|
||||
<Redirect exact from='/project/:id' to={`/project/${match.params.id}/interface`} />
|
||||
<Redirect exact from ="/project/:id" to={`/project/${match.params.id}/activity`}/>
|
||||
<Route path="/project/:id/activity" component={null} />
|
||||
<Route path="/project/:id/interface" component={Interface} />
|
||||
<Route path="/project/:id/setting" component={null} />
|
||||
|
Loading…
Reference in New Issue
Block a user