Browse Source

[WHAT] 會員-收藏展覽 [WHY] 開發 ShowEasy 前台

save exhibition book mark 顯示問題修正
Dev
Janie 2 years ago
parent
commit
0327c1236b
  1. 2
      FrontEnd/components/exhibition/ExhibitionListCard.vue
  2. 33
      FrontEnd/pages/user/saveExhibition.vue

2
FrontEnd/components/exhibition/ExhibitionListCard.vue

@ -194,6 +194,8 @@ export default {
)
.then((result) => {
this.$emit('toggle-favorite');
})
.catch((err) => {
console.log(err);

33
FrontEnd/pages/user/saveExhibition.vue

@ -77,11 +77,11 @@
>
</ExhibitionListCard>
<!-- <v-pagination
<v-pagination
v-model="page"
class="tw-mt-[28px]"
:length="userSavedExhibitionPageLength"
></v-pagination> -->
></v-pagination>
</div>
</div>
</div>
@ -305,8 +305,6 @@ export default {
// patchData.LastName
// );
// this.$store.dispatch("updatePicture");
})
.catch((error) => {
console.log(error);
@ -390,7 +388,7 @@ export default {
`/trending/api/Favorite/Favorites?Type=Exhibition`
)
.then((response) => {
console.log(JSON.stringify(response));
//console.log(JSON.stringify(response));
if(response && response.data && response.data.DATA && response.data.DATA.rel){
let data = response.data.DATA.rel
if(data){
@ -422,7 +420,7 @@ export default {
`/trending/api/Exhibition/Cards?RegionIDs&CountryIDs&CityIDs&MainCategoryIDs&SubCategoryIDs&Status&Date&Sort&Lang=${this.$i18n.localeProperties["langQuery"]}`
)
.then((response) => {
console.log(JSON.stringify(response));
//console.log(JSON.stringify(response));
if(response && response.data && response.data.DATA && response.data.DATA.rel){
let data = response.data.DATA.rel
if(data){
@ -430,6 +428,7 @@ export default {
this.exhibitionList.forEach((exhib) => {
this.userSaveExhibition.forEach((user) => {
if(exhib.ExhibitionID == user.ParentID){
exhib.IsFavorite = 'Y';
this.showUserExhibitionList.push(exhib);
}
})
@ -447,20 +446,13 @@ export default {
// this.showUserExhibitionList.push(this.exhibitionMap.get(exhib.ExhibitionID));
// })
};
};
})
.catch((error) => {
console.log(error);
});
},
filterSavedExhibition(countryId, selectId) {
this.countryFilterList = [];
@ -489,8 +481,6 @@ export default {
}
});
// this.userSavedExhibitionPageLength = Math.ceil(
// this.countryFilterList.length / this.savedExhibitionPerPage
@ -500,13 +490,22 @@ export default {
},
async removeExhibitionRelation() {
//
this.countryFilterList = [];
this.exhibitionList = [];
this.userSaveExhibition = [];
this.page = 1;
await this.fetchUserData();
this.fetchUserData();
await this.fetchSavedExhibition();
await this.fetchExhibition();
this.countryFilterList = this.showUserExhibitionList;
//this.countryFilterList = this.showUserExhibitionList;
if (this.countrySelect.toString() !== "999") {
this.countrySelect = 999;
}
if (this.statusSelect.toString() !== "999") {
this.statusSelect = 999;
}
},
},
};

Loading…
Cancel
Save