diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index 33691628..981afb40 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -86,7 +86,7 @@ - + 录播课 @@ -135,7 +135,7 @@ 好评榜 - + @@ -182,7 +182,7 @@ 人气榜 - + @@ -229,7 +229,7 @@ 热度榜 - + @@ -540,21 +540,26 @@ export default { toCourseDetail(item) { let $this=this; if (item.source == 1) { - return `${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`; + //return `${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`; + //location.href=`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`; + this.$router.push(`${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/studyindex?id=" + item.id; + //return this.webBaseUrl + "/course/studyindex?id=" + item.id; + this.$router.push("/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; + apiCourseStudy.hasSignup(item.id).then(rs=>{ + if(rs.status==200){ + //return $this.webBaseUrl + "/course/studyindex?id=" + item.id; + this.$router.push("/course/studyindex?id=" + item.id); + }else{ + //return $this.webBaseUrl + "/course/detail?id=" + item.id; + this.$router.push("/course/detail?id=" + item.id); + } + }) + //return $this.webBaseUrl + "/course/detail?id=" + item.id; } }