fix:处理不存在报名记录的情况

This commit is contained in:
zxj
2025-12-11 23:30:01 +08:00
parent 8bbe6f15ca
commit f83438e97d

View File

@@ -118,13 +118,18 @@ export default {
// 从后端获取用户信息和报名状态
const res = await getWelcomeData();
const szxygProjectInfo = await getSzxygProjectInfo();
this.allowSelfRegistration =
szxygProjectInfo.data.allowSelfRegistration;
if (res.status === 200 && res.data) {
if (typeof res.data === "string") {
this.approvalResults = null;
return;
}
this.userName = res.data.studentName;
// 1报名失败、2审核中、3审核通过、4审核失败
if (res.data.approvalResults) {
this.approvalResults = res.data.approvalResults;
this.allowSelfRegistration =
szxygProjectInfo.data.allowSelfRegistration;
if (res.data.approvalResults != 1) {
this.$router.push("/new-employee/study");
}