课程详情跳转

This commit is contained in:
NiSen
2023-09-25 17:02:26 +08:00
parent 8e43c67209
commit 51a0869bb3

View File

@@ -169,9 +169,38 @@ export default {
},
methods: {
toCourseDetail(cinfo) {
console.log(cinfo);
//课程列表详情
toCourseDetail(item) {
let courseId = item.id;
if (!courseId) {
courseId = item.courseId;
}
if (item.source == 1) {
this.$router.push('/course/boeframe?id=' + courseId + '&type=' + item.type);
} else if (item.source == 3) {
//跳转到管理系统的页面
let manageApi = process.env.VUE_APP_MANAGER_API_PATH;
let studentPath = process.env.VUE_APP_STUDENT_PATH;
if (item.type == 30) { //线下课,面授课
let params = encodeURIComponent('courseId=' + courseId);
this.$router.push('/forward?to=' + manageApi + '/stu/project/redirectDetail&params=' + params);
} else if (item.type == 40) { //学习项目
let params = encodeURIComponent('projectId=' + courseId);
this.$router.push('/forward?to=' + studentPath + '/projectdetails&params=' + params);
}
} else {
if (item.type == 10) {
this.$router.push("/course/studyindex?id=" + courseId);
} else if (item.type == 20) {
apiCourseStudy.hasSignup(courseId).then(rs => {
if (rs.status == 200) {
this.$router.push("/course/studyindex?id=" + courseId);
} else {
this.$router.push("/course/detail?id=" + courseId);
}
})
}
}
},
emitInput() {
@@ -230,6 +259,7 @@ export default {
transform: scale(1.25) translateY(-15px);
transition: all 0.6s;
}
// 关键字卡片的样式
.keywordInfo-every {
display: grid;