From d814e203843e1bc8135797ba15ccff28222fcde0 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 28 Apr 2022 15:50:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Home.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index 38d85c8..0bc4038 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -95,7 +95,7 @@ export default { searchTimer: null, tableData: [], dataTotal: 0, // 总条数,根据接口获取数据长度(注意:这里不能为空) - pageNum: 1, + pageNum: +this.$route.query.page || 1, pageSize: 10, currentPage: 1, systemId: this.$route.query.systemId, @@ -131,6 +131,13 @@ export default { }, handleCurrentChange(val) { // 切换页码 this.pageNum = val; + this.$router.redirect({ + path: '/', + query: { + ...this.$route.query, + page: val + } + }) this.initData(); }, initData() { // 获取初始数据