|
|
@ -1,38 +1,59 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<!-- 课程预览 --> |
|
|
|
<!-- 课程预览 --> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<el-card shadow="hover" |
|
|
|
|
|
|
|
class="m-b-20"> |
|
|
|
<div class="flex-between"> |
|
|
|
<div class="flex-between"> |
|
|
|
<el-page-header @back="goBack" :content="'课程预览'"></el-page-header> |
|
|
|
<el-page-header @back="goBack" |
|
|
|
|
|
|
|
:content="'课程预览'"></el-page-header> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20" style="background: none;"> |
|
|
|
<el-card shadow="hover" |
|
|
|
|
|
|
|
class="m-b-20" |
|
|
|
|
|
|
|
style="background: none;"> |
|
|
|
<div class="flex"> |
|
|
|
<div class="flex"> |
|
|
|
<div class="cover" :class="{'is-word': showMask1}"> |
|
|
|
<div class="cover" |
|
|
|
<img v-if="coverUrl" :src="coverUrl" alt="" width="100%" height="100%"> |
|
|
|
:class="{'is-word': showMask1}"> |
|
|
|
|
|
|
|
<img v-if="coverUrl" |
|
|
|
|
|
|
|
:src="coverUrl" |
|
|
|
|
|
|
|
alt="" |
|
|
|
|
|
|
|
width="100%" |
|
|
|
|
|
|
|
height="100%"> |
|
|
|
<template v-else-if="iframeSrc"> |
|
|
|
<template v-else-if="iframeSrc"> |
|
|
|
<iframe class="inner fileIframe" id="fileIframe" :src="iframeSrc" frameborder="0"></iframe> |
|
|
|
<iframe class="inner fileIframe" |
|
|
|
|
|
|
|
id="fileIframe" |
|
|
|
|
|
|
|
:src="iframeSrc" |
|
|
|
|
|
|
|
frameborder="0"></iframe> |
|
|
|
<template v-if="showMask"> |
|
|
|
<template v-if="showMask"> |
|
|
|
<div class="mask" style="width: 500px;height: 30px;top: 53px;right: 320px"></div> |
|
|
|
<div class="mask" |
|
|
|
<div class="mask" style="width: 175px;height: 30px;top: 53px;right: 5px"></div> |
|
|
|
style="width: 500px;height: 30px;top: 53px;right: 320px"></div> |
|
|
|
|
|
|
|
<div class="mask" |
|
|
|
|
|
|
|
style="width: 175px;height: 30px;top: 53px;right: 5px"></div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-if="showMask1"> |
|
|
|
<template v-if="showMask1"> |
|
|
|
<div class="word-mask" style="height: 40px;"></div> |
|
|
|
<div class="word-mask" |
|
|
|
<div class="word-mask2" style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div> |
|
|
|
style="height: 40px;"></div> |
|
|
|
|
|
|
|
<div class="word-mask2" |
|
|
|
|
|
|
|
style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-if="showMask2"> |
|
|
|
<template v-if="showMask2"> |
|
|
|
<div class="excel-mask1" style="height: 48px;"></div> |
|
|
|
<div class="excel-mask1" |
|
|
|
|
|
|
|
style="height: 48px;"></div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<div class="pdf inner" v-else-if="pdfSrc"> |
|
|
|
<div class="pdf inner" |
|
|
|
|
|
|
|
v-else-if="pdfSrc"> |
|
|
|
<p class="arrow"> |
|
|
|
<p class="arrow"> |
|
|
|
<span @click="changePdfPage(0)" class="turn el-icon-arrow-left" :class="{grey: currentPage==1}"></span> |
|
|
|
<span @click="changePdfPage(0)" |
|
|
|
|
|
|
|
class="turn el-icon-arrow-left" |
|
|
|
|
|
|
|
:class="{grey: currentPage==1}"></span> |
|
|
|
{{ currentPage }} / {{ pageCount }} |
|
|
|
{{ currentPage }} / {{ pageCount }} |
|
|
|
<span @click="changePdfPage(1)" class="turn el-icon-arrow-right" :class="{grey: currentPage==pageCount}"></span> |
|
|
|
<span @click="changePdfPage(1)" |
|
|
|
|
|
|
|
class="turn el-icon-arrow-right" |
|
|
|
|
|
|
|
:class="{grey: currentPage==pageCount}"></span> |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
<pdf |
|
|
|
<pdf class="pdf-wrap" |
|
|
|
class="pdf-wrap" |
|
|
|
|
|
|
|
:src="pdfSrc" |
|
|
|
:src="pdfSrc" |
|
|
|
:page="currentPage" |
|
|
|
:page="currentPage" |
|
|
|
@num-pages="pageCount=$event" |
|
|
|
@num-pages="pageCount=$event" |
|
|
@ -40,27 +61,41 @@ |
|
|
|
@loaded="loadPdfHandler"> |
|
|
|
@loaded="loadPdfHandler"> |
|
|
|
</pdf> |
|
|
|
</pdf> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="inner" v-else-if="playAuth"> |
|
|
|
<div class="inner" |
|
|
|
<div class="video_wid" id="player"></div> |
|
|
|
v-else-if="playAuth"> |
|
|
|
|
|
|
|
<div class="video_wid" |
|
|
|
|
|
|
|
id="player"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="catalog flex-1"> |
|
|
|
<div class="catalog flex-1"> |
|
|
|
<div class="list"> |
|
|
|
<div class="list"> |
|
|
|
<h4 class="title">{{ courseName }}</h4> |
|
|
|
<h4 class="title">{{ courseName }}</h4> |
|
|
|
<div class="desc-wrap"> |
|
|
|
<div class="desc-wrap"> |
|
|
|
<div class="desc" :class="{active: desShrink}" v-html="description"></div> |
|
|
|
<div class="desc" |
|
|
|
<i class="arrow" :class="{active: desShrink}" v-if="description.length > 40"> |
|
|
|
:class="{active: desShrink}" |
|
|
|
|
|
|
|
v-html="description"></div> |
|
|
|
|
|
|
|
<i class="arrow" |
|
|
|
|
|
|
|
:class="{active: desShrink}" |
|
|
|
|
|
|
|
v-if="description.length > 40"> |
|
|
|
<span>...</span> |
|
|
|
<span>...</span> |
|
|
|
<img src="@/assets/img/arrow-down.png" alt="" @click="desShrink = !desShrink"> |
|
|
|
<img src="@/assets/img/arrow-down.png" |
|
|
|
|
|
|
|
alt="" |
|
|
|
|
|
|
|
@click="desShrink = !desShrink"> |
|
|
|
</i> |
|
|
|
</i> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="chapters"> |
|
|
|
<div class="chapters"> |
|
|
|
<template v-if="videoList.length"> |
|
|
|
<template v-if="videoList.length"> |
|
|
|
<div class="chapter" v-for="(item,index) in videoList" :key="index"> |
|
|
|
<div class="chapter" |
|
|
|
|
|
|
|
v-for="(item,index) in videoList" |
|
|
|
|
|
|
|
:key="index"> |
|
|
|
<div class="chapterName">{{ item.name }}</div> |
|
|
|
<div class="chapterName">{{ item.name }}</div> |
|
|
|
<div class="section" v-if="item.subsectionList.length"> |
|
|
|
<div class="section" |
|
|
|
<div v-for="(section,i) in item.subsectionList" :key="i" @click="preview(section, item.name)"> |
|
|
|
v-if="item.subsectionList.length"> |
|
|
|
<p class="sectionName" :class="{active: curLink === `${item.name}${section.name}`}">{{ section.name }}</p> |
|
|
|
<div v-for="(section,i) in item.subsectionList" |
|
|
|
|
|
|
|
:key="i" |
|
|
|
|
|
|
|
@click="preview(section, item.name)"> |
|
|
|
|
|
|
|
<p class="sectionName" |
|
|
|
|
|
|
|
:class="{active: curLink === `${item.name}${section.name}`}">{{ section.name }}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -131,7 +166,7 @@ export default { |
|
|
|
this.coverUrl = res.data.coverUrl; |
|
|
|
this.coverUrl = res.data.coverUrl; |
|
|
|
}, |
|
|
|
}, |
|
|
|
async getChapter () { |
|
|
|
async getChapter () { |
|
|
|
let res = await this.$get(`${this.api.queryChapters}?courseId=${this.id}`); |
|
|
|
let res = await this.$get(`${this.api.queryChaptersTheoretical}?courseId=${this.id}`); |
|
|
|
this.videoList = res.chapterList; |
|
|
|
this.videoList = res.chapterList; |
|
|
|
}, |
|
|
|
}, |
|
|
|
insertScript () { |
|
|
|
insertScript () { |
|
|
@ -252,7 +287,8 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
$height: 700px; |
|
|
|
$height: 700px; |
|
|
|
.video_wid, .cover { |
|
|
|
.video_wid, |
|
|
|
|
|
|
|
.cover { |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
width: 76%; |
|
|
|
width: 76%; |
|
|
|
max-width: 1400px; |
|
|
|
max-width: 1400px; |
|
|
@ -274,7 +310,8 @@ $height: 700px; |
|
|
|
height: $height !important; |
|
|
|
height: $height !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.video_wid, .inner { |
|
|
|
.video_wid, |
|
|
|
|
|
|
|
.inner { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 100% !important; |
|
|
|
height: 100% !important; |
|
|
|
border: 0; |
|
|
|
border: 0; |
|
|
@ -379,7 +416,7 @@ $height: 700px; |
|
|
|
color: rgba(0, 0, 0, 0.65); |
|
|
|
color: rgba(0, 0, 0, 0.65); |
|
|
|
cursor: pointer; |
|
|
|
cursor: pointer; |
|
|
|
&.active { |
|
|
|
&.active { |
|
|
|
color: #9278FF; |
|
|
|
color: #9278ff; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -388,10 +425,10 @@ $height: 700px; |
|
|
|
|
|
|
|
|
|
|
|
.el-image-viewer__wrapper { |
|
|
|
.el-image-viewer__wrapper { |
|
|
|
transform: translateY(-10px); |
|
|
|
transform: translateY(-10px); |
|
|
|
transition: transform .5s; |
|
|
|
transition: transform 0.5s; |
|
|
|
|
|
|
|
|
|
|
|
&.active { |
|
|
|
&.active { |
|
|
|
transform: translateY(0) |
|
|
|
transform: translateY(0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|