|
@@ -65,7 +65,7 @@ export default class extends Component {
|
|
|
this.outPage();
|
|
|
}
|
|
|
|
|
|
- init() { }
|
|
|
+ init() {}
|
|
|
|
|
|
initState() {
|
|
|
return {};
|
|
@@ -140,16 +140,24 @@ export default class extends Component {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- search(data) {
|
|
|
- this.refreshQuery(Object.assign(this.state.search, data));
|
|
|
+ search(data, refresh) {
|
|
|
+ const query = Object.assign(this.state.search, data);
|
|
|
+ if (refresh) {
|
|
|
+ this.refreshQuery(query);
|
|
|
+ } else {
|
|
|
+ this.changeQuery(query);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
refresh() {
|
|
|
this.refreshQuery(this.state.search);
|
|
|
}
|
|
|
|
|
|
+ changeQuery(query) {
|
|
|
+ changeParams(`?${querystring.stringify(query)}`);
|
|
|
+ }
|
|
|
+
|
|
|
refreshQuery(query) {
|
|
|
- // this.inited = false;
|
|
|
replaceLink(`${this.props.location.pathname}?${querystring.stringify(query)}`);
|
|
|
}
|
|
|
|