Browse Source

[WHAT] 修正展覽列表篩選語言翻譯

Dev
berlin-tzen 2 years ago
parent
commit
1d72e0dc41
  1. 2
      FrontEnd/locales/zh-tw.json
  2. 113
      FrontEnd/pages/exhibition/_id.vue
  3. 9
      FrontEnd/pages/exhibition/index.vue

2
FrontEnd/locales/zh-tw.json

@ -363,7 +363,7 @@
"Show Status": "展覽狀態",
"Postponed": "已延期",
"Cancelled": "已取消",
"Upcoming": "即將開展",
"Upcoming": "即將到來",
"Ongoing": "展覽進行中",
"Finished": "已結束"
},

113
FrontEnd/pages/exhibition/_id.vue

@ -260,7 +260,6 @@ export default {
this.getExhibitionCard();
this.getAdList();
this.getFavorite();
// await this.getExhibition();
// await this.getServiceCategory();
// await this.getCategorySwiperList();
// await this.getRelatedServiceList();
@ -546,118 +545,6 @@ export default {
this.$router.push(this.localePath("/user"));
}
},
// toggleFavorite() {
// if (this.$auth.loggedIn) {
// this.$axios
// .put(
// `/member/exhibitions?jwt=${this.$auth.$storage.getUniversal("jwt")
// ? this.$auth.$storage.getUniversal("jwt").token
// : ""
// }&exhibition_id=${this.$route.params.id}&delete=${this.saved}`
// )
// .then((result) => {
// this.saved = !this.saved;
// })
// .catch((err) => {
// console.log(err);
// });
// } else {
// this.$router.push(this.localePath("/user"));
// }
// },
async getExhibition() {
if (this.$route.query.preview) {
await this.$axios
.get(
"/admin/events/previewShows/" +
this.$route.params.id +
this.$i18n.localeProperties["langQuery"]
)
.then((res) => {
this.exhibition.id = res.data.exhibition.id;
this.exhibition.name = res.data.exhibition.name;
this.exhibition.subtitle = res.data.exhibition.subtitle;
this.exhibition.region = res.data.exhibition.region;
this.exhibition.country = res.data.exhibition.country;
this.exhibition.city = res.data.exhibition.city;
this.exhibition.logo = res.data.exhibition.logo;
this.exhibition.banner = res.data.exhibition.banner;
this.exhibition.startdate = res.data.exhibition.startdate;
this.exhibition.enddate = res.data.exhibition.enddate;
this.exhibition.status = res.data.exhibition.status;
this.exhibition.website = res.data.exhibition.website;
this.exhibition.isRecommend = res.data.exhibition.isRecommend;
this.exhibition.isLiked = res.data.exhibition.isLiked;
this.exhibition.rating = res.data.exhibition.rating;
this.exhibition.reviewCount = res.data.exhibition.reviewCount;
this.exhibition.exhibitors = res.data.exhibition.exhibitors;
this.exhibition.visitors = res.data.exhibition.visitors;
this.exhibition.internalexhibitors =
res.data.exhibition.internalexhibitors;
this.exhibition.area = res.data.exhibition.area;
this.exhibition.showstatusid = res.data.exhibition.showstatusid;
this.exhibition.about = res.data.exhibition.about;
this.exhibition.profile = res.data.exhibition.profile;
this.exhibition.description = res.data.exhibition.description;
this.exhibition.shortName = res.data.exhibition.shortName;
this.exhibition.frequency = res.data.exhibition.frequency;
this.exhibition.online = res.data.exhibition.online;
this.exhibition.organizers = res.data.exhibition.organizers;
this.exhibition.videos = res.data.exhibition.videos;
this.exhibition.gallery = res.data.exhibition.gallery;
this.exhibition.venues = res.data.exhibition.venues;
this.exhibition.categories = res.data.exhibition.categories;
this.exhibition.subcategories = res.data.exhibition.subcategories;
})
.catch((err) => {
console.log(err);
});
} else {
await this.$axios
.get(
`/exhibitions/${this.$route.params.id}?lang=${this.$i18n.localeProperties["langQuery"]}`
)
.then((res) => {
this.exhibition.id = res.data.exhibition.id;
this.exhibition.name = res.data.exhibition.name;
this.exhibition.subtitle = res.data.exhibition.subtitle;
this.exhibition.region = res.data.exhibition.region;
this.exhibition.country = res.data.exhibition.country;
this.exhibition.city = res.data.exhibition.city;
this.exhibition.logo = res.data.exhibition.logo;
this.exhibition.banner = res.data.exhibition.banner;
this.exhibition.startdate = res.data.exhibition.startdate;
this.exhibition.enddate = res.data.exhibition.enddate;
this.exhibition.status = res.data.exhibition.status;
this.exhibition.website = res.data.exhibition.website;
this.exhibition.isRecommend = res.data.exhibition.isRecommend;
this.exhibition.isLiked = res.data.exhibition.isLiked;
this.exhibition.rating = res.data.exhibition.rating;
this.exhibition.reviewCount = res.data.exhibition.reviewCount;
this.exhibition.exhibitors = res.data.exhibition.exhibitors;
this.exhibition.visitors = res.data.exhibition.visitors;
this.exhibition.internalexhibitors =
res.data.exhibition.internalexhibitors;
this.exhibition.area = res.data.exhibition.area;
this.exhibition.showstatusid = res.data.exhibition.showstatusid;
this.exhibition.about = res.data.exhibition.about;
this.exhibition.profile = res.data.exhibition.profile;
this.exhibition.description = res.data.exhibition.description;
this.exhibition.shortName = res.data.exhibition.shortName;
this.exhibition.frequency = res.data.exhibition.frequency;
this.exhibition.online = res.data.exhibition.online;
this.exhibition.organizers = res.data.exhibition.organizers;
this.exhibition.videos = res.data.exhibition.videos;
this.exhibition.gallery = res.data.exhibition.gallery;
this.exhibition.venues = res.data.exhibition.venues;
this.exhibition.categories = res.data.exhibition.categories;
this.exhibition.subcategories = res.data.exhibition.subcategories;
})
.catch((err) => {
console.log(err);
});
}
},
async getCategorySwiperList() {
let langCode = this.$i18n.localeProperties["langQuery"];
await this.$axios

9
FrontEnd/pages/exhibition/index.vue

@ -242,11 +242,12 @@ export default {
locationQueryFilter: "",
width: undefined,
sortType: [
{ name: "exhibition.Recommended", value: "Recommended" },
{ name: "exhibition.ShowDate", value: "ShowDate" },
{ name: "exhibition.ExhibitorCount", value: "ExhibitorCount" },
{ name: "exhibition.VisitorCount", value: "VisitorCount" },
{ name: "Recommended", value: "exhibition.Recommended" },
{ name: "ShowDate", value: "exhibition.ShowDate" },
{ name: "ExhibitorCount", value: "exhibition.ExhibitorCount" },
{ name: "VisitorCount", value: "exhibition.VisitorCount" },
],
sortBy: "ShowDate",
}),

Loading…
Cancel
Save