From 20f2ca0bf31d55dce63023c5425b702650c3e0cd Mon Sep 17 00:00:00 2001 From: zwjamnsss Date: Tue, 8 Aug 2017 10:07:55 +0800 Subject: [PATCH] =?UTF-8?q?opti:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .tags | 96 +++++++++---------- .tags1 | 11 +-- client/Application.js | 2 +- client/components/AuthenticatedComponent.js | 2 +- client/components/Header/Header.js | 4 +- client/components/Header/Search/Search.js | 4 +- .../containers/AddInterface/AddInterface.js | 2 +- .../InterfaceTest/InterfaceTest.js | 2 +- .../AddInterface/MockUrl/MockUrl.js | 2 +- .../AddInterface/ReqHeader/ReqHeader.js | 2 +- .../AddInterface/ReqHeader/ReqList.js | 2 +- .../AddInterface/ReqMethod/ReqMethod.js | 2 +- .../AddInterface/ReqParams/ParamsList.js | 2 +- .../AddInterface/ReqParams/ReqParams.js | 2 +- .../AddInterface/ResParams/ResParams.js | 2 +- client/containers/Home/Home.js | 2 +- client/containers/Interface/Interface.js | 2 +- .../InterfaceTable/InterfaceTable.js | 2 +- client/containers/Login/Login.js | 2 +- client/containers/Login/Reg.js | 2 +- client/containers/News/News.js | 2 +- client/containers/News/NewsList/NewsList.js | 2 +- .../News/NewsTimeline/NewsTimeline.js | 2 +- .../ProjectGroups/GroupList/GroupList.js | 2 +- .../ProjectGroups/ProjectList/ProjectList.js | 2 +- .../ProjectGroups/ProjectList/UpDateModal.js | 2 +- client/reducer/index.js | 16 ++-- client/reducer/middlewares/message.js | 16 ++++ .../{addInterface => modules}/addInterface.js | 0 client/reducer/{group => modules}/group.js | 0 .../{interface => modules}/interface.js | 0 client/reducer/{login => modules}/login.js | 0 client/reducer/{menu => modules}/menu.js | 0 client/reducer/{news => modules}/news.js | 0 client/reducer/{group => modules}/project.js | 0 client/reducer/{user => modules}/user.js | 0 36 files changed, 103 insertions(+), 88 deletions(-) create mode 100644 client/reducer/middlewares/message.js rename client/reducer/{addInterface => modules}/addInterface.js (100%) rename client/reducer/{group => modules}/group.js (100%) rename client/reducer/{interface => modules}/interface.js (100%) rename client/reducer/{login => modules}/login.js (100%) rename client/reducer/{menu => modules}/menu.js (100%) rename client/reducer/{news => modules}/news.js (100%) rename client/reducer/{group => modules}/project.js (100%) rename client/reducer/{user => modules}/user.js (100%) diff --git a/.tags b/.tags index ba8b4fe6..f964a070 100644 --- a/.tags +++ b/.tags @@ -18,26 +18,6 @@ const.groupList /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/group/group switch /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/group/group.js /^ switch (action.type) {$/;" function line:15 fetchGroupList /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/group/group.js /^export function fetchGroupList() {$/;" function line:40 setCurrGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/group/group.js /^export function setCurrGroup(group) {$/;" function line:47 -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 -componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ componentWillMount() {$/;" function line:60 -showModal /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ showModal(type) {$/;" function line:81 -hideModal /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ hideModal(type) {$/;" function line:96 -addGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ addGroup() {$/;" function line:108 -editGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ editGroup() {$/;" function line:125 -inputNewGroupName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ inputNewGroupName(e, type) {$/;" function line:140 -inputNewGroupDesc /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ inputNewGroupDesc(e, type) {$/;" function line:148 -selectGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ selectGroup(e) {$/;" function line:157 -deleteGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ deleteGroup() {$/;" function line:165 -searchGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ searchGroup(e, value) {$/;" function line:183 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ render () {$/;" function line:193 const.isUpdateModalShow /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/group/project.js /^const initialState = {$/;" property line:13 const.handleUpdateIndex /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/group/project.js /^ isUpdateModalShow: false,$/;" property line:14 switch /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/group/project.js /^ switch (action.type) {$/;" function line:24 @@ -81,6 +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 +path /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^var path = require('path');$/;" variable line:1 +processOutput /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^ processOutput: function (assets) {$/;" function line:5 +modifyQuery /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^ modifyQuery: function (defaultQuery) { \/\/ 可查看和编辑 defaultQuery$/;" function line:13 +config /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^ config: function (ykit) {$/;" function line:21 +modifyWebpackConfig /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^ modifyWebpackConfig: function (baseConfig) {$/;" function line:43 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 @@ -93,6 +78,11 @@ ToolUser.propTypes.user /Users/qitmac000445/Desktop/YAPI/yapi/client/components/ 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 @@ -118,17 +108,6 @@ mockData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/Ad 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.mockURL /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ static propTypes = {$/;" property line:25 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ constructor(props) {$/;" function line:34 -componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ componentDidMount () {$/;" function line:38 -clipboard /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ clipboard () {$/;" function line:43 -target /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ target () {$/;" function line:50 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ render () {$/;" function line:56 -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.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 @@ -163,6 +142,17 @@ getQueryObj /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface getHeadersObj /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/InterfaceTest/InterfaceTest.js /^ getHeadersObj(headers) {$/;" function line:330 fileChange /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/InterfaceTest/InterfaceTest.js /^ fileChange(e, index) {$/;" function line:341 render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/InterfaceTest/InterfaceTest.js /^ render () {$/;" function line:346 +@connect.mockURL /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ static propTypes = {$/;" property line:25 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ constructor(props) {$/;" function line:34 +componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ componentDidMount () {$/;" function line:38 +clipboard /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ clipboard () {$/;" function line:43 +target /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ target () {$/;" function line:50 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/MockUrl/MockUrl.js /^ render () {$/;" function line:56 +@connect.seqGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^ static propTypes = {$/;" property line:32 +constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^ constructor(props) {$/;" function line:37 +from /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^} from '..\/..\/..\/reducer\/modules\/addInterface.js'$/;" function line:9 +addSeqGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^ addSeqGroup () {$/;" function line:42 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^ render () {$/;" function line:57 from.seqGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqList.js /^ static propTypes = {$/;" property line:30 constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqList.js /^ constructor(props) {$/;" function line:41 handleChange /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqList.js /^ handleChange (value) {$/;" function line:46 @@ -230,17 +220,43 @@ constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/Login/Reg.js 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\/news\/news.js'$/;" function line:5 +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 state.pagination /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsTimeline/NewsTimeline.js /^ this.state = {$/;" property line:31 handleChange /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsTimeline/NewsTimeline.js /^ handleChange(pagination){$/;" function line:39 render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/NewsTimeline/NewsTimeline.js /^ render () {$/;" function line:48 +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 +componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ componentWillMount() {$/;" function line:60 +showModal /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ showModal(type) {$/;" function line:81 +hideModal /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ hideModal(type) {$/;" function line:96 +addGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ addGroup() {$/;" function line:108 +editGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ editGroup() {$/;" function line:125 +inputNewGroupName /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ inputNewGroupName(e, type) {$/;" function line:140 +inputNewGroupDesc /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ inputNewGroupDesc(e, type) {$/;" function line:148 +selectGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ selectGroup(e) {$/;" function line:157 +deleteGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ deleteGroup() {$/;" function line:165 +searchGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ searchGroup(e, value) {$/;" function line:183 +render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/GroupList/GroupList.js /^ render () {$/;" function line:193 const.labelCol /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/ProjectList.js /^const formItemLayout = {$/;" property line:81 constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/ProjectList.js /^ constructor(props) {$/;" function line:112 state.visible /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/ProjectList.js /^ this.state = {$/;" property line:114 @@ -263,24 +279,8 @@ 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 -path /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^var path = require('path');$/;" variable line:1 -processOutput /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^ processOutput: function (assets) {$/;" function line:5 -modifyQuery /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^ modifyQuery: function (defaultQuery) { \/\/ 可查看和编辑 defaultQuery$/;" function line:13 -config /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^ config: function (ykit) {$/;" function line:21 -modifyWebpackConfig /Users/qitmac000445/Desktop/YAPI/yapi/ykit.js /^ modifyWebpackConfig: function (baseConfig) {$/;" function line:43 -@connect.seqGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^ static propTypes = {$/;" property line:32 -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^ constructor(props) {$/;" function line:37 -from /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^} from '..\/..\/..\/reducer\/addInterface\/addInterface.js'$/;" function line:9 -addSeqGroup /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^ addSeqGroup () {$/;" function line:42 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/AddInterface/ReqHeader/ReqHeader.js /^ render () {$/;" function line:57 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 -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 diff --git a/.tags1 b/.tags1 index b479ea3a..bf622ea9 100644 --- a/.tags1 +++ b/.tags1 @@ -4,9 +4,8 @@ !_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/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 +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 diff --git a/client/Application.js b/client/Application.js index b0097e97..633cdc0e 100644 --- a/client/Application.js +++ b/client/Application.js @@ -8,7 +8,7 @@ import Header from './components/Header/Header'; import Footer from './components/Footer/Footer'; import Breadcrumb from './components/Breadcrumb/Breadcrumb'; import Loading from './components/Loading/Loading'; -import { checkLoginState } from './reducer/login/login'; +import { checkLoginState } from './reducer/modules/login'; import { requireAuthentication } from './components/AuthenticatedComponent'; const LOADING_STATUS = 0; diff --git a/client/components/AuthenticatedComponent.js b/client/components/AuthenticatedComponent.js index 86d33f0e..a7f69dca 100644 --- a/client/components/AuthenticatedComponent.js +++ b/client/components/AuthenticatedComponent.js @@ -1,7 +1,7 @@ import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types' -import { changeMenuItem } from '../reducer/menu/menu' +import { changeMenuItem } from '../reducer/modules/menu' @connect( (state) => { diff --git a/client/components/Header/Header.js b/client/components/Header/Header.js index 6598e8de..165683f0 100644 --- a/client/components/Header/Header.js +++ b/client/components/Header/Header.js @@ -4,8 +4,8 @@ import PropTypes from 'prop-types' import { connect } from 'react-redux' import { Link } from 'react-router-dom' import { Icon, Layout, Menu, Dropdown, message } from 'antd' -import { checkLoginState, logoutActions, loginTypeAction} from '../../reducer/login/login' -import { changeMenuItem } from '../../reducer/menu/menu' +import { checkLoginState, logoutActions, loginTypeAction} from '../../reducer/modules/login' +import { changeMenuItem } from '../../reducer/modules/menu' import { withRouter } from 'react-router'; import Srch from './Search/Search' const { Header } = Layout; diff --git a/client/components/Header/Search/Search.js b/client/components/Header/Search/Search.js index 592aa060..78b03daf 100644 --- a/client/components/Header/Search/Search.js +++ b/client/components/Header/Search/Search.js @@ -5,8 +5,8 @@ import { Icon, Input, AutoComplete } from 'antd' import './Search.scss' import { withRouter } from 'react-router'; import axios from 'axios'; -import { setCurrGroup } from '../../../reducer/group/group' -import { changeMenuItem } from '../../../reducer/menu/menu' +import { setCurrGroup } from '../../../reducer/modules/group' +import { changeMenuItem } from '../../../reducer/modules/menu' const Option = AutoComplete.Option; @connect( diff --git a/client/containers/AddInterface/AddInterface.js b/client/containers/AddInterface/AddInterface.js index c26587fa..bd360107 100644 --- a/client/containers/AddInterface/AddInterface.js +++ b/client/containers/AddInterface/AddInterface.js @@ -22,7 +22,7 @@ import { pushInterfaceName, fetchInterfaceProject, pushInterfaceMethod -} from '../../reducer/addInterface/addInterface.js' +} from '../../reducer/modules/addInterface.js' let projectId = '' const success = (text, arg) => { diff --git a/client/containers/AddInterface/InterfaceTest/InterfaceTest.js b/client/containers/AddInterface/InterfaceTest/InterfaceTest.js index 23b137f7..55e90e52 100644 --- a/client/containers/AddInterface/InterfaceTest/InterfaceTest.js +++ b/client/containers/AddInterface/InterfaceTest/InterfaceTest.js @@ -9,7 +9,7 @@ import axios from 'axios'; import URL from 'url'; import { -} from '../../../reducer/group/group.js' +} from '../../../reducer/modules/group.js' import './InterfaceTest.scss' diff --git a/client/containers/AddInterface/MockUrl/MockUrl.js b/client/containers/AddInterface/MockUrl/MockUrl.js index 3673ddee..a61c1b56 100644 --- a/client/containers/AddInterface/MockUrl/MockUrl.js +++ b/client/containers/AddInterface/MockUrl/MockUrl.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types' import { connect } from 'react-redux' import { addInterfaceClipboard -} from '../../../reducer/addInterface/addInterface.js' +} from '../../../reducer/modules/addInterface.js' const success = () => { message.success('复制成功!') diff --git a/client/containers/AddInterface/ReqHeader/ReqHeader.js b/client/containers/AddInterface/ReqHeader/ReqHeader.js index d87d48ce..49597997 100644 --- a/client/containers/AddInterface/ReqHeader/ReqHeader.js +++ b/client/containers/AddInterface/ReqHeader/ReqHeader.js @@ -6,7 +6,7 @@ import { autobind } from 'core-decorators' import ReqList from './ReqList.js' import { addReqHeader -} from '../../../reducer/addInterface/addInterface.js' +} from '../../../reducer/modules/addInterface.js' // 重新渲染页面 const getReqList = function (self) { diff --git a/client/containers/AddInterface/ReqHeader/ReqList.js b/client/containers/AddInterface/ReqHeader/ReqList.js index e25917e0..265e29f9 100644 --- a/client/containers/AddInterface/ReqHeader/ReqList.js +++ b/client/containers/AddInterface/ReqHeader/ReqList.js @@ -8,7 +8,7 @@ import { reqHeaderValue, deleteReqHeader, addReqHeader -} from '../../../reducer/addInterface/addInterface.js' +} from '../../../reducer/modules/addInterface.js' @connect( state => { diff --git a/client/containers/AddInterface/ReqMethod/ReqMethod.js b/client/containers/AddInterface/ReqMethod/ReqMethod.js index 7f537e83..a5bdf707 100644 --- a/client/containers/AddInterface/ReqMethod/ReqMethod.js +++ b/client/containers/AddInterface/ReqMethod/ReqMethod.js @@ -7,7 +7,7 @@ import { pushInputValue, pushInterfaceName, pushInterfaceMethod -} from '../../../reducer/addInterface/addInterface.js' +} from '../../../reducer/modules/addInterface.js' @connect( state => { diff --git a/client/containers/AddInterface/ReqParams/ParamsList.js b/client/containers/AddInterface/ReqParams/ParamsList.js index 54908fb0..bb29ea48 100644 --- a/client/containers/AddInterface/ReqParams/ParamsList.js +++ b/client/containers/AddInterface/ReqParams/ParamsList.js @@ -3,7 +3,7 @@ // import PropTypes from 'prop-types' // import { autobind } from 'core-decorators' // import { connect } from 'react-redux' -// import { deleteReqParams } from '../../../reducer/addInterface/addInterface.js' +// import { deleteReqParams } from '../../../reducer/modules/addInterface.js' // import json2html from 'json2html' // @connect( diff --git a/client/containers/AddInterface/ReqParams/ReqParams.js b/client/containers/AddInterface/ReqParams/ReqParams.js index 624a4ccc..7235414f 100644 --- a/client/containers/AddInterface/ReqParams/ReqParams.js +++ b/client/containers/AddInterface/ReqParams/ReqParams.js @@ -2,7 +2,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' // import wangEditor from 'wangeditor' -import { getReqParams } from '../../../reducer/addInterface/addInterface.js' +import { getReqParams } from '../../../reducer/modules/addInterface.js' //const editor = new wangEditor('#req-cover') diff --git a/client/containers/AddInterface/ResParams/ResParams.js b/client/containers/AddInterface/ResParams/ResParams.js index c6b63e19..87acd49e 100644 --- a/client/containers/AddInterface/ResParams/ResParams.js +++ b/client/containers/AddInterface/ResParams/ResParams.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import { connect } from 'react-redux' // import wangEditor from 'wangeditor' import { Card } from 'antd' -import { getResParams } from '../../../reducer/addInterface/addInterface.js' +import { getResParams } from '../../../reducer/modules/addInterface.js' //const editor = new wangEditor('#res-cover') diff --git a/client/containers/Home/Home.js b/client/containers/Home/Home.js index 9166b766..00d569b5 100644 --- a/client/containers/Home/Home.js +++ b/client/containers/Home/Home.js @@ -6,7 +6,7 @@ import { Row, Col, Button, Icon } from 'antd' import PropTypes from "prop-types" import Login from '../Login/LoginWrap' import Intro from '../../components/Intro/Intro' -import { changeMenuItem } from '../../reducer/menu/menu' +import { changeMenuItem } from '../../reducer/modules/menu' import { OverPack } from 'rc-scroll-anim' import TweenOne from 'rc-tween-one' import QueueAnim from 'rc-queue-anim'; diff --git a/client/containers/Interface/Interface.js b/client/containers/Interface/Interface.js index 343dc7ce..98f02695 100644 --- a/client/containers/Interface/Interface.js +++ b/client/containers/Interface/Interface.js @@ -12,7 +12,7 @@ import { projectMember, closeProjectMember, saveInterfaceProjectId -} from '../../reducer/interface/interface.js' +} from '../../reducer/modules/interface.js' @connect( state => { diff --git a/client/containers/Interface/InterfaceTable/InterfaceTable.js b/client/containers/Interface/InterfaceTable/InterfaceTable.js index 04eca07a..6045f249 100644 --- a/client/containers/Interface/InterfaceTable/InterfaceTable.js +++ b/client/containers/Interface/InterfaceTable/InterfaceTable.js @@ -5,7 +5,7 @@ import axios from 'axios' import { autobind } from 'core-decorators' import { connect } from 'react-redux' import { Link } from 'react-router-dom' -import { deleteInterfaceData } from '../../../reducer/interface/interface.js' +import { deleteInterfaceData } from '../../../reducer/modules/interface.js' @connect( state => { diff --git a/client/containers/Login/Login.js b/client/containers/Login/Login.js index c20b7791..fcee2b3e 100644 --- a/client/containers/Login/Login.js +++ b/client/containers/Login/Login.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Form, Button, Input, Icon, message } from 'antd'; -import { loginActions } from '../../reducer/login/login'; +import { loginActions } from '../../reducer/modules/login'; const FormItem = Form.Item; import './Login.scss' diff --git a/client/containers/Login/Reg.js b/client/containers/Login/Reg.js index b84e4b49..8f2ca2d0 100644 --- a/client/containers/Login/Reg.js +++ b/client/containers/Login/Reg.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Form, Button, Input, Icon, message } from 'antd'; -import { regActions } from '../../reducer/login/login'; +import { regActions } from '../../reducer/modules/login'; const FormItem = Form.Item; const formItemStyle = { diff --git a/client/containers/News/News.js b/client/containers/News/News.js index 04ce21e3..ff5ba03a 100644 --- a/client/containers/News/News.js +++ b/client/containers/News/News.js @@ -4,7 +4,7 @@ import NewsTimeline from './NewsTimeline/NewsTimeline' import { connect } from 'react-redux' import PropTypes from 'prop-types' import NewsList from './NewsList/NewsList.js' -import { fetchNewsData } from '../../reducer/news/news.js' +import { fetchNewsData } from '../../reducer/modules/news.js' @connect( diff --git a/client/containers/News/NewsList/NewsList.js b/client/containers/News/NewsList/NewsList.js index bdef625b..d5ca10fc 100644 --- a/client/containers/News/NewsList/NewsList.js +++ b/client/containers/News/NewsList/NewsList.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types' import { Menu } from 'antd' import { fetchNewsData -} from '../../../reducer/news/news.js' +} from '../../../reducer/modules/news.js' const logList = [{ diff --git a/client/containers/News/NewsTimeline/NewsTimeline.js b/client/containers/News/NewsTimeline/NewsTimeline.js index 6081f45e..ca359ba1 100644 --- a/client/containers/News/NewsTimeline/NewsTimeline.js +++ b/client/containers/News/NewsTimeline/NewsTimeline.js @@ -2,7 +2,7 @@ import React, { Component } from 'react' import { Table, Popconfirm } from 'antd' import PropTypes from 'prop-types' import { connect } from 'react-redux' -import { fetchMoreNews } from '../../../reducer/news/news.js' +import { fetchMoreNews } from '../../../reducer/modules/news.js' const removeConfirm = function(e){ console.log(e); diff --git a/client/containers/ProjectGroups/GroupList/GroupList.js b/client/containers/ProjectGroups/GroupList/GroupList.js index 72d728fa..57685b0d 100644 --- a/client/containers/ProjectGroups/GroupList/GroupList.js +++ b/client/containers/ProjectGroups/GroupList/GroupList.js @@ -13,7 +13,7 @@ import { fetchGroupList, setCurrGroup, setGroupList -} from '../../../reducer/group/group.js' +} from '../../../reducer/modules/group.js' import './GroupList.scss' diff --git a/client/containers/ProjectGroups/ProjectList/ProjectList.js b/client/containers/ProjectGroups/ProjectList/ProjectList.js index 2a6dafa7..f0c38eda 100644 --- a/client/containers/ProjectGroups/ProjectList/ProjectList.js +++ b/client/containers/ProjectGroups/ProjectList/ProjectList.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Table, Button, Modal, Form, Input, Icon, Tooltip, Select, Popconfirm, message } from 'antd'; -import { addProject, fetchProjectList, delProject, changeUpdateModal, changeTableLoading } from '../../../reducer/group/project'; +import { addProject, fetchProjectList, delProject, changeUpdateModal, changeTableLoading } from '../../../reducer/modules/project'; import UpDateModal from './UpDateModal'; import { Link } from 'react-router-dom' import variable from '../../../constants/variable'; diff --git a/client/containers/ProjectGroups/ProjectList/UpDateModal.js b/client/containers/ProjectGroups/ProjectList/UpDateModal.js index afcb3614..da6b69ef 100644 --- a/client/containers/ProjectGroups/ProjectList/UpDateModal.js +++ b/client/containers/ProjectGroups/ProjectList/UpDateModal.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Modal, Form, Input, Icon, Tooltip, Select, message, Button, Row, Col } from 'antd'; -import { updateProject, fetchProjectList, delProject, changeUpdateModal, changeTableLoading } from '../../../reducer/group/project'; +import { updateProject, fetchProjectList, delProject, changeUpdateModal, changeTableLoading } from '../../../reducer/modules/project'; const { TextArea } = Input; const FormItem = Form.Item; const Option = Select.Option; diff --git a/client/reducer/index.js b/client/reducer/index.js index 297a7a3a..5fabf434 100644 --- a/client/reducer/index.js +++ b/client/reducer/index.js @@ -1,11 +1,11 @@ -import login from './login/login.js' -import group from './group/group.js' -import project from './group/project.js' -import Interface from './interface/interface.js' -import news from './news/news.js' -import addInterface from './addInterface/addInterface.js' -import user from './user/user.js' -import menu from './menu/menu.js' +import login from './modules/login.js' +import group from './modules/group.js' +import project from './modules/project.js' +import Interface from './modules/interface.js' +import news from './modules/news.js' +import addInterface from './modules/addInterface.js' +import user from './modules/user.js' +import menu from './modules/menu.js' export default { group, diff --git a/client/reducer/middlewares/message.js b/client/reducer/middlewares/message.js new file mode 100644 index 00000000..60769ab9 --- /dev/null +++ b/client/reducer/middlewares/message.js @@ -0,0 +1,16 @@ +import process from 'process'; +import { Message } from 'antd'; + +export default () => next => action => { + if (process.browser) { + if (action.error) { + Message.error('服务器错误'); + } else if (action.payload && action.payload.res === false) { + const hasChinese = /[\u4E00-\u9FFF]+/g.test(action.payload.message); + const message = hasChinese ? action.payload.message : '服务器错误'; + Message.error(message); + } + return next(action); + } + return next(action); +}; diff --git a/client/reducer/addInterface/addInterface.js b/client/reducer/modules/addInterface.js similarity index 100% rename from client/reducer/addInterface/addInterface.js rename to client/reducer/modules/addInterface.js diff --git a/client/reducer/group/group.js b/client/reducer/modules/group.js similarity index 100% rename from client/reducer/group/group.js rename to client/reducer/modules/group.js diff --git a/client/reducer/interface/interface.js b/client/reducer/modules/interface.js similarity index 100% rename from client/reducer/interface/interface.js rename to client/reducer/modules/interface.js diff --git a/client/reducer/login/login.js b/client/reducer/modules/login.js similarity index 100% rename from client/reducer/login/login.js rename to client/reducer/modules/login.js diff --git a/client/reducer/menu/menu.js b/client/reducer/modules/menu.js similarity index 100% rename from client/reducer/menu/menu.js rename to client/reducer/modules/menu.js diff --git a/client/reducer/news/news.js b/client/reducer/modules/news.js similarity index 100% rename from client/reducer/news/news.js rename to client/reducer/modules/news.js diff --git a/client/reducer/group/project.js b/client/reducer/modules/project.js similarity index 100% rename from client/reducer/group/project.js rename to client/reducer/modules/project.js diff --git a/client/reducer/user/user.js b/client/reducer/modules/user.js similarity index 100% rename from client/reducer/user/user.js rename to client/reducer/modules/user.js