Browse Source

[WHAT] 修正展覽列表頁reset currentPage 時機點

Dev
berlin-tzen 2 years ago
parent
commit
183a6476e5
  1. 30
      FrontEnd/pages/exhibition/index.vue

30
FrontEnd/pages/exhibition/index.vue

@ -134,7 +134,7 @@ export default {
}), }),
async created() { async created() {
console.log("created");
// console.log("created");
this.isPageLoading = true; this.isPageLoading = true;
// this.getAdList(); // this.getAdList();
@ -153,7 +153,7 @@ export default {
}, },
async mounted() { async mounted() {
console.log("mounted");
// console.log("mounted");
this.$nextTick(() => { this.$nextTick(() => {
window.addEventListener("resize", this.onResize); window.addEventListener("resize", this.onResize);
@ -415,12 +415,20 @@ export default {
} }
}, },
updateSortBy(data) {
getNewExhibitionCard() {
this.currentPage = 1;
this.query = ""; this.query = "";
this.sortBy = data;
this.getExhibitionCard(); this.getExhibitionCard();
},
updateSortBy(data) {
this.sortBy = data;
this.getNewExhibitionCard();
}, },
updatePage(value) { updatePage(value) {
@ -432,7 +440,6 @@ export default {
}, },
updateCategoryFilter(value) { updateCategoryFilter(value) {
this.query = "";
this.selectedMainCategory = []; this.selectedMainCategory = [];
this.selectedSubCategory = []; this.selectedSubCategory = [];
@ -448,12 +455,12 @@ export default {
}); });
this.getExhibitionCard();
this.getNewExhibitionCard();
}, },
updateLocationFilter(value) { updateLocationFilter(value) {
this.query = "";
this.selectedRegion = []; this.selectedRegion = [];
this.selectedCountry = []; this.selectedCountry = [];
this.selectedCity = []; this.selectedCity = [];
@ -474,12 +481,11 @@ export default {
}); });
this.getExhibitionCard();
this.getNewExhibitionCard();
}, },
updateStatusFilter(value) { updateStatusFilter(value) {
this.query = "";
this.selectedStatus = []; this.selectedStatus = [];
value.forEach(key => { value.forEach(key => {
@ -490,14 +496,14 @@ export default {
}); });
this.getExhibitionCard();
this.getNewExhibitionCard();
}, },
updateDateFilter(value) { updateDateFilter(value) {
this.query = "";
this.selectedDates = value; this.selectedDates = value;
this.getExhibitionCard();
this.getNewExhibitionCard();
}, },
async getQuery() { async getQuery() {

Loading…
Cancel
Save