处理搜索异常

cyl/dev
jscyl13849007907 1 year ago
parent 9ff056d5cd
commit 906f653861

@ -2611,10 +2611,25 @@ Page({
data.recordList.length < data.recordList.length <
that.data.storeJobListSearchForm.pageSize that.data.storeJobListSearchForm.pageSize
) { ) {
console.log('from 搜索')
var jobListTemp = commonUtil.disposeJobListData( var jobListTemp = commonUtil.disposeJobListData(
data.recordList 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.data.recordList = that.data.recordList.concat(jobListTemp);
that.setData({ that.setData({
@ -2623,18 +2638,21 @@ Page({
isTrigger: false, isTrigger: false,
}); });
} else { } else {
console.log('from 其他')
var jobListTemp = commonUtil.disposeJobListData( var jobListTemp = commonUtil.disposeJobListData(
data.recordList data.recordList
); );
that.data.recordList = that.data.recordList.concat(jobListTemp); that.data.recordList = that.data.recordList.concat(jobListTemp);
that.data.recordList.forEach((item, index) => { that.data.recordList.forEach((item, index) => {
if (item.jobSpecialLabelNames && item.jobSpecialLabelNames.length > 0) { if (item.jobSpecialLabelNames && item.jobSpecialLabelNames.length > 0) {
item.labelGroup = item.jobSpecialLabelNames.split(', ').filter((item, index) => { console.log('为什么不会执行',item,index)
return index < 6 item.labelGroup = item.jobSpecialLabelNames.split(', ').filter((itm, inx) => {
}).map(item => { return inx < 6
return item }).map(itm => {
return itm
}) })
} else { } else {
console.log('为什么会执行',item,index)
item.labelGroup = []; item.labelGroup = [];
} }
}) })

Loading…
Cancel
Save