筛选中可能出现的问题

master
lemon橪 2021-11-09 19:04:38 +08:00
parent d65ad6c5fd
commit 58484f1b61
1 changed files with 15 additions and 7 deletions

View File

@ -341,7 +341,7 @@ export default {
}; };
}, },
onPageScroll(e) { onPageScroll(e) {
console.log(e) console.log(e);
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
}, },
onLoad(val) { onLoad(val) {
@ -464,13 +464,21 @@ export default {
// //
sortConfim() { sortConfim() {
// //
if (!this.params.brandId) {
this.params.brandId = []; this.params.brandId = [];
} else {
this.params.brandId = [this.params.brandId];
}
//
this.selectedWay["brand"].forEach((item) => { this.selectedWay["brand"].forEach((item) => {
if (item.__selected) { if (item.__selected) {
this.params.brandId.push(item.value); this.params.brandId.push(item.value);
} }
}); });
this.params.brandId = this.params.brandId.join("@");
this.params.brandId = this.params.brandId.join("@") || this.params.brandId;
// () // ()
if (this.selectedWay["categoryId"][0]) { if (this.selectedWay["categoryId"][0]) {
this.params.categoryId = this.selectedWay["categoryId"][0].value; this.params.categoryId = this.selectedWay["categoryId"][0].value;
@ -501,7 +509,7 @@ export default {
this.sortParams = { this.sortParams = {
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
categoryId:this.routerVal.category || '' categoryId: this.routerVal.category || "",
}; };
this.sortPopup = false; this.sortPopup = false;
this.initSortGoods(); this.initSortGoods();
@ -510,9 +518,9 @@ export default {
this.params = { this.params = {
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
categoryId:this.routerVal.category || '', categoryId: this.routerVal.category || "",
order: 'desc', order: "desc",
sort: 'releaseTime' sort: "releaseTime",
}; };
this.goodsList = []; this.goodsList = [];
this.loadData(); this.loadData();