From f672f0d9b73615b1fda91d15010d6396d5149ad1 Mon Sep 17 00:00:00 2001 From: fanfan Date: Fri, 30 Aug 2024 20:45:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/list.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pages/goods/list.vue b/pages/goods/list.vue index 269b501..ae83394 100644 --- a/pages/goods/list.vue +++ b/pages/goods/list.vue @@ -253,8 +253,8 @@ searchText: '', banrdType: [], keyName1: '', - isBanrdActive: '', - isActive: '', + isBanrdActive: 0, + isActive: 0, goodsType: [], keyName2: '', showView: false, // 列表显示方式 (true列表、false平铺) @@ -445,15 +445,22 @@ if (this.keyName2) { keywords.push(this.keyName2) } + let categoryId = 0 + if (this.isActive) { + categoryId = this.isActive + } else { + categoryId = this.isBanrdActive > 0 ? this.isBanrdActive : ((app.options.categoryId || app.options + .categoryId != undefined) ? app.options + .categoryId : 0) + } const param = { sortType: app.sortType != 'city' ? app.sortType : '', sortPrice: Number(app.sortPrice), - categoryId: (app.options.categoryId || app.options.categoryId != undefined) ? app.options - .categoryId : 0, + categoryId: categoryId, merchantId: app.options.merchantId, // goodsName: app.options.search || '', page: pageNo, - keywords: keywords.length > 0 ? keywords.join(',') : '', + // keywords: keywords.length > 0 ? keywords.join(',') : '', keyword: app.options.search || '', // goods_source: this.multiIndex > -1 ? this.multiArray[this.multiIndex].value : '' }