Skip to content

Commit

Permalink
fix(feed): ( isses #324 ) 修复二次操作页面按钮,搜索数据丢失
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Aug 7, 2018
1 parent d206bde commit 8b09341
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/slimkit-plus-feed/admin/pages/topic/List.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,23 @@ class List extends React.Component {
return;
}

this.setState({ loading: true, cacheRequestQuery: query, topics: [] });
this.setState({ loading: true, topics: [] });
listRequest({ params: { ...this.state.cacheRequestQuery, limit: this.state.limit, ...query } })
.then(({ data }) => this.setState({
loading: false,
topics: data.data,
page: data.current_page,
total: data.total
total: data.total,
cacheRequestQuery: { ...this.state.cacheRequestQuery, ...query}
}))
.catch(({ response: { data = { message: '数据加载失败,请刷新页面重拾!' } } = {} }) => this.setState({
loading: false,
message: {
open: true,
type: 'error',
text: data
}
},
cacheRequestQuery: { ...this.state.cacheRequestQuery, ...query}
}));
}

Expand Down

0 comments on commit 8b09341

Please sign in to comment.