处理搜索异常

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

@ -3,7 +3,7 @@ Component({
data: {
labelColor: ["#c41d7f", "#096dd9", "#531dab", "#d46b08", "#389e0d", "#08979c", "#cf1322"],
bgColor: ["#fff0f6", "#e6f7ff", "#f9f0ff", "#fff7e6", "#f6ffed", "#e6fffb", "#fff1f0"],
},
},
properties: {
// 抽屉高度
recordList: {

@ -29,7 +29,7 @@
<view class="f12 pl4 pr4" style="color:#646572;padding:4px;" hover-class="none" hover-stop-propagation="false">
{{itm || '-'}}
</view>
</view>
</view>
<view class="f12 pl4 pr4" style="background: #f1faff;padding:4px;" wx:if="{{item.labelGroup.length <= 0}}">
暂无特色
</view>

@ -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 = [];
}
})

Loading…
Cancel
Save