合并后

This commit is contained in:
@fawn-nine
2024-10-16 17:21:24 +08:00
9 changed files with 46 additions and 51 deletions

View File

@@ -334,13 +334,14 @@
},
})
.then(async (res) => {
console.log('获取播放凭证666', res.video);
this.reaquestFlag = false
if (this.$platform == 'ios') {
if (this.currentVideo.type == 1 && res.video.m3u8Url == null || this.currentVideo
if (res.video.type == 1 && res.video.m3u8Url == null || res.video
.type == 1 && res.video.m3u8Url == '') {
// 只存在私有加密
this.show = true
this.UnlockChangeVideo() // 解锁按钮
uni.showModal({
content: '抱歉,苹果手机不支持此加密视频格式,您可以在安卓端观看本视频',
confirmText: '知道了',
@@ -578,7 +579,7 @@
},
// renderjs阿里云播放器引入与配置
getLive() {
console.log('这是这只只是666666:', this.firstTime, this.videoData)
console.log('阿里云播放器引入与配置:', this.firstTime, videoData)
$('#url-player-test').empty();
@@ -714,18 +715,17 @@
}
if (this.videoData.type == 1) {
if (this.videoData.m3u8Url == null || this.videoData.m3u8Url == '') {
if (videoData.type == 1) {
if (videoData.m3u8Url == null || videoData.m3u8Url == '') {
console.log('这是私有加密的视频');
if (this.$platform == 'ios') {
this.$refs.videoContent5.click()
} else {
playerOptions = {
...playerOptions,
"vid": this.videoData
.videoId, // 必选参数,可以通过点播控制台(路径:媒资库>音/视频查询。示例1e067a2831b641db90d570b6480f****。
"vid": videoData.videoId, // 必选参数,可以通过点播控制台(路径:媒资库>音/视频查询。示例1e067a2831b641db90d570b6480f****。
"playauth": this.videoData.playAuth, // 必选参数参数值可通过调用GetVideoPlayAuth接口获取。
"playauth": videoData.playAuth, // 必选参数参数值可通过调用GetVideoPlayAuth接口获取。
"encryptType": 1, // 必选参数当播放私有加密流时需要设置本参数值为1。其它情况无需设置。
"playConfig": {
"EncryptType": 'AliyunVoDEncryption'
@@ -733,19 +733,19 @@
}
console.log('这是私有加密的视频');
}
} else if (this.videoData.m3u8Url != null || this.videoData.m3u8Url != '') {
} else if (videoData.m3u8Url != null || videoData.m3u8Url != '') {
playerOptions = {
...playerOptions,
source: this.videoData.m3u8Url,
source: videoData.m3u8Url,
// "playConfig": {"EncryptType": "HLSEncryption"}
}
console.log('这是标准加密的视频', this.videoData.id, this.videoData.m3u8Url);
console.log('这是标准加密的视频', videoData.id, videoData.m3u8Url);
}
} else {
playerOptions = {
...playerOptions,
source: this.videoData.videoUrl
source: videoData.videoUrl
}
console.log('这是没有加密的视频');
}
@@ -873,25 +873,8 @@
// 监听视频参数变化,并赋值给常量
receiveMsg(newValue, oldValue, ownerVm, vm) {
//数据变化
videoData = newValue
if (videoData) {
return
console.log('切换后的播放数据videoData', videoData.type);
if (videoData.type == 1) {
if (videoData.m3u8Url != '' && videoData.m3u8Url != null) {
// myplayer.source(videoData.m3u8Url)
myplayer.loadByUrl(videoData.m3u8Url)
console.log('切换走了吗m3u8');
} else {
myplayer.replayByVidAndPlayAuth(videoData.videoId, videoData.playAuth)
console.log('切换走了吗?私有加密');
}
} else {
myplayer.loadByUrl(videoData.videoUrl)
console.log('切换常规视频');
}
}
// console.log('可能是切换视频', videoData, );
videoData = newValue
},
receiveWinWidth(newValue, oldValue, ownerVm, vm) {
//数据变化
@@ -903,8 +886,8 @@
},
// 检测是否传入播放参数
checkValue() {
console.log(this.videoId, this.authId, this.videoData, "1111888888")
if ((!this.videoData.playAuth || !this.currentVideoList)) {
console.log(this.videoId, this.authId, videoData, "1111888888")
if ((!videoData.playAuth || !this.currentVideoList)) {
setTimeout(() => {
this.checkValue();
}, 1000);

View File

@@ -72,7 +72,7 @@
v-if="course.canzk == '1' && librayList[curIndex] && (!classInfo.id || classInfo.state == '2' || selfStudyCertificate.length >= 0)">
<view style="padding: 20rpx;"
v-if="selfStudyCertificate.length > 0 || selfStudyCertificate.length == 0 && (!classInfo.id || classInfo.state == '2')">
v-if="selfStudyCertificate.length > 0 || selfStudyPaperList.length > 0 || selfStudyCertificate.length == 0 && (!classInfo.id || classInfo.state == '2')">
<view class="">
<view class="" style="line-height: 40rpx; font-size: 28rpx;"
@@ -1691,7 +1691,7 @@
}
})
.catch((e) => {
console.log(e, "获取目录数据报错");
console.log(e, "获取目录数据报错666");
});
},
goBuy() {

View File

@@ -19,9 +19,9 @@
</view>
<view class="">
<text>恭喜您本次考试获得了自考证书请前往 我的->我的证书查看</text>
<view class="" style="text-align: center;">
<<view class="" style="text-align: center;">
<text class="small_btn border_radius_10"
style="display: block;font-size: 28rpx; color: #55aaff; border:1px solid #55aaff"
style="display: inline-block;font-size: 28rpx; color: #55aaff; border:1px solid #55aaff"
@click="onPageJump('/pages/certificate/certificate')">查看证书</text>
</view>
@@ -33,9 +33,9 @@
</template>
</view>
<view class="flex_box flex_between">
<button type="primary" v-if="testPaper.type == '2'" @click="goToCourse">返回课程</button>
<button type="primary" v-else @click="goToClass">返回班级</button>
<button type="warn" @click="goToPaper">查看试卷</button>
<button size="mini" type="primary" v-if="testPaper.type == '2'" @click="goToCourse">返回课程</button>
<button size="mini" type="primary" v-else @click="goToClass">返回班级</button>
<button size="mini" type="warn" @click="goToPaper">查看试卷</button>
</view>
<view class="result_imgBox">
<image src="../../static/jiesuan_Icon.jpg" mode="widthFix"></image>

View File

@@ -12,16 +12,18 @@
本次考试卷面成绩为<text class="score PM_font">{{exameResult.score}} </text>
</view>
<view class="" style="margin: 20rpx 0; text-align: center;">
<template v-if="exameResult.score >= 1 && selfStudyCertificate.length > 0">
<template v-if="exameResult.score >= 60 && selfStudyCertificate.length > 0">
<view class="">
<view class="congritulations">
<image src="../../static/icon/xunzhang.png" mode="widthFix"></image>
</view>
<view class="">
<text>恭喜您本次考试获得了自考证书请前往 我的->我的证书查看</text>
<text class="small_btn border_radius_10"
style="display: block;font-size: 28rpx; color: #55aaff; border:1px solid #55aaff"
@click="onPageJump('/pages/certificate/certificate')">查看证书</text>
<view class="" style="text-align: center;">
<text class="small_btn border_radius_10"
style="display: inline-block;font-size: 28rpx; color: #55aaff; border:1px solid #55aaff"
@click="onPageJump('/pages/certificate/certificate')">查看证书</text>
</view>
</view>
</view>
</template>
@@ -408,7 +410,7 @@
that.showQuestIndex = false
that.secondTimeDif = 0
that.isOvertime = true
if(that.exameResult.score >= 1){
if(that.exameResult.score >= 60){
var newCertificate = await that.getCertificateInfo()
console.log('5555555证书资料', newCertificate);
that.selfStudyCertificate = []