This commit is contained in:
zhaofang
2022-09-02 15:28:34 +08:00
parent db0e262d26
commit 68eb098e19
4 changed files with 77 additions and 6 deletions

View File

@@ -83,7 +83,14 @@ export default {
) {
return this.fileBaseUrl + this.course.image;
}
else if (this.course.coverImg == "" || this.course.courseImage == "" || this.course.image == "") {
else if (
this.course &&
this.course.images &&
this.course.images != ""
) {
return this.fileBaseUrl + this.course.images;
}
else if (this.course.coverImg == "" || this.course.courseImage == "" || this.course.image == "" || this.course.images == "") {
this.isShow = true;
return this.webBaseUrl + "/images/bgimg/course.png";
}

View File

@@ -14,6 +14,12 @@
</el-tooltip>
<span class="interact-bar-value"> {{ data.answers}}</span>
</div>
<div v-if="couseViews" style="cursor: default;" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="浏览量" placement="top" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon style="margin-right: 0;font-size:14px;" icon-class="couseViews"></svg-icon>
</el-tooltip>
<span class="interact-bar-value"> {{ data.views}}</span>
</div>
<div v-if="comments" class="interact-bar-btn" :style="`min-width: ${nodeWidth};`" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="评论" placement="left" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon style="margin-right: 0;font-size: 14px;" icon-class="comment"></svg-icon>
@@ -127,6 +133,10 @@ export default {
type:Boolean,
default:true
},
couseViews:{
type:Boolean,
default:false
},
praises:{
type:Boolean,
default:true