mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-18 13:04:46 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
005224b54e
18
.tags
18
.tags
@ -344,11 +344,6 @@ regActions /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js
|
||||
const.username /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^ password,$/;" property line:106
|
||||
logoutActions /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^export function logoutActions() {$/;" function line:115
|
||||
loginTypeAction /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^export function loginTypeAction(index) {$/;" function line:122
|
||||
constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ constructor(props) {$/;" function line:26
|
||||
state.login /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ this.state = {$/;" property line:28
|
||||
static.checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ static propTypes = {$/;" property line:33
|
||||
componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ componentDidMount() {$/;" function line:45
|
||||
render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:78
|
||||
const.height /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^const headerStyle = {$/;" property line:13
|
||||
const.lineHeight /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ 'height': '.56rem',$/;" property line:14
|
||||
const.padding /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ 'lineHeight': '.56rem',$/;" property line:15
|
||||
@ -457,7 +452,12 @@ static.curUserRole /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/
|
||||
getUserList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/List.js /^ getUserList() {$/;" function line:41
|
||||
componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/List.js /^ componentDidMount() {$/;" function line:60
|
||||
render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/List.js /^ render() {$/;" function line:85
|
||||
from.children /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ static propTypes = {$/;" property line:8
|
||||
constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ constructor(props) {$/;" function line:15
|
||||
componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ componentWillMount() {$/;" function line:19
|
||||
render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ render () {$/;" function line:22
|
||||
from.match /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ static propTypes = {$/;" property line:9
|
||||
constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ constructor(props) {$/;" function line:16
|
||||
componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ componentWillMount() {$/;" function line:20
|
||||
render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ render () {$/;" function line:23
|
||||
constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ constructor(props) {$/;" function line:26
|
||||
state.login /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ this.state = {$/;" property line:28
|
||||
static.checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ static propTypes = {$/;" property line:33
|
||||
componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ componentDidMount() {$/;" function line:45
|
||||
render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:78
|
||||
|
9
.tags1
9
.tags1
@ -4,7 +4,8 @@
|
||||
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
||||
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
||||
!_TAG_PROGRAM_VERSION 5.8 //
|
||||
from.children /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ static propTypes = {$/;" property line:8
|
||||
constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ constructor(props) {$/;" function line:15
|
||||
componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ componentWillMount() {$/;" function line:19
|
||||
render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Project/Project.js /^ render () {$/;" function line:22
|
||||
constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ constructor(props) {$/;" function line:26
|
||||
state.login /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ this.state = {$/;" property line:28
|
||||
static.checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ static propTypes = {$/;" property line:33
|
||||
componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ componentDidMount() {$/;" function line:45
|
||||
render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:78
|
||||
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Route, BrowserRouter as Router, Redirect, Switch } from 'react-router-dom';
|
||||
import { Home, Group, Project, News, AddInterface, Follows, AddProject } from './containers/index';
|
||||
import { Home, Group, Project, Follows, AddProject } from './containers/index';
|
||||
import User from './containers/User/User.js';
|
||||
import Header from './components/Header/Header';
|
||||
import Footer from './components/Footer/Footer';
|
||||
@ -57,16 +57,15 @@ export default class App extends Component {
|
||||
<Header />
|
||||
<div className="router-container">
|
||||
<Route path="/" component={Home} exact />
|
||||
<Switch>
|
||||
<Redirect exact from='/group' to='/group/1' />
|
||||
<Route exact path="/group/:groupName" component={requireAuthentication(Group)} />
|
||||
</Switch>
|
||||
<Route path="/project" component={requireAuthentication(Project)} />
|
||||
<Route path="/group/:id" component={requireAuthentication(Group)} />
|
||||
<Route path="/project/:id" component={requireAuthentication(Project)} />
|
||||
<Route path="/user" component={requireAuthentication(User)} />
|
||||
<Route path="/news" component={requireAuthentication(News)} />
|
||||
<Route path="/add-interface" component={requireAuthentication(AddInterface)} />
|
||||
<Route path="/follow" component={requireAuthentication(Follows)} />
|
||||
<Route path="/add-project" component={requireAuthentication(AddProject)} />
|
||||
{
|
||||
// <Route path="/news" component={requireAuthentication(News)} />
|
||||
// <Route path="/add-interface" component={requireAuthentication(AddInterface)} />
|
||||
}
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
|
0
client/containers/Project/Interface/Interface.js
Normal file
0
client/containers/Project/Interface/Interface.js
Normal file
@ -2,11 +2,12 @@ import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Route, Switch, Redirect } from 'react-router-dom';
|
||||
import { Subnav } from '../../components/index'
|
||||
import { Interface } from './Interface/Interface.js'
|
||||
|
||||
export default class GroupList extends Component {
|
||||
|
||||
static propTypes = {
|
||||
children: PropTypes.element
|
||||
match: PropTypes.object
|
||||
}
|
||||
|
||||
state = {
|
||||
@ -20,24 +21,25 @@ export default class GroupList extends Component {
|
||||
}
|
||||
|
||||
render () {
|
||||
const { match } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<Subnav
|
||||
default={'接口'}
|
||||
data={[{
|
||||
name: '接口',
|
||||
path: '/project/:id/activity'
|
||||
path: `/project/${match.params.id}/interface`
|
||||
}, {
|
||||
name: '设置',
|
||||
path: '/project/:id/setting'
|
||||
path: `/project/${match.params.id}/setting`
|
||||
}, {
|
||||
name: '动态',
|
||||
path: '/project/:id/activity'
|
||||
path: `/project/${match.params.id}/activity`
|
||||
}]}/>
|
||||
<Switch>
|
||||
<Redirect exact from='/project/:id' to='/project/:id/interface' />
|
||||
<Redirect exact from='/project/:id' to={`/project/${match.params.id}/interface`} />
|
||||
<Route path="/project/:id/activity" component={null} />
|
||||
<Route path="/project/:id/interface" component={null} />
|
||||
<Route path="/project/:id/interface" component={Interface} />
|
||||
<Route path="/project/:id/setting" component={null} />
|
||||
</Switch>
|
||||
</div>
|
||||
|
@ -19,7 +19,6 @@ class baseController {
|
||||
|
||||
async init(ctx) {
|
||||
this.$user = null;
|
||||
console.log(111111)
|
||||
let ignoreRouter = [
|
||||
'/user/login_by_token',
|
||||
'/user/login',
|
||||
|
@ -66,23 +66,22 @@ var baseController = function () {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
this.$user = null;
|
||||
console.log(111111);
|
||||
ignoreRouter = ['/user/login_by_token', '/user/login', '/user/reg', '/user/status', '/user/logout'];
|
||||
|
||||
if (!(ignoreRouter.indexOf(ctx.path) > -1)) {
|
||||
_context.next = 7;
|
||||
_context.next = 6;
|
||||
break;
|
||||
}
|
||||
|
||||
this.$auth = true;
|
||||
_context.next = 9;
|
||||
_context.next = 8;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
_context.next = 9;
|
||||
case 6:
|
||||
_context.next = 8;
|
||||
return this.checkLogin(ctx);
|
||||
|
||||
case 9:
|
||||
case 8:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user