diff --git a/components/job-sub/index.js b/components/job-sub/index.js index dc769ce..9996266 100644 --- a/components/job-sub/index.js +++ b/components/job-sub/index.js @@ -3,7 +3,7 @@ Component({ data: { labelColor: ["#c41d7f", "#096dd9", "#531dab", "#d46b08", "#389e0d", "#08979c", "#cf1322"], bgColor: ["#fff0f6", "#e6f7ff", "#f9f0ff", "#fff7e6", "#f6ffed", "#e6fffb", "#fff1f0"], - }, + }, properties: { // 抽屉高度 recordList: { diff --git a/components/job-sub/index.wxml b/components/job-sub/index.wxml index af543e5..227830b 100644 --- a/components/job-sub/index.wxml +++ b/components/job-sub/index.wxml @@ -29,7 +29,7 @@ {{itm || '-'}} - + 暂无特色 diff --git a/pages/firstBill/index.js b/pages/firstBill/index.js index 391dffa..fbe26d6 100644 --- a/pages/firstBill/index.js +++ b/pages/firstBill/index.js @@ -2611,10 +2611,25 @@ Page({ data.recordList.length < that.data.storeJobListSearchForm.pageSize ) { - + console.log('from 搜索') var jobListTemp = commonUtil.disposeJobListData( 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({ @@ -2623,18 +2638,21 @@ Page({ isTrigger: false, }); } else { + console.log('from 其他') var jobListTemp = commonUtil.disposeJobListData( data.recordList ); that.data.recordList = that.data.recordList.concat(jobListTemp); that.data.recordList.forEach((item, index) => { if (item.jobSpecialLabelNames && item.jobSpecialLabelNames.length > 0) { - item.labelGroup = item.jobSpecialLabelNames.split(', ').filter((item, index) => { - return index < 6 - }).map(item => { - return item + 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 = []; } })