From 5662f0c0f0fb01d6816e79ce548da34b6218d248 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Tue, 1 Apr 2025 11:34:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor(market):=20=E9=87=8D=E6=9E=84=E7=BA=BF?= =?UTF-8?q?=E7=B4=A2=E9=A1=B5=E9=9D=A2=E7=AD=9B=E9=80=89=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 优化筛选条件的代码结构,提高可读性和可维护性 - 添加注释,增强代码的可理解性 - 修复筛选条件不重置的问题 - 优化切换标签列表的逻辑,确保正确重置筛选条件 --- pages/market/clue/index.vue | 38 +++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/pages/market/clue/index.vue b/pages/market/clue/index.vue index 67a3ae0..9f432a3 100644 --- a/pages/market/clue/index.vue +++ b/pages/market/clue/index.vue @@ -3,14 +3,14 @@ - 全部(320) + 全部(320) - 待跟进(8) + 待跟进(8) - + 7天未跟进(15) - + 30天未成交(12) @@ -392,8 +392,8 @@ export default { id: 2, name: '区域公海' }], - select_type: 1, - segmented_type: 1, + select_type: 1,//筛选标签列表|1,2,3,4 + segmented_type: 1,//1=我的客户,2=区域公海 } }, onLoad(options) {}, @@ -471,12 +471,34 @@ export default { this.select_type = type //重置为第一页 await this.resetFilteredData() - this.filteredData.type = type + switch (type) { + //全部 + case 1: + this.filteredData.type = '' + break + //待跟进 + case 2: + this.filteredData.type = '1' + break + //7天未跟进 + case 3: + this.filteredData.type = '2' + break + //30天未成交 + case 4: + this.filteredData.type = '3' + break + } await this.getList() }, //切换tag列表 - segmented(index) { + async segmented(index) { + this.select_type = 1 this.segmented_type = index.id//1=我的客户,2=区域公海 + //重置为第一页 + await this.resetFilteredData() + this.filteredData.type = '' + await this.getList() }, clue_info() {