|
@@ -55,7 +55,7 @@
|
|
|
videoWancheng
|
|
|
} from "@/api/shipin.js"
|
|
|
import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
|
|
|
- import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
|
|
|
+ import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
|
|
|
import svipDialog from './svipDialog.vue';
|
|
|
import {
|
|
|
toast,
|
|
@@ -65,6 +65,7 @@
|
|
|
userZhangNextInfo,
|
|
|
} from "@/api/learnPlan.js"
|
|
|
import cacheManager from "@/utils/cacheManager.js";
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -100,7 +101,7 @@
|
|
|
this.nianji = youkeData.nianji
|
|
|
this.zhangId = youkeData.zhangId
|
|
|
this.cardId = youkeData.cardId
|
|
|
- this.tipFlag=youkeData.tipFlag
|
|
|
+ this.tipFlag = youkeData.tipFlag
|
|
|
this.shipinTitle = youkeData.jieName
|
|
|
this.progressMarkers = youkeData.jieList.jiedianList || []
|
|
|
this.getLiveYk(); //获取播放凭证
|
|
@@ -181,6 +182,9 @@
|
|
|
})
|
|
|
},
|
|
|
playEnd(data) {
|
|
|
+ console.log('data', data);
|
|
|
+ console.log('111111');
|
|
|
+ plus.screen.lockOrientation('portrait-primary');
|
|
|
const AuthCode = getUserIdentity();
|
|
|
console.log(AuthCode);
|
|
|
if (AuthCode == 'Visitor') {
|
|
@@ -209,11 +213,12 @@
|
|
|
|
|
|
},
|
|
|
goBack() {
|
|
|
+ plus.screen.unlockOrientation();
|
|
|
this.$refs.popupRef.close();
|
|
|
this.goUpPage()
|
|
|
},
|
|
|
goNext() {
|
|
|
- debugger
|
|
|
+ plus.screen.unlockOrientation();
|
|
|
this.$refs.popupRef.close();
|
|
|
if (!cacheManager.get('auth')) {
|
|
|
console.log(this);
|
|
@@ -227,14 +232,14 @@
|
|
|
// }
|
|
|
// debugger
|
|
|
Number(this.jieId++)
|
|
|
- console.log('this.pageData',this.pageData);
|
|
|
+ console.log('this.pageData', this.pageData);
|
|
|
let currentObject = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex].jieList.find(item =>
|
|
|
item.jieId == this.jieId);
|
|
|
- if(currentObject){
|
|
|
- this.pageData = {
|
|
|
- ...currentObject
|
|
|
- }
|
|
|
+ if (currentObject) {
|
|
|
+ this.pageData = {
|
|
|
+ ...currentObject
|
|
|
}
|
|
|
+ }
|
|
|
// lastFlag是否是本章最后一节,0否1是 type,1视频,2试题
|
|
|
if (this.pageData.lastFlag == 1 && this.pageData.type == 2) {
|
|
|
uni.redirectTo({
|
|
@@ -277,7 +282,7 @@
|
|
|
if (!cacheManager.get('auth')) {
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/study/index?cardId=' + this.cardId + '&nianji=' + this.nianji + '&zhangId=' +
|
|
|
- this.zhangId+ '&tipFlag=' + this.tipFlag
|
|
|
+ this.zhangId + '&tipFlag=' + this.tipFlag
|
|
|
})
|
|
|
} else {
|
|
|
uni.redirectTo({
|
|
@@ -324,6 +329,7 @@
|
|
|
playAuth: '',
|
|
|
videoId: '',
|
|
|
progressMarkers: [],
|
|
|
+ isFullScreen: false,
|
|
|
seekTime: ''
|
|
|
|
|
|
}
|
|
@@ -412,6 +418,11 @@
|
|
|
extraInfo: {
|
|
|
poster: 'noposter'
|
|
|
},
|
|
|
+ fullscreenEvents: {
|
|
|
+ fullscreenChange: (isFull) => {
|
|
|
+ this.isFullScreen = isFull
|
|
|
+ }
|
|
|
+ },
|
|
|
//cover: 'https://img.alicdn.com/tps/TB1EXIhOFXXXXcIaXXXXXXXXXXX-760-340.jpg',
|
|
|
// "vid": '',
|
|
|
// "playauth": '',
|
|
@@ -480,7 +491,9 @@
|
|
|
player.tag.play();
|
|
|
|
|
|
});
|
|
|
- player.on('ended', function() {
|
|
|
+
|
|
|
+ player.on('ended', function(data) {
|
|
|
+ that.exitFullScreen();
|
|
|
that.$ownerInstance.callMethod('playEnd', {
|
|
|
data: 'end'
|
|
|
})
|
|
@@ -489,7 +502,17 @@
|
|
|
// });
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ exitFullScreen() {
|
|
|
+ if (document.exitFullscreen) {
|
|
|
+ document.exitFullscreen(); // 标准方法
|
|
|
+ } else if (document.mozCancelFullScreen) { // Firefox
|
|
|
+ document.mozCancelFullScreen();
|
|
|
+ } else if (document.webkitExitFullscreen) { // Chrome, Safari & Opera
|
|
|
+ document.webkitExitFullscreen();
|
|
|
+ } else if (document.msExitFullscreen) { // IE/Edge
|
|
|
+ document.msExitFullscreen();
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
loadWebPlayerSDK() {
|
|
|
return new Promise((resolve, reject) => {
|