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) {