Browse Source

Merge branch 'Dev' of http://www.origtek.com:2999/nelson.kai/ShowEasyFrontEnd into Dev

# Conflicts:
#	FrontEnd/pages/exhibition/index.vue
Dev
parent
commit
891225ee0d
  1. 57
      FrontEnd/pages/exhibition/index.vue
  2. 19
      FrontEnd/pages/user/signUp.vue

57
FrontEnd/pages/exhibition/index.vue

@ -214,7 +214,9 @@ export default {
},
data: () => ({
page: 1,
perPage: 10,
perPageItems: 10,
currentPage: 1,
total: 0,
adList: [],
exhibitionList: [],
categoryChecked: [],
@ -357,16 +359,22 @@ export default {
this.fetchUser();
},
computed: {
// result() {
// // return this.exhibitionsFilter.length;
// return this.exhibitionList.length;
// },
// pageLength() {
// return Math.ceil(this.totalPages / this.perPage);
// },
// renderList() {
// return this.sliceRenderList(this.exhibitionsFilter);
// },
result() {
// return this.exhibitionsFilter.length;
return this.exhibitionList.length;
return this.total;
},
pageLength() {
return Math.ceil(this.result / this.perPage);
return Math.ceil(this.result / this.perPageItems);
},
// renderList() {
// return this.sliceRenderList(this.exhibitionsFilter);
// },
},
watch: {
page() {
@ -374,7 +382,7 @@ export default {
},
$route() {
console.log("route");
// console.log("route");
this.getQuery();
},
@ -557,16 +565,21 @@ export default {
},
async getExhibitionCard() {
// to Fred
// should add q=? to api
// this.query = this.query + "";
// console.log("getExhibitionCard"+": "+this.query)
<<<<<<< HEAD
// this.query = this.query + "";
// console.log("getExhibitionCard"+": "+this.query)
=======
>>>>>>> 221c7d61404524a69834d629a1d1430b1172e744
await this.$axios
.get(
`/trending/api/Exhibition/Cards?Lang=${this.$i18n.localeProperties["langQuery"]}` +
`&PageIndex=${this.currentPage}` +
`&PageSize=${this.perPageItems}` +
`&RegionIDs=${JSON.stringify(this.selectedRegion)}` +
`&CountryIDs=${JSON.stringify(this.selectedCountry)}` +
`&CityIDs=${JSON.stringify(this.selectedCity)}` +
@ -579,11 +592,15 @@ export default {
)
.then((result) => {
console.log(result);
console.table(result);
if (result.data.DATA.rel) {
this.exhibitionList = result.data.DATA.rel;
this.setFavorite();
if(result && result.data && result.data.DATA && result.data.DATA.rel){
let data = result.data.DATA.rel
if(data.DataList.length>0){
this.total = data.Total;
this.exhibitionList = data.DataList;
this.setFavorite();
}
}
})
@ -643,15 +660,18 @@ export default {
},
updateSortBy(data) {
this.query = "";
this.sortBy = data;
this.getExhibitionCard();
},
updatePage(value) {
this.page = value;
this.currentPage = value;
this.getExhibitionCard();
},
updateCategoryFilter(value) {
this.query = "";
this.selectedMainCategory = [];
this.selectedSubCategory = [];
@ -672,6 +692,7 @@ export default {
},
updateLocationFilter(value) {
this.query = "";
this.selectedRegion = [];
this.selectedCountry = [];
this.selectedCity = [];
@ -697,6 +718,7 @@ export default {
},
updateStatusFilter(value) {
this.query = "";
this.selectedStatus = [];
value.forEach(key => {
@ -712,6 +734,7 @@ export default {
},
updateDateFilter(value) {
this.query = "";
this.selectedDates = value;
this.getExhibitionCard();
},
@ -725,10 +748,6 @@ export default {
this.selectedCity = [];
this.query = "";
// vm.categoryQueryFilter = {};
console.log(this.$route.query);
if (this.$route.query.category) {
vm.categoryQueryFilter = vm.$route.query.category;
this.selectedMainCategory.push(vm.$route.query.category);

19
FrontEnd/pages/user/signUp.vue

@ -189,10 +189,24 @@ export default {
Account: "",
Password: "",
Email: "",
Subscribe: true
Subscribe: true,
},
signUp: false,
};
},
watch: {
signUp: {
handler: function () {
if (this.signUp == true) {
this.$auth.$storage.removeUniversal("userPassword");
this.$auth.$storage.removeUniversal("userAccount");
console.log("帳號: " + this.$auth.$storage.getUniversal('userAccount'));
console.log("密碼: " + this.$auth.$storage.getUniversal('userPassword'));
console.log("都給我刪掉");
}
},
},
},
methods: {
userRegister() {
const postUserData = { ...this.userData };
@ -202,6 +216,7 @@ export default {
`/trending/api/Signup/SignupWithEmail`, postUserData
)
.then((response) => {
//console.log(JSON.stringify(response));
if(response.data.STATUSCODE == "400"){
this.errorDialog = true;
@ -210,6 +225,7 @@ export default {
if(response && response.data && response.data.DATA && response.data.DATA.rel){
let data = response.data.DATA.rel
if(data){
this.signUp = true;
this.timer = setInterval(() => {
if (this.countdown > 0) {
this.countdown--;
@ -218,6 +234,7 @@ export default {
clearInterval(this.timer);
}
}, 1000);
console.log("pageloading:" + this.isPageLoading);
this.isPageLoading = false;
this.dialog = !this.dialog;
}

Loading…
Cancel
Save