Browse Source

fix 收藏展覽未完成

Dev
Janie 2 years ago
parent
commit
e61f7d8d86
  1. 34
      FrontEnd/pages/user/saveExhibition.vue

34
FrontEnd/pages/user/saveExhibition.vue

@ -78,11 +78,18 @@
>
</ExhibitionListCard>
<v-pagination
<div class="tw-mt-[34px] tw-flex tw-justify-end">
<pagination :pageLength="pageLength" @update="updatePage"></pagination>
</div>
<!-- <v-pagination
v-model="page"
class="tw-mt-[28px]"
:length="userSavedExhibitionPageLength"
></v-pagination>
></v-pagination> -->
</div>
</div>
</div>
@ -93,6 +100,8 @@ import TwoDots from "@/components/TwoDots";
import ExhibitionListCard from "~/components/exhibition/ExhibitionListCard.vue";
import userSidebar from "@/components/user/userSidebar.vue";
import elementSelect from "@/components/newComponent/form/ElementSelect.vue";
import pagination from "@/components/newComponent/pagination/pagination.vue";
export default {
name: "saveExhibition",
layout: "profile",
@ -102,6 +111,7 @@ export default {
ExhibitionListCard,
userSidebar,
elementSelect,
pagination,
},
data() {
return {
@ -144,6 +154,9 @@ export default {
CountryName:[],
test:"",
isRouterAlive: true,
currentPage: 1,
perPageItems: 6,
};
},
async created() {
@ -262,7 +275,16 @@ export default {
},
},
},
computed: {
pageLength() {
return Math.ceil(this.userSaveExhibition.length / this.perPageItems);
},
},
methods: {
updatePage(value) {
this.currentPage = value;
this.fetchExhibition();
},
patchUserData() {
// if (this.width < 1366) {
// this.isEditInfoDialogActive = !this.isEditInfoDialogActive;
@ -393,7 +415,6 @@ export default {
`/trending/api/Favorite/Favorites?Type=Exhibition`
)
.then((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,10 +443,9 @@ export default {
async fetchExhibition() {
this.$axios
.get(
`/trending/api/Exhibition/Cards?RegionIDs&CountryIDs&CityIDs&MainCategoryIDs&SubCategoryIDs&Status&Date&Sort&Query&Lang=${this.$i18n.localeProperties["langQuery"]}`
`/trending/api/Exhibition/Cards?PageIndex=${this.currentPage}&PageSize=${this.perPageItems}&RegionIDs&CountryIDs&CityIDs&MainCategoryIDs&SubCategoryIDs&Status&Date&Sort&Query&Lang=${this.$i18n.localeProperties["langQuery"]}`
)
.then((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){
@ -456,7 +476,6 @@ export default {
},
async userSavedExhib(){
console.log("in");
this.exhibitionList.forEach((exhib) => {
this.userSaveExhibition.forEach((user) => {
if(exhib.ExhibitionID == user.ParentID){
@ -465,7 +484,6 @@ export default {
}
})
});
this.countryFilterList = JSON.parse(
JSON.stringify(this.showUserExhibitionList));
@ -473,7 +491,7 @@ export default {
filterSavedExhibition(countryId, selectId) {
this.countryFilterList = [];
this.page = 1;
this.currentPage = 1;
//const country = countryId;
if (countryId == "999" && selectId == "999") {
this.countryFilterList = JSON.parse(

Loading…
Cancel
Save