投递简历添加确认弹窗

This commit is contained in:
francis_fh
2026-01-27 13:58:46 +08:00
parent e0f8faf757
commit dbdb330189
3 changed files with 209 additions and 26 deletions

View File

@@ -222,6 +222,18 @@
</view>
</template>
<VideoPlayer ref="videoPalyerRef" />
<!-- 确认弹窗 -->
<view v-if="showConfirmDialog" class="confirm-dialog">
<view class="dialog-content">
<view class="dialog-title">确认投递</view>
<view class="dialog-message">确定要投递此职位吗</view>
<view class="dialog-buttons">
<view class="btn-cancel button-click" @click="cancelApply">取消</view>
<view class="btn-confirm button-click" @click="confirmApply">确认</view>
</view>
</view>
</view>
</AppLayout>
</template>
@@ -266,6 +278,7 @@ const raderData = ref({
});
const videoPalyerRef = ref(null);
const explainUrlRef = ref('');
const showConfirmDialog = ref(false);
// 申请人列表直接使用接口返回的applyUsers数组
@@ -422,24 +435,28 @@ function jobApply() {
$api.msg('请您先登录');
return;
}
// 显示确认弹窗
showConfirmDialog.value = true;
}
// 确认投递
function confirmApply() {
const jobId = jobInfo.value.jobId;
$api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
getDetail(jobId);
$api.msg('申请成功');
const jobUrl = jobInfo.value.jobUrl;
// return window.open(jobUrl);
});
// if (jobInfo.value.isApply) {
// const jobUrl = jobInfo.value.jobUrl;
// return window.open(jobUrl);
// } else {
// $api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
// getDetail(jobId);
// $api.msg('申请成功');
// const jobUrl = jobInfo.value.jobUrl;
// return window.open(jobUrl);
// });
// }
$api.msg('申请成功');
const jobUrl = jobInfo.value.jobUrl;
// return window.open(jobUrl);
showConfirmDialog.value = false;
});
}
// 取消投递
function cancelApply() {
const jobId = jobInfo.value.jobId;
$api.createRequest(`/app/job/applyJobCencal`, { jobId }, 'DELETE').then((resData) => {
$api.msg('取消投递成功');
showConfirmDialog.value = false;
});
}
// 取消/收藏岗位
@@ -966,4 +983,70 @@ for i in 0..100
font-weight: bold;
color: #333;
}
// 确认弹窗样式
.confirm-dialog {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.dialog-content {
width: 80%;
max-width: 500rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 40rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.dialog-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
margin-bottom: 30rpx;
}
.dialog-message {
font-size: 28rpx;
color: #666;
margin-bottom: 40rpx;
text-align: center;
}
.dialog-buttons {
width: 100%;
display: flex;
justify-content: space-between;
gap: 20rpx;
}
.btn-cancel, .btn-confirm {
flex: 1;
height: 80rpx;
border-radius: 12rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
font-weight: 500;
}
.btn-cancel {
background-color: #f5f5f5;
color: #666;
}
.btn-confirm {
background-color: #256BFA;
color: #fff;
}
</style>