diff --git a/.tags b/.tags index 388b1988..ffb43780 100644 --- a/.tags +++ b/.tags @@ -61,48 +61,11 @@ fetchMoreNews /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/news/news.js const.curUid /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/user/user.js /^const initialState = {$/;" property line:4 switch /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/user/user.js /^ switch (action.type) {$/;" function line:9 changeCurUid /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/user/user.js /^export function changeCurUid(curUid) {$/;" function line:23 -requireAuthentication /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^export function requireAuthentication(Component) {$/;" function line:16 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ constructor(props){$/;" function line:18 -static.isAuthenticated /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ static propTypes ={$/;" property line:21 -componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ componentWillMount() {$/;" function line:28 -componentWillReceiveProps /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ componentWillReceiveProps() {$/;" function line:31 -checkAuth /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ checkAuth() {$/;" function line:34 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ render() {$/;" function line:40 -MenuUser.propTypes.user /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^MenuUser.propTypes={$/;" property line:27 -ToolUser.propTypes.user /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ToolUser.propTypes={$/;" property line:59 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ constructor(props) {$/;" function line:89 -static.router /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ static propTypes ={$/;" property line:92 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ render () {$/;" function line:149 constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Search/Search.js /^ constructor(props){$/;" function line:24 state.dataSource /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Search/Search.js /^ this.state = {$/;" property line:26 static.groupList /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Search/Search.js /^ static propTypes = {$/;" property line:31 getDataSource /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Search/Search.js /^ getDataSource(groupList){$/;" function line:91 render /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Search/Search.js /^ render(){$/;" function line:99 -@connect.url /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ static propTypes = {$/;" property line:58 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ constructor (props) {$/;" function line:75 -constructor.state.isLoading /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ this.state = {$/;" property line:77 -constructor.state.isSave /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ isLoading: '',$/;" property line:78 -constructor.state.mockJson /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ isSave: false,$/;" property line:79 -constructor.state.mockURL /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ mockJson: '',$/;" property line:80 -constructor.state.projectData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ mockURL: '',$/;" property line:81 -componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ componentDidMount () {$/;" function line:88 -getInterfaceId /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ getInterfaceId () {$/;" function line:121 -modifyTagName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ modifyTagName (tagName) {$/;" function line:134 -verificationURL /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ verificationURL () {$/;" function line:140 -getMockURL /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ getMockURL (project_id, result) {$/;" function line:148 -getMockURL.id /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ const params = {id: project_id}$/;" property line:149 -editState /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ editState (data) {$/;" function line:161 -initInterfaceData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ initInterfaceData (interfaceId) {$/;" function line:177 -initInterfaceData.id /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ const params = { id: interfaceId }$/;" property line:178 -initInterfaceDataTwo /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ initInterfaceDataTwo (interfaceId) {$/;" function line:198 -initInterfaceDataTwo.id /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ const params = { id: interfaceId }$/;" property line:199 -setLoading /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ setLoading (boolean) {$/;" function line:211 -routerPage /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ routerPage () {$/;" function line:217 -changeState /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ changeState (ifTrue) {$/;" function line:223 -mockData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ mockData () { \/\/ mock 数据$/;" function line:230 -jumpEditUrl /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ jumpEditUrl (_id) {$/;" function line:244 -saveForms /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ saveForms () {$/;" function line:255 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ render () {$/;" function line:308 @connect.reqParams /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/InterfaceTest/InterfaceTest.js /^ static propTypes = {$/;" property line:33 state.res /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/InterfaceTest/InterfaceTest.js /^ state = {$/;" property line:43 state.method /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/InterfaceTest/InterfaceTest.js /^ res: '',$/;" property line:44 @@ -174,23 +137,6 @@ rhymeCompleter.identifierRegexps /Users/qitmac000445/Desktop/YAPI/yapi/client/co getCompletions /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ResParams/ResParams.js /^ getCompletions: function (editor, session, pos, prefix, callback) {$/;" function line:72 callback /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ResParams/ResParams.js /^ callback(null, wordList.map(function (ea) {$/;" function line:94 render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ResParams/ResParams.js /^ render() {$/;" function line:113 -const.y /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };$/;" property line:15 -const.opacity /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };$/;" property line:15 -const.type /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };$/;" property line:15 -const.ease /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };$/;" property line:15 -const.y /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 -const.opacity /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 -const.type /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 -const.ease /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 -const.duration /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 -const.width /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const style = {$/;" property line:17 -const.background /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ 'width':'100%',$/;" property line:20 -const.backgroundSize /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ 'background': 'url(.\/image\/bg-img.jpg) no-repeat',$/;" property line:21 -HomeGuest.propTypes.introList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^HomeGuest.propTypes ={$/;" property line:125 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ constructor(props) {$/;" function line:139 -static.introList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ static propTypes = {$/;" property line:142 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ render () {$/;" function line:150 -Home.defaultProps.introList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^Home.defaultProps={$/;" property line:174 from.fetchInterfaceData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Interface/Interface.js /^ static propTypes = {$/;" property line:34 constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Interface/Interface.js /^ constructor(props) {$/;" function line:43 componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Interface/Interface.js /^ componentWillMount () {$/;" function line:47 @@ -203,29 +149,6 @@ deleteInterfaceData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Inte deleteInterface /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Interface/InterfaceTable/InterfaceTable.js /^ deleteInterface (interfaceId) {$/;" function line:50 deleteInterface.id /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Interface/InterfaceTable/InterfaceTable.js /^ const params = {$/;" property line:51 render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Interface/InterfaceTable/InterfaceTable.js /^ render () {$/;" function line:63 -import.marginBottom /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^const formItemStyle = {$/;" property line:9 -const.height /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^const changeHeight = {$/;" property line:13 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^ constructor(props) {$/;" function line:29 -static.form /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^ static propTypes = {$/;" property line:33 -componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^ componentDidMount() {$/;" function line:56 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^ render() {$/;" function line:61 -const.marginBottom /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^const formItemStyle = {$/;" property line:8 -const.height /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^const changeHeight = {$/;" property line:12 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^ constructor(props) {$/;" function line:28 -state.confirmDirty /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^ this.state = {$/;" property line:30 -static.form /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^ static propTypes = {$/;" property line:35 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^ render() {$/;" function line:80 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ constructor(props) {$/;" function line:23 -from.state.loading /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ this.state = {$/;" property line:25 -static.newsData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ static propTypes = {$/;" property line:29 -setLoading /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ setLoading(bool){$/;" function line:34 -componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ componentWillMount(){$/;" function line:39 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ render () {$/;" function line:45 -@connect.fetchNewsData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ static propTypes = {$/;" property line:34 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ constructor(props) {$/;" function line:40 -constructor.state.selectedKeys /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ this.state = {$/;" property line:42 -getLogData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ getLogData(e){$/;" function line:46 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ render () {$/;" function line:59 from /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsTimeline/NewsTimeline.js /^import { fetchMoreNews } from '..\/..\/..\/reducer\/modules\/news.js'$/;" function line:5 @connect.newsData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsTimeline/NewsTimeline.js /^ static propTypes = {$/;" property line:22 constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsTimeline/NewsTimeline.js /^ constructor(props) {$/;" function line:29 @@ -254,11 +177,6 @@ static.form /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroup render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/UpDateModal.js /^ render() {$/;" function line:152 validator /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/UpDateModal.js /^ validator(rule, value, callback) {$/;" function line:191 validator /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/UpDateModal.js /^ validator(rule, value, callback) {$/;" function line:224 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ constructor(props) {$/;" function line:27 -state.login /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ this.state = {$/;" property line:29 -static.checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ static propTypes = {$/;" property line:34 -componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ componentDidMount() {$/;" function line:39 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:72 createStore /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/create.js /^export default function createStore(initialState = {}) {$/;" function line:8 module.exports.parser /Users/qitmac000445/Desktop/YAPI/yapi/client/.eslintrc.js /^module.exports = {$/;" property line:1 module.exports.extends /Users/qitmac000445/Desktop/YAPI/yapi/client/.eslintrc.js /^ parser: 'babel-eslint',$/;" property line:2 @@ -411,3 +329,135 @@ inputNewGroupDesc /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Projec selectGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ selectGroup(e) {$/;" function line:151 searchGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ searchGroup(e, value) {$/;" function line:175 render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ render () {$/;" function line:185 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/Group.js /^ constructor(props) {$/;" function line:10 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/Group.js /^ render () {$/;" function line:14 +const.isLogin /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^const initialState = {$/;" property line:15 +const.userName /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^ isLogin: false,$/;" property line:16 +const.uid /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^ userName: null,$/;" property line:17 +const.email /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^ uid: null,$/;" property line:18 +const.loginState /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^ email: '',$/;" property line:19 +const.loginWrapActiveKey /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^ loginState: LOADING_STATUS,$/;" property line:20 +switch /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^ switch (action.type) {$/;" function line:25 +checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^export function checkLoginState() {$/;" function line:82 +loginActions /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^export function loginActions(data) {$/;" function line:95 +regActions /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/user.js /^export function regActions(data) {$/;" function line:102 +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 +MenuUser.propTypes.user /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^MenuUser.propTypes={$/;" property line:34 +ToolUser.propTypes.user /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ToolUser.propTypes={$/;" property line:78 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ constructor(props) {$/;" function line:107 +static.router /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ static propTypes ={$/;" property line:110 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/components/Header/Header.js /^ render () {$/;" function line:166 +import.marginBottom /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^const formItemStyle = {$/;" property line:9 +const.height /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^const changeHeight = {$/;" property line:13 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^ constructor(props) {$/;" function line:29 +static.form /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^ static propTypes = {$/;" property line:33 +componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^ componentDidMount() {$/;" function line:56 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Login.js /^ render() {$/;" function line:61 +const.marginBottom /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^const formItemStyle = {$/;" property line:8 +const.height /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^const changeHeight = {$/;" property line:12 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^ constructor(props) {$/;" function line:28 +state.confirmDirty /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^ this.state = {$/;" property line:30 +static.form /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^ static propTypes = {$/;" property line:35 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js /^ render() {$/;" function line:80 +requireAuthentication /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^export function requireAuthentication(Component) {$/;" function line:16 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ constructor(props){$/;" function line:18 +static.isAuthenticated /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ static propTypes ={$/;" property line:21 +componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ componentWillMount() {$/;" function line:28 +componentWillReceiveProps /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ componentWillReceiveProps() {$/;" function line:31 +checkAuth /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ checkAuth() {$/;" function line:34 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/components/AuthenticatedComponent.js /^ render() {$/;" function line:40 +const.y /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };$/;" property line:15 +const.opacity /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };$/;" property line:15 +const.type /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };$/;" property line:15 +const.ease /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };$/;" property line:15 +const.y /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 +const.opacity /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 +const.type /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 +const.ease /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 +const.duration /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};$/;" property line:16 +const.width /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^const style = {$/;" property line:17 +const.background-color /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ 'width':'100%',$/;" property line:18 +const.backgroundSize /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ 'background-color': '#333',$/;" property line:20 +HomeGuest.propTypes.introList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^HomeGuest.propTypes ={$/;" property line:124 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ constructor(props) {$/;" function line:138 +static.introList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ static propTypes = {$/;" property line:141 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^ render () {$/;" function line:149 +Home.defaultProps.introList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Home/Home.js /^Home.defaultProps={$/;" property line:173 +@connect.url /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ static propTypes = {$/;" property line:58 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ constructor (props) {$/;" function line:75 +constructor.state.isLoading /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ this.state = {$/;" property line:77 +constructor.state.isSave /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ isLoading: '',$/;" property line:78 +constructor.state.mockJson /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ isSave: false,$/;" property line:79 +constructor.state.mockURL /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ mockJson: '',$/;" property line:80 +constructor.state.projectData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ mockURL: '',$/;" property line:81 +componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ componentDidMount () {$/;" function line:88 +getInterfaceId /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ getInterfaceId () {$/;" function line:121 +modifyTagName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ modifyTagName (tagName) {$/;" function line:134 +verificationURL /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ verificationURL () {$/;" function line:140 +getMockURL /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ getMockURL (project_id, result) {$/;" function line:148 +getMockURL.id /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ const params = {id: project_id}$/;" property line:149 +editState /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ editState (data) {$/;" function line:161 +initInterfaceData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ initInterfaceData (interfaceId) {$/;" function line:177 +initInterfaceData.id /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ const params = { id: interfaceId }$/;" property line:178 +initInterfaceDataTwo /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ initInterfaceDataTwo (interfaceId) {$/;" function line:198 +initInterfaceDataTwo.id /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ const params = { id: interfaceId }$/;" property line:199 +setLoading /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ setLoading (boolean) {$/;" function line:211 +routerPage /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ routerPage () {$/;" function line:217 +changeState /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ changeState (ifTrue) {$/;" function line:223 +mockData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ mockData () { \/\/ mock 数据$/;" function line:230 +jumpEditUrl /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ jumpEditUrl (_id) {$/;" function line:244 +saveForms /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ saveForms () {$/;" function line:255 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/AddInterface.js /^ render () {$/;" function line:308 +from.groupList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ static propTypes = {$/;" property line:35 +state.addGroupModalVisible /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ state = {$/;" property line:46 +state.editGroupModalVisible /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ addGroupModalVisible: false,$/;" property line:47 +state.newGroupName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ editGroupModalVisible: false,$/;" property line:48 +state.newGroupDesc /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ newGroupName: '',$/;" property line:49 +state.currGroupName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ newGroupDesc: '',$/;" property line:50 +state.currGroupDesc /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ currGroupName: '',$/;" property line:51 +state.groupList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ currGroupDesc: '',$/;" property line:52 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ constructor(props) {$/;" function line:56 +showModal /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ showModal(type) {$/;" function line:80 +hideModal /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ hideModal(type) {$/;" function line:95 +inputNewGroupName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ inputNewGroupName(e, type) {$/;" function line:134 +inputNewGroupDesc /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ inputNewGroupDesc(e, type) {$/;" function line:142 +selectGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ selectGroup(e) {$/;" function line:151 +searchGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ searchGroup(e, value) {$/;" function line:175 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Group/GroupList/GroupList.js /^ render () {$/;" function line:185 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/LoginWrap.js /^ constructor(props){$/;" function line:16 +static.form /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/LoginWrap.js /^ static propTypes = {$/;" property line:20 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/LoginWrap.js /^ render() {$/;" function line:25 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ constructor(props) {$/;" function line:24 +state.mockURL /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ this.state = {$/;" property line:26 +static.uid /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ static propTypes = {$/;" property line:30 +componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ componentWillMount(){$/;" function line:34 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ render () {$/;" function line:44 +@connect.fetchNewsData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ static propTypes = {$/;" property line:34 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ constructor(props) {$/;" function line:40 +constructor.state.selectedKeys /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ this.state = {$/;" property line:42 +getLogData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ getLogData(e){$/;" function line:46 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsList/NewsList.js /^ render () {$/;" function line:59 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/LeftMenu.js /^ constructor(props) {$/;" function line:21 +@connect.state.dataSource /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/LeftMenu.js /^ this.state = {$/;" property line:23 +static.curUid /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/LeftMenu.js /^ static propTypes = {$/;" property line:31 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/LeftMenu.js /^ render() {$/;" function line:68 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/List.js /^ constructor(props) {$/;" function line:24 +@connect.state.data /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/List.js /^ this.state = {$/;" property line:26 +static.curUserRole /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/User/List.js /^ static propTypes = {$/;" property line:32 +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 diff --git a/.tags1 b/.tags1 index 3a940a30..b1b2df20 100644 --- a/.tags1 +++ b/.tags1 @@ -4,19 +4,7 @@ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_VERSION 5.8 // -from.groupList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ static propTypes = {$/;" property line:35 -state.addGroupModalVisible /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ state = {$/;" property line:46 -state.editGroupModalVisible /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ addGroupModalVisible: false,$/;" property line:47 -state.newGroupName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ editGroupModalVisible: false,$/;" property line:48 -state.newGroupDesc /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ newGroupName: '',$/;" property line:49 -state.currGroupName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ newGroupDesc: '',$/;" property line:50 -state.currGroupDesc /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ currGroupName: '',$/;" property line:51 -state.groupList /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ currGroupDesc: '',$/;" property line:52 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ constructor(props) {$/;" function line:56 -showModal /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ showModal(type) {$/;" function line:80 -hideModal /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ hideModal(type) {$/;" function line:95 -inputNewGroupName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ inputNewGroupName(e, type) {$/;" function line:134 -inputNewGroupDesc /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ inputNewGroupDesc(e, type) {$/;" function line:142 -selectGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ selectGroup(e) {$/;" function line:151 -searchGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ searchGroup(e, value) {$/;" function line:175 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ render () {$/;" function line:185 +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 diff --git a/README.md b/README.md index b5e033a6..a77f9dc0 100644 --- a/README.md +++ b/README.md @@ -1,98 +1,17 @@ # YApi -## 平台介绍 +## 一、平台介绍 -

YApi是高效易用功能强大、的api管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护、监控和保护任意规模的 API,而且yapi为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的创建。

+

YApi是高效易用功能强大、的api管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护、监控和保护任意规模的 API,yapi还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。

-## 功能 -1. 项目接口管理 - - 提供基本的项目分组,项目管理,接口管理功能 - -2. mockServer服务 - - 用户只需在项目配置线上域名和接口基本路径,通过将线上域名指到我们的yapi平台服务器,就可使用mockServer服务 - -3. 用户管理 - - 提供基本的用户注册登录管理等功能,集成了去哪儿QSSO登录 - -## 快速开始 -### 1 接口管理架构 -平台以**项目分组** -> **项目** -> **接口**的划分进行接口组织管理。 - -图片名称 - -#### 1.1 项目分组 - -登录之后进到项目首页,左边侧边栏显示的即分组列表。 - -图片名称 - -管理员有权限添加或删除分组。 - -图片名称 - -> 分组名称具有唯一性 - -#### 1.2 项目 - -选中不同的分组,右边会显示该分组下的项目列表。 - -图片名称 - -创建项目需要填写项目名称,项目线上域名(添加完成后可配置项目其他环境域名),项目接口基本路径(接口路径前面相同的部分)以及项目描述。 - -图片名称 - -> 项目『线上域名 + 基本路径』具有唯一性 - -#### 1.3 接口 - -点击项目名称,进入该项目接口列表。 - -图片名称 - -点击编辑,进入接口详情页(之后接口详情页和编辑也会分开),可以编辑接口或者请求测试真实接口。 - -图片名称 - -图片名称 +## 二、特性 +* 完善的项目接口管理功能 +* 易用的MockServer +* 类gitlab的用户管理和权限管理功能 +* 强大的接口集功能 -### 2 Mock功能 -

yapi的Mock功能可以根据用户的输入接口信息如协议、URL、接口名、请求头、请求参数、mock规则生成Mock接口,这些接口会自动生成模拟数据,支持复杂的生成逻辑,创建者可以自由构造需要的数据。而且与常见的Mock方式如将Mock写在代码里和JS拦截等相比yapi的Mock在使用场景和效率和复杂度上是相差甚远的,正是由于yapi的Mock是一个第三方平台那么在 团队开发时任何人都可以权限许可下创建、修改接口信息等操作,这对于团队开发是很有好处的。

-#### 2.1 添加接口 -通过点击页面上的"+添加接口" -图片名称 - - 输入协议、URL、接口名、请求头、请求参数、mock规则等信息,然后点击右上角的"Mock"按钮。 - -图片名称 - -#### 2.2 Mock - -当点击"Mock"按钮之后,就会在页面下方生成一个mock结果并产生一个API接口。点击"复制"按钮即可复制,用户拿到接口后就可以发请求了。 - -图片名称 - -将请求的信息填写完善如:请求方法(post、get等)、URL、请求头、请求的数据等。然后就点击"发送",然后在"返回结果"出可以看到接口返回的数据。 - -图片名称 - -#### 2.3 成员管理 - -你也可以通过点击"管理成员"来添加和删除项目的成员,便于团队管理。 - -图片名称 - -## 未来计划推出功能 - -1. 可视化JSON编辑器,可定义JSON_Schema和mockjs -2. 支持HTTP和RPC协议 -3. 自动化测试 -4. 多人协作 diff --git a/client/Application.js b/client/Application.js index 3fc1826a..24aafcd7 100644 --- a/client/Application.js +++ b/client/Application.js @@ -2,12 +2,12 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { Route, HashRouter, Redirect, Switch } from 'react-router-dom'; -import { Home, ProjectGroups, Interface, News, AddInterface, Follows } from './containers/index'; +import { Home, Group, Project, News, AddInterface, Follows, AddProject } from './containers/index'; import User from './containers/User/User.js'; import Header from './components/Header/Header'; import Footer from './components/Footer/Footer'; import Loading from './components/Loading/Loading'; -import { checkLoginState } from './reducer/modules/login'; +import { checkLoginState } from './reducer/modules/user'; import { requireAuthentication } from './components/AuthenticatedComponent'; const LOADING_STATUS = 0; @@ -15,7 +15,7 @@ const LOADING_STATUS = 0; @connect( state => { return { - loginState: state.login.loginState + loginState: state.user.loginState }; }, { @@ -35,6 +35,13 @@ export default class App extends Component { loginState: PropTypes.number }; + // componentWillMount() { + // if( !this.props.isAuthenticated ){ + // this.props.history.push('/'); + // this.props.changeMenuItem('/'); + // } + // } + componentDidMount() { this.props.checkLoginState(); } @@ -52,13 +59,14 @@ export default class App extends Component { - + - + +