人才首页接口对接
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Date: 2025-10-16 15:15:47
|
||||
* @LastEditors: shirlwang
|
||||
* @LastEditTime: 2025-10-22 09:54:53
|
||||
* @LastEditors: lip
|
||||
* @LastEditTime: 2025-11-03 18:52:09
|
||||
-->
|
||||
<template>
|
||||
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
|
||||
@@ -38,20 +38,24 @@
|
||||
<view class="title-item" :class="{active: activeTitle == 1}" @click="activeTitle = 1"><view>推荐岗位</view></view>
|
||||
<view class="title-item" :class="{active: activeTitle == 2}" @click="activeTitle = 2"><view>热门岗位</view></view>
|
||||
</view>
|
||||
<view v-for="(item, index) in jobList" :key="index" class="job-list">
|
||||
<view v-for="(item, index) in recomList" :key="index" class="job-list">
|
||||
<view class="top-line">
|
||||
<view class="salary">4000-8000/月</view>
|
||||
<view class="time"><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期:2025-10-20</view>
|
||||
<view class="salary">{{item.minSalary}}-{{item.maxSalary}}/月</view>
|
||||
<view class="time"><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期:{{ item.postingDate }}</view>
|
||||
</view>
|
||||
<view class="title">销售顾问</view>
|
||||
<view class="title">{{ item.jobTitle }}</view>
|
||||
<view class="infos">
|
||||
<view>大专</view>
|
||||
<view>1-3年</view>
|
||||
<view>喀什 市南区</view>
|
||||
<view>
|
||||
<dict-Label dictType="education" :value="item.education"></dict-Label>
|
||||
</view>
|
||||
<view>
|
||||
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
|
||||
</view>
|
||||
<view>{{ item.jobLocation }}</view>
|
||||
</view>
|
||||
<view class="bottom-line">
|
||||
<view><uni-icons color="#A2A2A2" type="person" size="12"></uni-icons>6人</view>
|
||||
<view>青岛xx公司</view>
|
||||
<view><uni-icons color="#A2A2A2" type="person" size="12"></uni-icons>{{item.vacancies}}人</view>
|
||||
<view>{{ item.companyName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-more-btn" @click="viewMore">查看更多内容</view>
|
||||
@@ -80,14 +84,19 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
|
||||
const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction');
|
||||
let activeTab = ref(1)
|
||||
let activeTitle = ref(1)
|
||||
let jobList = ref([{},{},{},{},{},{}])
|
||||
|
||||
function back() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
onMounted(()=>{
|
||||
getJobRecommed()
|
||||
})
|
||||
|
||||
function viewMore() {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/jobList/jobList'
|
||||
@@ -106,6 +115,44 @@ function tiao(){
|
||||
}
|
||||
});
|
||||
}
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const conditionSearch = ref({});
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
total: 0,
|
||||
maxPage: 2,
|
||||
pageSize: 10,
|
||||
search: {
|
||||
order: 0,
|
||||
},
|
||||
});
|
||||
let jobList = ref([])
|
||||
let recomList = ref([])
|
||||
// 获取推荐岗位
|
||||
function getJobRecommed(){
|
||||
let params = {
|
||||
pageSize: pageState.pageSize,
|
||||
sessionId: useUserStore().seesionId,
|
||||
...pageState.search,
|
||||
...conditionSearch.value,
|
||||
isPublish: 1,
|
||||
};
|
||||
$api.createRequest('/app/job/recommend', params).then((resData) => {
|
||||
const { data, total } = resData;
|
||||
console.log(resData)
|
||||
recomList.value = resData.data
|
||||
pageState.total = 0;
|
||||
});
|
||||
}
|
||||
|
||||
// 获取岗位列表
|
||||
function getJobList(){
|
||||
$api.createRequest('/app/job/list', params).then((resData) => {
|
||||
console.log(resData)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@@ -1001,16 +1001,16 @@ function dataToImg(data) {
|
||||
}
|
||||
|
||||
// import { loginRc } from '@/apiRc/login/login.js';
|
||||
import storeRc from '@/utilsRc/store/index.js';
|
||||
// import storeRc from '@/utilsRc/store/index.js';
|
||||
// 跳转到高校毕业页面
|
||||
function goRc(){
|
||||
if (checkLogin()) {
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
console.log(uni.getStorageSync('userInfo'), "uni.getStorageSync('userInfo')");
|
||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||
// let userInfo = uni.getStorageSync('userInfo')
|
||||
// console.log(uni.getStorageSync('userInfo'), "uni.getStorageSync('userInfo')");
|
||||
// storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||
// console.log(res, "'res");
|
||||
navTo('/packageRc/pages/index/index');
|
||||
});
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user