flat: 暂存

This commit is contained in:
史典卓
2025-05-13 11:10:38 +08:00
parent 582e432e6a
commit fd74b7d4df
109 changed files with 8644 additions and 5205 deletions

View File

@@ -1,199 +1,521 @@
<template>
<view class="app-container">
<view class="careerfair-AI">AI+就业服务程序</view>
<view class="careerfair-tab">
<view class="careerfair-tab-options actived">现场招聘</view>
<view class="careerfair-tab-options" @click="textXcx">VR虚拟招聘会</view>
<view class="app-custom-root">
<view class="app-container">
<!-- 顶部头部区域 -->
<view class="container-header">
<view class="header-top">
<view class="header-btnLf button-click" @click="seemsg(0)" :class="{ active: state.current === 0 }">
现场招聘
</view>
<view class="header-btnLf button-click" @click="seemsg(1)" :class="{ active: state.current === 1 }">
VR虚拟招聘会
</view>
</view>
<view class="header-input btn-feel">
<uni-icons class="iconsearch" color="#666666" type="search" size="18"></uni-icons>
<input class="input" placeholder="招聘会" placeholder-class="inputplace" />
</view>
<view class="header-date">
<view class="data-week">
<view
class="weel-days button-click"
:class="{ active: currentDay.fullDate === item.fullDate }"
v-for="(item, index) in weekList"
:key="index"
@click="selectDate(item)"
>
<view class="label">{{ item.day }}</view>
<view class="day">{{ item.date }}</view>
</view>
</view>
<view class="data-all">
<image class="allimg button-click" @click="toSelectDate" src="/static/icon/date1.png"></image>
</view>
</view>
</view>
<!-- 主体内容区域 -->
<view class="container-main">
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
<view class="cards" v-if="fairList.length">
<view
class="card btn-incline"
v-for="(item, index) in fairList"
:key="index"
@click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.jobFairId)"
>
<view class="card-title">{{ item.name }}</view>
<view class="card-row">
<text class="">{{ item.location }}</text>
<text class="">
<convert-distance
:alat="item.latitude"
:along="item.longitude"
:blat="latitudeVal"
:blong="longitudeVal"
></convert-distance>
</text>
</view>
<view class="card-times">
<view class="time-left">
<view class="left-date">{{ parseDateTime(item.startTime).time }}</view>
<view class="left-dateDay">{{ parseDateTime(item.startTime).date }}</view>
</view>
<view class="line"></view>
<view class="time-center">
<view class="center-date">
{{ getTimeStatus(item.startTime, item.endTime).statusText }}
</view>
<view class="center-dateDay">
{{ getHoursBetween(item.startTime, item.endTime) }}小时
</view>
</view>
<view class="line"></view>
<view class="time-right">
<view class="left-date">{{ parseDateTime(item.endTime).time }}</view>
<view class="left-dateDay">{{ parseDateTime(item.endTime).date }}</view>
</view>
</view>
<view class="recommend-card-line"></view>
<view class="card-footer">内容简介{{ item.description }}</view>
</view>
</view>
<empty v-else pdTop="200"></empty>
</scroll-view>
</view>
</view>
<scroll-view :scroll-x="true" :show-scrollbar="false" class="careerfair-scroll">
<view class="careerfair-date">
<view class="date-list" v-for="(item, index) in state.dateList" :key="index">
<view class="date-list-item">{{ item.day }}</view>
<view class="date-list-item active">{{ item.date }}</view>
</view>
</view>
</scroll-view>
<scroll-view :scroll-y="true" class="careerfair-list-scroll">
<view class="careerfair-list">
<view class="careerfair-list-card" v-for="(item, index) in 10" :key="index">
<view class="card-title">2024年春季青岛市商贸服务业招聘会</view>
<view class="card-intro">
<view class="line_2">内容简介</view>
<view class="intro-distance">500m以内</view>
</view>
<view class="card-address">市南区延安三路105号</view>
<view class="card-footer">
<view class="cardfooter-lf">
<view class="card-company">市南区就业人才中心</view>
<view class="card-date">7月31日周三14:00-18:00</view>
</view>
<view class="cardfooter-ri" @click="navTo('/packageA/pages/exhibitors/exhibitors')">
查看详情
</view>
</view>
</view>
</view>
</scroll-view>
<!-- 自定义tabbar -->
<!-- <tabbar-custom :currentpage="1"></tabbar-custom> -->
</view>
</template>
<script setup>
import { reactive, inject, watch, ref, onMounted } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
const { $api, navTo } = inject('globalFunction');
import useLocationStore from '@/stores/useLocationStore';
import { storeToRefs } from 'pinia';
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
const { $api, navTo, cloneDeep } = inject('globalFunction');
const weekList = ref([]);
const fairList = ref([]);
const currentDay = ref({});
const state = reactive({
dateList: [],
current: 0,
all: [{}],
});
const pageState = reactive({
page: 0,
total: 0,
maxPage: 2,
pageSize: 10,
search: {},
});
onLoad(() => {
state.dateList = getNextMonthDates();
const result = getNextDates({
startDate: '2025-04-21',
});
weekList.value = result;
getFair('refresh');
});
function textXcx() {
$api.msg('测试给小程序发送消息');
$api.sendingMiniProgramMessage();
function toSelectDate() {
navTo('/packageA/pages/selectDate/selectDate', {
query: {
date: currentDay.value.fullDate,
},
onBack: (res) => {
const result = getNextDates({
startDate: res.date,
});
weekList.value = result;
getFair('refresh');
},
});
}
// 查看消息类型
function changeSwiperMsgType(e) {
const currented = e.detail.current;
state.current = currented;
}
// 获取往后三十天日期
function getNextMonthDates() {
const today = new Date();
function seemsg(index) {
if (index === 1) {
return $api.msg('功能确定中');
}
state.current = index;
}
const handleScrollToLower = () => {
getFair();
console.log('触底');
};
function getFair(type = 'add') {
if (type === 'refresh') {
pageState.page = 0;
pageState.maxPage = 1;
}
if (type === 'add' && pageState.page < pageState.maxPage) {
pageState.page += 1;
}
let params = {
...pageState.search,
current: pageState.page,
pageSize: pageState.pageSize,
};
if (currentDay.value?.fullDate) {
params.queryDate = currentDay.value.fullDate;
}
$api.createRequest('/app/fair', params).then((resData) => {
const { rows, total } = resData;
console.log(rows);
if (type === 'add') {
const str = pageState.pageSize * (pageState.page - 1);
const end = fairList.value.length;
const reslist = rows;
fairList.value.splice(str, end, ...reslist);
} else {
fairList.value = rows;
}
// pageState.list = resData.rows;
pageState.total = resData.total;
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
});
}
function parseDateTime(datetimeStr) {
if (!datetimeStr) return { time: '', date: '' };
const dateObj = new Date(datetimeStr);
if (isNaN(dateObj.getTime())) return { time: '', date: '' }; // 无效时间
const year = dateObj.getFullYear();
const month = String(dateObj.getMonth() + 1).padStart(2, '0');
const day = String(dateObj.getDate()).padStart(2, '0');
const hours = String(dateObj.getHours()).padStart(2, '0');
const minutes = String(dateObj.getMinutes()).padStart(2, '0');
return {
time: `${hours}:${minutes}`,
date: `${year}${month}${day}`,
};
}
function getTimeStatus(startTimeStr, endTimeStr) {
const now = new Date();
const startTime = new Date(startTimeStr);
const endTime = new Date(endTimeStr);
// 判断状态0 开始中1 过期2 待开始
let status = 0;
let statusText = '开始中';
if (now < startTime) {
status = 2; // 待开始
statusText = '待开始';
} else if (now > endTime) {
status = 1; // 已过期
statusText = '已过期';
} else {
status = 0; // 进行中
statusText = '进行中';
}
return {
status, // 0: 进行中1: 已过期2: 待开始
statusText,
};
}
function getHoursBetween(startTimeStr, endTimeStr) {
const start = new Date(startTimeStr);
const end = new Date(endTimeStr);
const diffMs = end - start;
const diffHours = diffMs / (1000 * 60 * 60);
return +diffHours.toFixed(2); // 保留 2 位小数
}
const selectDate = (item) => {
if (currentDay.value?.fullDate === item.fullDate) {
currentDay.value = {};
getFair('refresh');
return;
}
currentDay.value = item;
getFair('refresh');
};
function getNextDates({ startDate = '', count = 6 }) {
const baseDate = startDate ? new Date(startDate) : new Date(); // 指定起点或今天
const dates = [];
const dayNames = ['日', '一', '二', '三', '四', '五', '六'];
for (let i = 0; i < 30; i++) {
const date = new Date(today); // 创建当天的副本
date.setDate(today.getDate() + i); // 设置日期为往后第 i 天
const formattedDate = date.toISOString().slice(0, 10).slice(8); // 格式化为 YYYY-MM-DD
const dayOfWeek = dayNames[date.getDay()]; // 获取星期几
for (let i = 0; i < count; i++) {
const date = new Date(baseDate);
date.setDate(baseDate.getDate() + i);
const fullDate = date.toISOString().slice(0, 10); // YYYY-MM-DD
const formattedDate = fullDate.slice(5); // MM-DD
const dayOfWeek = dayNames[date.getDay()];
dates.push({
date: formattedDate,
day: dayOfWeek,
fullDate,
day: '周' + dayOfWeek,
isToday: i === 0,
});
}
dates[0].date = '今天';
dates[1].date = '明天';
// 可选设置默认选中项
// currentDay.value = dates[0];
return dates;
}
</script>
<style lang="stylus" scoped>
.app-container
width: 100%;
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
.app-custom-root {
position: fixed;
z-index: 10;
width: 100vw;
height: calc(100% - var(--window-bottom));
overflow: hidden;
}
.app-container {
display: flex;
flex-direction: column;
position: fixed
.careerfair-AI
height: 42rpx;
font-family: Inter, Inter;
font-weight: 400;
font-size: 35rpx;
color: #FFFFFF;
line-height: 41rpx;
padding: 85rpx 0 0 30rpx;
.careerfair-tab
margin: 20rpx 0 0 30rpx;
width: fit-content;
display: flex;
flex-wrap: nowrap;
.careerfair-tab-options
background: #4778EC;
padding: 0 20rpx;
height: 63rpx;
line-height: 63rpx;
height: 100%;
width: 100%;
.container-header {
background: url('@/static/icon/background2.png') 0 0 no-repeat;
background-size: 100% 400rpx;
.header-top{
display: flex;
line-height: calc(88rpx - 14rpx);
padding: 16rpx 44rpx 14rpx 44rpx;
.header-btnLf {
display: flex;
width: fit-content;
white-space: nowrap
justify-content: flex-start;
align-items: center;
width: calc(60rpx * 3);
font-weight: 500;
font-size: 40rpx;
color: #696969;
margin-right: 44rpx;
position: relative;
.btns-wd{
position: absolute
top: 2rpx;
right: 2rpx
width: 16rpx;
height: 16rpx;
background: #F73636;
border-radius: 50%;
border: 4rpx solid #EEEEFF;
}
}
.active {
font-weight: 600;
font-size: 40rpx;
color: #000000;
}
}
.header-input{
padding: 0 24rpx
width: calc(100% - 48rpx);
position: relative
.iconsearch{
position: absolute
left: 50rpx;
top: 50%
transform: translate(0, -50%)
}
.input{
padding: 0 30rpx 0 80rpx
height: 80rpx;
background: #FFFFFF;
border-radius: 75rpx 75rpx 75rpx 75rpx;
font-size: 28rpx;
}
.inputplace{
font-weight: 400;
font-size: 28rpx;
color: #B5B5B5;
}
}
.header-date{
padding: 28rpx
display: flex
justify-content: space-between
align-items: center
.data-week{
flex: 1
display: flex
justify-content: space-between
flex-wrap: nowrap
overflow: hidden
.weel-days{
display: flex
justify-content: center
flex-direction: column
text-align: center
font-weight: 400;
font-size: 24rpx;
color: #333333;
width: 96rpx;
height: 88rpx;
.label{}
.day{
font-weight: 500;
}
}
.active{
background: rgba(37,107,250,0.1);
border-radius: 12rpx 12rpx 12rpx 12rpx;
color: #256BFA;
}
}
.data-all{
width: 66rpx;
height: 66rpx;
margin-left: 18rpx
.allimg{
width: 100%;
height: 100%
}
}
}
}
}
.container-main {
flex: 1;
overflow: hidden;
background-color: #f4f4f4;
}
.main-scroll {
width: 100%
height: 100%;
}
.cards{
padding: 28rpx 28rpx 28rpx 28rpx;
.card{
margin-top: 28rpx
padding: 32rpx;
background: #FFFFFF
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
border-radius: 20rpx 20rpx 20rpx 20rpx;
.card-title{
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.card-row{
display: flex
justify-content: space-between
font-weight: 400;
font-size: 28rpx;
color: #FFFFFF;
text-align: center;
.actived
position: relative;
background: #FFAD47;
box-shadow: 0rpx 7rpx 7rpx 0rpx rgba(0,0,0,0.25);
.careerfair-tab-options:first-child
border-radius: 17rpx 0rpx 0rpx 0rpx;
.careerfair-tab-options:last-child
border-radius: 0rpx 17rpx 0rpx 0rpx;
.careerfair-scroll
background: #4778EC;
.careerfair-date
height: 119rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
color: #FFFFFF;
width: fit-content;
.date-list
color: #495265;
margin-top: 4rpx
}
.card-times{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: calc(750rpx / 7);
.date-list-item:nth-child(2)
font-size: 19rpx;
margin-top: 10rpx;
.active
width: 52rpx;
height: 52rpx;
background: #FFAD47;
border-radius: 0rpx 0rpx 0rpx 0rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
.careerfair-list-scroll
overflow: hidden;
background: linear-gradient( 180deg, rgba(255,255,255,0.2) 0%, #FFFFFF 100%);
.careerfair-list
display: flex;
flex-direction: column;
align-items: center;
padding: 25rpx 28rpx;
.careerfair-list-card
margin-top: 36rpx;
width: calc(100% - 40rpx);
background: #FFFFFF;
border-radius: 17rpx 17rpx 17rpx 17rpx;
padding: 20rpx;
.card-title
height: 68rpx;
font-size: 35rpx;
color: #606060;
line-height: 68rpx;
.card-intro,.card-address,.card-company,.card-date
font-weight: 400;
font-size: 21rpx;
color: #606060;
line-height: 25rpx;
margin-top: 13rpx;
.card-footer
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
.cardfooter-ri
width: 206rpx;
height: 56rpx;
line-height: 56rpx;
justify-content: space-between
align-items: center
margin-top: 24rpx
.time-left,
.time-right{
text-align: center
.left-date{
font-weight: 500;
font-size: 48rpx;
color: #333333;
}
.left-dateDay{
font-weight: 400;
font-size: 24rpx;
color: #333333;
margin-top: 12rpx
}
}
.line{
width: 40rpx;
height: 0rpx;
border: 2rpx solid #D4D4D4;
margin-top: 64rpx
}
.time-center{
text-align: center;
display: flex
flex-direction: column
justify-content: center
align-items: center
.center-date{
font-weight: 400;
font-size: 28rpx;
text-align: center;
color: #FFFFFF;
background: #FFAD47;
border-radius: 17rpx 17rpx 17rpx 17rpx;
.card-intro
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
.intro-distance
height: 30rpx;
background: #13C57C;
padding: 3rpx 8rpx;
line-height: 30rpx;
color: #FFFFFF;
font-size: 21rpx;
border-radius: 17rpx 17rpx 17rpx 17rpx;
.careerfair-list-card:first-child
margin-top: 0;
color: #FF881A;
padding-top: 10rpx
}
.center-dateDay{
font-weight: 400;
font-size: 24rpx;
color: #333333;
margin-top: 6rpx
line-height: 48rpx;
width: 104rpx;
height: 48rpx;
background: #F9F9F9;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
}
.recommend-card-line{
width: calc(100%);
height: 0rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 2rpx dashed rgba(0,0,0,0.14);
margin-top: 32rpx
position: relative
}
.recommend-card-line::before{
position: absolute
content: ''
left: 0
top: 0
transform: translate(-50% - 110rpx, -50%)
width: 28rpx;
height: 28rpx;
background: #F4F4F4;
border-radius: 50%;
}
.recommend-card-line::after{
position: absolute
content: ''
right: 0
top: 0
transform: translate(50% + 100rpx, -50%)
width: 28rpx;
height: 28rpx;
background: #F4F4F4;
border-radius: 50%;
}
.card-footer{
margin-top: 32rpx
min-height: 50rpx;
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
}
}
.card:first-child{
margin-top: 0
}
}
</style>

View File

@@ -40,11 +40,11 @@
<image class="drawer-user-img" v-if="userInfo.age === '0'" src="/static/icon/boy.png"></image>
<image class="drawer-user-img" v-else src="/static/icon/girl.png"></image>
<text>{{ userInfo.name || '暂无用户名' }}</text>
<image
<!-- <image
class="drawer-user-setting button-click"
src="/static/icon/setting.png"
@click="updateSetting"
></image>
></image> -->
</view>
</view>
</view>
@@ -315,4 +315,4 @@ header-height = 88rpx
.main-content.shift {
margin-left: 500rpx;
}
</style>
</style>

View File

@@ -7,7 +7,12 @@
我可以根据您的简历和求职需求帮你精准匹配青岛市互联网招聘信息对比招聘信息的优缺点提供面试指导等请把你的任务交给我吧~
</view>
<view class="back-rowh3">猜你所想</view>
<view class="back-rowmsg" v-for="item in queries" @click="sendMessageGuess(item)">
<view
class="back-rowmsg button-click"
v-for="(item, index) in queries"
:key="index"
@click="sendMessageGuess(item)"
>
{{ item }}
</view>
<view class="chat-item self" v-if="isRecording">
@@ -738,6 +743,8 @@ image-margin-top = 40rpx
justify-content: flex-start
align-items: center
width: calc(100% - 88rpx)
position: relative
z-index: 1
.backlogo
width: 313rpx;
height: 190rpx;

View File

@@ -1,133 +1,137 @@
<template>
<view class="app-container">
<view class="index-AI">AI+就业服务程序</view>
<view class="index-option">
<view class="option-left">
<view class="left-item" @click="navTo('/pages/nearby/nearby')">附近</view>
<view class="left-item" @click="navTo('/packageA/pages/choiceness/choiceness')">精选</view>
<view class="left-item">职业图谱</view>
<view class="nav-hidden hidden-animation" :class="{ 'hidden-height': isScrollingDown }">
<view class="container-search">
<view class="search-input button-click" @click="navTo('/pages/search/search')">
<uni-icons class="iconsearch" color="#666666" type="search" size="18"></uni-icons>
<text class="inpute">职位名称薪资要求等</text>
</view>
<view class="chart button-click">职业图谱</view>
</view>
<view class="option-right">
<input
class="uni-input right-input"
adjust-position="false"
confirm-type="search"
v-model="inputText"
@confirm="searchJobTitle"
/>
<uni-icons
class="iconsearch"
color="#FFFFFF"
type="search"
size="20"
@click="searchJobTitle"
></uni-icons>
<view class="cards">
<view class="card btn-feel" @click="navTo('/pages/nearby/nearby')">
<view class="card-title">附近工作</view>
<view class="card-text">好岗职等你来</view>
</view>
<view class="card btn-feel" @click="navTo('/packageA/pages/choiceness/choiceness')">
<view class="card-title">精选企业</view>
<view class="card-text">优选职得信赖</view>
</view>
</view>
</view>
<!-- tab -->
<view class="tab-options">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
<view class="tab-op-left">
<view
class="tab-list"
:class="{ tabchecked: state.tabIndex === 'all' }"
@click="choosePosition('all')"
>
全部
<view class="nav-filter">
<view class="filter-top">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
<view class="jobs-left">
<view
class="job button-click"
:class="{ active: state.tabIndex === 'all' }"
@click="choosePosition('all')"
>
全部
</view>
<view
class="job button-click"
:class="{ active: state.tabIndex === index }"
v-for="(item, index) in userInfo.jobTitle"
:key="index"
@click="choosePosition(index)"
>
{{ item }}
</view>
</view>
</scroll-view>
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
<text>添加</text>
</view>
</view>
<view class="filter-bottom">
<view class="btm-left">
<view
class="tab-list"
:class="{ tabchecked: state.tabIndex === index }"
v-for="(item, index) in userInfo.jobTitle"
:key="index"
@click="choosePosition(index)"
class="button-click filterbtm"
:class="{ active: pageState.search.order === item.value }"
v-for="item in rangeOptions"
@click="handelHostestSearch(item)"
:key="item.value"
>
{{ item }}
{{ item.text }}
</view>
</view>
<view class="btm-right button-click" @click="openFilter">
筛选
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
</view>
</view>
</view>
<view class="table-list">
<scroll-view :scroll-y="true" class="falls-scroll" @scroll="handleScroll" @scrolltolower="scrollBottom">
<view class="falls" v-if="list.length">
<custom-waterfalls-flow :column="columnCount" ref="waterfallsFlowRef" :value="list">
<template v-slot:default="job">
<view class="item btn-feel" v-if="!job.recommend">
<view class="falls-card" @click="nextDetail(job)">
<view class="falls-card-pay">
<view class="pay-text">
<Salary-Expectation
:max-salary="job.maxSalary"
:min-salary="job.minSalary"
:is-month="true"
></Salary-Expectation>
</view>
<image v-if="job.isHot" class="flame" src="/static/icon/flame.png"></image>
</view>
<view class="falls-card-title">{{ job.jobTitle }}</view>
<view class="fl_box fl_warp">
<view class="falls-card-education mar_ri10" v-if="job.education">
<dict-Label dictType="education" :value="job.education"></dict-Label>
</view>
<view class="falls-card-experience" v-if="job.experience">
<dict-Label dictType="experience" :value="job.experience"></dict-Label>
</view>
</view>
<view class="falls-card-company">{{ job.companyName }}</view>
<view class="falls-card-company">
青岛
<dict-Label dictType="area" :value="job.jobLocationAreaCode"></dict-Label>
</view>
<view class="falls-card-pepleNumber">
<view>{{ job.postingDate || '发布日期' }}</view>
<view>{{ vacanciesTo(job.vacancies) }}</view>
</view>
<!-- <view class="falls-card-matchingrate">
<view class=""><matchingDegree :job="job"></matchingDegree></view>
<uni-icons type="star" size="30"></uni-icons>
</view> -->
</view>
</view>
<view class="item" :class="{ isBut: job.isBut }" v-else>
<view class="recommend-card">
<view class="card-content">
<view class="recommend-card-title">在找{{ job.jobCategory }}工作吗</view>
<view class="recommend-card-tip">{{ job.tip }}</view>
<view class="recommend-card-line"></view>
<view class="recommend-card-controll">
<view class="controll-no" @click="clearfindJob(job)">不是</view>
<view class="controll-yes" @click="findJob(job)">是的</view>
</view>
</view>
</view>
</view>
</template>
</custom-waterfalls-flow>
<loadmore ref="loadmoreRef"></loadmore>
</view>
<empty v-else pdTop="200"></empty>
</scroll-view>
<view class="tab-op-right">
<uni-icons type="plusempty" style="margin-right: 10rpx" size="20" @click="editojobs"></uni-icons>
<view class="tab-recommend">
<latestHotestStatus @confirm="handelHostestSearch"></latestHotestStatus>
</view>
<view class="tab-filter" @click="showFilter = true">
<view class="tab-number" v-show="pageState.total">{{ formatTotal(pageState.total) }}</view>
<image class="image" src="/static/icon/filter.png"></image>
</view>
</view>
</view>
<!-- waterfalls -->
<scroll-view :scroll-y="true" class="falls-scroll" @scrolltolower="scrollBottom">
<view class="falls">
<custom-waterfalls-flow ref="waterfallsFlowRef" :value="list">
<template v-slot:default="job">
<view class="item" v-if="!job.recommend">
<view class="falls-card" @click="nextDetail(job)">
<view class="falls-card-title">{{ job.jobTitle }}</view>
<view class="falls-card-pay">
<view class="pay-text">
<Salary-Expectation
:max-salary="job.maxSalary"
:min-salary="job.minSalary"
:is-month="true"
></Salary-Expectation>
</view>
<image v-if="job.isHot" class="flame" src="/static/icon/flame.png"></image>
</view>
<view class="falls-card-education" v-if="job.education">
<dict-Label dictType="education" :value="job.education"></dict-Label>
</view>
<view class="falls-card-experience" v-if="job.experience">
<dict-Label dictType="experience" :value="job.experience"></dict-Label>
</view>
<view class="falls-card-company">{{ job.companyName }}</view>
<view class="falls-card-company">
青岛
<dict-Label dictType="area" :value="job.jobLocationAreaCode"></dict-Label>
</view>
<view class="falls-card-pepleNumber">
<view>{{ job.postingDate || '发布日期' }}</view>
<view>{{ vacanciesTo(job.vacancies) }}</view>
</view>
<view class="falls-card-matchingrate">
<view class=""><matchingDegree :job="job"></matchingDegree></view>
<uni-icons type="star" size="30"></uni-icons>
<!-- <uni-icons type="star-filled" color="#FFCB47" size="30"></uni-icons> -->
</view>
</view>
</view>
<view class="item" v-else>
<view class="recommend-card">
<view class="card-content">
<view class="recommend-card-title">在找{{ job.jobCategory }}工作吗</view>
<view class="recommend-card-tip">{{ job.tip }}</view>
<view class="recommend-card-controll">
<view class="controll-yes" @click="findJob(job)">是的</view>
<view class="controll-no">不是</view>
</view>
</view>
</view>
</view>
</template>
</custom-waterfalls-flow>
<loadmore ref="loadmoreRef"></loadmore>
</view>
</scroll-view>
<screeningJobRequirementsVue
v-model:show="showFilter"
@confirm="handleFilterConfirm"
></screeningJobRequirementsVue>
<!-- 岗位推荐组件 -->
<modify-expected-position-vue v-model:show="showModel" :jobList="jobList" />
<!-- 自定义tabbar -->
<!-- <tabbar-custom :currentpage="0"></tabbar-custom> -->
<!-- 筛选 -->
<select-filter ref="selectFilterModel"></select-filter>
</view>
</template>
<script setup>
import { reactive, inject, watch, ref, onMounted, getCurrentInstance } from 'vue';
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
import img from '@/static/icon/filter.png';
import dictLabel from '@/components/dict-Label/dict-Label.vue';
const { $api, navTo, vacanciesTo, formatTotal } = inject('globalFunction');
@@ -136,16 +140,21 @@ import { storeToRefs } from 'pinia';
import useUserStore from '@/stores/useUserStore';
const { userInfo } = storeToRefs(useUserStore());
import useDictStore from '@/stores/useDictStore';
const { getTransformChildren } = useDictStore();
import screeningJobRequirementsVue from '@/components/screening-job-requirements/screening-job-requirements.vue';
import modifyExpectedPositionVue from '@/components/modifyExpectedPosition/modifyExpectedPosition.vue';
const { getTransformChildren, oneDictData } = useDictStore();
import useLocationStore from '@/stores/useLocationStore';
import selectFilter from '@/components/selectFilter/selectFilter.vue';
import { useRecommedIndexedDBStore, jobRecommender } from '@/stores/useRecommedIndexedDBStore.js';
import { useScrollDirection } from '@/hook/useScrollDirection';
import { useColumnCount } from '@/hook/useColumnCount';
const { isScrollingDown, handleScroll } = useScrollDirection();
const recommedIndexDb = useRecommedIndexedDBStore();
const waterfallsFlowRef = ref(null);
const loadmoreRef = ref(null);
const conditionSearch = ref({});
const waterfallcolumn = ref(2);
const state = reactive({
tabIndex: 'all',
search: '',
});
const list = ref([]);
const pageState = reactive({
@@ -159,7 +168,13 @@ const pageState = reactive({
});
const inputText = ref('');
const showFilter = ref(false);
const selectFilterModel = ref(null);
const showModel = ref(false);
const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
]);
const jobList = ref([
{ name: '销售顾问', highlight: true },
{ name: '销售管理', highlight: true },
@@ -172,41 +187,18 @@ const jobList = ref([
{ name: '创意总监', highlight: false },
]);
onLoad(() => {
const { columnCount } = useColumnCount(() => {
pageState.pageSize = 10 * (columnCount.value - 1);
getJobRecommend('refresh');
nextTick(() => {
waterfallsFlowRef.value?.refresh?.();
useLocationStore().getLocation();
});
});
function nextDetail(job) {
// 记录岗位类型,用作数据分析
if (job.jobCategory) {
const recordData = recommedIndexDb.JobParameter(job);
recommedIndexDb.addRecord(recordData);
}
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`);
}
function handleModelConfirm(val) {
console.log(val);
}
function findJob(item) {
console.log(item);
}
function handleFilterConfirm(val) {
pageState.search = {
order: pageState.search.order,
};
for (const [key, value] of Object.entries(val)) {
pageState.search[key] = value.join(',');
}
getJobList('refresh');
}
function handelHostestSearch(val) {
pageState.search.order = val.value;
getJobList('refresh');
}
// onLoad(() => {
// getJobRecommend('refresh');
// });
function scrollBottom() {
loadmoreRef.value.change('loading');
@@ -217,16 +209,97 @@ function scrollBottom() {
}
}
function editojobs() {
console.log('jobs');
showModel.value = true;
function findJob(job) {
if (job.isBut) {
$api.msg('已确认');
} else {
list.value = list.value.map((item) => {
if (item.recommend && item.jobCategory === job.jobCategory) {
return {
...item,
isBut: true,
};
}
return item;
});
const jobstr = job.jobCategory;
const jobsObj = {
地区: 'area',
岗位: 'jobTitle',
经验: 'experience',
};
const [name, value] = jobstr.split(':');
const nameAttr = jobsObj[name];
if (name === '岗位') {
conditionSearch.value[nameAttr] = value;
} else {
const valueAttr = oneDictData(nameAttr).filter((item) => item.label === value);
if (valueAttr.length) {
const val = valueAttr[0].value;
conditionSearch.value[nameAttr] = val;
}
}
}
}
function clearfindJob(job) {
if (job.isBut) {
$api.msg('已确认');
} else {
list.value = list.value.map((item) => {
if (item.recommend && item.jobCategory === job.jobCategory) {
return {
...item,
isBut: true,
};
}
return item;
});
recommedIndexDb.deleteRecords(job);
}
}
function nextDetail(job) {
// 记录岗位类型,用作数据分析
if (job.jobCategory) {
const recordData = recommedIndexDb.JobParameter(job);
recommedIndexDb.addRecord(recordData);
}
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`);
}
function openFilter() {
showFilter.value = true;
selectFilterModel.value?.open({
title: '筛选',
maskClick: true,
success: (values) => {
pageState.search = {
...pageState.search,
};
for (const [key, value] of Object.entries(values)) {
pageState.search[key] = value.join(',');
}
showFilter.value = false;
getJobList('refresh');
},
cancel: () => {
showFilter.value = false;
},
});
}
function handleFilterConfirm(e) {
console.log(e);
}
function choosePosition(index) {
state.tabIndex = index;
list.value = [];
if (index === 'all') {
pageState.search = {};
pageState.search = {
order: pageState.search.order,
};
inputText.value = '';
getJobRecommend('refresh');
} else {
@@ -237,18 +310,15 @@ function choosePosition(index) {
}
}
function searchJobTitle() {
state.tabIndex = '-1';
pageState.search = {
jobTitle: inputText.value,
};
getJobList('refresh');
function handelHostestSearch(val) {
pageState.search.order = val.value;
if (state.tabIndex === 'all') {
getJobRecommend('refresh');
} else {
getJobList('refresh');
}
}
function changeRecommend() {}
function changeLatestHotestStatus(e) {}
function getJobRecommend(type = 'add') {
if (type === 'refresh') {
list.value = [];
@@ -258,6 +328,7 @@ function getJobRecommend(type = 'add') {
pageSize: pageState.pageSize,
sessionId: useUserStore().seesionId,
...pageState.search,
...conditionSearch.value,
};
let comd = { recommend: true, jobCategory: '', tip: '确认你的兴趣,为您推荐更多合适的岗位' };
$api.createRequest('/app/job/recommend', params).then((resData) => {
@@ -277,6 +348,7 @@ function getJobRecommend(type = 'add') {
jobRecommender.updateConditions(conditionCounts);
const question = jobRecommender.getNextQuestion();
if (question) {
comd.jobCategory = question;
data.unshift(comd);
@@ -347,6 +419,228 @@ function dataToImg(data) {
</script>
<style lang="stylus" scoped>
.app-container
width: 100%;
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
background: url('@/static/icon/background2.png') 0 0 no-repeat;
background-size: 100% 728rpx;
background-color: #FFFFFF;
display: flex;
flex-direction: column
.hidden-animation
max-height: 1000px;
transition: all 0.3s ease;
overflow: hidden;
.hidden-height
max-height: 0;
padding-top: 0;
padding-bottom: 0;
.container-search
padding: 16rpx 24rpx
display: flex
justify-content: space-between
.search-input
display: flex
align-items: center;
width: 100%
height: 80rpx;
line-height: 80rpx
margin-right: 24rpx
background: #FFFFFF;
border-radius: 75rpx 75rpx 75rpx 75rpx;
.iconsearch
padding-left: 36rpx
.inpute
margin-left: 20rpx
font-weight: 400;
font-size: 28rpx;
color: #B5B5B5;
width: 100%
.chart
width: 170rpx;
background: radial-gradient( 0% 56% at 87% 61%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.47) 100%);
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(210,210,210,0.14);
border-radius: 80rpx 80rpx 80rpx 80rpx;
border: 2rpx solid #FFFFFF;
text-align: center
font-weight: 500;
font-size: 28rpx;
height: 36rpx;
color: #000000;
padding: 20rpx 30rpx
.cards
padding: 10rpx 28rpx
display: grid
grid-gap: 38rpx;
grid-template-columns: 1fr 1fr;
.card
height: calc(158rpx - 40rpx);
padding: 22rpx 26rpx
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(210,210,210,0.14);
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #FFFFFF;
.card-title
font-weight: 600;
font-size: 32rpx;
color: #000000;
.card-text
font-weight: 400;
font-size: 24rpx;
color: #9E9E9E;
margin-top: 4rpx
.card:first-child
background: radial-gradient( 0% 56% at 87% 61%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.47) 100%),
url('@/static/icon/fujin.png');
background-size: 100%, 100%
.card:last-child
background: radial-gradient( 0% 56% at 87% 61%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.47) 100%),
url('@/static/icon/jinxuan.png');
background-size: 100%, 100%
background-size: cover;
background-position: center;
.nav-filter
padding: 16rpx 28rpx 0 28rpx
.filter-top
display: flex
justify-content: space-between;
.tab-scroll
flex: 1;
overflow: hidden;
margin-right: 20rpx
white-space: nowrap;
overflow: hidden;
text-overflow: clip;
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
mask-image: linear-gradient(to right, black 60%, transparent);
.jobs-left
display: flex
flex-wrap: nowrap
.job
font-weight: 400;
font-size: 36rpx;
color: #666D7F;
margin-right: 32rpx;
white-space: nowrap
.active
font-weight: 500;
font-size: 36rpx;
color: #000000;
.jobs-add
display: flex
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 32rpx;
color: #666D7F;
line-height: 38rpx;
.filter-bottom
display: flex
justify-content: space-between
padding: 24rpx 0
.btm-left
display: flex
.filterbtm
font-weight: 400;
font-size: 32rpx;
color: #666D7F;
margin-right: 24rpx
padding: 0rpx 16rpx
.active
font-weight: 500;
font-size: 32rpx;
color: #256BFA;
.btm-right
font-weight: 400;
font-size: 32rpx;
color: #6C7282;
.right-sx
width: 26rpx;
height: 26rpx;
.active
transform: rotate(180deg)
.table-list
background: #F4F4F4
flex: 1
overflow: hidden
.falls-scroll
width: 100%
height: 100%
.falls
padding: 28rpx 28rpx;
.item
position: relative;
// background: linear-gradient( 180deg, rgba(19, 197, 124, 0.4) 0%, rgba(255, 255, 255, 0) 30%), rgba(255, 255, 255, 0);
.falls-card
padding: 30rpx;
.falls-card-title
color: #606060;
line-height: 49rpx;
text-align: left;
word-break:break-all
font-weight: 500;
font-size: 32rpx;
color: #333333;
.falls-card-pay
// height: 50rpx;
word-break:break-all
color: #002979;
text-align: left;
display: flex;
align-items: end;
position: relative
.pay-text
color: #4C6EFB;
padding-right: 10rpx
font-weight: 500;
font-size: 28rpx;
color: #4C6EFB;
line-height: 45rpx;
text-align: left;
.flame
position: absolute
bottom: 0
right: -10rpx
transform: translate(0, -30%)
width: 24rpx
height: 31rpx
.falls-card-education,.falls-card-experience
width: fit-content;
height: 30rpx;
background: #F4F4F4;
border-radius: 4rpx;
padding: 6rpx 20rpx;
line-height: 30rpx;
font-weight: 400;
font-size: 24rpx;
color: #6C7282;
text-align: center;
margin-top: 14rpx;
white-space: nowrap
.falls-card-company,.falls-card-pepleNumber
margin-top: 20rpx;
font-size: 24rpx;
color: #606060;
line-height: 25rpx;
text-align: left;
.falls-card-pepleNumber
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 38rpx;
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
.falls-card-matchingrate
margin-top: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 21rpx;
color: #4778EC;
text-align: left;
// 推荐卡片
.recommend-card::before
position: absolute
@@ -355,223 +649,81 @@ function dataToImg(data) {
content: ''
height: 60rpx
width: 100%
background: linear-gradient(to bottom, #FFAD47, #FFFFFF)
.recommend-card::after
position: absolute
right: -20rpx
top: 40rpx
content: ''
height: 100rpx
width: 200rpx
background: url('@/static/icon/Group1.png') center center no-repeat
background-size: 100rpx 140rpx
height: 8rpx;
background: linear-gradient( to left, #9E74FD 0%, #256BFA 100%);
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(0,54,170,0.15);
.recommend-card
padding: 20rpx
padding: 24rpx
.card-content
position: relative;
z-index: 2;
.recommend-card-title
color: #333333
font-size: 32rpx
font-weight: 500;
font-size: 32rpx;
color: #333333;
.recommend-card-tip
font-size: 24rpx;
color: #606060;
margin-top: 10rpx
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
margin-top: 20rpx
.recommend-card-line
width: calc(100%);
height: 0rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 2rpx dashed rgba(0,0,0,0.14);
margin-top: 50rpx
position: relative
.recommend-card-line::before
position: absolute
content: ''
left: 0
top: 0
transform: translate(-50% - 90rpx, -50%)
width: 28rpx;
height: 28rpx;
background: #F4F4F4;
border-radius: 50%;
.recommend-card-line::after
position: absolute
content: ''
right: 0
top: 0
transform: translate(50% + 90rpx, -50%)
width: 28rpx;
height: 28rpx;
background: #F4F4F4;
border-radius: 50%;
.recommend-card-controll
display: flex
align-items: center
justify-content: space-around
justify-content: space-between
margin-top: 40rpx
padding: 0 6rpx;
.controll-yes
border-radius: 39rpx
padding: 0rpx 30rpx
background: rgba(255, 173, 71, 1)
border: 2rpx solid rgba(255, 173, 71, 1)
color: #FFFFFF
width: 124rpx;
height: 70rpx;
background: rgba(37,107,250,0.1);
border-radius: 12rpx 12rpx 12rpx 12rpx;
text-align: center;
line-height:70rpx
color: #256BFA
.controll-no
border-radius: 39rpx
border: 2rpx solid rgba(255, 173, 71, 1)
padding: 0rpx 30rpx
color: rgba(255, 173, 71, 1)
width: 124rpx;
height: 66rpx;
line-height: 66rpx
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #DEDEDE;
font-weight: 400;
font-size: 28rpx;
color: #333333;
text-align: center;
.controll-yes:active, .controll-no:active
width: 120rpx;
height: 66rpx;
line-height: 66rpx
background: #e8e8e8
border: 2rpx solid #e8e8e8
.app-container
width: 100%;
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
// background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, #fff 100%);
display: flex;
flex-direction: column;
position: fixed
.index-AI
height: 42rpx;
font-family: Inter, Inter;
font-weight: 400;
font-size: 35rpx;
color: #FFFFFF;
line-height: 41rpx;
padding: 85rpx 0 0 30rpx;
.index-option
margin-top: 27rpx;
display: flex;
.option-left
display: flex;
width: 427rpx;
height: 56rpx;
background: #4778EC;
border-radius: 0rpx 17rpx 17rpx 0rpx;
align-items: center;
.left-item
width: 117rpx;
text-align: center;
line-height: 47rpx;
height: 47rpx;
margin-right: 27rpx;
color: #FFFFFF;
.left-item:active
color: blue;
.option-right
flex: 1;
position: relative;
display: flex;
justify-content: center;
align-items: center;
padding: 0 49rpx;
.right-input
width: 100%;
height: 45rpx;
background: rgba(255,255,255,0.5);
border-radius: 17rpx 17rpx 17rpx 17rpx;
border: 3rpx solid #FFFFFF;
padding: 0 50rpx 0 10rpx;
color: #FFFFFF;
.iconsearch
position: absolute;
right: 60rpx;
.tab-options
margin-top: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
height: 77rpx;
background: #FFFFFF;
border-radius: 17rpx 17rpx 0rpx 0rpx;
padding: 0 24rpx;
overflow: hidden;
.tab-scroll
height: 77rpx;
line-height: 77rpx;
flex: 1;
overflow: hidden;
padding-right: 10rpx;
.tab-op-left
display: flex;
align-items: center;
flex-wrap: nowrap;
.tab-list
text-align: center;
white-space: nowrap;
margin-right: 30rpx;
font-size: 28rpx;
color: #606060;
.tab-op-right
display: flex;
align-items: center;
.tab-recommend
white-space: nowrap;
width: fit-content;
padding: 0 10rpx;
height: 42rpx;
background: #4778EC;
border-radius: 17rpx 17rpx 0rpx 17rpx;
text-align: center;
color: #FFFFFF;
font-size: 21rpx;
line-height: 42rpx;
margin-right: 14rpx;
.tab-number
font-size: 21rpx;
color: #606060;
line-height: 25rpx;
text-align: center;
.tab-filter
display: flex;
.image
width: 28rpx;
height: 27rpx;
.falls-scroll
flex: 1;
overflow: hidden;
background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, #fff 100%)
.falls
padding: 20rpx 40rpx;
.item
position: relative;
// background: linear-gradient( 180deg, rgba(19, 197, 124, 0.4) 0%, rgba(255, 255, 255, 0) 30%), rgba(255, 255, 255, 0);
.falls-card
padding: 30rpx;
.falls-card-title
// height: 49rpx;
font-size: 42rpx;
color: #606060;
line-height: 49rpx;
text-align: left;
word-break:break-all
.falls-card-pay
// height: 50rpx;
word-break:break-all
font-size: 34rpx;
color: #002979;
line-height: 50rpx;
text-align: left;
display: flex;
align-items: end;
position: relative
.pay-text
color: #002979;
padding-right: 10rpx
.flame
position: absolute
bottom: 0
right: -10rpx
transform: translate(0, -30%)
width: 24rpx
height: 31rpx
.falls-card-education,.falls-card-experience
width: fit-content;
height: 30rpx;
background: #13C57C;
border-radius: 17rpx 17rpx 17rpx 17rpx;
padding: 0 10rpx;
line-height: 30rpx;
font-weight: 400;
font-size: 21rpx;
color: #FFFFFF;
text-align: center;
margin-top: 14rpx;
.falls-card-company,.falls-card-pepleNumber
margin-top: 14rpx;
font-size: 21rpx;
color: #606060;
line-height: 25rpx;
text-align: left;
.falls-card-pepleNumber
display: flex;
justify-content: space-between;
align-items: center;
.falls-card-matchingrate
margin-top: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 21rpx;
color: #4778EC;
text-align: left;
.logo
width: 200rpx;
height: 200rpx;
.tabchecked
color: #4778EC !important
.isBut{
filter: grayscale(100%);
}
</style>

View File

@@ -21,6 +21,9 @@
<swiper-item @touchmove.stop="false">
<slot name="tab3"></slot>
</swiper-item>
<swiper-item @touchmove.stop="false">
<slot name="tab3"></slot>
</swiper-item>
<swiper-item @touchmove.stop="false">
<slot name="tab4"></slot>
</swiper-item>
@@ -52,8 +55,9 @@ export default {
<style lang="stylus" scoped>
.tab-container
width: 100%
// flex: 1
height: 100%
width: 100%
display: flex
align-items: center
justify-content: center

View File

@@ -1,239 +1,240 @@
<template>
<view class="container">
<view :style="{ height: statusBarHeight + 'px' }"></view>
<AppLayout title="AI+就业服务程序">
<tabcontrolVue :current="tabCurrent">
<!-- tab0 -->
<template v-slot:tab0>
<view class="login-content">
<image class="logo" src="../../static/logo.png"></image>
<view class="logo-title">就业</view>
</view>
<view class="btns">
<button class="wxlogin" @click="loginTest">登录</button>
<!-- <button open-type="getUserInfo" @getuserinfo="getuserinfo" class="wxlogin">登录</button> -->
<button class="wxlogin" @click="loginTest">内测登录</button>
<view class="wxaddress">青岛市公共就业和人才服务中心</view>
</view>
</template>
<!-- tab1 -->
<template v-slot:tab1>
<view class="tabtwo">
<view class="tabtwo-top">
<view class="color_FFFFFF fs_30">选择您的性别1/6</view>
<view class="color_D9D9D9">个人信息仅用于推送优质内容</view>
</view>
<view class="fl_box fl_justmiddle fl_1 fl_alstart">
<view class="tabtwo-sex" @click="changeSex(1)">
<image class="sex-img" src="../../static/icon/woman.png"></image>
<view class="mar_top5"></view>
<view v-if="fromValue.sex === 1" class="dot doted"></view>
<view v-else class="dot"></view>
<view class="content-one">
<view>
<view class="content-title">
<view class="title-lf">
<view class="lf-h1">请您完善求职名片</view>
<view class="lf-text">个人信息仅用于推送优质内容</view>
</view>
<view class="title-ri">
<text style="color: #256bfa">1</text>
<text>/2</text>
</view>
</view>
<view class="tabtwo-sex" @click="changeSex(0)">
<image class="sex-img" src="../../static/icon/man.png"></image>
<view class="mar_top5"></view>
<view v-if="fromValue.sex === 0" class="dot doted"></view>
<view v-else class="dot"></view>
<view class="content-input" @click="changeExperience">
<view class="input-titile">工作经验</view>
<input
class="input-con"
v-model="state.experienceText"
disabled
placeholder="请选择您的工作经验"
/>
</view>
<view class="content-sex">
<view class="sex-titile">求职区域</view>
<view class="sext-ri">
<view
class="sext-box"
:class="{ 'sext-boxactive': fromValue.sex === 0 }"
@click="changeSex(0)"
>
</view>
<view
class="sext-box"
:class="{ 'sext-boxactive': fromValue.sex === 1 }"
@click="changeSex(1)"
>
</view>
</view>
</view>
<view class="content-input" @click="changeEducation">
<view class="input-titile">学历</view>
<input class="input-con" v-model="state.educationText" disabled placeholder="本科" />
</view>
</view>
<view class="nextstep" @tap="nextStep">下一步</view>
<view class="next-btn" @tap="nextStep">下一步</view>
</view>
</template>
<!-- tab2 -->
<template v-slot:tab2>
<view class="tabtwo">
<view class="tabtwo-top">
<view class="color_FFFFFF fs_30">选择您的年龄断段2/6</view>
<view class="color_D9D9D9">个人信息仅用于推送优质内容</view>
</view>
<view class="fl_box fl_deri fl_almiddle">
<!-- <view class="agebtn agebtned">30岁以下</view> -->
<view
class="agebtn"
:class="{ agebtned: item.value === fromValue.age }"
v-for="item in state.ageList"
:key="item.value"
@click="changeAge(item.value)"
>
{{ item.label }}
<view class="content-one">
<view>
<view class="content-title">
<view class="title-lf">
<view class="lf-h1">请您完善求职名片</view>
<view class="lf-text">个人信息仅用于推送优质内容</view>
</view>
<view class="title-ri">
<text style="color: #256bfa">2</text>
<text>/2</text>
</view>
</view>
<view class="content-input" @click="changeArea">
<view class="input-titile">求职区域</view>
<input
class="input-con"
v-model="state.areaText"
disabled
placeholder="请选择您的求职区域"
/>
</view>
<view class="content-input" @click="changeJobs">
<view class="input-titile">求职岗位</view>
<input
class="input-con"
disabled
v-if="!state.jobsText.length"
placeholder="请选择您的求职岗位"
/>
<view class="input-nx" @click="changeJobs" v-else>
<view class="nx-item" v-for="item in state.jobsText">{{ item }}</view>
</view>
</view>
<view class="content-input" @click="changeSalay">
<view class="input-titile">期望薪资</view>
<input
class="input-con"
v-model="state.salayText"
disabled
placeholder="请选择您的期望薪资"
/>
</view>
</view>
<view class="fl_box fl_justmiddle"></view>
<view class="nextstep" @tap="nextStep">下一步</view>
</view>
</template>
<!-- tab3 -->
<template v-slot:tab3>
<view class="tabtwo">
<view class="tabtwo-top">
<view class="color_FFFFFF fs_30">选择您的学历3/6</view>
<view class="color_D9D9D9">个人信息仅用于推送优质内容</view>
</view>
<view class="eduction-content">
<view
class="eductionbtn"
:class="{ eductionbtned: item.value === fromValue.education }"
v-for="item in oneDictData('education')"
@click="changeEducation(item.value)"
:key="item.value"
>
{{ item.label }}
</view>
</view>
<view class="nextstep" @tap="nextStep">下一步</view>
</view>
</template>
<!-- tab4 -->
<template v-slot:tab4>
<view class="tabtwo">
<view class="tabtwo-top">
<view class="color_FFFFFF fs_30">您期望的薪资范围4/6</view>
<view class="color_D9D9D9">个人信息仅用于推送优质内容</view>
</view>
<view class="salary">
<picker-view
indicator-style="height: 140rpx;"
:value="state.salayData"
@change="bindChange"
class="picker-view"
>
<picker-view-column>
<view class="item" v-for="(item, index) in state.lfsalay" :key="index">
<view class="item-child" :class="{ 'item-childed': state.salayData[0] === index }">
{{ item }}k
</view>
</view>
</picker-view-column>
<view class="item-center"></view>
<picker-view-column>
<view class="item" v-for="(item, index) in state.risalay" :key="index">
<view class="item-child" :class="{ 'item-childed': state.salayData[2] === index }">
{{ item }}k
</view>
</view>
</picker-view-column>
</picker-view>
</view>
<view class="fl_box fl_justmiddle"></view>
<view class="nextstep" @tap="nextStep">下一步</view>
</view>
</template>
<!-- tab5 -->
<template v-slot:tab5>
<view class="tabtwo">
<view class="tabtwo-top">
<view class="color_FFFFFF fs_30">您期望的求职区域5/6</view>
<view class="color_D9D9D9">个人信息仅用于推送优质内容</view>
</view>
<view class="eduction-content">
<!-- <view class="eductionbtn eductionbtned">市南区</view> -->
<view
class="eductionbtn"
:class="{ eductionbtned: item.value === fromValue.area }"
v-for="item in oneDictData('area')"
:key="item.value"
@click="changeArea(item.value)"
>
{{ item.label }}
</view>
<!-- <view class="eductionbtn">不限区域</view> -->
</view>
<view class="nextstep" @tap="nextStep">下一步</view>
</view>
</template>
<!-- tab6 -->
<template v-slot:tab6>
<view class="tabtwo sex-two">
<view class="tabtwo-top mar_top25 mar_le25">
<view class="color_FFFFFF fs_30">您的期望岗位6/6</view>
<view class="color_D9D9D9">个人信息仅用于推送优质内容</view>
</view>
<view class="sex-content fl_1">
<expected-station @onChange="changeJobTitleId" :station="state.station"></expected-station>
</view>
<button class="nextstep confirmStep" @click="complete">完成</button>
<!-- <navigator url="/pages/index/index" open-type="reLaunch" hover-class="other-navigator-hover">
<button class="nextstep confirmStep" @click="complete">完成</button>
</navigator> -->
<view class="next-btn" @tap="complete">开启求职之旅</view>
</view>
</template>
</tabcontrolVue>
</view>
<SelectJobs ref="selectJobsModel"></SelectJobs>
</AppLayout>
</template>
<script setup>
import tabcontrolVue from './components/tabcontrol.vue';
import { reactive, inject, watch, ref } from 'vue';
import SelectJobs from '@/components/selectJobs/selectJobs.vue';
import { reactive, inject, watch, ref, onMounted } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import useUserStore from '@/stores/useUserStore';
import useDictStore from '@/stores/useDictStore';
const { statusBarHeight } = inject('deviceInfo');
const { $api, navTo } = inject('globalFunction');
const { loginSetToken, getUserResume } = useUserStore();
const { getDictSelectOption, oneDictData } = useDictStore();
const openSelectPopup = inject('openSelectPopup');
// status
const selectJobsModel = ref();
const tabCurrent = ref(0);
const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100];
const state = reactive({
station: [],
stationCateLog: 1,
ageList: [],
lfsalay: [2, 5, 10, 15, 20, 25, 30, 50],
risalay: JSON.parse(JSON.stringify(salay)),
salayData: [0, 0, 0],
areaText: '',
educationText: '',
experienceText: '',
salayText: '',
jobsText: [],
});
const fromValue = reactive({
sex: 1,
age: '0',
education: '4',
salaryMin: 2000,
salaryMax: 2000,
area: 0,
jobTitleId: '',
experience: '1',
});
onLoad((parmas) => {
getDictSelectOption('age').then((data) => {
state.ageList = data;
});
getTreeselect();
});
// 选择薪资
function bindChange(val) {
state.salayData = val.detail.value;
const copyri = JSON.parse(JSON.stringify(salay));
const [lf, _, ri] = val.detail.value;
state.risalay = copyri.slice(lf, copyri.length);
fromValue.salaryMin = copyri[lf] * 1000;
fromValue.salaryMax = state.risalay[ri] * 1000;
}
onMounted(() => {});
function changeSex(sex) {
fromValue.sex = sex;
}
function changeAge(age) {
fromValue.age = age;
function changeExperience() {
openSelectPopup({
title: '工作经验',
maskClick: true,
data: [oneDictData('experience')],
success: (_, [value]) => {
fromValue.experience = value.value;
state.experienceText = value.label;
},
change(_, [value]) {
// this.setColunm(1, [123, 123]);
console.log(this);
},
});
}
function changeEducation(education) {
fromValue.education = education;
function changeEducation() {
openSelectPopup({
title: '学历',
maskClick: true,
data: [oneDictData('education')],
success: (_, [value]) => {
fromValue.area = value.value;
state.educationText = value.label;
},
});
}
function changeArea(area) {
fromValue.area = area;
function changeArea() {
openSelectPopup({
title: '区域',
maskClick: true,
data: [oneDictData('area')],
success: (_, [value]) => {
fromValue.area = value.value;
state.areaText = '青岛市-' + value.label;
},
});
}
function changeJobTitleId(jobTitleId) {
fromValue.jobTitleId = jobTitleId;
function changeSalay() {
let leftIndex = 0;
openSelectPopup({
title: '薪资',
maskClick: true,
data: [state.lfsalay, state.risalay],
unit: 'k',
success: (_, [min, max]) => {
fromValue.salaryMin = min.value * 1000;
fromValue.salaryMax = max.value * 1000;
state.salayText = `${fromValue.salaryMin}-${fromValue.salaryMax}`;
},
change(e) {
const salayData = e.detail.value;
if (leftIndex !== salayData[0]) {
const copyri = JSON.parse(JSON.stringify(salay));
const [lf, ri] = e.detail.value;
const risalay = copyri.slice(lf, copyri.length);
this.setColunm(1, risalay);
leftIndex = salayData[0];
}
},
});
}
// 行为
// function changeStationLog(item) {
// state.stationCateLog = item.value;
// }
function changeJobs() {
selectJobsModel.value?.open({
title: '添加岗位',
success: (ids, labels) => {
fromValue.jobTitleId = ids;
state.jobsText = labels.split(',');
},
});
}
function nextStep() {
tabCurrent.value += 1;
}
// function handleScroll(event) {
// console.log('滚动条滚动', event.detail.scrollTop);
// console.log(Math.round(event.detail.scrollTop / 75));
// // this.activeIndex = Math.round(event.detail.scrollTop / 75);
// }
// 获取职位
function getTreeselect() {
@@ -276,12 +277,55 @@ function complete() {
</script>
<style lang="stylus" scoped>
.input-nx
position: relative
border-bottom: 2rpx solid #EBEBEB
padding-bottom: 30rpx
display: flex
flex-wrap: wrap
.nx-item
padding: 20rpx 28rpx
width: fit-content
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #E8EAEE;
margin-right: 24rpx
margin-top: 24rpx
.nx-item::before
position: absolute;
right: 20rpx;
top: 60rpx;
content: '';
width: 4rpx;
height: 18rpx;
border-radius: 2rpx
background: #697279;
transform: translate(0, -50%) rotate(-45deg) ;
.nx-item::after
position: absolute;
right: 20rpx;
top: 61rpx;
content: '';
width: 4rpx;
height: 18rpx;
border-radius: 2rpx
background: #697279;
transform: rotate(45deg)
.container
background: linear-gradient(#4778EC, #002979);
// background: linear-gradient(#4778EC, #002979);
width: 100%;
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
position: fixed;
background: url('@/static/icon/background2.png') 0 0 no-repeat;
background-size: 100% 728rpx;
display: flex;
flex-direction: column
.container-hader
height: 88rpx;
text-align: center;
line-height: 88rpx;
color: #000000;
font-weight: bold
font-size: 32rpx
.login-content
position: absolute;
@@ -296,7 +340,7 @@ function complete() {
height: 182rpx;
.logo-title
font-size: 88rpx;
color: #FFFFFF;
color: #22c984;
width: 180rpx;
.btns
position: absolute;
@@ -316,179 +360,97 @@ function complete() {
color: #BBBBBB;
margin-top: 70rpx;
text-align: center;
// 2
.tabtwo
padding: 40rpx;
.content-one
padding: 60rpx 28rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
height: calc(100% - 40rpx);
.tabtwo-top
margin: 222rpx 0 0 0;
width: 100%;
.tabtwo-sex
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #FFFFFF;
font-size: 40rpx;
margin: 200rpx 60rpx 0 60rpx;
.sex-img
width: 184rpx;
height: 184rpx;
.dot
width: 68rpx;
height: 68rpx;
border-radius: 50%;
background: #d1d1d6;
position: relative;
.dot:before
content: '';
width: 44rpx;
height: 44rpx;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
background: #1e4baa;
.doted
background: #13C57C;
.doted:after{
content: '';
width: 34rpx;
height: 34rpx;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 50%
background: #13C57C;
}
.agebtn
width: 630rpx;
height: 108rpx;
border-radius: 20rpx;
background: #d9d9d9;
text-align: center;
line-height: 108rpx;
font-size: 40rpx;
margin-top: 50rpx;
color: #606060;
.agebtned
background: #13C57C;
color: #FFFFFF;
.nextstep
width: 630rpx;
height: 98rpx;
border-radius: 20rpx;
background: #13C57C;
text-align: center;
line-height: 98rpx;
font-size: 36rpx;
color: #FFFFFF;
margin-bottom: 150rpx;
.confirmStep
margin-bottom: 50rpx;
.eduction-content
width: fit-content;
display: grid;
grid-template-columns: 300rpx 300rpx;
grid-gap: 20rpx;
margin-top: 50rpx;
.eductionbtn
width: 300rpx;
height: 108rpx;
border-radius: 20rpx;
background: #d9d9d9;
text-align: center;
line-height: 108rpx;
font-size: 36rpx;
color: #606060;
.eductionbtned
background: #13C57C;
color: #FFFFFF;
.salary
width: fit-content;
display: grid;
grid-template-columns: 640rpx;
grid-gap: 20rpx;
margin-top: 50rpx;
.picker-view {
justify-content: space-between
height: calc(100% - 120rpx)
.content-title
display: flex
justify-content: space-between;
align-items: center
margin-bottom: 70rpx
.title-lf
font-size: 44rpx;
color: #000000;
font-weight: 600;
.lf-text
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
.title-ri
font-size: 36rpx;
color: #000000;
font-weight: 600;
.content-input
margin-bottom: 52rpx
.input-titile
font-weight: 400;
font-size: 28rpx;
color: #6A6A6A;
.input-con
font-weight: 400;
font-size: 32rpx;
color: #333333;
line-height: 80rpx;
height: 80rpx;
border-bottom: 2rpx solid #EBEBEB
position: relative;
.input-con::before
position: absolute;
right: 20rpx;
top: calc(50% - 2rpx);
content: '';
width: 4rpx;
height: 18rpx;
border-radius: 2rpx
background: #697279;
transform: translate(0, -50%) rotate(-45deg) ;
.input-con::after
position: absolute;
right: 20rpx;
top: 50%;
content: '';
width: 4rpx;
height: 18rpx;
border-radius: 2rpx
background: #697279;
transform: rotate(45deg)
.content-sex
height: 110rpx;
display: flex
justify-content: space-between;
align-items: flex-start;
border-bottom: 2rpx solid #EBEBEB
margin-bottom: 52rpx
.sex-titile
line-height: 80rpx;
.sext-ri
display: flex
align-items: center;
.sext-box
height: 76rpx;
width: 152rpx;
text-align: center;
line-height: 80rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx
border: 2rpx solid #E8EAEE;
margin-left: 28rpx
font-weight: 400;
font-size: 28rpx;
.sext-boxactive
color: #256BFA
background: rgba(37,107,250,0.1);
border: 2rpx solid #256BFA;
.next-btn
width: 100%;
height: 600rpx;
margin-top: 20rpx;
.uni-picker-view-mask{
background: rgba(0,0,0,0);
}
}
.item {
.item-child{
line-height: 90rpx;
font-size: 38rpx;
color: #606060;
text-align: center;
background: #D9D9D9;
border-radius: 20rpx;
margin: 20rpx 10rpx 20rpx 10rpx;
}
.item-childed{
line-height: 105rpx;
margin: 10rpx 5rpx 10rpx 5rpx;
background: #13C57C;
color: #FFFFFF;
}
}
.item-center{
width: 40rpx;
line-height: 600rpx;
width: 51rpx;
height: 47rpx;
font-family: Inter, Inter;
font-weight: 400;
font-size: 28rpx;
height: 90rpx;
background: #256BFA;
border-radius: 12rpx 12rpx 12rpx 12rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
font-style: normal;
text-transform: none;
}
.uni-picker-view-indicator:after{
border: 0
}
.uni-picker-view-indicator:before{
border: 0
}
.center-text
color: #FFFFFF;
text-align: center;
line-height: 400rpx;
.salary-content
width: 300rpx;
height: 380rpx;
.salary-content-item
height: 104rpx;
line-height: 104rpx;
margin: 20rpx 10rpx 20rpx 10rpx;
border-radius: 20rpx;
background: #d9d9d9;
text-align: center;
font-size: 38rpx;
.salary-content-item-selected
margin: 10rpx 5rpx 10rpx 5rpx;
background: #13C57C;
color: #FFFFFF;
.sex-two
padding-left: 0;
padding-right: 0;
background: #4678ec;
.sex-content
border-radius: 20rpx;
width: 100%;
margin-top: 20rpx;
margin-bottom: 40rpx;
display: flex;
overflow: hidden;
height: 100%
line-height: 90rpx
</style>

View File

@@ -1,9 +1,8 @@
<template>
<view class="app-container">
<view class="mine-AI">AI+就业服务程序</view>
<view class="mine-userinfo">
<AppLayout title="我的" back-gorund-color="#F4F4F4">
<view class="mine-userinfo btn-feel" @click="navTo('/packageA/pages/myResume/myResume')">
<view class="userindo-head">
<image class="userindo-head-img" v-if="userInfo.age === '0'" src="/static/icon/boy.png"></image>
<image class="userindo-head-img" v-if="userInfo.sex === '0'" src="/static/icon/boy.png"></image>
<image class="userindo-head-img" v-else src="/static/icon/girl.png"></image>
</view>
<view class="userinfo-ls">
@@ -14,46 +13,90 @@
<view class="userinfo-ls-resume" v-else>简历完成度 {{ Completion }}</view>
</view>
</view>
<view class="mine-tab">
<view class="tab-item" @click="navTo('/packageA/pages/myResume/myResume')">
<image class="item-img" src="/static/icon/resume.png"></image>
<view class="item-text">我的简历</view>
<view class="mini-number">
<view class="numbe-item button-click" @click="navTo('/packageA/pages/Intendedposition/Intendedposition')">
<view class="mini-num">{{ counts.applyCount }}</view>
<view class="mini-text">投递</view>
</view>
<view class="tab-item" @click="navTo('/packageA/pages/collection/collection')">
<image class="item-img" src="/static/icon/collect.png"></image>
<view class="item-text">我的收藏</view>
<view class="numbe-item button-click" @click="navTo('/packageA/pages/collection/collection')">
<view class="mini-num">{{ counts.collectionCount }}</view>
<view class="mini-text">收藏</view>
</view>
<view class="tab-item" @click="navTo('/packageA/pages/browseJob/browseJob')">
<image class="item-img" src="/static/icon/browse.png"></image>
<view class="item-text">我的浏览</view>
<view class="numbe-item button-click" @click="navTo('/packageA/pages/browseJob/browseJob')">
<view class="mini-num">{{ counts.jobReviewCount }}</view>
<view class="mini-text">足迹</view>
</view>
<view class="tab-item" @click="navTo('/packageA/pages/Intendedposition/Intendedposition')">
<image class="item-img" src="/static/icon/quaters.png"></image>
<view class="item-text">意向岗位</view>
<view class="numbe-item button-click" @click="navTo('/packageA/pages/reservation/reservation')">
<view class="mini-num">{{ counts.fairCollecitonCount }}</view>
<view class="mini-text">预约</view>
</view>
</view>
<view class="mine-options">
<view class="mine-options-item">实名认证</view>
<view class="mine-options-item">素质测评</view>
<view class="mine-options-item">AI面试</view>
<!-- <view class="mine-options-item">账号与安全</view> -->
<view class="mine-options-item">通知与提醒</view>
<view class="mine-logout" @click="logOut">退出登录</view>
<view class="mini-cards">
<view class="card-top btn-feel">
<view class="top-title line_1">
<text>{{ userInfo.name || '暂无用户名' }}</text>
&nbsp;|&nbsp;
<dict-Label dictType="education" :value="userInfo.education"></dict-Label>
</view>
<view class="top-subTitle line_1">
<text v-for="(item, index) in userInfo.jobTitle" :key="index">
&nbsp;{{ item }}&nbsp;
<text v-if="userInfo.jobTitle.length - 1 !== index">|</text>
</text>
</view>
<view class="top-btn button-click" @click="navTo('/packageA/pages/personalInfo/personalInfo')">
修改简历
</view>
</view>
<view class="card-main">
<view class="main-title">服务专区</view>
<view class="main-row btn-feel">
<view class="row-left">
<image class="left-img" src="@/static/icon/server1.png"></image>
<text class="left-text">实名认证</text>
</view>
<view class="row-right">已认证</view>
</view>
<view class="main-row btn-feel">
<view class="row-left">
<image class="left-img" src="@/static/icon/server2.png"></image>
<text class="left-text">素质测评</text>
</view>
<view class="row-right">
<uni-icons color="#909090" type="right" size="14"></uni-icons>
</view>
</view>
<view class="main-row btn-feel">
<view class="row-left">
<image class="left-img" src="@/static/icon/server3.png"></image>
<text class="left-text">AI面试</text>
</view>
<view class="row-right">
<uni-icons color="#909090" type="right" size="14"></uni-icons>
</view>
</view>
<view class="main-row btn-feel">
<view class="row-left">
<image class="left-img" src="@/static/icon/server4.png"></image>
<text class="left-text">通知与提醒</text>
</view>
<view class="row-right">已开启</view>
</view>
</view>
<view class="card-back button-click" @click="logOut">退出登录</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog
mode="base"
title="确定退出登录吗?"
type="info"
:duration="2000"
:before-close="true"
@confirm="confirm"
@close="close"
></uni-popup-dialog>
</uni-popup>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog
mode="base"
title="确定退出登录吗?"
type="info"
:duration="2000"
:before-close="true"
@confirm="confirm"
@close="close"
></uni-popup-dialog>
</uni-popup>
<!-- 自定义tabbar -->
<!-- <tabbar-custom :currentpage="4"></tabbar-custom> -->
</view>
</AppLayout>
</template>
<script setup>
@@ -64,10 +107,13 @@ const { $api, navTo } = inject('globalFunction');
import useUserStore from '@/stores/useUserStore';
const popup = ref(null);
const { userInfo, Completion } = storeToRefs(useUserStore());
const counts = ref({});
function logOut() {
popup.value.open();
}
onShow(() => {
getUserstatistics();
});
function close() {
popup.value.close();
@@ -78,120 +124,180 @@ function confirm() {
}
const isAbove90 = (percent) => parseFloat(percent) < 90;
function getUserstatistics() {
$api.createRequest('/app/user/statistics').then((resData) => {
console.log(resData);
counts.value = resData.data;
});
}
</script>
<style lang="stylus" scoped>
.app-container
width: 100%;
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
.card-top {
transition: transform 0.3s ease;
transform-style: preserve-3d;
}
.card-top.tilt {
transform: perspective(600px) rotateY(8deg) rotateX(4deg);
}
.mini-cards{
padding: 28rpx
.card-top{
background-image: url('@/static/icon/backAI2.png'), linear-gradient(to left, #9E74FD 0%, #256BFA 63%, #4180FF 100%);
background-repeat: no-repeat, no-repeat;
background-position: right top, center;
background-size: 396rpx 212rpx, cover;
padding: 36rpx 36rpx 64rpx 36rpx
border-radius: 20rpx 20rpx 0rpx 0rpx;
position: relative
.top-title{
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
width: 452rpx;
}
.top-subTitle{
margin-top: 8rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
width: 400rpx;
}
.top-btn{
width: 164rpx;
height: 64rpx;
background: radial-gradient( 0% 24% at 57% 42%, rgba(255,255,255,0) 0%, rgba(255,255,255,0.27) 100%);
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(210,210,210,0.14);
border-radius: 80rpx 80rpx 80rpx 80rpx;
border: 2rpx solid #D2D2D2;
text-align: center
line-height: 64rpx
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
position: absolute
right: 44rpx
top: 50rpx
}
}
.card-main{
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
position: relative;
top: -28rpx
padding: 26rpx 60rpx 0 32rpx
.main-title{
font-weight: 600;
font-size: 32rpx;
color: #000000;
}
.main-row{
display: flex
align-items: center
justify-content: space-between
.row-left{
display: flex
align-items: center
.left-img{
width: 44rpx;
height: 44rpx;
margin: 32rpx 16rpx 32rpx 10rpx
}
.left-text{
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
.row-right{
color: #6E6E6E;
font-size: 28rpx;
}
}
.main-row:last-child{
margin: 0
}
}
.card-back{
height: 96rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
text-align: center;
line-height: 96rpx
font-size: 28rpx;
color: #256BFA;
}
}
.mini-number{
padding: 24rpx
display: flex
justify-content: space-around
.numbe-item{
display: flex
flex-direction: column
justify-content: center
align-items: center
.mini-num{
font-weight: 500;
font-size: 44rpx;
color: #333333;
}
.mini-text{
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
}
}
}
.mine-userinfo
display: flex;
flex-direction: column;
.mine-AI
height: 42rpx;
font-family: Inter, Inter;
font-weight: 400;
font-size: 35rpx;
color: #FFFFFF;
line-height: 41rpx;
padding: 85rpx 0 0 30rpx;
.mine-userinfo
display: flex;
justify-content: flex-start;
align-items: center;
padding: 64rpx;
.userindo-head
width: 101rpx;
height: 101rpx;
background: #D9D9D9;
border-radius: 50%
overflow: hidden
margin-right: 40rpx;
.userindo-head-img
width: 100%;
height: 100%;
.userinfo-ls
display: flex;
flex-direction: column;
align-items: flex-start;
.userinfo-ls-name
font-size: 42rpx;
color: #FFFFFF;
.userinfo-ls-resume
font-size: 21rpx;
color: #D9D9D9;
.mine-tab
margin: 0 30rpx;
height: calc(155rpx - 30rpx);
background: #FFFFFF;
border-radius: 17rpx 17rpx 17rpx 17rpx;
display: flex;
padding: 15rpx;
.tab-item
display: flex;
flex-direction: column;
width: calc(100% / 4);
align-items: center;
justify-content: center;
position: relative;
.item-img
height: 55rpx;
width: 50rpx;
.item-text
font-size: 21rpx;
color: #000000;
line-height: 25rpx;
text-align: center;
margin-top: 10rpx;
.tab-item::after
position: absolute;
right: 0;
content: '';
width: 0rpx;
height: 96rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
border-right: 2rpx solid #4778EC;
.tab-item:last-child::after
border-right: 0;
.tab-item:nth-child(2)>.item-img
width: 51rpx;
height: 45rpx;
margin-top: 6rpx;
margin-bottom: 4rpx;
.tab-item:nth-child(3)>.item-img
width: 62rpx;
height: 41rpx;
margin-top: 6rpx
margin-bottom: 10rpx;
.tab-item:nth-child(4)>.item-img
width: 45rpx;
height: 47rpx;
margin-bottom: 8rpx;
.mine-options
margin: 43rpx 30rpx;
min-height: 155rpx;
background: #FFFFFF;
border-radius: 17rpx 17rpx 17rpx 17rpx;
display: flex;
padding: 24rpx 45rpx;
justify-content: flex-start;
align-items: center;
padding: 30rpx;
position: relative;
.userindo-head
width: 101rpx;
height: 101rpx;
overflow: hidden
border-radius: 50%
margin-right: 22rpx;
.userindo-head-img
width: 100%;
height: 100%;
.userinfo-ls
display: flex;
flex-direction: column;
min-height: min-content;
.mine-options-item
height: 80rpx;
align-items: flex-start;
.userinfo-ls-name
font-weight: 600;
font-size: 40rpx;
color: #333333;
border-radius: 50%
.userinfo-ls-resume
font-weight: 400;
font-size: 28rpx;
color: #000000;
line-height: 80rpx;
border-bottom: 2rpx solid #4778EC;
padding: 0 30rpx;
.mine-logout
margin: 250rpx auto 0 auto;
width: 399rpx;
height: 96rpx;
background: #FFAD47;
border-radius: 17rpx 17rpx 17rpx 17rpx;
text-align: center;
line-height: 96rpx;
color: #FFFFFF;
font-size: 35rpx;
color: #6C7282;
.mine-userinfo::before
position: absolute;
right: 40rpx;
top: 50%;
content: '';
width: 4rpx;
height: 18rpx;
border-radius: 2rpx
background: #A2A2A2;
transform: translate(0, -50%) rotate(-45deg);
.mine-userinfo::after
position: absolute;
right: 40rpx;
top: calc(50% + 1rpx);
content: '';
width: 4rpx;
height: 18rpx;
border-radius: 2rpx
background: #A2A2A2;
transform: rotate(45deg)
</style>

View File

@@ -1,132 +1,152 @@
<template>
<view class="app-container">
<view class="msg-AI">AI+就业服务程序</view>
<view class="msg-tab">
<view class="msg-tab-item" :class="{ actived: state.current === 0 }" @click="seemsg(0)">全部</view>
<view class="msg-tab-item" :class="{ actived: state.current === 1 }" @click="seemsg(1)">未读</view>
<view class="app-custom-root">
<view class="app-container">
<!-- 顶部头部区域 -->
<view class="container-header">
<view class="header-btnLf button-click" @click="changeType(0)" :class="{ active: state.current === 0 }">
已读消息
<view class="btns-wd"></view>
</view>
<view class="header-btnLf button-click" @click="changeType(1)" :class="{ active: state.current === 1 }">
未读消息
<view class="btns-wd"></view>
</view>
</view>
<!-- 主体内容区域 -->
<view class="container-main">
<swiper class="swiper" :current="state.current" @change="changeSwiperType">
<swiper-item class="swiper-item" v-for="(_, index) in 2" :key="index">
<component :is="components[index]" :ref="(el) => handelComponentsRef(el, index)" />
</swiper-item>
</swiper>
</view>
</view>
<view class="msg-list">
<swiper class="swiper" :current="state.current" @change="changeSwiperMsgType">
<swiper-item class="list">
<view class="list-card">
<view class="card-img">
<image class="card-img-flame" src="/static/icon/recommendday.png"></image>
</view>
<view class="card-info">
<view class="info-title">今日推荐</view>
<view class="info-text">这里有9个职位很适合你快来看看吧</view>
</view>
<view class="card-time">刚才</view>
</view>
</swiper-item>
<swiper-item class="list">
<view class="list-card">
<view class="card-img">
<image class="card-img-flame" src="/static/icon/recommendday.png"></image>
</view>
<view class="card-info">
<view class="info-title">今日推荐</view>
<view class="info-text">这里有9个职位很适合你快来看看吧</view>
</view>
<view class="card-time">刚才</view>
</view>
</swiper-item>
</swiper>
</view>
<!-- 自定义tabbar -->
<!-- <tabbar-custom :currentpage="3"></tabbar-custom> -->
</view>
</template>
<script setup>
import { reactive, inject, watch, ref, onMounted } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import readComponent from './read.vue';
import unreadComponent from './unread.vue';
const loadedMap = reactive([false, false]);
const swiperRefs = [ref(null), ref(null)];
const components = [readComponent, unreadComponent];
const state = reactive({
current: 0,
all: [{}],
});
onLoad(() => {});
onMounted(() => {
handleTabChange(state.current);
});
const handelComponentsRef = (el, index) => {
if (el) {
swiperRefs[index].value = el;
}
};
// 查看消息类型
function changeSwiperType(e) {
const index = e.detail.current;
state.current = index;
handleTabChange(index);
}
function changeType(index) {
state.current = index;
handleTabChange(index);
}
function handleTabChange(index) {
if (!loadedMap[index]) {
swiperRefs[index].value?.loadData();
loadedMap[index] = true;
}
}
// 查看消息类型
function changeSwiperMsgType(e) {
const currented = e.detail.current;
state.current = currented;
}
function seemsg(index) {
state.current = index;
}
</script>
<style lang="stylus" scoped>
.app-container
width: 100%;
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
.app-custom-root {
position: fixed;
z-index: 10;
width: 100vw;
height: calc(100% - var(--window-bottom));
overflow: hidden;
}
.app-container {
display: flex;
flex-direction: column;
.msg-AI
height: 42rpx;
font-family: Inter, Inter;
font-weight: 400;
font-size: 35rpx;
color: #FFFFFF;
line-height: 41rpx;
padding: 85rpx 0 0 30rpx;
.msg-tab
padding: 85rpx 0 0 30rpx;
height: 100%;
width: 100%;
.container-header {
height: calc(88rpx - 14rpx);
text-align: center;
line-height: calc(88rpx - 14rpx);
font-size: 32rpx;
display: flex;
justify-content: flex-start;
flex-direction: row;
align-items: center;
color: #D9D9D9;
.msg-tab-item
margin-right: 40rpx;
.actived
font-size: 28rpx;
color: #FFFFFF;
text-shadow: 0rpx 14rpx 14rpx rgba(0,0,0,0.25);
.msg-list
flex: 1;
overflow: hidden;
.swiper
height: 100%;
.list
display: flex;
flex-direction: column;
.list-card
height: calc(119rpx - 26rpx - 26rpx);
width: calc(100% - 36rpx - 36rpx - 23rpx - 23rpx);
background: #FFFFFF;
border-radius: 17rpx;
display: flex;
justify-content: flex-start;
align-items: center;
padding: 26rpx 36rpx;
margin: 36rpx 23rpx;
.card-img
width: 63rpx;
height: 63rpx;
background: #D9D9D9;
border-radius: 50%
display: grid;
place-items: center;
margin-right: 30rpx;
.card-img-flame
width: 100%;
height: 100%
.card-info
flex: 1;
display: flex;
align-items: flex-start;
flex-direction: column;
.info-title
font-weight: 400;
font-size: 28rpx;
color: #000000;
.info-text
font-size: 17rpx;
color: #606060;
.card-time
font-size: 17rpx;
color: #606060;
padding: 16rpx 44rpx 36rpx 44rpx;
background: url('@/static/icon/msgTopbg.png') 0 0 no-repeat;
background-size: 100% 100%;
.header-title {
color: #000000;
font-weight: bold;
}
.header-btnLf {
display: flex;
justify-content: flex-start;
align-items: center;
width: calc(60rpx * 3);
font-weight: 500;
font-size: 40rpx;
color: #696969;
margin-right: 44rpx;
position: relative;
.btns-wd{
position: absolute
top: 2rpx;
right: 2rpx
width: 16rpx;
height: 16rpx;
background: #F73636;
border-radius: 50%;
border: 4rpx solid #EEEEFF;
}
}
.active {
font-weight: 600;
font-size: 40rpx;
color: #000000;
}
}
}
.container-main {
flex: 1;
overflow: hidden;
background-color: #f4f4f4;
}
.main-scroll {
width: 100%
height: 100%;
}
.scrollmain{
padding: 28rpx
}
.swiper
height: 100%;
width: 100%
.list
width: 100%
display: flex;
flex-direction: column;
</style>

86
pages/msglog/read.vue Normal file
View File

@@ -0,0 +1,86 @@
<template>
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
<view class="scrollmain">
<view class="list-card btn-feel" v-for="(item, index) in 20" :key="index">
<view class="card-img">
<image class="card-img-flame" src="/static/icon/msgtype.png"></image>
</view>
<view class="card-info">
<view class="info-title">
<text>今日推荐</text>
<view class="card-time">刚才</view>
</view>
<view class="info-text line_2">这里有9个职位很适合你快来看看吧</view>
</view>
</view>
</view>
</scroll-view>
</template>
<script setup>
import { reactive, inject, ref } from 'vue';
const isLoaded = ref(false);
async function loadData() {
try {
if (isLoaded.value) return;
isLoaded.value = true;
} catch (err) {
isLoaded.value = false; // 重置状态允许重试
throw err;
}
}
function handleScrollToLower() {}
defineExpose({ loadData });
</script>
<style lang="stylus" scoped>
.main-scroll {
width: 100%
height: 100%;
}
.scrollmain{
padding: 28rpx
}
.list-card
background: #FFFFFF;
border-radius: 17rpx;
display: flex;
justify-content: flex-start;
align-items: center;
padding: 26rpx 36rpx;
margin: 0 0 28rpx 0
.card-img
width: 96rpx;
height: 96rpx;
border-radius: 50%
display: grid;
place-items: center;
margin-right: 30rpx;
.card-img-flame
width: 100%;
height: 100%
.card-info
flex: 1;
display: flex;
align-items: flex-start;
flex-direction: column;
.info-title
font-weight: 500;
font-size: 32rpx;
color: #333333;
display: flex;
justify-content: space-between;
width: 100%
.card-time
font-weight: 400;
font-size: 28rpx;
color: #AAAAAA;
height: 100%
margin: 4rpx;
.info-text
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
margin-top: 4rpx;
</style>

86
pages/msglog/unread.vue Normal file
View File

@@ -0,0 +1,86 @@
<template>
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
<view class="scrollmain">
<view class="list-card btn-feel" v-for="(item, index) in 20" :key="index">
<view class="card-img">
<image class="card-img-flame" src="/static/icon/msgtype.png"></image>
</view>
<view class="card-info">
<view class="info-title">
<text>今日推荐</text>
<view class="card-time">刚才</view>
</view>
<view class="info-text line_2">这里有9个职位很适合你快来看看吧</view>
</view>
</view>
</view>
</scroll-view>
</template>
<script setup>
import { reactive, inject, ref } from 'vue';
const isLoaded = ref(false);
async function loadData() {
try {
if (isLoaded.value) return;
isLoaded.value = true;
} catch (err) {
isLoaded.value = false; // 重置状态允许重试
throw err;
}
}
function handleScrollToLower() {}
defineExpose({ loadData });
</script>
<style lang="stylus" scoped>
.main-scroll {
width: 100%
height: 100%;
}
.scrollmain{
padding: 28rpx
}
.list-card
background: #FFFFFF;
border-radius: 17rpx;
display: flex;
justify-content: flex-start;
align-items: center;
padding: 26rpx 36rpx;
margin: 0 0 28rpx 0
.card-img
width: 96rpx;
height: 96rpx;
border-radius: 50%
display: grid;
place-items: center;
margin-right: 30rpx;
.card-img-flame
width: 100%;
height: 100%
.card-info
flex: 1;
display: flex;
align-items: flex-start;
flex-direction: column;
.info-title
font-weight: 500;
font-size: 32rpx;
color: #333333;
display: flex;
justify-content: space-between;
width: 100%
.card-time
font-weight: 400;
font-size: 28rpx;
color: #AAAAAA;
height: 100%
margin: 4rpx;
.info-text
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
margin-top: 4rpx;
</style>

View File

@@ -1,125 +1,108 @@
<template>
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
<view class="two-head">
<!-- <view class="head-item active">市北区</view> -->
<view
class="head-item"
:class="{ active: state.comId === item.commercialAreaId }"
v-for="(item, index) in state.comlist"
:key="item.commercialAreaId"
:key="item.commercialAreaName"
@click="clickCommercialArea(item)"
>
{{ item.commercialAreaName }}
</view>
</view>
<view class="nearby-list">
<view class="list-head" @touchmove.stop.prevent>
<view class="tab-options">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll" @touchmove.stop>
<view class="tab-op-left">
<view class="nav-filter" @touchmove.stop.prevent>
<view class="filter-top">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
<view class="jobs-left">
<view
class="tab-list"
:class="{ tabchecked: state.tabIndex === 'all' }"
class="job button-click"
:class="{ active: state.tabIndex === 'all' }"
@click="choosePosition('all')"
>
全部
</view>
<view
class="tab-list"
:class="{ tabchecked: state.tabIndex === index }"
@click="choosePosition(index)"
class="job button-click"
:class="{ active: state.tabIndex === index }"
v-for="(item, index) in userInfo.jobTitle"
:key="index"
@click="choosePosition(index)"
>
{{ item }}
</view>
</view>
</scroll-view>
<view class="tab-op-right">
<uni-icons type="plusempty" style="margin-right: 10rpx" size="20"></uni-icons>
<view class="tab-recommend">
<latestHotestStatus @confirm="handelHostestSearch"></latestHotestStatus>
</view>
<view class="tab-filter" @click="emit('onFilter', 3)">
<view class="tab-number" v-show="pageState.total">{{ formatTotal(pageState.total) }}</view>
<image class="image" src="/static/icon/filter.png"></image>
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
<text>添加</text>
</view>
</view>
<view class="filter-bottom">
<view class="btm-left">
<view
class="button-click filterbtm"
:class="{ active: pageState.search.order === item.value }"
v-for="item in rangeOptions"
@click="handelHostestSearch(item)"
:key="item.value"
>
{{ item.text }}
</view>
</view>
<view class="btm-right button-click" @click="openFilter">
筛选
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
</view>
</view>
</view>
<view class="one-cards">
<view class="card-box" v-for="(item, index) in list" :key="item.jobId" @click="navToPost(item.jobId)">
<view class="box-row mar_top0">
<view class="row-left">{{ item.jobTitle }}</view>
<view class="row-right">
<Salary-Expectation
:max-salary="item.maxSalary"
:min-salary="item.minSalary"
></Salary-Expectation>
</view>
</view>
<view class="box-row">
<view class="row-left">
<view class="row-tag" v-if="item.education">
<dict-Label dictType="education" :value="item.education"></dict-Label>
</view>
<view class="row-tag" v-if="item.experience">
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
</view>
</view>
</view>
<view class="box-row mar_top0">
<view class="row-item mineText">{{ item.postingDate || '发布日期' }}</view>
<view class="row-item mineText">{{ vacanciesTo(item.vacancies) }}</view>
<view class="row-item mineText textblue"><matchingDegree :job="item"></matchingDegree></view>
<view class="row-item">
<uni-icons type="star" size="28"></uni-icons>
<!-- <uni-icons type="star-filled" color="#FFCB47" size="30"></uni-icons> -->
</view>
</view>
<view class="box-row">
<view class="row-left mineText">{{ item.companyName }}</view>
<view class="row-right mineText">
青岛
<dict-Label dictType="area" :value="item.jobLocationAreaCode"></dict-Label>
<convert-distance
:alat="item.latitude"
:along="item.longitude"
:blat="latitude()"
:blong="longitude()"
></convert-distance>
</view>
</view>
</view>
<renderJobs
v-if="list.length"
:list="list"
:longitude="longitudeVal"
:latitude="latitudeVal"
></renderJobs>
<empty v-else pdTop="60"></empty>
<loadmore ref="loadmoreRef"></loadmore>
</view>
</view>
<loadmore ref="loadmoreRef"></loadmore>
<!-- 筛选 -->
<select-filter ref="selectFilterModel"></select-filter>
</scroll-view>
</template>
<script setup>
import dictLabel from '@/components/dict-Label/dict-Label.vue';
import { reactive, inject, watch, ref, onMounted } from 'vue';
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import useDictStore from '@/stores/useDictStore';
import useUserStore from '@/stores/useUserStore';
const { getDictSelectOption, oneDictData } = useDictStore();
const { $api, navTo, vacanciesTo, formatTotal } = inject('globalFunction');
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
import { storeToRefs } from 'pinia';
import useLocationStore from '@/stores/useLocationStore';
const { getLocation, longitude, latitude } = useLocationStore();
import useUserStore from '@/stores/useUserStore';
import useDictStore from '@/stores/useDictStore';
const { oneDictData } = useDictStore();
const { userInfo } = storeToRefs(useUserStore());
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
import point2 from '@/static/icon/point2.png';
import LocationPng from '@/static/icon/Location.png';
import selectFilter from '@/components/selectFilter/selectFilter.vue';
const emit = defineEmits(['onFilter']);
const state = reactive({
tabIndex: 'all',
tabBxText: 'buxianquyu',
comlist: [],
comId: 0,
});
const fromValue = reactive({
area: 0,
areaInfo: {},
});
const loadmoreRef = ref(null);
const userInfo = ref({});
const isLoaded = ref(false);
const showFilter = ref(false);
const selectFilterModel = ref();
const fromValue = reactive({
area: 0,
});
const loadmoreRef = ref(null);
const pageState = reactive({
page: 0,
total: 0,
@@ -131,20 +114,59 @@ const pageState = reactive({
});
const list = ref([]);
onShow(() => {
userInfo.value = useUserStore().userInfo;
});
const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
]);
function choosePosition(index) {
state.tabIndex = index;
list.value = [];
if (index === 'all') {
pageState.search = {
...pageState.search,
jobTitle: '',
};
getJobList('refresh');
} else {
// const id = useUserStore().userInfo.jobTitleId.split(',')[index];
pageState.search.jobTitle = userInfo.value.jobTitle[index];
getJobList('refresh');
}
}
function openFilter() {
showFilter.value = true;
selectFilterModel.value?.open({
title: '筛选',
maskClick: true,
success: (values) => {
pageState.search = {
...pageState.search,
};
for (const [key, value] of Object.entries(values)) {
pageState.search[key] = value.join(',');
}
showFilter.value = false;
console.log(pageState.search);
getJobList('refresh');
},
cancel: () => {
showFilter.value = false;
},
});
}
onLoad(() => {
getBusinessDistrict();
});
function navToPost(jobId) {
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
}
async function loadData() {
try {
if (isLoaded.value) return;
const area = oneDictData('area')[0];
fromValue.area = area.value;
getJobList('refresh');
isLoaded.value = true;
} catch (err) {
@@ -152,19 +174,6 @@ async function loadData() {
throw err;
}
}
function scrollBottom() {
getJobList();
loadmoreRef.value.change('loading');
}
function choosePosition(index) {
state.tabIndex = index;
if (index === 'all') {
pageState.search.jobTitle = '';
} else {
pageState.search.jobTitle = useUserStore().userInfo.jobTitle[index];
}
getJobList('refresh');
}
function clickCommercialArea(area) {
state.areaInfo = area;
@@ -172,6 +181,25 @@ function clickCommercialArea(area) {
getJobList('refresh');
}
function scrollBottom() {
getJobList();
loadmoreRef.value.change('loading');
}
// function choosePosition(index) {
// state.tabIndex = index;
// if (index === 'all') {
// pageState.search.jobTitle = '';
// } else {
// pageState.search.jobTitle = userInfo.jobTitle[index];
// }
// getJobList('refresh');
// }
function changeArea(area, item) {
fromValue.area = area;
getJobList('refresh');
}
function getBusinessDistrict() {
$api.createRequest(`/app/common/commercialArea`).then((resData) => {
if (resData.data.length) {
@@ -181,6 +209,7 @@ function getBusinessDistrict() {
}
});
}
function getJobList(type = 'add') {
if (type === 'add' && pageState.page < pageState.maxPage) {
pageState.page += 1;
@@ -197,7 +226,10 @@ function getJobList(type = 'add') {
radius: 2,
...pageState.search,
};
$api.createRequest('/app/job/commercialArea', params, 'POST').then((resData) => {
if (fromValue.area === state.tabBxText) {
params.countyIds = [];
}
$api.createRequest('/app/job/countyJob', params, 'POST').then((resData) => {
const { rows, total } = resData;
if (type === 'add') {
const str = pageState.pageSize * (pageState.page - 1);
@@ -241,125 +273,96 @@ defineExpose({ loadData, handleFilterConfirm });
.nearby-scroll
overflow: hidden;
.two-head
margin: 24rpx;
padding: 26rpx;
background: #FFFFFF;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-column-gap: 40rpx;
grid-row-gap: 30rpx;
margin: 22rpx;
display: flex;
flex-wrap: wrap
// grid-template-columns: repeat(4, 1fr);
// grid-column-gap: 10rpx;
// grid-row-gap: 24rpx;
border-radius: 17rpx 17rpx 17rpx 17rpx;
.head-item
min-width: 129rpx;
height: 44rpx;
line-height: 44rpx;
margin: 10rpx
white-space: nowrap
min-width: 156rpx
line-height: 64rpx
text-align: center;
width: fit-content;
background: #D9D9D9;
border-radius: 17rpx 17rpx 17rpx 17rpx;
font-size: 21rpx;
color: #606060;
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
background: #F6F6F6;
border-radius: 12rpx 12rpx 12rpx 12rpx;
.active
background: #4778EC;
color: #FFFFFF;
.nearby-list
margin-top: 40rpx;
// background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
.list-head
height: 77rpx;
background-color: #FFFFFF;
border-radius: 17rpx 17rpx 0rpx 0rpx;
position: relative;
top: -17rpx;
z-index: 9999;
.tab-options
display: flex;
align-items: center;
justify-content: space-between;
height: 77rpx;
background: #FFFFFF;
border-radius: 17rpx 17rpx 0rpx 0rpx;
padding: 0 24rpx;
overflow: hidden;
.tab-scroll
height: 77rpx;
line-height: 77rpx;
flex: 1;
overflow: hidden;
padding-right: 10rpx;
.tab-op-left
display: flex;
align-items: center;
flex-wrap: nowrap;
.tab-list
text-align: center;
white-space: nowrap;
margin-right: 30rpx;
font-size: 28rpx;
color: #606060;
.tab-op-right
display: flex;
align-items: center;
.tab-recommend
white-space: nowrap;
width: fit-content;
padding: 0 10rpx;
height: 42rpx;
background: #4778EC;
border-radius: 17rpx 17rpx 0rpx 17rpx;
text-align: center;
color: #FFFFFF;
font-size: 21rpx;
line-height: 42rpx;
margin-right: 12rpx;
.tab-number
font-size: 21rpx;
color: #606060;
line-height: 25rpx;
text-align: center;
.tab-filter
display: flex;
.image
width: 28rpx;
height: 27rpx;
.one-cards
color: #256BFA;
background: #E9F0FF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
.nearby-list
border-top: 2rpx solid #EBEBEB;
height: 100%
.one-cards{
display: flex;
flex-direction: column;
padding: 20rpx;
.card-box
width: calc(100% - 36rpx - 36rpx);
border-radius: 0rpx 0rpx 0rpx 0rpx;
background: #FFFFFF;
border-radius: 17rpx;
padding: 15rpx 36rpx;
margin-top: 24rpx;
.box-row
display: flex;
justify-content: space-between;
margin-top: 8rpx;
padding: 0 20rpx 20rpx 20rpx;
background: #f4f4f4
}
.nav-filter
padding: 16rpx 28rpx 0 28rpx
.filter-top
display: flex
justify-content: space-between;
.tab-scroll
flex: 1;
overflow: hidden;
margin-right: 20rpx
white-space: nowrap;
overflow: hidden;
text-overflow: clip;
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
mask-image: linear-gradient(to right, black 60%, transparent);
.jobs-left
display: flex
flex-wrap: nowrap
.job
font-weight: 400;
font-size: 36rpx;
color: #666D7F;
margin-right: 32rpx;
white-space: nowrap
.active
font-weight: 500;
font-size: 36rpx;
color: #000000;
.jobs-add
display: flex
align-items: center;
.mineText
justify-content: center;
font-weight: 400;
font-size: 32rpx;
color: #666D7F;
line-height: 38rpx;
.filter-bottom
display: flex
justify-content: space-between
padding: 24rpx 0
.btm-left
display: flex
.filterbtm
font-weight: 400;
font-size: 21rpx;
color: #606060;
.textblue
color: #4778EC;
.row-right
min-width: 120rpx
text-align: right
.row-left
display: flex;
justify-content: space-between;
.row-tag
background: #13C57C;
border-radius: 17rpx 17rpx 17rpx 17rpx;
font-size: 21rpx;
color: #FFFFFF;
line-height: 25rpx;
text-align: center;
padding: 4rpx 8rpx;
margin-right: 23rpx;
.card-box:first-child
margin-top: -14rpx;
font-size: 32rpx;
color: #666D7F;
margin-right: 40rpx
.active
font-weight: 500;
font-size: 32rpx;
color: #256BFA;
.btm-right
font-weight: 400;
font-size: 32rpx;
color: #6C7282;
.right-sx
width: 26rpx;
height: 26rpx;
.active
transform: rotate(180deg)
</style>

View File

@@ -2,112 +2,111 @@
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
<view class="nearby-map" @touchmove.stop.prevent>
<map
style="width: 100%; height: 300px"
:latitude="latitude()"
:longitude="longitude()"
style="width: 100%; height: 400px"
:latitude="latitudeVal"
:longitude="longitudeVal"
:markers="mapCovers"
:circles="mapCircles"
:controls="mapControls"
@controltap="handleControl"
></map>
<view class="nearby-select">
<view class="select-view" @click="changeRangeShow">
<text>{{ pageState.search.radius }}km</text>
<image class="view-sx" :class="{ active: rangeShow }" src="@/static/icon/shaixun.png"></image>
</view>
<transition name="fade-slide">
<view class="select-list" v-if="rangeShow">
<view class="list-item button-click" v-for="(item, index) in range" @click="changeRadius(item)">
{{ item }}km
</view>
</view>
</transition>
<!-- <view class="select-list" v-show="!rangeShow">
<view class="list-item" v-for="(item, index) in range">{{ item }}km</view>
</view> -->
</view>
</view>
<view class="nearby-list">
<view class="list-head" @touchmove.stop.prevent>
<view class="tab-options">
<view class="tab-scroll" ref="progress">
<view class="tab-scr-d" :style="`width: ${state.progressWidth}`">
<view class="">1km</view>
<view class="">5km</view>
<view class="">10km</view>
<view class="nav-filter" @touchmove.stop.prevent>
<view class="filter-top">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
<view class="jobs-left">
<view
class="job button-click"
:class="{ active: state.tabIndex === 'all' }"
@click="choosePosition('all')"
>
全部
</view>
<view
class="job button-click"
:class="{ active: state.tabIndex === index }"
v-for="(item, index) in userInfo.jobTitle"
:key="index"
@click="choosePosition(index)"
>
{{ item }}
</view>
</view>
<bingProgressComponent
strokeWidth="7px"
:max="10"
activeColor="#13C57C"
handleWidth="10px"
handleHeight="10px"
handleBorderRadius="5px"
handleColor="#4778EC"
@change="progressChange"
:showInfo="false"
:width="state.progressWidth"
></bingProgressComponent>
</scroll-view>
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
<text>添加</text>
</view>
<view class="tab-op-right">
<view class="tab-recommend">
<latestHotestStatus @confirm="handelHostestSearch"></latestHotestStatus>
</view>
<view class="tab-filter" @click="emit('onFilter', 0)">
<view class="tab-number" v-show="pageState.total">{{ formatTotal(pageState.total) }}</view>
<image class="image" src="/static/icon/filter.png"></image>
</view>
<view class="filter-bottom">
<view class="btm-left">
<view
class="button-click filterbtm"
:class="{ active: pageState.search.order === item.value }"
v-for="item in rangeOptions"
@click="handelHostestSearch(item)"
:key="item.value"
>
{{ item.text }}
</view>
</view>
<view class="btm-right button-click" @click="openFilter">
筛选
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
</view>
</view>
</view>
<view class="one-cards">
<view class="card-box" v-for="(item, index) in list" :key="item.jobId" @click="navToPost(item.jobId)">
<view class="box-row mar_top0">
<view class="row-left">{{ item.jobTitle }}</view>
<view class="row-right">
<Salary-Expectation
:max-salary="item.maxSalary"
:min-salary="item.minSalary"
></Salary-Expectation>
</view>
</view>
<view class="box-row">
<view class="row-left">
<view class="row-tag" v-if="item.education">
<dict-Label dictType="education" :value="item.education"></dict-Label>
</view>
<view class="row-tag" v-if="item.experience">
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
</view>
</view>
</view>
<view class="box-row mar_top0">
<view class="row-item mineText">{{ item.postingDate || '发布日期' }}</view>
<view class="row-item mineText">{{ vacanciesTo(item.vacancies) }}</view>
<view class="row-item mineText textblue"><matchingDegree :job="item"></matchingDegree></view>
<view class="row-item">
<uni-icons type="star" size="28"></uni-icons>
<!-- <uni-icons type="star-filled" color="#FFCB47" size="30"></uni-icons> -->
</view>
</view>
<view class="box-row">
<view class="row-left mineText">{{ item.companyName }}</view>
<view class="row-right mineText">
青岛
<dict-Label dictType="area" :value="item.jobLocationAreaCode"></dict-Label>
<convert-distance
:alat="item.latitude"
:along="item.longitude"
:blat="latitude()"
:blong="longitude()"
></convert-distance>
</view>
</view>
</view>
<renderJobs
v-if="list.length"
:list="list"
:longitude="longitudeVal"
:latitude="latitudeVal"
></renderJobs>
<empty v-else pdTop="60"></empty>
<loadmore ref="loadmoreRef"></loadmore>
</view>
</view>
<loadmore ref="loadmoreRef"></loadmore>
<!-- 筛选 -->
<select-filter ref="selectFilterModel"></select-filter>
</scroll-view>
</template>
<script setup>
import point2 from '@/static/icon/point2.png';
import LocationPng from '@/static/icon/Location.png';
import dictLabel from '@/components/dict-Label/dict-Label.vue';
import useLocationStore from '@/stores/useLocationStore';
import bingProgressComponent from '/components/bing-progress/bing-progress.vue';
import screeningJobRequirementsVue from '@/components/screening-job-requirements/screening-job-requirements.vue';
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
const { getLocation, longitude, latitude } = useLocationStore();
import { onLoad, onShow } from '@dcloudio/uni-app';
import { msg } from '../../../common/globalFunction';
const { $api, navTo, debounce, vacanciesTo, customSystem, formatTotal } = inject('globalFunction');
const emit = defineEmits(['onFilter']);
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
import { storeToRefs } from 'pinia';
import useLocationStore from '@/stores/useLocationStore';
import useUserStore from '@/stores/useUserStore';
const { userInfo } = storeToRefs(useUserStore());
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
import point2 from '@/static/icon/Location1.png';
import LocationPng from '@/static/icon/Location12.png';
import selectFilter from '@/components/selectFilter/selectFilter.vue';
const emit = defineEmits(['onFilter']);
const range = ref([1, 2, 4, 6, 8, 10]);
const rangeShow = ref(false);
const selectFilterModel = ref(null);
const tMap = ref();
const progress = ref();
const mapCovers = ref([]);
@@ -117,10 +116,10 @@ const mapControls = ref([
id: 1,
position: {
// 控件位置
left: customSystem.systemInfo.screenWidth - 50,
top: 180,
width: 30,
height: 30,
left: customSystem.systemInfo.screenWidth - 48 - 14,
top: 320,
width: 48,
height: 48,
},
iconPath: LocationPng, // 控件图标
},
@@ -137,17 +136,67 @@ const pageState = reactive({
},
});
const isLoaded = ref(false);
const showFilter = ref(false);
const list = ref([]);
const state = reactive({
progressWidth: '200px',
});
const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
]);
function changeRangeShow() {
rangeShow.value = !rangeShow.value;
}
function changeRadius(item) {
pageState.search.radius = item;
rangeShow.value = false;
progressChange(item);
}
function choosePosition(index) {
state.tabIndex = index;
list.value = [];
if (index === 'all') {
pageState.search = {
...pageState.search,
jobTitle: '',
};
getJobList('refresh');
} else {
// const id = useUserStore().userInfo.jobTitleId.split(',')[index];
pageState.search.jobTitle = useUserStore().userInfo.jobTitle[index];
getJobList('refresh');
}
}
function openFilter() {
showFilter.value = true;
selectFilterModel.value?.open({
title: '筛选',
maskClick: true,
success: (values) => {
pageState.search = {
...pageState.search,
};
for (const [key, value] of Object.entries(values)) {
pageState.search[key] = value.join(',');
}
showFilter.value = false;
console.log(pageState.search);
getJobList('refresh');
},
cancel: () => {
showFilter.value = false;
},
});
}
onLoad(() => {});
function navToPost(jobId) {
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
}
async function loadData() {
try {
if (isLoaded.value) return;
@@ -176,35 +225,39 @@ onMounted(() => {
});
function getInit() {
getLocation().then((res) => {
mapCovers.value = [
{
latitude: res.latitude,
longitude: res.longitude,
iconPath: point2,
},
];
mapCircles.value = [
{
latitude: res.latitude,
longitude: res.longitude,
radius: 1000,
fillColor: '#00b8002e',
},
];
getJobList('refresh');
});
useLocationStore()
.getLocation()
.then((res) => {
mapCovers.value = [
{
latitude: res.latitude,
longitude: res.longitude,
iconPath: point2,
},
];
mapCircles.value = [
{
latitude: res.latitude,
longitude: res.longitude,
radius: 1000,
fillColor: '#1c52fa25',
color: '#256BFA',
},
];
getJobList('refresh');
});
}
function progressChange(e) {
const range = 1 + e.value;
function progressChange(value) {
const range = 1 + value;
pageState.search.radius = range;
mapCircles.value = [
{
latitude: latitude(),
longitude: longitude(),
latitude: latitudeVal.value,
longitude: longitudeVal.value,
radius: range * 1000,
fillColor: '#00b8002e',
fillColor: '#1c52fa25',
color: '#256BFA',
},
];
debounceAjax('refresh');
@@ -222,8 +275,8 @@ function getJobList(type = 'add') {
let params = {
current: pageState.page,
pageSize: pageState.pageSize,
longitude: longitude(),
latitude: latitude(),
longitude: longitudeVal.value,
latitude: latitudeVal.value,
...pageState.search,
};
@@ -267,118 +320,117 @@ defineExpose({ loadData, handleFilterConfirm });
</script>
<style lang="stylus" scoped>
.nearby-select{
width: 184rpx;
height: 64rpx;
background: #FFFFFF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
position: absolute
right: 28rpx;
top: 28rpx
.select-view{
display: flex
align-items: center
justify-content: center
height: 100%
.view-sx{
width: 26rpx;
height: 26rpx;
}
.active{
transform: rotate(180deg)
}
}
.select-list{
border-radius: 12rpx 12rpx 12rpx 12rpx;
overflow: hidden
position: absolute
top: 76rpx
left: 0
display: flex
flex-direction: column
background: #FFFFFF;
text-align: center
.list-item{
width: 184rpx;
line-height: 68rpx;
height: 68rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
}
}
.nearby-scroll
overflow: hidden;
.nearby-map
height: 467rpx;
height: 767rpx;
background: #e8e8e8;
overflow: hidden
.nearby-list
// background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
.list-head
height: 77rpx;
background-color: #FFFFFF;
border-radius: 17rpx 17rpx 0rpx 0rpx;
position: relative;
top: -17rpx;
z-index: 9999;
.tab-options
margin-top: -15rpx;
display: flex;
align-items: center;
justify-content: space-between;
height: 77rpx;
background: #FFFFFF;
border-radius: 17rpx 17rpx 0rpx 0rpx;
padding: 0 24rpx;
overflow: hidden;
.tab-scroll
height: 77rpx;
flex: 1;
padding-right: 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
.tab-scr-d
display: flex;
justify-content: space-between;
font-weight: 400;
font-size: 21rpx;
color: #000000;
.tab-op-left
display: flex;
align-items: center;
flex-wrap: nowrap;
.tab-list
text-align: center;
white-space: nowrap;
margin-right: 30rpx;
font-size: 28rpx;
color: #606060;
.tab-op-right
display: flex;
align-items: center;
.tab-recommend
white-space: nowrap;
width: fit-content;
padding: 0 10rpx;
height: 42rpx;
background: #4778EC;
border-radius: 17rpx 17rpx 0rpx 17rpx;
text-align: center;
color: #FFFFFF;
font-size: 21rpx;
line-height: 42rpx;
margin-right: 12rpx;
.tab-number
font-size: 21rpx;
color: #606060;
line-height: 25rpx;
text-align: center;
.tab-filter
display: flex;
.image
width: 28rpx;
height: 27rpx;
.one-cards
.nearby-list
.one-cards{
display: flex;
flex-direction: column;
padding: 0 20rpx 20rpx 20rpx;
.card-box
width: calc(100% - 36rpx - 36rpx);
border-radius: 0rpx 0rpx 0rpx 0rpx;
background: #FFFFFF;
border-radius: 17rpx;
padding: 15rpx 36rpx;
margin-top: 24rpx;
.box-row
display: flex;
justify-content: space-between;
margin-top: 8rpx;
background: #f4f4f4
height: 100%
}
.nav-filter
padding: 16rpx 28rpx 0 28rpx
.filter-top
display: flex
justify-content: space-between;
.tab-scroll
flex: 1;
overflow: hidden;
margin-right: 20rpx
white-space: nowrap;
overflow: hidden;
text-overflow: clip;
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
mask-image: linear-gradient(to right, black 60%, transparent);
.jobs-left
display: flex
flex-wrap: nowrap
.job
font-weight: 400;
font-size: 36rpx;
color: #666D7F;
margin-right: 32rpx;
white-space: nowrap
.active
font-weight: 500;
font-size: 36rpx;
color: #000000;
.jobs-add
display: flex
align-items: center;
.mineText
justify-content: center;
font-weight: 400;
font-size: 32rpx;
color: #666D7F;
line-height: 38rpx;
.filter-bottom
display: flex
justify-content: space-between
padding: 24rpx 0
.btm-left
display: flex
.filterbtm
font-weight: 400;
font-size: 21rpx;
color: #606060;
.textblue
color: #4778EC;
.row-right
min-width: 120rpx
text-align: right
.row-left
display: flex;
justify-content: space-between;
.row-tag
background: #13C57C;
border-radius: 17rpx 17rpx 17rpx 17rpx;
font-size: 21rpx;
color: #FFFFFF;
line-height: 25rpx;
text-align: center;
padding: 4rpx 8rpx;
margin-right: 23rpx;
.card-box:first-child
margin-top: 6rpx;
font-size: 32rpx;
color: #666D7F;
margin-right: 40rpx
.active
font-weight: 500;
font-size: 32rpx;
color: #256BFA;
.btm-right
font-weight: 400;
font-size: 32rpx;
color: #6C7282;
.right-sx
width: 26rpx;
height: 26rpx;
.active
transform: rotate(180deg)
</style>

View File

@@ -1,26 +1,21 @@
<template>
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
<view class="three-head" @touchmove.stop.prevent>
<view class="one-picker">
<view class="oneleft button-click" @click="openFilterSubway">
<view class="uni-input">{{ inputText(state.subwayId) }}</view>
<view class="btm-right">
<image
class="right-sx"
:class="{ active: showFiltersubway }"
src="@/static/icon/shaixun.png"
></image>
</view>
</view>
<view class="oneright">{{ state.subwayStart.stationName }}-{{ state.subwayEnd.stationName }}</view>
</view>
<scroll-view class="scroll-head" :scroll-x="true" :show-scrollbar="false">
<view class="metro">
<view class="metro-one">
<picker
class="one-picker"
@change="bindPickerChange"
@cancel="state.downup = true"
@click="state.downup = false"
:value="state.value"
range-key="text"
:range="range"
>
<view class="one-picker">
<view class="uni-input">{{ inputText(state.subwayId) }}</view>
<uni-icons v-if="state.downup" type="down" size="16"></uni-icons>
<uni-icons v-else type="up" size="16"></uni-icons>
</view>
</picker>
</view>
<view class="metro-two">{{ state.subwayStart.stationName }}-{{ state.subwayEnd.stationName }}</view>
<view class="metro-three">
<view class="three-background">
<view class="three-items">
@@ -47,20 +42,20 @@
</scroll-view>
</view>
<view class="nearby-list">
<view class="list-head" @touchmove.stop.prevent>
<view class="tab-options">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll" @touchmove.stop>
<view class="tab-op-left">
<view class="nav-filter" @touchmove.stop.prevent>
<view class="filter-top">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
<view class="jobs-left">
<view
class="tab-list"
:class="{ tabchecked: state.tabIndex === 'all' }"
class="job button-click"
:class="{ active: state.tabIndex === 'all' }"
@click="choosePosition('all')"
>
全部
</view>
<view
class="tab-list"
:class="{ tabchecked: state.tabIndex === index }"
class="job button-click"
:class="{ active: state.tabIndex === index }"
v-for="(item, index) in userInfo.jobTitle"
:key="index"
@click="choosePosition(index)"
@@ -69,82 +64,68 @@
</view>
</view>
</scroll-view>
<view class="tab-op-right">
<uni-icons type="plusempty" style="margin-right: 10rpx" size="20"></uni-icons>
<view class="tab-recommend">
<latestHotestStatus @confirm="handelHostestSearch"></latestHotestStatus>
</view>
<view class="tab-filter" @click="emit('onFilter', 2)">
<view class="tab-number" v-show="pageState.total">{{ formatTotal(pageState.total) }}</view>
<image class="image" src="/static/icon/filter.png"></image>
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
<text>添加</text>
</view>
</view>
<view class="filter-bottom">
<view class="btm-left">
<view
class="button-click filterbtm"
:class="{ active: pageState.search.order === item.value }"
v-for="item in rangeOptions"
@click="handelHostestSearch(item)"
:key="item.value"
>
{{ item.text }}
</view>
</view>
<view class="btm-right button-click" @click="openFilter">
筛选
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
</view>
</view>
</view>
<view class="one-cards">
<view class="card-box" v-for="(item, index) in list" :key="item.jobId" @click="navToPost(item.jobId)">
<view class="box-row mar_top0">
<view class="row-left">{{ item.jobTitle }}</view>
<view class="row-right">
<Salary-Expectation
:max-salary="item.maxSalary"
:min-salary="item.minSalary"
></Salary-Expectation>
</view>
</view>
<view class="box-row">
<view class="row-left">
<view class="row-tag" v-if="item.education">
<dict-Label dictType="education" :value="item.education"></dict-Label>
</view>
<view class="row-tag" v-if="item.experience">
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
</view>
</view>
</view>
<view class="box-row mar_top0">
<view class="row-item mineText">{{ item.postingDate || '发布日期' }}</view>
<view class="row-item mineText">{{ vacanciesTo(item.vacancies) }}</view>
<view class="row-item mineText textblue"><matchingDegree :job="item"></matchingDegree></view>
<view class="row-item">
<uni-icons type="star" size="28"></uni-icons>
<!-- <uni-icons type="star-filled" color="#FFCB47" size="30"></uni-icons> -->
</view>
</view>
<view class="box-row">
<view class="row-left mineText">{{ item.companyName }}</view>
<view class="row-right mineText">
青岛
<dict-Label dictType="area" :value="item.jobLocationAreaCode"></dict-Label>
<convert-distance
:alat="item.latitude"
:along="item.longitude"
:blat="latitude()"
:blong="longitude()"
></convert-distance>
</view>
</view>
</view>
<renderJobs
v-if="list.length"
:list="list"
:longitude="longitudeVal"
:latitude="latitudeVal"
></renderJobs>
<empty v-else pdTop="60"></empty>
<loadmore ref="loadmoreRef"></loadmore>
</view>
</view>
<loadmore ref="loadmoreRef"></loadmore>
<!-- 筛选 -->
<select-filter ref="selectFilterModel"></select-filter>
</scroll-view>
</template>
<script setup>
import dictLabel from '@/components/dict-Label/dict-Label.vue';
import { reactive, inject, watch, ref, onMounted } from 'vue';
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import useUserStore from '@/stores/useUserStore';
const { $api, navTo, vacanciesTo, formatTotal } = inject('globalFunction');
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
const openSelectPopup = inject('openSelectPopup');
import { storeToRefs } from 'pinia';
import useLocationStore from '@/stores/useLocationStore';
const { getLocation, longitude, latitude } = useLocationStore();
import useUserStore from '@/stores/useUserStore';
import useDictStore from '@/stores/useDictStore';
const { oneDictData } = useDictStore();
const { userInfo } = storeToRefs(useUserStore());
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
import point2 from '@/static/icon/point2.png';
import LocationPng from '@/static/icon/Location.png';
import selectFilter from '@/components/selectFilter/selectFilter.vue';
const emit = defineEmits(['onFilter']);
// status
const showFiltersubway = ref(false);
const showFilter = ref(false);
const selectFilterModel = ref();
const subwayCurrent = ref([]);
const isLoaded = ref(false);
const range = ref([]);
const userInfo = ref({});
const state = reactive({
subwayList: [],
subwayStart: {},
@@ -167,15 +148,15 @@ const pageState = reactive({
});
const list = ref([]);
const loadmoreRef = ref(null);
const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
]);
onLoad(() => {
getSubway();
});
onShow(() => {
userInfo.value = useUserStore().userInfo;
});
function navToPost(jobId) {
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
}
@@ -191,6 +172,51 @@ async function loadData() {
}
}
function openFilter() {
showFilter.value = true;
selectFilterModel.value?.open({
title: '筛选',
maskClick: true,
success: (values) => {
pageState.search = {
...pageState.search,
};
for (const [key, value] of Object.entries(values)) {
pageState.search[key] = value.join(',');
}
showFilter.value = false;
console.log(pageState.search);
getJobList('refresh');
},
cancel: () => {
showFilter.value = false;
},
});
}
function openFilterSubway() {
const diti = state.subwayList.map((item) => ({ ...item, label: item.lineName, value: item.lineId }));
openSelectPopup({
title: '地铁',
maskClick: true,
data: [diti],
success: (_, [value]) => {
subwayCurrent.value = value;
state.subwayId = value.value;
state.value = value.value;
const points = value.subwayStationList;
state.downup = true;
if (points.length) {
state.dont = 0;
state.dontObj = points[0];
state.subwayStart = points[0];
state.subwayEnd = points[points.length - 1];
getJobList('refresh');
}
},
});
}
function scrollBottom() {
getJobList();
loadmoreRef.value.change('loading');
@@ -201,7 +227,7 @@ function choosePosition(index) {
if (index === 'all') {
pageState.search.jobTitle = '';
} else {
pageState.search.jobTitle = useUserStore().userInfo.jobTitle[index];
pageState.search.jobTitle = userInfo.value.jobTitle[index];
}
getJobList('refresh');
}
@@ -312,15 +338,36 @@ defineExpose({ loadData, handleFilterConfirm });
</script>
<style lang="stylus" scoped>
.btm-right
font-weight: 400;
font-size: 32rpx;
color: #6C7282;
.right-sx
width: 26rpx;
height: 26rpx;
.active
transform: rotate(180deg)
.tabchecked
color: #4778EC !important;
.nearby-scroll
overflow: hidden;
.three-head
margin: 24rpx;
padding: 26rpx;
background: #FFFFFF;
margin: 24rpx 0 0 0;
padding: 26rpx 0 0 0;
border-radius: 17rpx 17rpx 17rpx 17rpx;
.one-picker
height: 100%
padding: 0 28rpx
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between
.oneleft
display: flex;
flex-wrap: nowrap;
.oneright
display: flex;
flex-wrap: nowrap;
.scroll-head
width: 100%;
overflow: hidden;
@@ -330,14 +377,9 @@ defineExpose({ loadData, handleFilterConfirm });
font-size: 28rpx;
color: #000000;
line-height: 33rpx;
width: fit-content;
width: 100%;
min-width: 100rpx;
.one-picker
width: 100%
height: 100%
display: flex;
flex-wrap: nowrap;
align-items: center;
.metro-two
font-size: 21rpx;
color: #606060;
@@ -345,7 +387,8 @@ defineExpose({ loadData, handleFilterConfirm });
margin-top: 6rpx;
.metro-three
width: fit-content;
margin-top: 26rpx;
margin-top: 100rpx;
padding: 0 64rpx;
.three-background
position: relative;
.three-items
@@ -354,15 +397,17 @@ defineExpose({ loadData, handleFilterConfirm });
display: flex;
justify-content: space-between;
z-index: 2;
height: 90rpx
.three-item
margin-right: 70rpx;
margin-right: 124rpx;
position: relative
.item-dont
width: 17rpx;
height: 17rpx;
background: #FFFFFF;
border-radius: 50%;
position: relative;
margin-bottom: 10rpx;
margin-bottom: 20rpx;
.donted::after
position: absolute;
content: '';
@@ -389,27 +434,33 @@ defineExpose({ loadData, handleFilterConfirm });
line-height: 28rpx;
background: #666666;
border-radius: 50%;
.dontend::after
position: absolute;
content: '终点';
color: #FFFFFF;
font-size: 20rpx;
text-align: center;
left: 0;
top: -5rpx;
width: 27rpx;
height: 27rpx;
line-height: 28rpx;
background: #666666;
border-radius: 50%;
// .dontend::after
// position: absolute;
// content: '终';
// color: #FFFFFF;
// font-size: 20rpx;
// text-align: center;
// left: 0;
// top: -5rpx;
// width: 27rpx;
// height: 27rpx;
// line-height: 28rpx;
// background: #666666;
// border-radius: 50%;
.item-text
width: 23rpx;
font-size: 21rpx;
color: #606060;
position: absolute
left: 0
width: fit-content;
font-weight: 400;
font-size: 28rpx;
color: #333333;
line-height: 25rpx;
text-align: center;
.three-item:last-child
margin-right: 0;
white-space: nowrap
transform: translate(-50% + 8rpx, 0)
.three-item:nth-child(2n)
.item-text
margin-top: -90rpx;
.three-background::after
position: absolute;
content: '';
@@ -420,104 +471,71 @@ defineExpose({ loadData, handleFilterConfirm });
background: #FFCB47;
border-radius: 17rpx 17rpx 17rpx 17rpx;
z-index: 1;
.nearby-list
margin-top: 40rpx;
// background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
.list-head
height: 77rpx;
background-color: #FFFFFF;
border-radius: 17rpx 17rpx 0rpx 0rpx;
position: relative;
top: -17rpx;
z-index: 2;
.tab-options
display: flex;
align-items: center;
justify-content: space-between;
height: 77rpx;
background: #FFFFFF;
border-radius: 17rpx 17rpx 0rpx 0rpx;
padding: 0 24rpx;
overflow: hidden;
.tab-scroll
height: 77rpx;
line-height: 77rpx;
flex: 1;
overflow: hidden;
padding-right: 10rpx;
.tab-op-left
display: flex;
align-items: center;
flex-wrap: nowrap;
.tab-list
text-align: center;
white-space: nowrap;
margin-right: 30rpx;
font-size: 28rpx;
color: #606060;
.tab-op-right
display: flex;
align-items: center;
.tab-recommend
white-space: nowrap;
width: fit-content;
padding: 0 10rpx;
height: 42rpx;
background: #4778EC;
border-radius: 17rpx 17rpx 0rpx 17rpx;
text-align: center;
color: #FFFFFF;
font-size: 21rpx;
line-height: 42rpx;
margin-right: 12rpx;
.tab-number
font-size: 21rpx;
color: #606060;
line-height: 25rpx;
text-align: center;
.tab-filter
display: flex;
.image
width: 28rpx;
height: 27rpx;
.one-cards
.nearby-list
border-top: 2rpx solid #EBEBEB;
.one-cards{
display: flex;
flex-direction: column;
padding: 20rpx;
.card-box
width: calc(100% - 36rpx - 36rpx);
border-radius: 0rpx 0rpx 0rpx 0rpx;
background: #FFFFFF;
border-radius: 17rpx;
padding: 15rpx 36rpx;
margin-top: 24rpx;
.box-row
display: flex;
justify-content: space-between;
margin-top: 8rpx;
padding: 0 20rpx 20rpx 20rpx;
background: #f4f4f4
}
.nav-filter
padding: 16rpx 28rpx 0 28rpx
.filter-top
display: flex
justify-content: space-between;
.tab-scroll
flex: 1;
overflow: hidden;
margin-right: 20rpx
white-space: nowrap;
overflow: hidden;
text-overflow: clip;
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
mask-image: linear-gradient(to right, black 60%, transparent);
.jobs-left
display: flex
flex-wrap: nowrap
.job
font-weight: 400;
font-size: 36rpx;
color: #666D7F;
margin-right: 32rpx;
white-space: nowrap
.active
font-weight: 500;
font-size: 36rpx;
color: #000000;
.jobs-add
display: flex
align-items: center;
.mineText
justify-content: center;
font-weight: 400;
font-size: 32rpx;
color: #666D7F;
line-height: 38rpx;
.filter-bottom
display: flex
justify-content: space-between
padding: 24rpx 0
.btm-left
display: flex
.filterbtm
font-weight: 400;
font-size: 21rpx;
color: #606060;
.textblue
color: #4778EC;
.row-right
min-width: 120rpx
text-align: right
.row-left
display: flex;
justify-content: space-between;
.row-tag
background: #13C57C;
border-radius: 17rpx 17rpx 17rpx 17rpx;
font-size: 21rpx;
color: #FFFFFF;
line-height: 25rpx;
text-align: center;
padding: 4rpx 8rpx;
margin-right: 23rpx;
.card-box:first-child
margin-top: -14rpx;
font-size: 32rpx;
color: #666D7F;
margin-right: 40rpx
.active
font-weight: 500;
font-size: 32rpx;
color: #256BFA;
.btm-right
font-weight: 400;
font-size: 32rpx;
color: #6C7282;
.right-sx
width: 26rpx;
height: 26rpx;
.active
transform: rotate(180deg)
</style>

View File

@@ -19,111 +19,94 @@
</view>
</view>
<view class="nearby-list">
<view class="list-head" @touchmove.stop.prevent>
<view class="tab-options">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll" @touchmove.stop>
<view class="tab-op-left">
<view class="nav-filter" @touchmove.stop.prevent>
<view class="filter-top">
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
<view class="jobs-left">
<view
class="tab-list"
:class="{ tabchecked: state.tabIndex === 'all' }"
class="job button-click"
:class="{ active: state.tabIndex === 'all' }"
@click="choosePosition('all')"
>
全部
</view>
<view
class="tab-list"
:class="{ tabchecked: state.tabIndex === index }"
@click="choosePosition(index)"
class="job button-click"
:class="{ active: state.tabIndex === index }"
v-for="(item, index) in userInfo.jobTitle"
:key="index"
@click="choosePosition(index)"
>
{{ item }}
</view>
</view>
</scroll-view>
<view class="tab-op-right">
<uni-icons type="plusempty" style="margin-right: 10rpx" size="20"></uni-icons>
<view class="tab-recommend">
<latestHotestStatus @confirm="handelHostestSearch"></latestHotestStatus>
</view>
<view class="tab-filter" @click="emit('onFilter', 1)">
<view class="tab-number" v-show="pageState.total">{{ formatTotal(pageState.total) }}</view>
<image class="image" src="/static/icon/filter.png"></image>
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
<text>添加</text>
</view>
</view>
<view class="filter-bottom">
<view class="btm-left">
<view
class="button-click filterbtm"
:class="{ active: pageState.search.order === item.value }"
v-for="item in rangeOptions"
@click="handelHostestSearch(item)"
:key="item.value"
>
{{ item.text }}
</view>
</view>
<view class="btm-right button-click" @click="openFilter">
筛选
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
</view>
</view>
</view>
<view class="one-cards">
<view class="card-box" v-for="(item, index) in list" :key="item.jobId" @click="navToPost(item.jobId)">
<view class="box-row mar_top0">
<view class="row-left">{{ item.jobTitle }}</view>
<view class="row-right">
<Salary-Expectation
:max-salary="item.maxSalary"
:min-salary="item.minSalary"
></Salary-Expectation>
</view>
</view>
<view class="box-row">
<view class="row-left">
<view class="row-tag" v-if="item.education">
<dict-Label dictType="education" :value="item.education"></dict-Label>
</view>
<view class="row-tag" v-if="item.experience">
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
</view>
</view>
</view>
<view class="box-row mar_top0">
<view class="row-item mineText">{{ item.postingDate || '发布日期' }}</view>
<view class="row-item mineText">{{ vacanciesTo(item.vacancies) }}</view>
<view class="row-item mineText textblue"><matchingDegree :job="item"></matchingDegree></view>
<view class="row-item">
<uni-icons type="star" size="28"></uni-icons>
<!-- <uni-icons type="star-filled" color="#FFCB47" size="30"></uni-icons> -->
</view>
</view>
<view class="box-row">
<view class="row-left mineText">{{ item.companyName }}</view>
<view class="row-right mineText">
青岛
<dict-Label dictType="area" :value="item.jobLocationAreaCode"></dict-Label>
<convert-distance
:alat="item.latitude"
:along="item.longitude"
:blat="latitude()"
:blong="longitude()"
></convert-distance>
</view>
</view>
</view>
<renderJobs
v-if="list.length"
:list="list"
:longitude="longitudeVal"
:latitude="latitudeVal"
></renderJobs>
<empty v-else pdTop="60"></empty>
<loadmore ref="loadmoreRef"></loadmore>
</view>
</view>
<loadmore ref="loadmoreRef"></loadmore>
<!-- 筛选 -->
<select-filter ref="selectFilterModel"></select-filter>
</scroll-view>
</template>
<script setup>
import dictLabel from '@/components/dict-Label/dict-Label.vue';
import { reactive, inject, watch, ref, onMounted } from 'vue';
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import useDictStore from '@/stores/useDictStore';
import useUserStore from '@/stores/useUserStore';
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
import { storeToRefs } from 'pinia';
import useLocationStore from '@/stores/useLocationStore';
const { getLocation, longitude, latitude } = useLocationStore();
const { getDictSelectOption, oneDictData } = useDictStore();
const { $api, navTo, vacanciesTo, formatTotal } = inject('globalFunction');
import useUserStore from '@/stores/useUserStore';
import useDictStore from '@/stores/useDictStore';
const { oneDictData } = useDictStore();
const { userInfo } = storeToRefs(useUserStore());
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
import point2 from '@/static/icon/point2.png';
import LocationPng from '@/static/icon/Location.png';
import selectFilter from '@/components/selectFilter/selectFilter.vue';
const emit = defineEmits(['onFilter']);
const state = reactive({
tabIndex: 'all',
tabBxText: 'buxianquyu',
});
const isLoaded = ref(false);
const showFilter = ref(false);
const selectFilterModel = ref();
const fromValue = reactive({
area: 0,
});
const loadmoreRef = ref(null);
const userInfo = ref({});
const pageState = reactive({
page: 0,
total: 0,
@@ -135,12 +118,48 @@ const pageState = reactive({
});
const list = ref([]);
onShow(() => {
userInfo.value = useUserStore().userInfo;
});
const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
]);
function navToPost(jobId) {
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
function choosePosition(index) {
state.tabIndex = index;
list.value = [];
if (index === 'all') {
pageState.search = {
...pageState.search,
jobTitle: '',
};
getJobList('refresh');
} else {
// const id = useUserStore().userInfo.jobTitleId.split(',')[index];
pageState.search.jobTitle = userInfo.value.jobTitle[index];
getJobList('refresh');
}
}
function openFilter() {
showFilter.value = true;
selectFilterModel.value?.open({
title: '筛选',
maskClick: true,
success: (values) => {
pageState.search = {
...pageState.search,
};
for (const [key, value] of Object.entries(values)) {
pageState.search[key] = value.join(',');
}
showFilter.value = false;
console.log(pageState.search);
getJobList('refresh');
},
cancel: () => {
showFilter.value = false;
},
});
}
async function loadData() {
@@ -161,15 +180,15 @@ function scrollBottom() {
loadmoreRef.value.change('loading');
}
function choosePosition(index) {
state.tabIndex = index;
if (index === 'all') {
pageState.search.jobTitle = '';
} else {
pageState.search.jobTitle = useUserStore().userInfo.jobTitle[index];
}
getJobList('refresh');
}
// function choosePosition(index) {
// state.tabIndex = index;
// if (index === 'all') {
// pageState.search.jobTitle = '';
// } else {
// pageState.search.jobTitle = userInfo.jobTitle[index];
// }
// getJobList('refresh');
// }
function changeArea(area, item) {
fromValue.area = area;
getJobList('refresh');
@@ -235,125 +254,96 @@ defineExpose({ loadData, handleFilterConfirm });
.nearby-scroll
overflow: hidden;
.two-head
margin: 24rpx;
padding: 26rpx;
background: #FFFFFF;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-column-gap: 40rpx;
grid-row-gap: 30rpx;
margin: 22rpx;
display: flex;
flex-wrap: wrap
// grid-template-columns: repeat(4, 1fr);
// grid-column-gap: 10rpx;
// grid-row-gap: 24rpx;
border-radius: 17rpx 17rpx 17rpx 17rpx;
.head-item
min-width: 129rpx;
height: 44rpx;
line-height: 44rpx;
margin: 10rpx
white-space: nowrap
min-width: 156rpx
line-height: 64rpx
text-align: center;
width: fit-content;
background: #D9D9D9;
border-radius: 17rpx 17rpx 17rpx 17rpx;
font-size: 21rpx;
color: #606060;
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
background: #F6F6F6;
border-radius: 12rpx 12rpx 12rpx 12rpx;
.active
background: #4778EC;
color: #FFFFFF;
.nearby-list
margin-top: 40rpx;
// background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
.list-head
height: 77rpx;
background-color: #FFFFFF;
border-radius: 17rpx 17rpx 0rpx 0rpx;
position: relative;
top: -17rpx;
z-index: 9999;
.tab-options
display: flex;
align-items: center;
justify-content: space-between;
height: 77rpx;
background: #FFFFFF;
border-radius: 17rpx 17rpx 0rpx 0rpx;
padding: 0 24rpx;
overflow: hidden;
.tab-scroll
height: 77rpx;
line-height: 77rpx;
flex: 1;
overflow: hidden;
padding-right: 10rpx;
.tab-op-left
display: flex;
align-items: center;
flex-wrap: nowrap;
.tab-list
text-align: center;
white-space: nowrap;
margin-right: 30rpx;
font-size: 28rpx;
color: #606060;
.tab-op-right
display: flex;
align-items: center;
.tab-recommend
white-space: nowrap;
width: fit-content;
padding: 0 10rpx;
height: 42rpx;
background: #4778EC;
border-radius: 17rpx 17rpx 0rpx 17rpx;
text-align: center;
color: #FFFFFF;
font-size: 21rpx;
line-height: 42rpx;
margin-right: 12rpx;
.tab-number
font-size: 21rpx;
color: #606060;
line-height: 25rpx;
text-align: center;
.tab-filter
display: flex;
.image
width: 28rpx;
height: 27rpx;
.one-cards
color: #256BFA;
background: #E9F0FF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
.nearby-list
border-top: 2rpx solid #EBEBEB;
.one-cards{
display: flex;
flex-direction: column;
padding: 20rpx;
.card-box
width: calc(100% - 36rpx - 36rpx);
border-radius: 0rpx 0rpx 0rpx 0rpx;
background: #FFFFFF;
border-radius: 17rpx;
padding: 15rpx 36rpx;
margin-top: 24rpx;
.box-row
display: flex;
justify-content: space-between;
margin-top: 8rpx;
padding: 0 20rpx 20rpx 20rpx;
background: #f4f4f4
}
.nav-filter
padding: 16rpx 28rpx 0 28rpx
.filter-top
display: flex
justify-content: space-between;
.tab-scroll
flex: 1;
overflow: hidden;
margin-right: 20rpx
white-space: nowrap;
overflow: hidden;
text-overflow: clip;
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
mask-image: linear-gradient(to right, black 60%, transparent);
.jobs-left
display: flex
flex-wrap: nowrap
.job
font-weight: 400;
font-size: 36rpx;
color: #666D7F;
margin-right: 32rpx;
white-space: nowrap
.active
font-weight: 500;
font-size: 36rpx;
color: #000000;
.jobs-add
display: flex
align-items: center;
.mineText
justify-content: center;
font-weight: 400;
font-size: 32rpx;
color: #666D7F;
line-height: 38rpx;
.filter-bottom
display: flex
justify-content: space-between
padding: 24rpx 0
.btm-left
display: flex
.filterbtm
font-weight: 400;
font-size: 21rpx;
color: #606060;
.textblue
color: #4778EC;
.row-right
min-width: 120rpx
text-align: right
.row-left
display: flex;
justify-content: space-between;
.row-tag
background: #13C57C;
border-radius: 17rpx 17rpx 17rpx 17rpx;
font-size: 21rpx;
color: #FFFFFF;
line-height: 25rpx;
text-align: center;
padding: 4rpx 8rpx;
margin-right: 23rpx;
.card-box:first-child
margin-top: -14rpx;
font-size: 32rpx;
color: #666D7F;
margin-right: 40rpx
.active
font-weight: 500;
font-size: 32rpx;
color: #256BFA;
.btm-right
font-weight: 400;
font-size: 32rpx;
color: #6C7282;
.right-sx
width: 26rpx;
height: 26rpx;
.active
transform: rotate(180deg)
</style>

View File

@@ -1,56 +1,36 @@
<template>
<view class="app-container">
<view class="nearby-head">
<view class="head-item" :class="{ actived: state.current === 0 }" @click="changeType(0)">附近工作</view>
<view class="head-item" :class="{ actived: state.current === 1 }" @click="changeType(1)">区县工作</view>
<view class="head-item" :class="{ actived: state.current === 2 }" @click="changeType(2)">地铁周边</view>
<view class="head-item" :class="{ actived: state.current === 3 }" @click="changeType(3)">商圈附近</view>
<AppLayout title="附近" :use-scroll-view="false">
<template #headerleft>
<view class="btn">
<image src="@/static/icon/back.png" @click="navBack"></image>
</view>
</template>
<view class="app-container">
<view class="nearby-head">
<view class="head-item" :class="{ actived: state.current === 0 }" @click="changeType(0)">附近工作</view>
<view class="head-item" :class="{ actived: state.current === 1 }" @click="changeType(1)">区县工作</view>
<view class="head-item" :class="{ actived: state.current === 2 }" @click="changeType(2)">地铁周边</view>
<view class="head-item" :class="{ actived: state.current === 3 }" @click="changeType(3)">商圈附近</view>
</view>
<view class="nearby-content">
<swiper class="swiper" :current="state.current" @change="changeSwiperType">
<swiper-item class="swiper-item" v-for="(_, index) in 4" :key="index">
<component :is="components[index]" :ref="(el) => handelComponentsRef(el, index)" />
</swiper-item>
</swiper>
</view>
</view>
<view class="nearby-content">
<swiper class="swiper" :current="state.current" @change="changeSwiperType">
<!-- 动态绑定ref -->
<swiper-item class="swiper-item" v-for="(_, index) in 4" :key="index">
<component
:is="components[index]"
@onFilter="addfileter"
:ref="(el) => handelComponentsRef(el, index)"
/>
</swiper-item>
</swiper>
</view>
<!-- 弹窗 -->
<screeningJobRequirementsVue
:area="false"
v-model:show="showFilter"
@confirm="handleFilterConfirm"
></screeningJobRequirementsVue>
<screeningJobRequirementsVue
:area="false"
v-model:show="showFilter1"
@confirm="handleFilterConfirm"
></screeningJobRequirementsVue>
<screeningJobRequirementsVue
:area="false"
v-model:show="showFilter2"
@confirm="handleFilterConfirm"
></screeningJobRequirementsVue>
<screeningJobRequirementsVue
:area="false"
v-model:show="showFilter3"
@confirm="handleFilterConfirm"
></screeningJobRequirementsVue>
</view>
</AppLayout>
</template>
<script setup>
import screeningJobRequirementsVue from '@/components/screening-job-requirements/screening-job-requirements.vue';
import oneComponent from './components/one.vue';
import twoComponent from './components/two.vue';
import threeComponent from './components/three.vue';
import fourComponent from './components/four.vue';
import { reactive, inject, watch, ref, onMounted } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
const { $api, debounce, throttle } = inject('globalFunction');
const { $api, debounce, throttle, navBack } = inject('globalFunction');
const loadedMap = reactive([false, false, false, false]);
const swiperRefs = [ref(null), ref(null), ref(null), ref(null)];
const components = [oneComponent, twoComponent, threeComponent, fourComponent];
@@ -66,35 +46,13 @@ const state = reactive({
all: [{}],
});
// filter education aera scale 。。。。
function handleFilterConfirm(e) {
swiperRefs[filterId.value].value?.handleFilterConfirm(e);
}
function addfileter(val) {
filterId.value = val;
switch (val) {
case 0:
showFilter.value = true;
break;
case 1:
showFilter1.value = true;
break;
case 2:
showFilter2.value = true;
break;
case 3:
showFilter3.value = true;
break;
}
}
onMounted(() => {
handleTabChange(state.current);
});
const handelComponentsRef = (el, index) => {
if (el) {
console.log(el);
swiperRefs[index].value = el;
}
};
@@ -118,29 +76,43 @@ function handleTabChange(index) {
</script>
<style lang="stylus" scoped>
.btn {
display: flex;
justify-content: space-between;
align-items: center;
width: 60rpx;
height: 60rpx;
}
image {
height: 100%;
width: 100%;
}
.app-container
width: 100%;
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
height: 100%;
display: flex;
flex-direction: column;
.nearby-head
height: 63rpx;
font-size: 28rpx;
color: #FFFFFF;
line-height: 63rpx;
text-align: center;
display: flex;
align-items: center;
font-weight: 400;
font-size: 32rpx;
color: #666D7F;
.head-item
width: calc(100% / 4);
z-index: 9
.actived
// width: 169rpx;
height: 63rpx;
background: #13C57C;
box-shadow: 0rpx 7rpx 7rpx 0rpx rgba(0,0,0,0.25);
border-radius: 0rpx 0rpx 0rpx 0rpx;
// height: 63rpx;
// background: #13C57C;
// box-shadow: 0rpx 7rpx 7rpx 0rpx rgba(0,0,0,0.25);
// border-radius: 0rpx 0rpx 0rpx 0rpx;
font-weight: 500;
font-size: 32rpx;
color: #000000;
.nearby-content
flex: 1;
overflow: hidden;

247
pages/search/search.vue Normal file
View File

@@ -0,0 +1,247 @@
<template>
<view class="container">
<view class="top">
<image class="btnback button-click" src="@/static/icon/back.png" @click="navBack"></image>
<view class="search-box">
<uni-icons
class="iconsearch"
color="#666666"
type="search"
size="18"
@confirm="searchCollection"
></uni-icons>
<input
class="inputed"
type="text"
focus
v-model="searchValue"
placeholder="搜索职位名称"
placeholder-class="placeholder"
/>
</view>
<view class="search-btn button-click" @click="searchBtn">搜索</view>
</view>
<scroll-view scroll-y class="Detailscroll-view" v-show="list.length" @scrolltolower="getJobList('add')">
<view class="cards-box">
<renderJobs :list="list" :longitude="longitude" :latitude="latitude"></renderJobs>
</view>
</scroll-view>
<view class="main-content" v-show="!list.length">
<view class="content-top">
<view class="top-left">历史搜索</view>
<view class="top-right button-click" @click="remove">
<uni-icons type="trash" color="#C1C1C1" size="20"></uni-icons>
</view>
</view>
<view class="content-history">
<view class="history-tag" v-for="(item, index) in historyList" :key="index" @click="searchFn(item)">
{{ item }}
</view>
</view>
</view>
</view>
</template>
<script setup>
import { inject, ref, reactive } from 'vue';
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
import SelectJobs from '@/components/selectJobs/selectJobs.vue';
const { $api, navBack } = inject('globalFunction');
import useLocationStore from '@/stores/useLocationStore';
const { getLocation, longitude, latitude } = useLocationStore();
import { storeToRefs } from 'pinia';
const searchValue = ref('');
const historyList = ref([]);
const list = ref([]);
const pageState = reactive({
page: 0,
total: 0,
maxPage: 2,
pageSize: 10,
search: {
order: 0,
},
});
onLoad(() => {
let arr = uni.getStorageSync('searchList');
if (arr) {
historyList.value = uni.getStorageSync('searchList');
}
});
function searchFn(item) {
searchValue.value = item;
searchBtn();
}
function searchBtn() {
if (!searchValue.value) {
return;
}
historyList.value.unshift(searchValue.value);
historyList.value = unique(historyList.value);
uni.setStorageSync('searchList', historyList.value);
getJobList('refresh');
}
function searchCollection(e) {
const value = e.detail.value;
pageState.search.jobTitle = value;
getJobList('refresh');
}
function unique(arr) {
for (var i = 0; i < arr.length; i++) {
for (var j = i + 1; j < arr.length; j++) {
if (arr[i] == arr[j]) {
//第一个等同于第二个splice方法删除第二个
arr.splice(j, 1);
j--;
}
}
}
return arr;
}
function remove() {
uni.removeStorage({
key: 'searchList',
});
historyList.value = [];
}
function getJobList(type = 'add') {
console.log(type);
if (type === 'add' && pageState.page < pageState.maxPage) {
pageState.page += 1;
}
if (type === 'refresh') {
list.value = [];
pageState.page = 1;
pageState.maxPage = 2;
}
let params = {
current: pageState.page,
pageSize: pageState.pageSize,
...pageState.search,
jobTitle: searchValue.value,
};
$api.createRequest('/app/job/list', params).then((resData) => {
const { rows, total } = resData;
if (type === 'add') {
const str = pageState.pageSize * (pageState.page - 1);
const end = list.value.length;
const reslist = rows;
list.value.splice(str, end, ...reslist);
} else {
list.value = rows;
}
pageState.total = resData.total;
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
if (rows.length < pageState.pageSize) {
// loadmoreRef.value?.change('noMore');
} else {
// loadmoreRef.value?.change('more');
}
});
}
</script>
<style lang="stylus" scoped>
.cards-box{
padding: 0 28rpx 28rpx 28rpx
}
.Detailscroll-view{
flex: 1
overflow: hidden
}
.container{
display: flex
flex-direction: column
background: #F4f4f4
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
.main-content{
background: #FFFFFF
height: 100%
.content-top{
padding: 28rpx
display: flex
justify-content: space-between
align-items: center
.top-left{
font-weight: 600;
font-size: 36rpx;
color: #000000;
line-height: 42rpx;
}
}
.content-history{
padding: 0 28rpx;
display: flex
flex-wrap: wrap
.history-tag{
margin-right: 40rpx
margin-bottom: 20rpx
white-space: nowrap
font-weight: 400;
font-size: 28rpx;
color: #333333;
background: #F5F5F5;
border-radius: 12rpx 12rpx 12rpx 12rpx;
width: fit-content;
padding: 12rpx 20rpx
}
}
}
.top {
display: flex;
align-items: center;
justify-content: space-between
background-color: #fff;
padding: 20rpx 20rpx;
position: sticky;
top: 0
.btnback{
width: 60rpx;
height: 60rpx;
}
.search-box{
flex: 1;
padding: 0 24rpx 0 6rpx;
position: relative
.inputed {
padding-left: 30rpx
width: 100%;
background: #F8F8F8;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 36rpx;
color: #666666;
padding: 0 30rpx 0 80rpx;
box-sizing: border-box;
height: 80rpx;
background: #F5F5F5;
border-radius: 75rpx 75rpx 75rpx 75rpx;
}
.iconsearch{
position: absolute
top: 50%
left: 36rpx
transform: translate(0, -50%)
}
}
.search-btn {
padding-right: 18rpx;
text-align: center;
height: 64rpx;
line-height: 64rpx;
font-size: 32rpx;
font-weight: 500;
color: #256BFA;
}
}
}
</style>