mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-17 06:46:43 +08:00
fix:处理不存在报名记录的情况
This commit is contained in:
@@ -118,13 +118,18 @@ export default {
|
|||||||
// 从后端获取用户信息和报名状态
|
// 从后端获取用户信息和报名状态
|
||||||
const res = await getWelcomeData();
|
const res = await getWelcomeData();
|
||||||
const szxygProjectInfo = await getSzxygProjectInfo();
|
const szxygProjectInfo = await getSzxygProjectInfo();
|
||||||
|
this.allowSelfRegistration =
|
||||||
|
szxygProjectInfo.data.allowSelfRegistration;
|
||||||
if (res.status === 200 && res.data) {
|
if (res.status === 200 && res.data) {
|
||||||
|
if (typeof res.data === "string") {
|
||||||
|
this.approvalResults = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.userName = res.data.studentName;
|
this.userName = res.data.studentName;
|
||||||
// 1报名失败、2审核中、3审核通过、4审核失败
|
// 1报名失败、2审核中、3审核通过、4审核失败
|
||||||
if (res.data.approvalResults) {
|
if (res.data.approvalResults) {
|
||||||
this.approvalResults = res.data.approvalResults;
|
this.approvalResults = res.data.approvalResults;
|
||||||
this.allowSelfRegistration =
|
|
||||||
szxygProjectInfo.data.allowSelfRegistration;
|
|
||||||
if (res.data.approvalResults != 1) {
|
if (res.data.approvalResults != 1) {
|
||||||
this.$router.push("/new-employee/study");
|
this.$router.push("/new-employee/study");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user