|
|
@@ -474,29 +474,29 @@
|
|
|
position: curTimes,
|
|
|
isFinish
|
|
|
};
|
|
|
+ let that = this
|
|
|
httpServer("course.tick", param, true).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
let {
|
|
|
skip,
|
|
|
position,
|
|
|
pause,
|
|
|
+ msg,
|
|
|
closed
|
|
|
} = res.data
|
|
|
- if (pause || closed) {
|
|
|
- this.doPause();
|
|
|
- if (closed) {
|
|
|
- this.$message.errorMsg("禁止多处同时学习", 5);
|
|
|
- } else if (pause) {
|
|
|
- this.$message.errorMsg("禁止多处同时学习", 5);
|
|
|
- }
|
|
|
+
|
|
|
+ if(closed){
|
|
|
+ that.$message.errorMsg(msg, 10)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (pause) {
|
|
|
+ that.$message.errorMsg(msg, 10)
|
|
|
+ setTimeout(that.playNext(), 10*1000)
|
|
|
return
|
|
|
}
|
|
|
- if (!skip) {
|
|
|
- let curTimes = parseInt(this.getPlayerTime())
|
|
|
- if (position < curTimes + 5) {
|
|
|
- this.setposition(position)
|
|
|
- }
|
|
|
- }
|
|
|
+ if (!skip) {
|
|
|
+ this.setposition(position)
|
|
|
+ }
|
|
|
Object.assign(this.media, res.data)
|
|
|
if( res.data.isFinish == 1){
|
|
|
this.playNext()
|
|
|
@@ -506,6 +506,7 @@
|
|
|
},
|
|
|
loadMedia(item) {
|
|
|
this.media = item;
|
|
|
+ this.stopTick()
|
|
|
httpServer('course.GetMedia', {
|
|
|
id: item.id
|
|
|
}).then(res => {
|
|
|
@@ -525,7 +526,6 @@
|
|
|
this.onPlay = false
|
|
|
this.hasSeeked = false
|
|
|
this.hiddenStartTime = 0
|
|
|
- this.stopTick()
|
|
|
this.options = {
|
|
|
...this.options,
|
|
|
sources: [{
|