mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
修改首页的点击
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
<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)">
|
||||
<a @click="toCourseDetail(cinfo)">
|
||||
<div class="course-image-box">
|
||||
<course-image :course="cinfo"></course-image>
|
||||
<span v-if="cinfo.type == 20 || 10" class="course-type-left">录播课</span>
|
||||
@@ -135,7 +135,7 @@
|
||||
<div class="ranking-title">好评榜</div>
|
||||
<ul class="ranking-data">
|
||||
<li class="list-info" v-for="(item, index) in scorelist" :key="index" style="cursor: pointer;margin-top:24px;line-height: 30px;display: flex;">
|
||||
<a style="display: inherit" :href="toCourseDetail(item)">
|
||||
<a style="display: inherit" @click="toCourseDetail(item)">
|
||||
<span class="portal-right-text blue-one" v-if="index==0">
|
||||
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
|
||||
</span>
|
||||
@@ -182,7 +182,7 @@
|
||||
<div class="ranking-title">人气榜</div>
|
||||
<ul class="ranking-data">
|
||||
<li class="list-info" v-for="(item, index) in ankingList" :key="index" style="cursor: pointer;margin-top:24px;line-height: 30px;display: flex;">
|
||||
<a style="display: inherit" :href="toCourseDetail(item)">
|
||||
<a style="display: inherit" @click="toCourseDetail(item)">
|
||||
<span class="portal-right-text orange-one" v-if="index==0">
|
||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||
</span>
|
||||
@@ -229,7 +229,7 @@
|
||||
<div class="ranking-title">热度榜</div>
|
||||
<ul class="ranking-data">
|
||||
<li class="list-info" v-for="(item, index) in hotList" :key="index" style="cursor: pointer;margin-top:24px;line-height: 30px;display: flex;">
|
||||
<a style="display: inherit" :href="toCourseDetail(item)">
|
||||
<a style="display: inherit" @click="toCourseDetail(item)">
|
||||
<span class="portal-right-text orange-one" v-if="index==0">
|
||||
<img :src="`${webBaseUrl}/images/listred01 .png`" alt="">
|
||||
</span>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user