mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
fix:报名后直接进入学习页面
This commit is contained in:
@@ -298,6 +298,7 @@ import { mapGetters, mapActions } from "vuex";
|
|||||||
import apiMessage from "@/api/system/message.js";
|
import apiMessage from "@/api/system/message.js";
|
||||||
import popup from "@/components/AlertPopup.vue";
|
import popup from "@/components/AlertPopup.vue";
|
||||||
import yearMedal from "@/components/Popup/China2023.vue";
|
import yearMedal from "@/components/Popup/China2023.vue";
|
||||||
|
import { getWelcomeData } from "@/api/new-employee/newEmployee";
|
||||||
import apiBoeCourse from "@/api/boe/course.js";
|
import apiBoeCourse from "@/api/boe/course.js";
|
||||||
import { userAvatarText } from "@/utils/tools.js";
|
import { userAvatarText } from "@/utils/tools.js";
|
||||||
import apiCase from "@/api/modules/cases.js";
|
import apiCase from "@/api/modules/cases.js";
|
||||||
@@ -416,7 +417,17 @@ export default {
|
|||||||
};
|
};
|
||||||
window.open(obj[val]);
|
window.open(obj[val]);
|
||||||
},
|
},
|
||||||
handleCommand(val) {
|
async handleCommand(val) {
|
||||||
|
if (val === "five") {
|
||||||
|
// 从后端获取用户信息和报名状态
|
||||||
|
const res = await getWelcomeData();
|
||||||
|
if (res.status === 200 && res.data) {
|
||||||
|
if (res.data?.approvalResults != 1) {
|
||||||
|
this.$router.push("/new-employee/study");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (val === "four") {
|
if (val === "four") {
|
||||||
window.open("https://m.qingxuetang.com/x/?appId=qxtcorp306130");
|
window.open("https://m.qingxuetang.com/x/?appId=qxtcorp306130");
|
||||||
// this.$emit('showClass',true)
|
// this.$emit('showClass',true)
|
||||||
|
|||||||
@@ -337,6 +337,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import desk from "@/api/console.js";
|
import desk from "@/api/console.js";
|
||||||
|
import { getWelcomeData } from "@/api/new-employee/newEmployee";
|
||||||
import Cookies from "vue-cookies";
|
import Cookies from "vue-cookies";
|
||||||
import InterestCollection from "@/components/Portal/interestCollection.vue";
|
import InterestCollection from "@/components/Portal/interestCollection.vue";
|
||||||
import GuideBox from "@/components/Portal/guideBox.vue";
|
import GuideBox from "@/components/Portal/guideBox.vue";
|
||||||
@@ -413,7 +414,7 @@ export default {
|
|||||||
closeSignDlg() {
|
closeSignDlg() {
|
||||||
this.signInShow = false;
|
this.signInShow = false;
|
||||||
},
|
},
|
||||||
handleCommand(val) {
|
async handleCommand(val) {
|
||||||
// let obj = {
|
// let obj = {
|
||||||
// one: process.env.VUE_APP_BOE_WEB_URL+'/web/teacherLesson',
|
// one: process.env.VUE_APP_BOE_WEB_URL+'/web/teacherLesson',
|
||||||
// two: process.env.VUE_APP_BOE_WEB_URL+'/grow180/login',
|
// two: process.env.VUE_APP_BOE_WEB_URL+'/grow180/login',
|
||||||
@@ -421,6 +422,16 @@ export default {
|
|||||||
// four: 'https://m.qingxuetang.com/x/?appId=qxtcorp306130',
|
// four: 'https://m.qingxuetang.com/x/?appId=qxtcorp306130',
|
||||||
// five: process.env.VUE_APP_BOE_WEB_URL+'/boe/new-employee/index.html'
|
// five: process.env.VUE_APP_BOE_WEB_URL+'/boe/new-employee/index.html'
|
||||||
// };
|
// };
|
||||||
|
if (val === "five") {
|
||||||
|
// 从后端获取用户信息和报名状态
|
||||||
|
const res = await getWelcomeData();
|
||||||
|
if (res.status === 200 && res.data) {
|
||||||
|
if (res.data?.approvalResults != 1) {
|
||||||
|
this.$router.push("/new-employee/study");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (val === "for") {
|
if (val === "for") {
|
||||||
this.uClassShow = true;
|
this.uClassShow = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ export default {
|
|||||||
elective: 0,
|
elective: 0,
|
||||||
},
|
},
|
||||||
// 学习引导弹窗
|
// 学习引导弹窗
|
||||||
guideDialogVisible: false,
|
guideDialogVisible: true,
|
||||||
// 转正流程图弹窗
|
// 转正流程图弹窗
|
||||||
chartVisible: false,
|
chartVisible: false,
|
||||||
approvalList: {
|
approvalList: {
|
||||||
@@ -421,7 +421,6 @@ export default {
|
|||||||
this.$refs.customMessage.show("未报名或报名失败,请前往报名页面进行报名");
|
this.$refs.customMessage.show("未报名或报名失败,请前往报名页面进行报名");
|
||||||
this.$router.push("/new-employee/welcome");
|
this.$router.push("/new-employee/welcome");
|
||||||
}
|
}
|
||||||
this.guideDialogVisible = this.$route.query?.fromWelcome == 1;
|
|
||||||
// 1报名失败、2审核中、3审核通过、4审核失败
|
// 1报名失败、2审核中、3审核通过、4审核失败
|
||||||
this.approvalResults = res.data.approvalResults;
|
this.approvalResults = res.data.approvalResults;
|
||||||
await this.initIds();
|
await this.initIds();
|
||||||
|
|||||||
Reference in New Issue
Block a user