自动报名

This commit is contained in:
daihh
2022-10-30 17:45:01 +08:00
parent 6470e488b5
commit 40d29343be
4 changed files with 73 additions and 79 deletions

View File

@@ -85,6 +85,7 @@
<div class="course-card-favorite">
<interactBar :type="1" nodeWidth="20px" :data="cinfo" :courseExclusive="true" :comments="false" :praises="false" :shares="false" :views="false"></interactBar>
</div>
<!-- <a :href="toCourseDetail(cinfo)"> -->
<a :href="toCourseDetail(cinfo)">
<div class="course-image-box">
<course-image :course="cinfo"></course-image>
@@ -291,6 +292,7 @@ import portalFloatTools from "@/components/PortalFloatTools.vue";
import authorInfo from "@/components/Portal/authorInfo.vue";
import courseItem from "@/components/Portal/course/courseItem.vue";
import apiCoursePortal from "@/api/modules/coursePortal.js";
import apiCourseStudy from "@/api/modules/courseStudy.js";
import courseForm from "@/components/Course/courseForm.vue";
import apiType from "@/api/modules/type.js";
import apiCourse from "@/api/modules/coursePortal.js";
@@ -536,16 +538,24 @@ export default {
});
},
toCourseDetail(item) {
let $this=this;
if (item.source == 1) {
return `${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`;
//此处使用window.open有问题
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`);
} else {
// if (item.type == 10) {
// return this.webBaseUrl + "/course/micro?id=" + item.id;
// } else if (item.type == 20) {
return this.webBaseUrl + "/course/detail?id=" + item.id;
// }
if (item.type == 10) {
return this.webBaseUrl + "/course/studyindex?id=" + item.id;
} else if (item.type == 20) {
// apiCourseStudy.hasSignup(item.id).then(rs=>{
// if(rs.status==200){
// return $this.webBaseUrl + "/course/studyindex?id=" + item.id;
// }else{
// return $this.webBaseUrl + "/course/detail?id=" + item.id;
// }
// })
return $this.webBaseUrl + "/course/detail?id=" + item.id;
}
}
return "";