From e9ba6c48bc9f50a82b6ba953ad0e059ce2fc874f Mon Sep 17 00:00:00 2001 From: hequan_waynaqua <1669738430@qq.com> Date: Thu, 29 Oct 2020 16:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=90=9C=E7=B4=A2=E6=93=8D?= =?UTF-8?q?=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/search/list.vue | 9 ++++++++- src/views/search/modules/FilterBar.vue | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/search/list.vue b/src/views/search/list.vue index 965037f..bbb6b85 100644 --- a/src/views/search/list.vue +++ b/src/views/search/list.vue @@ -49,6 +49,7 @@ export default { isNew: false, isHot: false, isPrice: false, + isSales: false, loading: false, finished: false, isSkeletonShow: true @@ -78,7 +79,8 @@ export default { keyword: this.keyword, isNew: this.isNew, isHot: this.isHot, - isPrice: this.isPrice + isPrice: this.isPrice, + isSales: this.isSales }).then((res) => { const data = res.map.goods this.list = [...this.list, ...data] @@ -107,6 +109,8 @@ export default { } else if (val['search'] === 'price') { this.isPrice = true this.orderBy = val['orderBy'] + } else if (val['search'] === 'isSales') { + this.isSales = true } else if (val['search'] === 'cancelPrice') { this.isPrice = false this.orderBy = '' @@ -119,6 +123,7 @@ export default { isNew: this.isNew, isHot: this.isHot, isPrice: this.isPrice, + isSales: this.isSales, orderBy: this.orderBy }).then((res) => { const data = res.map.goods @@ -135,6 +140,8 @@ export default { this.pageNum = 1 this.isNew = false this.isHot = false + this.isPrice = false + this.isSales = false this.finished = false } } diff --git a/src/views/search/modules/FilterBar.vue b/src/views/search/modules/FilterBar.vue index b043546..c54b86d 100644 --- a/src/views/search/modules/FilterBar.vue +++ b/src/views/search/modules/FilterBar.vue @@ -5,7 +5,7 @@ -
+
销量
@@ -55,6 +55,9 @@ export default { this.faDefault = this.faSortDown this.$emit('changeGoods', { search: 'price', orderBy: 'desc' }) } + }, + chageSales() { + this.$emit('changeGoods', { search: 'isSales' }) } }