From 4eaa130560d788309c363b9cef5f0020707650fd Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Tue, 4 Feb 2025 16:34:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/firstBill/index.js | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/pages/firstBill/index.js b/pages/firstBill/index.js index fbe26d6..9a91968 100644 --- a/pages/firstBill/index.js +++ b/pages/firstBill/index.js @@ -2603,6 +2603,15 @@ Page({ data.recordList.forEach((i) => { i.minMonthlyPay = i.minMonthlyPay / 100 i.maxMonthlyPay = i.maxMonthlyPay / 100 + if (i.jobSpecialLabelNames && i.jobSpecialLabelNames.length > 0) { + i.labelGroup = i.jobSpecialLabelNames.split(', ').filter((itm, inx) => { + return inx < 6 + }).map(itm => { + return itm + }) + } else { + i.labelGroup = []; + } }) } if ( @@ -2616,20 +2625,6 @@ Page({ data.recordList ); - jobListTemp.forEach((item, index) => { - if (item.jobSpecialLabelNames && item.jobSpecialLabelNames.length > 0) { - console.log('为什么不会执行',item,index) - item.labelGroup = item.jobSpecialLabelNames.split(', ').filter((itm, inx) => { - return inx < 6 - }).map(itm => { - return itm - }) - } else { - console.log('为什么会执行',item,index) - item.labelGroup = []; - } - }) - that.data.recordList = that.data.recordList.concat(jobListTemp); that.setData({ @@ -2643,19 +2638,7 @@ Page({ data.recordList ); that.data.recordList = that.data.recordList.concat(jobListTemp); - that.data.recordList.forEach((item, index) => { - if (item.jobSpecialLabelNames && item.jobSpecialLabelNames.length > 0) { - console.log('为什么不会执行',item,index) - item.labelGroup = item.jobSpecialLabelNames.split(', ').filter((itm, inx) => { - return inx < 6 - }).map(itm => { - return itm - }) - } else { - console.log('为什么会执行',item,index) - item.labelGroup = []; - } - }) + that.setData({ recordList: that.data.recordList, hasMoreData: true,