diff --git a/src/routes/content/link/index.js b/src/routes/content/link/index.js index 95acb19..24d70f2 100644 --- a/src/routes/content/link/index.js +++ b/src/routes/content/link/index.js @@ -75,25 +75,12 @@ const Link = ({ location, dispatch, link, loading }) => { onFilterChange(value) { dispatch(routerRedux.push({ pathname: location.pathname, - query: { + search: qs.stringify({ ...value, pageSize, - }, + }), })) }, - onSearch(fieldsValue) { - if (fieldsValue.keyword.length) { - dispatch(routerRedux.push({ - pathname: '/link', - query: { - field: fieldsValue.field, - keyword: fieldsValue.keyword, - }, - })) - } else { - dispatch(routerRedux.push({ pathname: '/link' })) - } - }, onAdd() { dispatch({ type: 'link/showModal', diff --git a/src/routes/content/media/Filter.js b/src/routes/content/media/Filter.js index 1f64437..41e3796 100644 --- a/src/routes/content/media/Filter.js +++ b/src/routes/content/media/Filter.js @@ -60,7 +60,7 @@ const Filter = ({ return ( - {getFieldDecorator('filterValue', { initialValue: name })()} + {getFieldDecorator('filterValue', { initialValue: name })()}
diff --git a/src/routes/content/media/index.js b/src/routes/content/media/index.js index 03435fb..9bf5039 100644 --- a/src/routes/content/media/index.js +++ b/src/routes/content/media/index.js @@ -69,25 +69,12 @@ const Media = ({ location, dispatch, media, loading }) => { onFilterChange(value) { dispatch(routerRedux.push({ pathname: location.pathname, - query: { + search: qs.stringify({ ...value, pageSize, - }, + }), })) }, - onSearch(fieldsValue) { - if (fieldsValue.keyword.length) { - dispatch(routerRedux.push({ - pathname: '/media', - query: { - field: fieldsValue.field, - keyword: fieldsValue.keyword, - }, - })) - } else { - dispatch(routerRedux.push({ pathname: '/media' })) - } - }, onAdd() { dispatch({ type: 'media/showModal' }) },