flat: 合并
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
</view>
|
||||
<view class="table-list">
|
||||
<scroll-view :scroll-y="true" class="falls-scroll" @scroll="handleScroll" @scrolltolower="scrollBottom">
|
||||
<view class="falls" v-if="list.length">
|
||||
<view class="falls">
|
||||
<custom-waterfalls-flow
|
||||
:column="columnCount"
|
||||
:columnSpace="columnSpace"
|
||||
@@ -142,7 +142,7 @@
|
||||
</custom-waterfalls-flow>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
<empty v-if="!list.length"></empty>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 筛选 -->
|
||||
@@ -298,6 +298,7 @@ function nextDetail(job) {
|
||||
function openFilter() {
|
||||
showFilter.value = true;
|
||||
emits('onShowTabbar', false);
|
||||
uni.hideTabBar();
|
||||
selectFilterModel.value?.open({
|
||||
title: '筛选',
|
||||
maskClick: true,
|
||||
@@ -310,10 +311,12 @@ function openFilter() {
|
||||
}
|
||||
showFilter.value = false;
|
||||
getJobList('refresh');
|
||||
uni.showTabBar();
|
||||
},
|
||||
cancel: () => {
|
||||
showFilter.value = false;
|
||||
emits('onShowTabbar', true);
|
||||
uni.showTabBar();
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -359,7 +362,11 @@ function getJobRecommend(type = 'add') {
|
||||
...pageState.search,
|
||||
...conditionSearch.value,
|
||||
};
|
||||
let comd = { recommend: true, jobCategory: '', tip: '确认你的兴趣,为您推荐更多合适的岗位' };
|
||||
let comd = {
|
||||
recommend: true,
|
||||
jobCategory: '',
|
||||
tip: '确认你的兴趣,为您推荐更多合适的岗位',
|
||||
};
|
||||
$api.createRequest('/app/job/recommend', params).then((resData) => {
|
||||
const { data, total } = resData;
|
||||
pageState.total = 0;
|
||||
@@ -380,7 +387,16 @@ function getJobRecommend(type = 'add') {
|
||||
|
||||
if (question) {
|
||||
comd.jobCategory = question;
|
||||
data.unshift(comd);
|
||||
// 生成随机插入位置,排除前两个和最后两个位置
|
||||
let insertIndex;
|
||||
if (data.length <= 4) {
|
||||
// 如果数据长度小于等于4,直接插入到中间位置
|
||||
insertIndex = Math.floor(data.length / 2);
|
||||
} else {
|
||||
// 生成2到data.length-2之间的随机位置
|
||||
insertIndex = Math.floor(Math.random() * (data.length - 4)) + 2;
|
||||
}
|
||||
data.splice(insertIndex, 0, comd);
|
||||
}
|
||||
}
|
||||
const reslist = dataToImg(data);
|
||||
|
||||
Reference in New Issue
Block a user