提交 1bf75d29 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-coursedetail-0817' of...

Merge branch 'dev-coursedetail-0817' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-professional-exam into dev-coursedetail-0817

* 'dev-coursedetail-0817' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-professional-exam:
  去掉默认值
  修改时间
  修改pdf
  修改cdn
  修改引用
......@@ -12,7 +12,7 @@
* GlobalWorkerOptions.workerSrc需要一个加载路径
*/
import pdfJS from 'pdfjs-dist/es5/build/pdf';
pdfJS.GlobalWorkerOptions.workerSrc = '//cdn.bootcdn.net/ajax/libs/pdf.js/2.4.456/pdf.worker.min.js';
pdfJS.GlobalWorkerOptions.workerSrc = '//cdn.bootcdn.net/ajax/libs/pdf.js/2.4.456/pdf.worker.js';
import coverImg from '@/images/course/lock-big.png';
export default {
......
......@@ -67,14 +67,14 @@
<!-- 接续播放 -->
<transition name="fade">
<div v-show="showResume" class="cover cover-resume">
<p>上次观看至{{ history > 59 ? `${parseInt(history / 60)}分钟` : `${history}秒` }},正在续播</p>
<p>上次观看至{{ dealTime(history) }},正在续播</p>
</div>
</transition>
<!-- 弹窗放在外部处理 -->
<slot></slot>
<!-- 试看提示 -->
<div class="proved-box" v-show="logged && showProved">
可试看{{ proved > 59 ? `${parseInt(proved / 60)}分钟` : `${proved}秒` }},观看完整版请来 <span @click="download">云鹊医App</span>
可试看{{ dealTime(proved) }},观看完整版请来 <span @click="download">云鹊医App</span>
</div>
<!-- 重新播放,只有试看有 -->
<div class="replay-box" v-show="showReplay" @click="onReplay">重新播放</div>
......@@ -388,6 +388,21 @@ export default {
const h = time.h === '00' ? '' : `${time.h}:`;
return `${h}${time.f}:${time.s}`;
},
dealTime(t) {
let text = '';
if (t < 60) {
text = `${t}秒`
} else {
let second = t % 60;
let minute = parseInt(t / 60);
if (left === 0) {
text = `${minute}分钟`
} else {
text = `${minute}${second}秒`
}
}
return text;
},
// 试看结束
provedEnd() {
this.player.pause();
......
......@@ -164,8 +164,8 @@ export default {
},
methods: {
getCourseInfo() {
const { courseId = 6 } = this.$route.query;
const projectId = this.projectId || 797;
const { courseId } = this.$route.query;
const projectId = this.projectId;
this.showLoading = true;
this.GET(`contents/courses/${courseId}/pcCourseInfo`, { projectId }).then(res => {
this.showLoading = false;
......@@ -345,8 +345,8 @@ export default {
},
// 刷新目录进度
refreshCatalog() {
const { courseId = 6 } = this.$route.query;
const projectId = this.projectId || 797;
const { courseId } = this.$route.query;
const projectId = this.projectId;
this.GET(`contents/courses/${courseId}/pcCourseInfo`, { projectId }).then(res => {
if (res.code == "000000") {
const {
......@@ -365,8 +365,8 @@ export default {
})
},
getCourseQas() {
const { courseId = 3 } = this.$route.query;
const projectId = this.projectId || 797;
const { courseId } = this.$route.query;
const projectId = this.projectId;
this.GET(`contents/courses/v2/${courseId}/qas`, { projectId, pageNo: 1, pageSize: 10 }).then(res => {
if (res.code == "000000") {
this.qsList = res.data.model && res.data.model.qaPostModel || [];
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册