课程详细页面不自动报名了

This commit is contained in:
daihh
2022-10-31 14:06:59 +08:00
parent 7ac23518f1
commit 070a8c4672
3 changed files with 25 additions and 13 deletions

View File

@@ -134,7 +134,7 @@
</interactBar>
<!-- <svg-icon style="font-size: 32px;margin-top: -5px;" icon-class="collectedCourse"></svg-icon> -->
</div>
<a :href="toCourseDetail(course)">
<a @click="toCourseDetail(course)">
<div class="xindex-course-image">
<course-image :course="course"></course-image>
<span v-if="course.type == 20 || 10" class="course-type">录播课</span>
@@ -166,7 +166,7 @@
<p class="ranking-title">课程排行榜</p>
<ul class="xindex-ranking-course">
<li class="xindex-ranking-li" v-for="(item, cindex) in scorelist" :key="'cc'+cindex">
<a style="display: inherit" :href="toCourseDetail(item)">
<a style="display: inherit" @click="toCourseDetail(item)">
<span class="portal-right-text blue-one">
<img :src="getPic(cindex)" alt="">
</span>
@@ -441,7 +441,7 @@
<script>
import { mapGetters } from 'vuex';
import apicourseStudy from "@/api/modules/courseStudy.js"
import apiCourseStudy from "@/api/modules/courseStudy.js"
import portalHeader from '@/components/PortalHeader.vue';
import portalFooter from '@/components/PortalFooter.vue';
import portalFloatTools from '@/components/PortalFloatTools.vue';
@@ -633,7 +633,7 @@
},
// 上次学习记录
getLastStudy() {
apicourseStudy.lastStudy().then(res => {
apiCourseStudy.lastStudy().then(res => {
if (res.status === 200) {
this.lastStudy = res.result;
if (res.result != '' && res.result.courseId) {
@@ -750,14 +750,26 @@
},
toCourseDetail(item) {
//二期调整,直接改成一个地址
return this.webBaseUrl + '/course/detail?id=' + item.id;
//return this.webBaseUrl + '/course/detail?id=' + item.id;
console.log(item,"item");
let $this=this;
if (item.type == 10) {
//return this.webBaseUrl + "/course/studyindex?id=" + item.id;
//console.log("直接进入学习页面");
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;
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;
}
// 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;
// }
// return '';
},
orderTypeFilter(val) {
this.courseList.orderType = val;

View File

@@ -112,7 +112,7 @@
<div class="pagination-div">
<span class="pag-text" @click="loadMore()" v-if="moreState == 1">加载更多</span>
<span class="pag-text-msg" v-else-if="moreState == 2">数据加载中</span>
<span class="notcoures" v-else-if="moreState == 3 && !isSeach">
<span class="notcoures" v-else-if="moreState == 3 && !isSeach && caseList.count>0">
<img :src="`${webBaseUrl}/images/nocase.png`" alt="">
<h5>暂无案例请优先学习其它案例吧</h5>
</span>

View File

@@ -332,7 +332,7 @@ export default {
this.loadLastStudy();
} else {
this.stuStusts = 0;
this.startSigningUp();
//this.startSigningUp();
}
})
},