From 300cdf23c6ce79005dd5188f22b25c7d2dac4475 Mon Sep 17 00:00:00 2001 From: zwjamnsss Date: Fri, 11 Aug 2017 10:44:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B9=E7=9B=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .tags | 8 ++-- .tags1 | 9 ++-- client/Application.js | 2 +- .../containers/Project/Interface/Interface.js | 0 client/containers/Project/Project.js | 14 +++--- server_dist/middleware/checkToken.js | 36 --------------- server_dist/middleware/userauth.js | 44 ------------------- 7 files changed, 17 insertions(+), 96 deletions(-) create mode 100644 client/containers/Project/Interface/Interface.js delete mode 100644 server_dist/middleware/checkToken.js delete mode 100644 server_dist/middleware/userauth.js diff --git a/.tags b/.tags index 70a123ef..aeca51b1 100644 --- a/.tags +++ b/.tags @@ -452,12 +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 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:81 +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 diff --git a/.tags1 b/.tags1 index c7564862..d6e1c6c4 100644 --- a/.tags1 +++ b/.tags1 @@ -4,8 +4,7 @@ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_VERSION 5.8 // -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:81 +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 diff --git a/client/Application.js b/client/Application.js index c56b270f..29faf67f 100644 --- a/client/Application.js +++ b/client/Application.js @@ -61,7 +61,7 @@ export default class App extends Component { - + diff --git a/client/containers/Project/Interface/Interface.js b/client/containers/Project/Interface/Interface.js new file mode 100644 index 00000000..e69de29b diff --git a/client/containers/Project/Project.js b/client/containers/Project/Project.js index d419e832..366c9d48 100644 --- a/client/containers/Project/Project.js +++ b/client/containers/Project/Project.js @@ -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 (
- + - +
diff --git a/server_dist/middleware/checkToken.js b/server_dist/middleware/checkToken.js deleted file mode 100644 index 0eca1c2f..00000000 --- a/server_dist/middleware/checkToken.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -var _regenerator = require("babel-runtime/regenerator"); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -var _asyncToGenerator2 = require("babel-runtime/helpers/asyncToGenerator"); - -var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// const jwt = require('jsonwebtoken'); -//检查token是否过期 - -module.exports = function () { - var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx, next) { - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return next(); - - case 2: - case "end": - return _context.stop(); - } - } - }, _callee, undefined); - })); - - return function (_x, _x2) { - return _ref.apply(this, arguments); - }; -}(); \ No newline at end of file diff --git a/server_dist/middleware/userauth.js b/server_dist/middleware/userauth.js deleted file mode 100644 index 3cbed01f..00000000 --- a/server_dist/middleware/userauth.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; - -var _regenerator = require("babel-runtime/regenerator"); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -var _asyncToGenerator2 = require("babel-runtime/helpers/asyncToGenerator"); - -var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = function () { - var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx, next) { - var path; - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - path = ctx.path; - - console.log(path); // eslint-disable-line - console.log(ctx.hostname); // eslint-disable-line - - if (!next) { - _context.next = 6; - break; - } - - _context.next = 6; - return next(); - - case 6: - case "end": - return _context.stop(); - } - } - }, _callee, undefined); - })); - - return function (_x, _x2) { - return _ref.apply(this, arguments); - }; -}(); \ No newline at end of file