mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
Merge branch 'pingcode-1104' into dev0515
# Conflicts: # src/components/PortalHeader.vue # src/components/VideoPlayer/progress-bar.vue # src/views/study/coursenew.vue
This commit is contained in:
@@ -10,7 +10,7 @@ import ajax from '@/utils/xajax.js'
|
|||||||
* 返回 检查报名状态
|
* 返回 检查报名状态
|
||||||
*/
|
*/
|
||||||
const hasSignup = function(courseId) {
|
const hasSignup = function(courseId) {
|
||||||
return ajax.get('/xboe/school/study/signup/has?cid='+courseId);
|
return ajax.get('/xboe/school/study/signup/has?cid='+courseId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,7 +25,7 @@ const hasSignup = function(courseId) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const signup = function(data) {
|
const signup = function(data) {
|
||||||
return ajax.post('/xboe/school/study/signup/self', data);
|
return ajax.post('/xboe/school/study/signup/self', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,7 +38,7 @@ const signup = function(data) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const findSignup = function(data) {
|
const findSignup = function(data) {
|
||||||
return ajax.post('/xboe/school/study/signup/pagelist', data);
|
return ajax.post('/xboe/school/study/signup/pagelist', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +46,7 @@ const findSignup = function(data) {
|
|||||||
* @param {Object} id 报名的id
|
* @param {Object} id 报名的id
|
||||||
*/
|
*/
|
||||||
const deleteSignup = function(id) {
|
const deleteSignup = function(id) {
|
||||||
return ajax.post('/xboe/school/study/signup/delete?id='+id);
|
return ajax.post('/xboe/school/study/signup/delete?id='+id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,7 +55,7 @@ const deleteSignup = function(id) {
|
|||||||
* Signup 对象集合, list
|
* Signup 对象集合, list
|
||||||
*/
|
*/
|
||||||
const importSignup = function(data) {
|
const importSignup = function(data) {
|
||||||
return ajax.post('/xboe/school/study/signup/import',data);
|
return ajax.post('/xboe/school/study/signup/import',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -63,11 +63,11 @@ const importSignup = function(data) {
|
|||||||
* @param {Object} courseId 课程 的id
|
* @param {Object} courseId 课程 的id
|
||||||
*/
|
*/
|
||||||
const countSignup = function(courseId) {
|
const countSignup = function(courseId) {
|
||||||
return ajax.post('/xboe/school/study/signup/count-by-course',{courseId});
|
return ajax.post('/xboe/school/study/signup/count-by-course',{courseId});
|
||||||
}
|
}
|
||||||
|
|
||||||
const studyIndex = function(courseId) {
|
const studyIndex = function(courseId) {
|
||||||
return ajax.get('/xboe/school/study/course/studyIndex?cid='+courseId+'&addView=true');
|
return ajax.get('/xboe/school/study/course/studyIndex?cid='+courseId+'&addView=true');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -80,7 +80,7 @@ const studyIndex = function(courseId) {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const studyIndexPost = function(data) {
|
const studyIndexPost = function(data) {
|
||||||
return ajax.post('/xboe/school/study/course/studyIndex',data);
|
return ajax.post('/xboe/school/study/course/studyIndex',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,7 +88,7 @@ const studyIndexPost = function(data) {
|
|||||||
* @param {Object} courseId
|
* @param {Object} courseId
|
||||||
*/
|
*/
|
||||||
const studyInfo = function(courseId) {
|
const studyInfo = function(courseId) {
|
||||||
return ajax.get('/xboe/school/study/course/info?cid='+courseId);
|
return ajax.get('/xboe/school/study/course/info?cid='+courseId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ const studyInfo = function(courseId) {
|
|||||||
* @param {Object} contentId
|
* @param {Object} contentId
|
||||||
*/
|
*/
|
||||||
const getStudyContentItem = function(studyId,contentId) {
|
const getStudyContentItem = function(studyId,contentId) {
|
||||||
return ajax.post('/xboe/school/study/course/study-course-content',{studyId,contentId});
|
return ajax.post('/xboe/school/study/course/study-course-content',{studyId,contentId});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -111,7 +111,7 @@ const getStudyContentItem = function(studyId,contentId) {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const studyVideoTime = function(data) {
|
const studyVideoTime = function(data) {
|
||||||
return ajax.post('/xboe/school/study/course/study-video-time',data);
|
return ajax.post('/xboe/school/study/course/study-video-time',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -119,7 +119,7 @@ const studyVideoTime = function(data) {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const lastStudy = function() {
|
const lastStudy = function() {
|
||||||
return ajax.get('/xboe/school/study/course/last-study');
|
return ajax.get('/xboe/school/study/course/last-study');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -136,7 +136,7 @@ const lastStudy = function() {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const studyContent = function(data) {
|
const studyContent = function(data) {
|
||||||
return ajax.postJson('/xboe/school/study/course/study',data);
|
return ajax.postJson('/xboe/school/study/course/study',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -150,7 +150,7 @@ const studyContent = function(data) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const appendStudyTime = function(data) {
|
const appendStudyTime = function(data) {
|
||||||
return ajax.post('/xboe/school/study/course/appendtime',data);
|
return ajax.post('/xboe/school/study/course/appendtime',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,7 +161,7 @@ const appendStudyTime = function(data) {
|
|||||||
* name: 学习人的姓名
|
* name: 学习人的姓名
|
||||||
*/
|
*/
|
||||||
const studyRecords = function(data) {
|
const studyRecords = function(data) {
|
||||||
return ajax.post('/xboe/school/study/course/pagelist',data);
|
return ajax.post('/xboe/school/study/course/pagelist',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -173,7 +173,7 @@ const studyRecords = function(data) {
|
|||||||
* name: 学习人的姓名
|
* name: 学习人的姓名
|
||||||
*/
|
*/
|
||||||
const studyContentRecords = function(data) {
|
const studyContentRecords = function(data) {
|
||||||
return ajax.post('/xboe/school/study/course/contents',data);
|
return ajax.post('/xboe/school/study/course/contents',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -185,7 +185,7 @@ const studyContentRecords = function(data) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const studyExport = function(data) {
|
const studyExport = function(data) {
|
||||||
return ajax.post('/xboe/school/study/course/export',data);
|
return ajax.post('/xboe/school/study/course/export',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -200,7 +200,7 @@ const studyExport = function(data) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const myStudyList = function(query) {
|
const myStudyList = function(query) {
|
||||||
return ajax.post('/xboe/school/study/course/mylist',query);
|
return ajax.post('/xboe/school/study/course/mylist',query);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 当前课程学习记录
|
* 当前课程学习记录
|
||||||
@@ -216,7 +216,7 @@ const myStudyList = function(query) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const myCourseStudy = function(query) {
|
const myCourseStudy = function(query) {
|
||||||
return ajax.post('/xboe/school/study/course/course-users',query);
|
return ajax.post('/xboe/school/study/course/course-users',query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ const myCourseStudy = function(query) {
|
|||||||
* answerJson
|
* answerJson
|
||||||
*/
|
*/
|
||||||
const saveExam = function(data) {
|
const saveExam = function(data) {
|
||||||
return ajax.postJson('/xboe/school/study/exam/save',data);
|
return ajax.postJson('/xboe/school/study/exam/save',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -261,7 +261,7 @@ const saveExam = function(data) {
|
|||||||
* hwAnswer: 文本提交的信息
|
* hwAnswer: 文本提交的信息
|
||||||
*/
|
*/
|
||||||
const saveHomework = function(data) {
|
const saveHomework = function(data) {
|
||||||
return ajax.postJson('/xboe/school/study/homework/save',data);
|
return ajax.postJson('/xboe/school/study/homework/save',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -279,7 +279,7 @@ const saveHomework = function(data) {
|
|||||||
* asScore:评估得分
|
* asScore:评估得分
|
||||||
*/
|
*/
|
||||||
const saveAssess = function(data) {
|
const saveAssess = function(data) {
|
||||||
return ajax.postJson('/xboe/school/study/assess/save',data);
|
return ajax.postJson('/xboe/school/study/assess/save',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -288,7 +288,7 @@ const saveAssess = function(data) {
|
|||||||
* id:记录的id
|
* id:记录的id
|
||||||
*/
|
*/
|
||||||
const myHomework = function(id) {
|
const myHomework = function(id) {
|
||||||
return ajax.post('/xboe/school/study/homework/detail?id='+id);
|
return ajax.post('/xboe/school/study/homework/detail?id='+id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -297,7 +297,7 @@ const myHomework = function(id) {
|
|||||||
* id:记录的id
|
* id:记录的id
|
||||||
*/
|
*/
|
||||||
const myExamPaper = function(id) {
|
const myExamPaper = function(id) {
|
||||||
return ajax.get('/xboe/school/study/exam/detail?id='+id);
|
return ajax.get('/xboe/school/study/exam/detail?id='+id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -306,7 +306,7 @@ const myExamPaper = function(id) {
|
|||||||
* id:记录的id
|
* id:记录的id
|
||||||
*/
|
*/
|
||||||
const myAssess = function(id) {
|
const myAssess = function(id) {
|
||||||
return ajax.get('/xboe/school/study/assess/detail?id='+id);
|
return ajax.get('/xboe/school/study/assess/detail?id='+id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -318,7 +318,7 @@ const myAssess = function(id) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const myHomeworkList = function(data) {
|
const myHomeworkList = function(data) {
|
||||||
return ajax.post('/xboe/school/study/homework/list-study',data);
|
return ajax.post('/xboe/school/study/homework/list-study',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -327,7 +327,7 @@ const myHomeworkList = function(data) {
|
|||||||
* 对应的提交记录的id,
|
* 对应的提交记录的id,
|
||||||
*/
|
*/
|
||||||
const myExamList = function(itemId) {
|
const myExamList = function(itemId) {
|
||||||
return ajax.post('/xboe/school/study/exam/list',{itemId});
|
return ajax.post('/xboe/school/study/exam/list',{itemId});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -338,8 +338,8 @@ const myExamList = function(itemId) {
|
|||||||
contentId:''
|
contentId:''
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const myExamList2 = function(data) {
|
const myExamList2 = function(data) {
|
||||||
return ajax.post('/xboe/school/study/exam/list-study',data);
|
return ajax.post('/xboe/school/study/exam/list-study',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -351,7 +351,7 @@ const myExamList = function(itemId) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const myAssessList = function(data) {
|
const myAssessList = function(data) {
|
||||||
return ajax.post('/xboe/school/study/assess/list-study',data);
|
return ajax.post('/xboe/school/study/assess/list-study',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -360,7 +360,7 @@ const myAssessList = function(data) {
|
|||||||
@param courseId 课程id 用于删除课程报名信息和修改课程学习人数
|
@param courseId 课程id 用于删除课程报名信息和修改课程学习人数
|
||||||
*/
|
*/
|
||||||
const deleteSignUp=function(id,courseId){
|
const deleteSignUp=function(id,courseId){
|
||||||
return ajax.post(`/xboe/school/study/course/delete-signup?id=${id}&couserId=${courseId}`);
|
return ajax.post(`/xboe/school/study/course/delete-signup?id=${id}&couserId=${courseId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -399,38 +399,38 @@ const findByIds=function (ids){
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
hasSignup,
|
hasSignup,
|
||||||
signup,
|
signup,
|
||||||
findSignup,
|
findSignup,
|
||||||
deleteSignup,
|
deleteSignup,
|
||||||
importSignup,
|
importSignup,
|
||||||
countSignup,
|
countSignup,
|
||||||
studyIndex,
|
studyIndex,
|
||||||
studyInfo,
|
studyInfo,
|
||||||
studyVideoTime,
|
studyVideoTime,
|
||||||
lastStudy,
|
lastStudy,
|
||||||
studyContent,
|
studyContent,
|
||||||
appendStudyTime,
|
appendStudyTime,
|
||||||
studyRecords,
|
studyRecords,
|
||||||
studyContentRecords,
|
studyContentRecords,
|
||||||
getStudyContentItem,
|
getStudyContentItem,
|
||||||
studyExport,
|
studyExport,
|
||||||
myStudyList,
|
myStudyList,
|
||||||
saveHomework,
|
saveHomework,
|
||||||
saveExam,
|
saveExam,
|
||||||
saveAssess,
|
saveAssess,
|
||||||
myHomework,
|
myHomework,
|
||||||
myExamPaper,
|
myExamPaper,
|
||||||
myAssess,
|
myAssess,
|
||||||
myHomeworkList,
|
myHomeworkList,
|
||||||
myExamList,
|
myExamList,
|
||||||
myAssessList,
|
myAssessList,
|
||||||
myExamList2,
|
myExamList2,
|
||||||
myCourseStudy,
|
myCourseStudy,
|
||||||
myStudysFromES,
|
myStudysFromES,
|
||||||
homeworkExport,
|
homeworkExport,
|
||||||
findByIds,
|
findByIds,
|
||||||
deleteSignUp,
|
deleteSignUp,
|
||||||
ids,
|
ids,
|
||||||
followIds,
|
followIds,
|
||||||
studyIndexPost
|
studyIndexPost
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ body {margin: 0px;padding: 0px;}
|
|||||||
padding-bottom:12px
|
padding-bottom:12px
|
||||||
}
|
}
|
||||||
.ranking-data{
|
.ranking-data{
|
||||||
min-height: 196px;
|
min-height: 246px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ body {margin: 0px;padding: 0px;}
|
|||||||
padding-bottom:12px
|
padding-bottom:12px
|
||||||
}
|
}
|
||||||
.ranking-data{
|
.ranking-data{
|
||||||
min-height: 196px;
|
min-height: 246px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
// overflow-y: auto;
|
// overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!--弹出窗口设置-->
|
<!--弹出窗口设置-->
|
||||||
<div>
|
<div>
|
||||||
<div v-for="pop in popupList" :key="pop.id">wwww
|
<div v-for="pop in popupList" :key="pop.id">
|
||||||
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" :visible.sync="pop.show" :append-to-body="true" >
|
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" :visible.sync="pop.show" :append-to-body="true" >
|
||||||
<div style="text-align: center;position: relative;">
|
<div style="text-align: center;position: relative;">
|
||||||
<!-- <span style="float: right;" @click="pop.show = false"><i style="font-size: 28px;color: #000000;" class="el-icon-close"></i></span> -->
|
<!-- <span style="float: right;" @click="pop.show = false"><i style="font-size: 28px;color: #000000;" class="el-icon-close"></i></span> -->
|
||||||
|
|||||||
@@ -637,7 +637,9 @@ export default {
|
|||||||
}
|
}
|
||||||
this.teacherList = rs.result.teachers;
|
this.teacherList = rs.result.teachers;
|
||||||
this.teacherName = rs.result.teachers;
|
this.teacherName = rs.result.teachers;
|
||||||
this.teacher = rs.result.teachers.map(res => res.teacherName);
|
this.teacher = rs.result.teachers.map(item => {
|
||||||
|
return `${item.teacherName}(${item.userNo})`
|
||||||
|
});
|
||||||
this.totalContent = rs.result.contents.length; //计算总内容数
|
this.totalContent = rs.result.contents.length; //计算总内容数
|
||||||
if (this.courseInfo.tags != "") {
|
if (this.courseInfo.tags != "") {
|
||||||
this.showTags = this.courseInfo.tags.split(",");
|
this.showTags = this.courseInfo.tags.split(",");
|
||||||
|
|||||||
@@ -681,7 +681,9 @@ export default {
|
|||||||
}
|
}
|
||||||
this.teacherList = rs.result.teachers;
|
this.teacherList = rs.result.teachers;
|
||||||
this.teacherName = rs.result.teachers;
|
this.teacherName = rs.result.teachers;
|
||||||
this.teacher = rs.result.teachers.map(item => item.teacherName);
|
this.teacher = rs.result.teachers.map(item => {
|
||||||
|
return `${item.teacherName}(${item.userNo})`
|
||||||
|
});
|
||||||
this.showTags = this.courseInfo.tags.split(",");
|
this.showTags = this.courseInfo.tags.split(",");
|
||||||
if (rs.result.course.resOwner3 == "") {
|
if (rs.result.course.resOwner3 == "") {
|
||||||
this.resOwnerArray = [
|
this.resOwnerArray = [
|
||||||
|
|||||||
@@ -383,8 +383,8 @@ export default {
|
|||||||
count: 0,
|
count: 0,
|
||||||
type: "",
|
type: "",
|
||||||
list: [],
|
list: [],
|
||||||
name: '',
|
|
||||||
status: '',
|
status: '',
|
||||||
|
name: '',
|
||||||
},
|
},
|
||||||
learningRecords: {
|
learningRecords: {
|
||||||
pageIndex: 1, //第几页
|
pageIndex: 1, //第几页
|
||||||
@@ -562,7 +562,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
this.isTrue = false;
|
this.isTrue = false;
|
||||||
this.$message.error(err.data.message)
|
this.$message.error(err.response.data.message)
|
||||||
})
|
})
|
||||||
// axios({
|
// axios({
|
||||||
// method: 'get',
|
// method: 'get',
|
||||||
|
|||||||
@@ -40,12 +40,12 @@
|
|||||||
:isPlaying="isPlaying"
|
:isPlaying="isPlaying"
|
||||||
:biBarrageXml="biBarrageXml"
|
:biBarrageXml="biBarrageXml"
|
||||||
/>
|
/>
|
||||||
<!-- 加载动画 -->
|
<!-- 加载动画(应该当前视频没有缓存时显示加载动画) && isCrowd && isShowPlayer -->
|
||||||
<div v-show="isShowLoading && isCrowd && isShowPlayer" class="player-loading" @click="videoDom.focus({preventScroll: true})">
|
<div v-show="isShowLoading" class="player-loading" @click="videoDom.focus({preventScroll: true})">
|
||||||
<img src="@/components/VideoPlayer/images/loading.svg" alt="loading"/>
|
<img src="@/components/VideoPlayer/images/loading.svg" alt="loading"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 控制栏 -->
|
<!-- 控制栏 -->
|
||||||
<div v-show="!isShowLoading && isCrowd" class="player-controls-container" @click="videoDom.focus({preventScroll: true})">
|
<div v-show="isCrowd" class="player-controls-container" @click="videoDom.focus({preventScroll: true})">
|
||||||
<div v-show="isShowVolumeHint" class="player-volumeHint">
|
<div v-show="isShowVolumeHint" class="player-volumeHint">
|
||||||
<span class="player-volumeHint-text">当前音量:{{volumePercent}}%</span>
|
<span class="player-volumeHint-text">当前音量:{{volumePercent}}%</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -71,6 +71,7 @@
|
|||||||
<div :class="{'player-controls': true, 'cursor-lasting-static': isCursorStatic}">
|
<div :class="{'player-controls': true, 'cursor-lasting-static': isCursorStatic}">
|
||||||
<div class="player-progress-bar">
|
<div class="player-progress-bar">
|
||||||
<progressBar
|
<progressBar
|
||||||
|
:blobId="blobId"
|
||||||
:currentProgress="currentProgress"
|
:currentProgress="currentProgress"
|
||||||
v-on:updateProgress="updateProgressByClickBar"
|
v-on:updateProgress="updateProgressByClickBar"
|
||||||
v-on:getMouseDownStatus="getMouseDownStatusOfProgressBar"
|
v-on:getMouseDownStatus="getMouseDownStatusOfProgressBar"
|
||||||
@@ -318,6 +319,17 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
|
//console.log('this.currentProgress::',this.currentProgress,this.isDrag,this.videoDom.currentTime , this.videoDom.duration)
|
||||||
|
// 视频播放时本地记录视频实时播放时长,视频设置了禁止拖动时执行
|
||||||
|
if(!this.isDrag){
|
||||||
|
var time = localStorage.getItem('videoProgressData')
|
||||||
|
var arr = time&&JSON.parse(time) || {}
|
||||||
|
if(arr[this.blobId] < this.currentProgress || !arr[this.blobId]){
|
||||||
|
arr[this.blobId] = parseFloat((this.currentProgress).toFixed(8))
|
||||||
|
if(arr[this.blobId]) localStorage.setItem('videoProgressData',JSON.stringify(arr))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 定时更新进度条
|
// 定时更新进度条
|
||||||
if (this.isPlaying && !this.isMousedownProgress) {
|
if (this.isPlaying && !this.isMousedownProgress) {
|
||||||
this.currentProgress = this.videoDom.currentTime / this.videoDom.duration;
|
this.currentProgress = this.videoDom.currentTime / this.videoDom.duration;
|
||||||
@@ -391,11 +403,13 @@ export default {
|
|||||||
//当视频由于需要缓冲下一帧而停止,解决一直计时的问题
|
//当视频由于需要缓冲下一帧而停止,解决一直计时的问题
|
||||||
onWaiting(){
|
onWaiting(){
|
||||||
console.log('触发了onWairing');
|
console.log('触发了onWairing');
|
||||||
|
this.isShowLoading = true
|
||||||
this.$emit('onPlayerPause', {})
|
this.$emit('onPlayerPause', {})
|
||||||
},
|
},
|
||||||
//当音频/视频在已因缓冲而暂停或停止后已就绪时
|
//当音频/视频在已因缓冲而暂停或停止后已就绪时
|
||||||
onPlaying(){
|
onPlaying(){
|
||||||
console.log('触发缓存结束onPlaying');
|
console.log('触发缓存结束onPlaying');
|
||||||
|
this.isShowLoading = false
|
||||||
if(this.videoDom.paused){
|
if(this.videoDom.paused){
|
||||||
this.$emit('onPlayerPause', {})
|
this.$emit('onPlayerPause', {})
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
down(e) {
|
down(e) {
|
||||||
|
|
||||||
this.$emit("getMouseDownStatus", true);
|
this.$emit("getMouseDownStatus", true);
|
||||||
this.is_mousedown_progress = true;
|
this.is_mousedown_progress = true;
|
||||||
// 获取完整进度条的clientX(dom左上角)
|
// 获取完整进度条的clientX(dom左上角)
|
||||||
@@ -111,7 +111,7 @@ export default {
|
|||||||
// 禁止拖动
|
// 禁止拖动
|
||||||
if(!this.isDrag && time && arr[this.blobId] < current) return;
|
if(!this.isDrag && time && arr[this.blobId] < current) return;
|
||||||
this.$emit("updateProgress", current);
|
this.$emit("updateProgress", current);
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -163,4 +163,4 @@ export default {
|
|||||||
.progress-bar:hover .progress-current::after {
|
.progress-bar:hover .progress-current::after {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ export default {
|
|||||||
timedOut = true;
|
timedOut = true;
|
||||||
xmlhttp.abort();
|
xmlhttp.abort();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
xmlhttp.open("HEAD", window.location.protocol + "//uapi.boe.com.cn", true);
|
xmlhttp.open("HEAD", window.location.protocol + "//uapi.boe.com.cn/500.html", true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
xmlhttp.onreadystatechange = function () {
|
xmlhttp.onreadystatechange = function () {
|
||||||
if (xmlhttp.readyState == 4) {
|
if (xmlhttp.readyState == 4) {
|
||||||
|
|||||||
Reference in New Issue
Block a user