fix:报名页面获取社招新员工详情

This commit is contained in:
zxj
2025-12-11 23:25:06 +08:00
parent 5d0b9fc133
commit 8bbe6f15ca

View File

@@ -81,7 +81,11 @@
<script>
import { mapGetters } from "vuex";
import { getWelcomeData, enrollRequest } from "@/api/new-employee/newEmployee";
import {
getWelcomeData,
enrollRequest,
getSzxygProjectInfo,
} from "@/api/new-employee/newEmployee";
import NewEmployeeGuideDialog from "@/components/NewEmployeeGuideDialog.vue";
import CustomErrorMessage from "@/components/CustomErrorMessage.vue";
@@ -113,12 +117,14 @@ export default {
try {
// 从后端获取用户信息和报名状态
const res = await getWelcomeData();
const szxygProjectInfo = await getSzxygProjectInfo();
if (res.status === 200 && res.data) {
this.userName = res.data.studentName;
// 1报名失败、2审核中、3审核通过、4审核失败
if (res.data.approvalResults) {
this.approvalResults = res.data.approvalResults;
this.allowSelfRegistration = res.data.allowSelfRegistration;
this.allowSelfRegistration =
szxygProjectInfo.data.allowSelfRegistration;
if (res.data.approvalResults != 1) {
this.$router.push("/new-employee/study");
}