From 183a6476e5cb7c4b7da16c2727176775b49a45c5 Mon Sep 17 00:00:00 2001 From: berlin-tzen Date: Tue, 14 Mar 2023 10:48:37 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E4=BF=AE=E6=AD=A3=E5=B1=95=E8=A6=BD?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A0=81reset=20currentPage=20=E6=99=82?= =?UTF-8?q?=E6=A9=9F=E9=BB=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontEnd/pages/exhibition/index.vue | 30 +++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/FrontEnd/pages/exhibition/index.vue b/FrontEnd/pages/exhibition/index.vue index 2ee14f5..7d283e5 100644 --- a/FrontEnd/pages/exhibition/index.vue +++ b/FrontEnd/pages/exhibition/index.vue @@ -134,7 +134,7 @@ export default { }), async created() { - console.log("created"); + // console.log("created"); this.isPageLoading = true; // this.getAdList(); @@ -153,7 +153,7 @@ export default { }, async mounted() { - console.log("mounted"); + // console.log("mounted"); this.$nextTick(() => { window.addEventListener("resize", this.onResize); @@ -415,12 +415,20 @@ export default { } }, - updateSortBy(data) { + getNewExhibitionCard() { + + this.currentPage = 1; this.query = ""; - this.sortBy = data; this.getExhibitionCard(); + }, + + updateSortBy(data) { + + this.sortBy = data; + this.getNewExhibitionCard(); + }, updatePage(value) { @@ -432,7 +440,6 @@ export default { }, updateCategoryFilter(value) { - this.query = ""; this.selectedMainCategory = []; this.selectedSubCategory = []; @@ -448,12 +455,12 @@ export default { }); - this.getExhibitionCard(); + this.getNewExhibitionCard(); }, + updateLocationFilter(value) { - this.query = ""; this.selectedRegion = []; this.selectedCountry = []; this.selectedCity = []; @@ -474,12 +481,11 @@ export default { }); - this.getExhibitionCard(); + this.getNewExhibitionCard(); }, updateStatusFilter(value) { - this.query = ""; this.selectedStatus = []; value.forEach(key => { @@ -490,14 +496,14 @@ export default { }); - this.getExhibitionCard(); + this.getNewExhibitionCard(); }, updateDateFilter(value) { - this.query = ""; this.selectedDates = value; - this.getExhibitionCard(); + this.getNewExhibitionCard(); + }, async getQuery() {