opti: 优化代码结构

This commit is contained in:
zwjamnsss 2017-08-08 10:07:55 +08:00
parent 3b29f5dafb
commit 20f2ca0bf3
36 changed files with 103 additions and 88 deletions

96
.tags
View File

@ -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 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 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 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.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 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 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 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 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 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 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 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 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 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 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 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 @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 /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.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 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 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 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 @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.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 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 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 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 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 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 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 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 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 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 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 @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 /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 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 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 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 @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 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 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 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 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 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 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 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 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:191
validator /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/UpDateModal.js /^ validator(rule, value, callback) {$/;" function line:224 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 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 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 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 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 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

11
.tags1
View File

@ -4,9 +4,8 @@
!_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.8 // !_TAG_PROGRAM_VERSION 5.8 //
constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ constructor(props) {$/;" function line:23 constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ constructor(props) {$/;" function line:27
from.state.loading /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ this.state = {$/;" property line:25 state.login /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ this.state = {$/;" property line:29
static.newsData /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ static propTypes = {$/;" property line:29 static.checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ static propTypes = {$/;" property line:34
setLoading /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ setLoading(bool){$/;" function line:34 componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ componentDidMount() {$/;" function line:39
componentWillMount /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ componentWillMount(){$/;" function line:39 render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:72
render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/News/News.js /^ render () {$/;" function line:45

View File

@ -8,7 +8,7 @@ import Header from './components/Header/Header';
import Footer from './components/Footer/Footer'; import Footer from './components/Footer/Footer';
import Breadcrumb from './components/Breadcrumb/Breadcrumb'; import Breadcrumb from './components/Breadcrumb/Breadcrumb';
import Loading from './components/Loading/Loading'; import Loading from './components/Loading/Loading';
import { checkLoginState } from './reducer/login/login'; import { checkLoginState } from './reducer/modules/login';
import { requireAuthentication } from './components/AuthenticatedComponent'; import { requireAuthentication } from './components/AuthenticatedComponent';
const LOADING_STATUS = 0; const LOADING_STATUS = 0;

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { changeMenuItem } from '../reducer/menu/menu' import { changeMenuItem } from '../reducer/modules/menu'
@connect( @connect(
(state) => { (state) => {

View File

@ -4,8 +4,8 @@ import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { Icon, Layout, Menu, Dropdown, message } from 'antd' import { Icon, Layout, Menu, Dropdown, message } from 'antd'
import { checkLoginState, logoutActions, loginTypeAction} from '../../reducer/login/login' import { checkLoginState, logoutActions, loginTypeAction} from '../../reducer/modules/login'
import { changeMenuItem } from '../../reducer/menu/menu' import { changeMenuItem } from '../../reducer/modules/menu'
import { withRouter } from 'react-router'; import { withRouter } from 'react-router';
import Srch from './Search/Search' import Srch from './Search/Search'
const { Header } = Layout; const { Header } = Layout;

View File

@ -5,8 +5,8 @@ import { Icon, Input, AutoComplete } from 'antd'
import './Search.scss' import './Search.scss'
import { withRouter } from 'react-router'; import { withRouter } from 'react-router';
import axios from 'axios'; import axios from 'axios';
import { setCurrGroup } from '../../../reducer/group/group' import { setCurrGroup } from '../../../reducer/modules/group'
import { changeMenuItem } from '../../../reducer/menu/menu' import { changeMenuItem } from '../../../reducer/modules/menu'
const Option = AutoComplete.Option; const Option = AutoComplete.Option;
@connect( @connect(

View File

@ -22,7 +22,7 @@ import {
pushInterfaceName, pushInterfaceName,
fetchInterfaceProject, fetchInterfaceProject,
pushInterfaceMethod pushInterfaceMethod
} from '../../reducer/addInterface/addInterface.js' } from '../../reducer/modules/addInterface.js'
let projectId = '' let projectId = ''
const success = (text, arg) => { const success = (text, arg) => {

View File

@ -9,7 +9,7 @@ import axios from 'axios';
import URL from 'url'; import URL from 'url';
import { import {
} from '../../../reducer/group/group.js' } from '../../../reducer/modules/group.js'
import './InterfaceTest.scss' import './InterfaceTest.scss'

View File

@ -6,7 +6,7 @@ import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { import {
addInterfaceClipboard addInterfaceClipboard
} from '../../../reducer/addInterface/addInterface.js' } from '../../../reducer/modules/addInterface.js'
const success = () => { const success = () => {
message.success('复制成功!') message.success('复制成功!')

View File

@ -6,7 +6,7 @@ import { autobind } from 'core-decorators'
import ReqList from './ReqList.js' import ReqList from './ReqList.js'
import { import {
addReqHeader addReqHeader
} from '../../../reducer/addInterface/addInterface.js' } from '../../../reducer/modules/addInterface.js'
// 重新渲染页面 // 重新渲染页面
const getReqList = function (self) { const getReqList = function (self) {

View File

@ -8,7 +8,7 @@ import {
reqHeaderValue, reqHeaderValue,
deleteReqHeader, deleteReqHeader,
addReqHeader addReqHeader
} from '../../../reducer/addInterface/addInterface.js' } from '../../../reducer/modules/addInterface.js'
@connect( @connect(
state => { state => {

View File

@ -7,7 +7,7 @@ import {
pushInputValue, pushInputValue,
pushInterfaceName, pushInterfaceName,
pushInterfaceMethod pushInterfaceMethod
} from '../../../reducer/addInterface/addInterface.js' } from '../../../reducer/modules/addInterface.js'
@connect( @connect(
state => { state => {

View File

@ -3,7 +3,7 @@
// import PropTypes from 'prop-types' // import PropTypes from 'prop-types'
// import { autobind } from 'core-decorators' // import { autobind } from 'core-decorators'
// import { connect } from 'react-redux' // import { connect } from 'react-redux'
// import { deleteReqParams } from '../../../reducer/addInterface/addInterface.js' // import { deleteReqParams } from '../../../reducer/modules/addInterface.js'
// import json2html from 'json2html' // import json2html from 'json2html'
// @connect( // @connect(

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
// import wangEditor from 'wangeditor' // import wangEditor from 'wangeditor'
import { getReqParams } from '../../../reducer/addInterface/addInterface.js' import { getReqParams } from '../../../reducer/modules/addInterface.js'
//const editor = new wangEditor('#req-cover') //const editor = new wangEditor('#req-cover')

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
// import wangEditor from 'wangeditor' // import wangEditor from 'wangeditor'
import { Card } from 'antd' import { Card } from 'antd'
import { getResParams } from '../../../reducer/addInterface/addInterface.js' import { getResParams } from '../../../reducer/modules/addInterface.js'
//const editor = new wangEditor('#res-cover') //const editor = new wangEditor('#res-cover')

View File

@ -6,7 +6,7 @@ import { Row, Col, Button, Icon } from 'antd'
import PropTypes from "prop-types" import PropTypes from "prop-types"
import Login from '../Login/LoginWrap' import Login from '../Login/LoginWrap'
import Intro from '../../components/Intro/Intro' 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 { OverPack } from 'rc-scroll-anim'
import TweenOne from 'rc-tween-one' import TweenOne from 'rc-tween-one'
import QueueAnim from 'rc-queue-anim'; import QueueAnim from 'rc-queue-anim';

View File

@ -12,7 +12,7 @@ import {
projectMember, projectMember,
closeProjectMember, closeProjectMember,
saveInterfaceProjectId saveInterfaceProjectId
} from '../../reducer/interface/interface.js' } from '../../reducer/modules/interface.js'
@connect( @connect(
state => { state => {

View File

@ -5,7 +5,7 @@ import axios from 'axios'
import { autobind } from 'core-decorators' import { autobind } from 'core-decorators'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { deleteInterfaceData } from '../../../reducer/interface/interface.js' import { deleteInterfaceData } from '../../../reducer/modules/interface.js'
@connect( @connect(
state => { state => {

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Form, Button, Input, Icon, message } from 'antd'; import { Form, Button, Input, Icon, message } from 'antd';
import { loginActions } from '../../reducer/login/login'; import { loginActions } from '../../reducer/modules/login';
const FormItem = Form.Item; const FormItem = Form.Item;
import './Login.scss' import './Login.scss'

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Form, Button, Input, Icon, message } from 'antd'; 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 FormItem = Form.Item;
const formItemStyle = { const formItemStyle = {

View File

@ -4,7 +4,7 @@ import NewsTimeline from './NewsTimeline/NewsTimeline'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import NewsList from './NewsList/NewsList.js' import NewsList from './NewsList/NewsList.js'
import { fetchNewsData } from '../../reducer/news/news.js' import { fetchNewsData } from '../../reducer/modules/news.js'
@connect( @connect(

View File

@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
import { Menu } from 'antd' import { Menu } from 'antd'
import { import {
fetchNewsData fetchNewsData
} from '../../../reducer/news/news.js' } from '../../../reducer/modules/news.js'
const logList = [{ const logList = [{

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react'
import { Table, Popconfirm } from 'antd' import { Table, Popconfirm } from 'antd'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { fetchMoreNews } from '../../../reducer/news/news.js' import { fetchMoreNews } from '../../../reducer/modules/news.js'
const removeConfirm = function(e){ const removeConfirm = function(e){
console.log(e); console.log(e);

View File

@ -13,7 +13,7 @@ import {
fetchGroupList, fetchGroupList,
setCurrGroup, setCurrGroup,
setGroupList setGroupList
} from '../../../reducer/group/group.js' } from '../../../reducer/modules/group.js'
import './GroupList.scss' import './GroupList.scss'

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Table, Button, Modal, Form, Input, Icon, Tooltip, Select, Popconfirm, message } from 'antd'; 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 UpDateModal from './UpDateModal';
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import variable from '../../../constants/variable'; import variable from '../../../constants/variable';

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Modal, Form, Input, Icon, Tooltip, Select, message, Button, Row, Col } from 'antd'; 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 { TextArea } = Input;
const FormItem = Form.Item; const FormItem = Form.Item;
const Option = Select.Option; const Option = Select.Option;

View File

@ -1,11 +1,11 @@
import login from './login/login.js' import login from './modules/login.js'
import group from './group/group.js' import group from './modules/group.js'
import project from './group/project.js' import project from './modules/project.js'
import Interface from './interface/interface.js' import Interface from './modules/interface.js'
import news from './news/news.js' import news from './modules/news.js'
import addInterface from './addInterface/addInterface.js' import addInterface from './modules/addInterface.js'
import user from './user/user.js' import user from './modules/user.js'
import menu from './menu/menu.js' import menu from './modules/menu.js'
export default { export default {
group, group,

View File

@ -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);
};