feat 对接外部数据投递功能

This commit is contained in:
2025-11-25 16:20:34 +08:00
parent fe6fe43636
commit 99a3fe41c5
5 changed files with 25 additions and 20 deletions

View File

@@ -46,10 +46,10 @@
<view class="card-companyName">{{ job.companyName }}</view>
<view class="card-tags">
<view class="tag">
<dict-Label dictType="education" :value="job.education"></dict-Label>
{{job.education == '不限' ? '学历不限' : job.education}}
</view>
<view class="tag">
<dict-Label dictType="experience" :value="job.experience"></dict-Label>
{{job.experience == '不限' ? '经验不限' : job.experience}}
</view>
<view class="tag">
{{ vacanciesTo(job.vacancies) }}
@@ -129,7 +129,7 @@ function parseDateTime(datetimeStr) {
}
function nextDetail(job) {
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`);
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=${job.dataType}`);
}
</script>

View File

@@ -41,8 +41,6 @@ onReachBottom(() => {
getJobList();
});
function getJobList(type = 'add') {
if (type === 'refresh') {
pageState.page = 1;

View File

@@ -24,7 +24,6 @@
</view>
<scroll-view scroll-y class="main-scroll" @scrolltolower="getJobList('add')">
<view class="one-cards">
<view class="mian">
<renderJobViewRecord
:list="pageState.list"
v-if="pageState.list.length"
@@ -33,7 +32,7 @@
></renderJobViewRecord>
<empty v-else pdTop="200"></empty>
<!-- <loadmore ref="loadmoreRef"></loadmore> -->
</view>
</view>
</scroll-view>
</view>

View File

@@ -162,8 +162,13 @@
<template #footer>
<view class="footer">
<view class="btn-wq button-click" @click="jobApply">
{{ dataType === 2 ? '立即投递' : '立即前往' }}
<view v-if="dataType==2" class="btn-wq button-click" :class="{'btn-des' : jobInfo.isApply}" @click="jobApply">
<span v-if="jobInfo.isApply"> 已投递 </span>
<span v-if="!jobInfo.isApply"> 立即投递</span>
</view>
<view v-else class="btn-wq button-click" @click="jobApply">
<span v-if="jobInfo.isApply"> 立即前往</span>
<span v-if="!jobInfo.isApply">立即投递 </span>
</view>
</view>
</template>
@@ -308,19 +313,18 @@ function getCompetivetuveness(jobId) {
// 申请岗位
function jobApply() {
if (dataType.value === 2) {
$api.msg('敬请期待');
return
// 第三方数据申请逻辑
const jobId = jobInfo.value.id;
const params = {
jobid:jobInfo.value.id,
jobname:jobInfo.value.gwmc
}
if (jobInfo.value.isApply) {
const jobUrl = jobInfo.value.jobUrl;
return window.open(jobUrl);
$api.msg('已经投递过该岗位了~');
return ;
} else {
$api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
getDetail(jobIdRef.value);
$api.createRequest(`/app/internal/sendResume`, params, 'POST').then((resData) => {
$api.msg('投递成功');
const jobUrl = jobInfo.value.jobUrl;
return window.open(jobUrl);
getDetail(jobIdRef.value);
});
}
} else {
@@ -651,5 +655,9 @@ for i in 0..100
text-align: center;
line-height: 90rpx
}
.btn-des{
background: #6697FB;
box-shadow: 0rpx -4rpx 24rpx 0rpx rgba(11,44,112,0.12);
}
}
</style>

View File

@@ -259,8 +259,8 @@ function getHoursBetween(startTimeStr, endTimeStr) {
const selectDate = (item) => {
if (currentDay.value?.fullDate === item.fullDate) {
currentDay.value = {};
getFair('refresh');
// currentDay.value = {};
// getFair('refresh');
return;
}
currentDay.value = item;