mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +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>
|
<interactBar :type="1" nodeWidth="20px" :data="cinfo" :courseExclusive="true" :comments="false" :praises="false" :shares="false" :views="false"></interactBar>
|
||||||
</div>
|
</div>
|
||||||
<!-- <a :href="toCourseDetail(cinfo)"> -->
|
<!-- <a :href="toCourseDetail(cinfo)"> -->
|
||||||
<a :href="toCourseDetail(cinfo)">
|
<a @click="toCourseDetail(cinfo)">
|
||||||
<div class="course-image-box">
|
<div class="course-image-box">
|
||||||
<course-image :course="cinfo"></course-image>
|
<course-image :course="cinfo"></course-image>
|
||||||
<span v-if="cinfo.type == 20 || 10" class="course-type-left">录播课</span>
|
<span v-if="cinfo.type == 20 || 10" class="course-type-left">录播课</span>
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
<div class="ranking-title">好评榜</div>
|
<div class="ranking-title">好评榜</div>
|
||||||
<ul class="ranking-data">
|
<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;">
|
<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">
|
<span class="portal-right-text blue-one" v-if="index==0">
|
||||||
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
|
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
|
||||||
</span>
|
</span>
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
<div class="ranking-title">人气榜</div>
|
<div class="ranking-title">人气榜</div>
|
||||||
<ul class="ranking-data">
|
<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;">
|
<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">
|
<span class="portal-right-text orange-one" v-if="index==0">
|
||||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||||
</span>
|
</span>
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
<div class="ranking-title">热度榜</div>
|
<div class="ranking-title">热度榜</div>
|
||||||
<ul class="ranking-data">
|
<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;">
|
<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">
|
<span class="portal-right-text orange-one" v-if="index==0">
|
||||||
<img :src="`${webBaseUrl}/images/listred01 .png`" alt="">
|
<img :src="`${webBaseUrl}/images/listred01 .png`" alt="">
|
||||||
</span>
|
</span>
|
||||||
@@ -540,21 +540,26 @@ export default {
|
|||||||
toCourseDetail(item) {
|
toCourseDetail(item) {
|
||||||
let $this=this;
|
let $this=this;
|
||||||
if (item.source == 1) {
|
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有问题
|
||||||
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`);
|
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`);
|
||||||
} else {
|
} else {
|
||||||
if (item.type == 10) {
|
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) {
|
} else if (item.type == 20) {
|
||||||
// apiCourseStudy.hasSignup(item.id).then(rs=>{
|
apiCourseStudy.hasSignup(item.id).then(rs=>{
|
||||||
// if(rs.status==200){
|
if(rs.status==200){
|
||||||
// return $this.webBaseUrl + "/course/studyindex?id=" + item.id;
|
//return $this.webBaseUrl + "/course/studyindex?id=" + item.id;
|
||||||
// }else{
|
this.$router.push("/course/studyindex?id=" + item.id);
|
||||||
// return $this.webBaseUrl + "/course/detail?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;
|
}
|
||||||
|
})
|
||||||
|
//return $this.webBaseUrl + "/course/detail?id=" + item.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user