Skip to content

Commit

Permalink
Merge branch 'yangbin1994-bug575' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
zuiidea committed Sep 11, 2017
2 parents dedd34e + e670ed2 commit 2ee26f5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
-   更新`eslint`,并适当修改了`.eslintrc`


[More Change Log](https://github.com/zuiidea/antd-admin/wiki/Change-Log)
[More Change Log](https://github.com/zuiidea/antd-admin/wiki/Change-Log)

## 开发构建

Expand Down
4 changes: 2 additions & 2 deletions src/models/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ export default {
} else if (config.openPages && config.openPages.indexOf(locationPathname) < 0) {
yield put(routerRedux.push({
pathname: '/login',
query: {
search: queryString.stringify({
from: locationPathname,
},
}),
}))
}
},
Expand Down
1 change: 1 addition & 0 deletions src/routes/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const App = ({ children, dispatch, app, loading, location }) => {
const headerProps = {
menu,
user,
location,
siderFold,
isNavbar,
menuPopoverVisible,
Expand Down
9 changes: 5 additions & 4 deletions src/routes/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { connect } from 'dva'
import { Tabs } from 'antd'
import { routerRedux } from 'dva/router'
import List from './List'
import queryString from 'query-string'

const TabPane = Tabs.TabPane

Expand All @@ -24,21 +25,21 @@ const Index = ({ post, dispatch, loading, location }) => {
onChange (page) {
dispatch(routerRedux.push({
pathname,
query: {
search: queryString.stringify({
...query,
page: page.current,
pageSize: page.pageSize,
},
}),
}))
},
}

const handleTabClick = (key) => {
dispatch(routerRedux.push({
pathname,
query: {
search: queryString.stringify({
status: key,
},
}),
}))
}

Expand Down
12 changes: 6 additions & 6 deletions src/routes/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ const User = ({ location, dispatch, user, loading }) => {
const { query, pathname } = location
dispatch(routerRedux.push({
pathname,
query: {
search: queryString.stringify({
...query,
page: page.current,
pageSize: page.pageSize,
},
}),
}))
},
onDeleteItem (id) {
Expand Down Expand Up @@ -88,20 +88,20 @@ const User = ({ location, dispatch, user, loading }) => {
onFilterChange (value) {
dispatch(routerRedux.push({
pathname: location.pathname,
query: {
search: queryString.stringify({
...value,
page: 1,
pageSize,
},
}),
}))
},
onSearch (fieldsValue) {
fieldsValue.keyword.length ? dispatch(routerRedux.push({
pathname: '/user',
query: {
search: queryString.stringify({
field: fieldsValue.field,
keyword: fieldsValue.keyword,
},
}),
})) : dispatch(routerRedux.push({
pathname: '/user',
}))
Expand Down

0 comments on commit 2ee26f5

Please sign in to comment.