Skip to content

Commit

Permalink
20200809查询优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Aizhuxueliang committed Aug 9, 2020
1 parent f294e63 commit bcdb35d
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions vue_project/src/components/UserHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,24 @@
},
handleSearch() {
this.handlePageChange();
this.getRowCount();
let postData = this.qs.stringify({
userName: this.search1,
userSex: this.search2
});
this.axios({
method: 'post',
url: '/ssm_project_war_exploded/user/getRowCount',
data: postData
}).then(response => {
this.total = response.data;
let countPage = Math.ceil(this.total/5);
if (countPage <= this.currentPage) {
this.currentPage = countPage;
}
this.handlePageChange();
}).catch(error => {
console.log(error);
});
},
handleEdit(index, row) {
Expand Down

0 comments on commit bcdb35d

Please sign in to comment.