|
@@ -12,10 +12,14 @@
|
|
|
</div>
|
|
|
<!-- 内容 -->
|
|
|
<div class="learn-content-body">
|
|
|
- <div class="learn-content-body-title">
|
|
|
+ <!-- 不是视频时展示 -->
|
|
|
+ <div v-if="contentObj.type != 'VIDEO'" class="learn-content-body-title">
|
|
|
{{ contentObj.name }}
|
|
|
</div>
|
|
|
- <div class="learn-content-body-auther">编辑:{{ contentObj.userId }}</div>
|
|
|
+ <!-- 不是视频时展示 -->
|
|
|
+ <div v-if="contentObj.type != 'VIDEO'" class="learn-content-body-auther">
|
|
|
+ 编辑:{{ contentObj.userId }}
|
|
|
+ </div>
|
|
|
<div class="learn-content-body-description">
|
|
|
<!-- {{ contentObj.contents }} -->
|
|
|
<p
|
|
@@ -26,17 +30,19 @@
|
|
|
>
|
|
|
{{ contentObj.contents }}
|
|
|
</p>
|
|
|
- <div>
|
|
|
+ <div v-if="contentObj.type == 'VIDEO'">
|
|
|
<video
|
|
|
- v-if="contentObj.type == 'VIDEO'"
|
|
|
:poster="getContentObj(contentObj.contents).faceUrl"
|
|
|
:src="getContentObj(contentObj.contents).videoUrl"
|
|
|
controls="controls"
|
|
|
>
|
|
|
您的浏览器不支持 video 标签。
|
|
|
</video>
|
|
|
+ <div class="learn-content-body-title" style="margin-top: 0.5rem;">
|
|
|
+ {{ contentObj.name }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <div style="margin-top: 0.5rem;">
|
|
|
<div>附件</div>
|
|
|
<div v-for="(item, index) in contentObj.links" :key="index">
|
|
|
<a :href="item">{{ getUrlName(item) }}</a>
|
|
@@ -184,8 +190,7 @@ export default {
|
|
|
this.env = process.env.VUE_APP_ENV;
|
|
|
this.setLanXinNavigator();
|
|
|
},
|
|
|
- destroyed () {
|
|
|
- },
|
|
|
+ destroyed() {},
|
|
|
activated() {
|
|
|
this.setLanXinNavigator();
|
|
|
},
|
|
@@ -233,14 +238,15 @@ export default {
|
|
|
// !!!需要查询评论列表内容!!!
|
|
|
let path = {
|
|
|
materialId: this.materialId
|
|
|
-
|
|
|
};
|
|
|
let params = {
|
|
|
page: this.commentPage,
|
|
|
size: this.commentSize
|
|
|
};
|
|
|
this.$_http
|
|
|
- .get(this.$pathParams(this.$_API.JTXT_GET_MATERIALS_COMMENTS, path), { params })
|
|
|
+ .get(this.$pathParams(this.$_API.JTXT_GET_MATERIALS_COMMENTS, path), {
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
this.commentList = res.data.content;
|
|
|
// 分页到底了
|
|
@@ -258,7 +264,11 @@ export default {
|
|
|
},
|
|
|
async handleCommentScroll(e) {
|
|
|
console.log("aaaaa");
|
|
|
- if (this.canCommentFlag && e.srcElement.scrollTop + e.srcElement.offsetHeight > e.srcElement.scrollHeight - 100) {
|
|
|
+ if (
|
|
|
+ this.canCommentFlag &&
|
|
|
+ e.srcElement.scrollTop + e.srcElement.offsetHeight >
|
|
|
+ e.srcElement.scrollHeight - 100
|
|
|
+ ) {
|
|
|
this.canCommentFlag = false;
|
|
|
console.log("触底");
|
|
|
this.commentPage = this.commentPage + 1;
|
|
@@ -414,7 +424,9 @@ export default {
|
|
|
if (this.favorite.materials && this.favorite.materials.length > 0) {
|
|
|
console.log(this.favorite.materials);
|
|
|
console.log(this.materialId);
|
|
|
- const item = this.favorite.materials.find(it => it.materialId === this.materialId);
|
|
|
+ const item = this.favorite.materials.find(
|
|
|
+ it => it.materialId === this.materialId
|
|
|
+ );
|
|
|
if (item && item.materialId === this.materialId) {
|
|
|
this.isCollected = true;
|
|
|
}
|
|
@@ -441,7 +453,6 @@ export default {
|
|
|
console.log(fileName);
|
|
|
return fileName;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
};
|
|
|
</script>
|