From d44bf993de0537c74c56a3dcbaa94d3d76e4d767 Mon Sep 17 00:00:00 2001 From: berlin-tzen Date: Wed, 8 Mar 2023 11:12:05 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E4=BF=AE=E6=94=B9=E5=B1=95=E8=A6=BD?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A0=81=E5=8F=96=E8=B3=87=E6=96=99=E9=A0=86?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontEnd/pages/exhibition/index.vue | 56 +++++++++++++---------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/FrontEnd/pages/exhibition/index.vue b/FrontEnd/pages/exhibition/index.vue index b75b3ee..031c4bc 100644 --- a/FrontEnd/pages/exhibition/index.vue +++ b/FrontEnd/pages/exhibition/index.vue @@ -252,13 +252,18 @@ export default { sortBy: "ShowDate", }), async created() { + + // to Fred + // addjust async/sync orders + this.isPageLoading = true; + await this.getQuery(); this.getAdList(); - this.getStatusList(); - this.getLocationList(); - this.getCategoryList(); - this.getFavorite(); - this.getExhibitionCard(); + await this.getStatusList(); + await this.getLocationList(); + await this.getCategoryList(); + await this.getFavorite(); + await this.getExhibitionCard(); // this.getQuery(); // await this.getUnsortLocationList(); // await this.getUnsortCategoryList(); @@ -356,9 +361,8 @@ export default { }, $route() { - // console.table(this.$route); + this.getQuery(); - // this.getQuery(); }, }, methods: { @@ -422,7 +426,7 @@ export default { ] }, - getStatusList() { + async getStatusList() { this.$axios .get( `/trending/api/Exhibition/Statuses?Lang=${this.$i18n.localeProperties["langQuery"]}` @@ -447,7 +451,7 @@ export default { console.log(err); }); }, - getCategoryList() { + async getCategoryList() { this.$axios .get( `/trending/api/Exhibition/Categories?Lang=${this.$i18n.localeProperties["langQuery"]}` @@ -487,7 +491,7 @@ export default { console.log(err); }); }, - getLocationList() { + async getLocationList() { this.$axios .get( `/trending/api/Exhibition/Locations?Lang=${this.$i18n.localeProperties["langQuery"]}` @@ -537,26 +541,11 @@ export default { console.log(err); }); }, - getExhibitionCard() { - - let vm = this; - - if (this.$route.query.category) { - vm.categoryQueryFilter = vm.$route.query.category; - this.selectedMainCategory.push(vm.$route.query.category); - } - - if (this.$route.query.subcategory) { - vm.categoryQueryFilter = vm.$route.query.category; - this.selectedSubCategory.push(vm.$route.query.subcategory); - } - - if (this.$route.query.country) { - vm.locationQueryFilter = vm.$route.query.country; - this.selectedCountry.push(vm.$route.query.country); - } - + async getExhibitionCard() { + // to Fred + // should add q=? to api + this.$axios .get( `/trending/api/Exhibition/Cards?Lang=${this.$i18n.localeProperties["langQuery"]}` + @@ -582,7 +571,7 @@ export default { this.exhibitionList = []; }); }, - getFavorite() { + async getFavorite() { this.favoriteSet.clear(); @@ -715,8 +704,9 @@ export default { } if (this.$route.query.subcategory) { - vm.categoryQueryFilter = vm.$route.query.category; + vm.categoryQueryFilter = vm.$route.query.subcategory; this.selectedSubCategory.push(vm.$route.query.subcategory); + console.log(vm.$route.query.subcategory); } if (this.$route.query.country) { @@ -724,6 +714,10 @@ export default { this.selectedCountry.push(vm.$route.query.country); } + if (this.$route.query.q) { + console.log(vm.$route.query.q); + } + }, sortServiceList(data) { switch (this.sortBy) {