|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <nav-bar title="身份证"></nav-bar>
|
|
|
+ <nav-bar title="课程详情" v-if="navShow"></nav-bar>
|
|
|
<view style="position: fixed;width: 100%;z-index: 999;background: #FFFFFF;" id="top">
|
|
|
<view class="video_box" v-if="!startStatus">
|
|
|
<image :src="$method.splitImgHost(detail.coverUrl)" style="width: 100%;height: 460rpx;"></image>
|
|
@@ -16,11 +16,18 @@
|
|
|
:showSettingBtn="true"
|
|
|
:enablePlayGesture="true"
|
|
|
@statechange="onStateChange"
|
|
|
+ @fullscreenchange="fullscreenchange "
|
|
|
:autoplay="autoplay"
|
|
|
:isAllowSeek="isAllowSeek"
|
|
|
:playbackRate="playbackRate"
|
|
|
:startTime="startTime"
|
|
|
+ :enableAutoRotation="enableAutoRotation"
|
|
|
></polyv-player>
|
|
|
+ <cover-view class="video-toast__close" v-if="videoToastShow" @click="closeToast()">X</cover-view>
|
|
|
+ <cover-view class="video-toast" v-if="videoToastShow">
|
|
|
+ <cover-view class="video-toast__text">您上次看到 {{seekTime}},正在自动续播</cover-view>
|
|
|
+ <cover-view class="video-toast__btn" @click="restart()">从头播放</cover-view>
|
|
|
+ </cover-view>
|
|
|
</view>
|
|
|
<view class="video_box" style="width: 100%;height: 460rpx;" v-if="playChannelId>0">
|
|
|
<player
|
|
@@ -130,7 +137,7 @@
|
|
|
</view>
|
|
|
<view v-for="(item, index) in answerList" :key="index" style="background-color: #FFFFFF;margin-bottom: 20rpx;">
|
|
|
<view class="chat_box" @click.stop="clearCtx">
|
|
|
- <view style="display: flex;">
|
|
|
+ <view style="display: flex;flex:1;">
|
|
|
<view><image :src="item.assignUserId > 0 ? '/static/logo_xcx.png' :$method.splitImgHost(item.avatar)" style="width: 64rpx;height: 64rpx;"></image></view>
|
|
|
<view style="margin-left: 15rpx;">
|
|
|
<view class="chat1">{{ item.assignUserId > 0 ? '祥粤老师' : item.realname }}</view>
|
|
@@ -216,6 +223,11 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ navShow:true,
|
|
|
+ enableAutoRotation:true,
|
|
|
+ seekTime:'',
|
|
|
+ toastTimer:null,
|
|
|
+ videoToastShow:false,
|
|
|
initLiveOk:false,
|
|
|
livePlay:false, //是否正在播放直播,不含暂停
|
|
|
liveDuration:0, //直播观看时长
|
|
@@ -1067,8 +1079,8 @@ export default {
|
|
|
if(self.gradeDetail.learningStatus==2){
|
|
|
uni.showModal({
|
|
|
showCancel:false,
|
|
|
- cancelText: '返回',
|
|
|
- content: '当前课程正在申请中,请耐心等待',
|
|
|
+ confirmText: '确定',
|
|
|
+ content: '当前课程正在申请中,正式开班后方可进行学习,请耐心等候!',
|
|
|
success: function(resultst) {
|
|
|
uni.navigateBack();
|
|
|
}
|
|
@@ -1320,13 +1332,29 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ closeToast() {
|
|
|
+ clearTimeout(this.toastTimer)
|
|
|
+ this.videoToastShow = false;
|
|
|
+
|
|
|
+ },
|
|
|
+ restart() {
|
|
|
+ var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
|
+ polyvPlayerContext.seek(0);
|
|
|
+ clearTimeout(this.toastTimer)
|
|
|
+ this.videoToastShow = false;
|
|
|
+ },
|
|
|
onStateChange(newstate, oldstate) {
|
|
|
if (newstate.detail.newstate == 'playing') {
|
|
|
if (this.needSeek) {
|
|
|
var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
|
if(this.recordObj.videoCurrentTime){
|
|
|
- console.log('seek')
|
|
|
polyvPlayerContext.seek(this.recordObj.videoCurrentTime);
|
|
|
+ this.seekTime = this.$method.secondToDate(this.recordObj.videoCurrentTime)
|
|
|
+ this.videoToastShow = true;
|
|
|
+ this.toastTimer = setTimeout(() => {
|
|
|
+ this.videoToastShow = false;
|
|
|
+ },3000)
|
|
|
+
|
|
|
}else{
|
|
|
polyvPlayerContext.seek(1);//避免相同节继续播放
|
|
|
}
|
|
@@ -1352,6 +1380,9 @@ export default {
|
|
|
},
|
|
|
//拍照
|
|
|
openPhoto() {
|
|
|
+ var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
|
+ polyvPlayerContext.exitFullScreen();
|
|
|
+ this.enableAutoRotation = false;
|
|
|
this.photoPopup = true;
|
|
|
uni.authorize({
|
|
|
scope: 'scope.camera',
|
|
@@ -1383,6 +1414,7 @@ export default {
|
|
|
self.submit();
|
|
|
|
|
|
self.photoPopup = false;
|
|
|
+ self.enableAutoRotation = true;
|
|
|
},
|
|
|
fail: err => {
|
|
|
console.log(err);
|
|
@@ -1396,6 +1428,19 @@ export default {
|
|
|
//关闭相机
|
|
|
closePhoto() {
|
|
|
this.photoPopup = false;
|
|
|
+ self.enableAutoRotation = true;
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 进入全屏
|
|
|
+ */
|
|
|
+ fullscreenchange(event) {
|
|
|
+ console.log(event)
|
|
|
+ if(event.detail.direction == 'vertical') {
|
|
|
+ this.navShow = true;
|
|
|
+ } else if(event.detail.direction == 'horizontal') {
|
|
|
+ this.navShow = false;
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
getGoodsDetail() {
|
|
|
let self = this;
|
|
@@ -1736,9 +1781,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
page {
|
|
|
- padding-top: 10px;
|
|
|
- padding-top: constant(safe-area-inset-top);
|
|
|
- padding-top: env(safe-area-inset-top);
|
|
|
+ // padding-top: 10px;
|
|
|
+ // padding-top: constant(safe-area-inset-top);
|
|
|
+ // padding-top: env(safe-area-inset-top);
|
|
|
}
|
|
|
.inputBottom {
|
|
|
position: fixed;
|
|
@@ -2121,6 +2166,48 @@ page {
|
|
|
}
|
|
|
.video_box {
|
|
|
position: relative;
|
|
|
+
|
|
|
+ .video-toast {
|
|
|
+ position:absolute;
|
|
|
+ width: 686rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ background: rgba(0,0,0,0.6);
|
|
|
+ border-radius: 24rpx;
|
|
|
+ bottom:100rpx;
|
|
|
+ left:50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ color:#fff;
|
|
|
+ display: flex;
|
|
|
+ font-size: 26rpx;
|
|
|
+ align-items: center;
|
|
|
+ overflow:visible;
|
|
|
+
|
|
|
+ &__text {
|
|
|
+ flex:1;
|
|
|
+ margin-left:40rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ &__btn {
|
|
|
+ width:180rpx;
|
|
|
+ text-align: center;
|
|
|
+ border-left:1rpx solid #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .video-toast__close {
|
|
|
+ position:absolute;
|
|
|
+ right:32rpx;
|
|
|
+ bottom:184rpx;
|
|
|
+ width: 40rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ line-height: 40rpx;
|
|
|
+ text-align: center;
|
|
|
+ background: rgba(0,0,0,0.6);
|
|
|
+ border-radius:50%;
|
|
|
+ color:rgba(255,255,255,0.3)
|
|
|
+ }
|
|
|
}
|
|
|
.rotoct {
|
|
|
transform: rotate(90deg);
|