@@ -264,23 +231,13 @@ import portalHeader from "@/components/PortalHeader.vue";
import comments from "@/components/Portal/comments.vue";
import portalFooter from "@/components/PortalFooter.vue";
import interactBar from "@/components/Portal/interactBar.vue";
-import apiCourse from "@/api/modules/course.js";
import apiCourseFile from "@/api/modules/courseFile.js";
import apiCoursePortal from "@/api/modules/coursePortal.js";
import apiUser from '@/api/system/user.js';
import exam from '@/components/Course/exam';
import homework from '@/components/Course/homework';
import assess from '@/components/Course/assess';
-import {
- formatDate,
- resListMap,
- toScore,
- courseType,
- getType,
- numberToLetter,
- correctJudgment,
- userAvatarText
-} from "@/utils/tools.js";
+import {toScore,courseType, getType, numberToLetter, correctJudgment,userAvatarText} from "@/utils/tools.js";
import apicourseStudy from "@/api/modules/courseStudy.js";
import apiVideoStudy from "@/api/modules/videoStudy.js";
import apiCourseGrade from "@/api/modules/courseGrade.js";
@@ -288,7 +245,6 @@ import apiPraises from "@/api/modules/praises.js";
import apiTrample from "@/api/modules/trample.js";
import FileUpload from "@/components/FileUpload/index.vue";
import pdfPreview from "@/components/PdfPreview/index.vue";
-// import {resOwnerIndexName} from '@/utils/type.js';
import { setTimeout } from "timers";
import videoPlayer from '@/components/VideoPlayer/index.vue';
import audioPlayer from '@/components/AudioPlayer/index.vue';
@@ -330,7 +286,6 @@ export default {
studyId: "",
tags: [],
numberToLetter: numberToLetter,
- // resOwnerListMap: resOwnerIndexName,
fileBaseUrl: this.$Constants.fileBaseUrl,
blobUrl:'',//播放的文件地址,新添加,采用blob方式
getType: getType,
@@ -406,16 +361,13 @@ export default {
this.showQrimage();
this.$watermark.set(this.userInfo.name+this.userInfo.loginName);
this.loadResOwners();
-
let $this = this;
//页面只支取一次,所以先直接写在这里面
apiCoursePortal.detail(id).then(rs => {
if (rs.status == 200) {
this.courseInfo = rs.result.course;
- // this.courseInfo.score = this.toScore(rs.result.course.score);
if(rs.result.course.tags != '') this.tags = rs.result.course.tags.split(",");
this.teachers = rs.result.teachers;
-
if(rs.result.teachers && rs.result.teachers.length > 0){
let userIds=[];
let ctoUsers=[];
@@ -448,7 +400,6 @@ export default {
}
//对url进行加密处理
$this.createPlayUrl(con.contentRefId,this.curriculumData.url);
-
} else if (con.contentType == 40) {
//需要读取pdf的路径
apiCourseFile.detail($this.coursewareInfo.content.contentRefId).then(cfrs=>{
@@ -461,12 +412,10 @@ export default {
$this.coursewareInfo.content.content=cfrs.result.filePath;
$this.curCFile=2;
}
-
}else{
$this.$message.error('加载pdf课件文件失败');
}
});
- //let url = this.fileBaseUrl + r.content;
}else if(con.contentType ==52){
if(con.content.startsWith('\{')){
this.conLink=JSON.parse(con.content);
@@ -507,9 +456,7 @@ export default {
let nowDate=new Date();
let ctime=parseInt(nowDate.getTime()/1000);
let beforeUrl=parseInt(nowDate.getTime()/1000)+'/'+fid;
- //console.log(beforeUrl,'beforeUrl');
let urlSign=encodeURIComponent(encrypt(beforeUrl));
- //console.log(urlSign,'urlSign');
cookies.set('PLAYSIGN_TIME', ctime);//写客户端的cookie保存
//以下判断是为了区分本地环境和服务器环境
if(process.env.NODE_ENV == 'development'){
@@ -524,7 +471,6 @@ export default {
// this.qrcode = this.webBaseUrl+'/mobile/pages/resource/microDetail?id='+this.courseInfo.id;
urlPre='https://u.boe.com/m?returnUrl=https://u.boe.com/mobile/pages/login/loading?returnUrl=';
this.qrcode =urlPre+ '/pages/resource/microDetail?id='+this.courseInfo.id;
- //console.log(this.qrcode,'qrcode');
this.$nextTick(() => {
this.crateQrcode();
});
@@ -633,11 +579,9 @@ export default {
this.playerBoxShow = false;
//console.log("开始播放");
this.isAppendTime=false;
-
//视频类的内容,开始播放时才会记录完成情况
//2022-05-24修改,判断播放的
let $this=this;
- //console.log(this.curriculumData,'this.curriculumData');
//完成类型 completeSetup 0表默认,打开后5秒算学完,1表按进度,2表按时间
//完成值(非默认情况下起作用) setupTage
if(!$this.coursewareInfo.finish){
@@ -676,7 +620,6 @@ export default {
if(!completeSecond){
completeSecond=5;//如果没有就采用默认的时间了
}
-
if(completeType>0 && !this.coursewareInfo.finish){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
if(completeType==1){
let finishPercent=this.curriculumData.setupTage;
@@ -690,7 +633,6 @@ export default {
this.finishStudyItem();
}
}
-
}
//以下是每10秒记录一次学习时长
let saveTime=Math.floor(intTime%10);
@@ -711,14 +653,12 @@ export default {
},
audioPlaying(item,currentTime){
let intTime=parseInt(currentTime);//秒
- //console.log("当前播放时间="+item+',currentTime='+intTime);
//判断是否完成
let completeType=this.curriculumData.completeSetup;
let completeSecond=this.curriculumData.second;
if(!completeSecond){
completeSecond=5;//如果没有就采用默认的时间了
}
-
if(completeType>0 && !this.coursewareInfo.finish){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
if(completeType==1){
let finishPercent=this.curriculumData.setupTage;
@@ -770,7 +710,6 @@ export default {
},
audioEnd(){
// this.playerBoxShow = true;
- //console.log("播放结束");
if(!this.coursewareInfo.finish){
this.finishStudyItem();
}
@@ -882,7 +821,6 @@ export default {
//首先从本地读取
let duration=studyUtil.getStudyDuration();
-
//追加学习时间
let $this = this;
if(this.appendStartTime == null) {
@@ -893,14 +831,10 @@ export default {
}
return;
}
-
//当前进行的时间
let now = new Date();
let m = now.getTime() - this.appendStartTime.getTime(); //相差的毫秒数
let sen = parseInt(m / 1000); //计算秒数
-
- //console.log(duration,'duration')
- //console.log(sen,'sen')
duration=duration+sen;
if(flag){
//这个时候才进行存储 ,否则只能是存储在本地
@@ -943,14 +877,12 @@ export default {
if(res.result.signup) {
//this.bootTabActive = 'commnets';//系统自动报名,这里不进行切换了
this.studyId = res.result.studyId; //设置学习id
-
//需要判断此内容是否已学习完成,如果已学习完成,不需要再请不说了
res.result.contents.forEach(con => {
if (con.contentId == $this.coursewareInfo.content.id) {
$this.coursewareInfo.studyItemId=con.id;
$this.coursewareInfo.status=con.status;
$this.coursewareInfo.progress=con.progress;
-
if(con.contentType==10 || con.contentType==20){
if(con.progress==100 || con.status==9){
$this.coursewareInfo.finish = true;
@@ -960,7 +892,6 @@ export default {
}else{
$this.coursewareInfo.finish = true; //课件已学习
}
-
if(con.lastStudyTime){
//如果上次课件已经播放完成,此处应该是$this.coursewareInfo.content.duration
//也就是从头开开始
@@ -1028,7 +959,6 @@ export default {
if (rs.status == 200 && rs.result) {
this.scoreInfo.has = true;
}
- //console.log(rs.result,'rs.result');
});
//}
apiPraises.has(1, this.courseInfo.id).then(rs => {
@@ -1183,12 +1113,8 @@ export default {
background: none;
border: none;
}
-
-
.player-box{
position: absolute;
- // top: 62px;
- // left: 184px;
width: 300px;
left: 50%;
top: 50%;
@@ -1210,24 +1136,10 @@ export default {
}
}
::v-deep .el-tabs__nav-wrap::after {
- // content: "";
- // position: absolute;
- // left: 0;
- // bottom: 0;
- // width: 100%;
- // height: 2px;
background-color: #fff;
- // z-index: 1;
}
::v-deep .el-tabs__nav-wrap::after {
- // content: "";
- // position: absolute;
- // left: 0;
- // bottom: 0;
- // width: 100%;
- // height: 2px;
background-color: #fff;
- // z-index: 1;
}
.qrcode{
display: inline-block;
@@ -1240,16 +1152,7 @@ export default {
}
}
.ref-score{
- // background: #e4e4e4;
- // width: 64px;
- // height: 32px;
- // border-radius: 17px;
- // line-height: 32px;
- // // opacity: 0.24;
- // color: #000;
- // font-size: 14px;
- // border: none;
- // text-align: center;
+
}
.portal-content ::v-deep .el-rate__icon{
font-size: 24px !important;
@@ -1392,13 +1295,6 @@ export default {
transform: rotate(180deg);
}
}
- // margin-bottom: 50px;
- // line-height: 20px;
- // .el-link{
- // font-size: 30px;
- // color: #70a5f4;
- // margin: 0 30px;
- // }
}
}
}
@@ -1416,9 +1312,7 @@ export default {
color: #FFB30F ;
font-family: "Arial";
margin-left: 23px;
- // font-weight: 600;
}
- // margin-bottom: 19px;
.score-no{
color: #FFB30F;
padding: 5px 0;