2024-03-19 17:19:44 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="body">
|
|
|
|
|
|
<!-- <view v-if="browsingResultList.length > 0" class="search-result">
|
|
|
|
|
|
<view v-for="(item, index) in browsingResultList" class="search-item" v-if="item.workname" :key="index" @click="">
|
|
|
|
|
|
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" mode=""></image>
|
|
|
|
|
|
<view style="flex:1">{{ item.workname }}</view>
|
|
|
|
|
|
<view class="type" v-if="item.type == 0">任务</view>
|
|
|
|
|
|
<view class="type" v-else-if="item.type == 1">岗位</view>
|
|
|
|
|
|
<view class="type" v-else-if="item.type == 2">政策</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view> -->
|
|
|
|
|
|
<block v-for="(page, pIndex) in data" :key="pIndex">
|
|
|
|
|
|
<block v-for="(item, index) in page" :key="item.id">
|
|
|
|
|
|
<view class="search-item" @click="toDetail(item)">
|
|
|
|
|
|
<!-- <company-list :companyitem="item" :noApply="false"></company-list> -->
|
|
|
|
|
|
<image src="/static/img/eyeopen.svg" style="width: 32rpx;height: 32rpx;margin-right: 10rpx;"
|
|
|
|
|
|
mode=""></image>
|
|
|
|
|
|
<view style="flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{ item.workname }}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
</view>
|
2024-03-19 17:19:44 +08:00
|
|
|
|
<view class="type" v-if="item.type1 == 0">任务</view>
|
|
|
|
|
|
<view class="type" v-else-if="item.type1 == 1">岗位</view>
|
|
|
|
|
|
<view class="type" v-else-if="item.type1 == 2">招工</view>
|
|
|
|
|
|
<view class="baddd"></view>
|
2024-03-18 17:06:39 +08:00
|
|
|
|
</view>
|
2024-03-19 17:19:44 +08:00
|
|
|
|
</block>
|
|
|
|
|
|
</block>
|
|
|
|
|
|
<view class="nothing" v-if="data.length === 0">
|
|
|
|
|
|
<image src="/static/img/pic_notask.svg" mode=""></image>
|
|
|
|
|
|
<view class="nothingContnt">
|
|
|
|
|
|
暂无浏览信息
|
|
|
|
|
|
</view>
|
2024-03-18 17:06:39 +08:00
|
|
|
|
</view>
|
2024-03-19 17:19:44 +08:00
|
|
|
|
</view>
|
2024-03-18 17:06:39 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-03-19 17:19:44 +08:00
|
|
|
|
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
|
|
|
|
|
import {
|
|
|
|
|
|
recruitmentNewsList
|
|
|
|
|
|
} from '@/api/mission.js';
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
components: {
|
|
|
|
|
|
vTabs,
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
data: [],
|
|
|
|
|
|
activeTab: 0,
|
|
|
|
|
|
current: 1,
|
|
|
|
|
|
size: 10,
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
browsingResultList: []
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad: function () {
|
|
|
|
|
|
this.init()
|
|
|
|
|
|
},
|
|
|
|
|
|
/*页面滚动到底部 换页*/
|
|
|
|
|
|
onReachBottom: function () {
|
|
|
|
|
|
if (this.current <= Math.ceil(this.total / this.size)) {
|
|
|
|
|
|
this.getData();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: '已经是最后一页',
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
/*下拉刷新*/
|
|
|
|
|
|
onPullDownRefresh: function () {
|
|
|
|
|
|
this.init()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
init() {
|
|
|
|
|
|
this.current = 1
|
|
|
|
|
|
this.data = []
|
|
|
|
|
|
this.getData()
|
2024-03-18 17:06:39 +08:00
|
|
|
|
},
|
2024-03-19 17:19:44 +08:00
|
|
|
|
getData() {
|
|
|
|
|
|
var status = Number(this.activeTab) + 1
|
|
|
|
|
|
recruitmentNewsList(this.current, this.size, status).then(res => {
|
2024-03-18 17:06:39 +08:00
|
|
|
|
uni.stopPullDownRefresh();
|
2024-03-19 17:19:44 +08:00
|
|
|
|
console.log(res)
|
|
|
|
|
|
if (this.current === 1) {
|
|
|
|
|
|
this.data = [];
|
|
|
|
|
|
}
|
|
|
|
|
|
this.current += 1;
|
|
|
|
|
|
this.total = res.data.data.total;
|
|
|
|
|
|
if (res.data.data && res.data.data.records.length) {
|
|
|
|
|
|
this.data.push(res.data.data.records);
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2024-03-19 17:19:44 +08:00
|
|
|
|
gomap: function () {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: '../mapSeach/mapSeach'
|
|
|
|
|
|
})
|
2024-03-18 17:06:39 +08:00
|
|
|
|
},
|
2024-03-19 17:19:44 +08:00
|
|
|
|
changeTab: function (e) {
|
|
|
|
|
|
this.activeTab = e;
|
|
|
|
|
|
this.init()
|
2024-03-18 17:06:39 +08:00
|
|
|
|
},
|
2024-03-19 17:19:44 +08:00
|
|
|
|
toDetail(item) {
|
|
|
|
|
|
const no = item.id
|
|
|
|
|
|
// 判断是岗位还是任务 0:任务,1:岗位,2:招工
|
|
|
|
|
|
if (item.type1 == 0) {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/recruit/subPage/newsDetail/projectInfo?missionNo=${encodeURIComponent(no)}&type=${item.type1}&isCan=1`
|
|
|
|
|
|
})
|
|
|
|
|
|
} else if (item.type1 == 1) {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/recruit/subPage/newsDetail/workInfo?workId=${encodeURIComponent(no)}&type=${item.type1}&isCan=1`
|
|
|
|
|
|
})
|
|
|
|
|
|
} else if (item.type1 == 2) {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/recruit/subPage/newsDetail/userrecruitInfo?workId=${encodeURIComponent(no)}&isCan=1&type=${item.type1}`
|
|
|
|
|
|
})
|
2024-03-18 17:06:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
<style scoped>
|
|
|
|
|
|
page {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.tab {
|
|
|
|
|
|
height: 46px;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.body {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.probody image {
|
|
|
|
|
|
width: 88rpx;
|
|
|
|
|
|
height: 88rpx;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.probody {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.baddd {
|
|
|
|
|
|
background: #f6f6f6;
|
|
|
|
|
|
height: 20rpx;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.nothing {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
padding-top: 50%;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.nothing image {
|
|
|
|
|
|
width: 400rpx;
|
|
|
|
|
|
height: 200rpx;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.nothingContnt {
|
|
|
|
|
|
font-family: PingFangSC-Regular;
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
color: #666;
|
|
|
|
|
|
margin-top: 30rpx;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.title {
|
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
border-bottom: 1rpx solid #ddd;
|
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
|
line-height: 60rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.search-item {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
|
border-bottom: 1rpx solid #ddd;
|
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
|
line-height: 80rpx;
|
|
|
|
|
|
padding: 10rpx 30rpx;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
|
2024-03-19 17:19:44 +08:00
|
|
|
|
.search-item .type {
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
color: #707070;
|
|
|
|
|
|
background-color: #dddddd;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
height: 30rpx;
|
|
|
|
|
|
line-height: 30rpx;
|
|
|
|
|
|
padding: 0 20rpx;
|
|
|
|
|
|
}
|
2024-03-18 17:06:39 +08:00
|
|
|
|
</style>
|