feat: 更新视频播放器功能并修复多个问题

- 升级edu-core依赖至v1.0.8
- 新增测试页面路由配置
- 修复订单页面Android平台专属支付按钮逻辑
- 优化视频播放器组件,增加倍速播放配置和控件显示逻辑
- 修复iOS平台视频封面显示问题
- 改进全屏模式处理逻辑
- 优化进度条和控制栏交互体验
- 修复DOM元素查找延迟问题
- 移除课程详情页冗余刷新逻辑
This commit is contained in:
2026-03-03 16:01:58 +08:00
parent a67874754f
commit 5200c73bc5
14 changed files with 420 additions and 143 deletions

View File

@@ -67,7 +67,6 @@ export default {
secondCountDown: 10,
isFullScreen: false,
screenLoading: false,
isfresh: false,
currentCateIndex: 0,
currentVideo: {},
videoList: {},
@@ -167,18 +166,7 @@ export default {
this.screenLoading = status;
},
initVideo() {
this.changeVideoLock = true
this.screenLoading = false;
this.isfresh = false;
this.$nextTick(() => {
this.isfresh = true;
// setTimeout(() => {
// this.$refs.commonVideo.init({
// currentVideo: this.currentVideo,
// currentVideoList: this.videoArray,
// });
// }, 200);
});
},
changeScreen(status) {
this.isFullScreen = status;
@@ -189,20 +177,8 @@ export default {
this.$forceUpdate();
},
handleFresh(status) {
this.isfresh = status;
this.$forceUpdate();
},
changeVideo(data) {
if (data.id != this.currentVideo.id) {
this.isfresh = false;
this.$nextTick(() => {
this.currentVideo = data;
this.currentVideoId = data.id;
this.initVideo()
this.isfresh = true;
});
}
},
hancleModalCancel() {
this.show = false;
},
@@ -227,7 +203,6 @@ export default {
}));
},
async getCourseDescriptionData() {
this.isfresh = false;
var data = {
id: this.options.id,
load: false,
@@ -245,12 +220,12 @@ export default {
that.curriculumData = res.data.detail;
that.videoArray = res.data.videos;
console.log('视频数据列表', that.videoArray)
console.log('章节详情', res.data)
if (that.videoArray.length > 0) {
that.convertToPlayerList();
that.currentVideo = that.videoArray[0];
that.currentVideoId = that.videoArray[0].id;
that.currentVideoId = res.data.current || that.videoArray[0].id;
that.initVideo()
that.isfresh = true;
}
});
},

26
pages/index.vue Normal file
View File

@@ -0,0 +1,26 @@
<template>
<view style="padding-top: 60rpx;">
<VideoPlayer />
</view>
</template>
<script>
import VideoPlayer from "@/components/video-player/video-player.vue";
// import YbPlayer from '@/libs/yb-player.js'
export default {
components: {
VideoPlayer,
},
data () {
return {}
},
mounted () {
},
methods: {
}
}
</script>
<style>
</style>

View File

@@ -97,7 +97,6 @@
<view
class="chong_list_item"
@click="onPageJump('/pages/wallet/points')"
v-if="$platform == 'android'"
>
<view class="pay_item_img"> 积分 </view>
<view class="text" style="line-height: 30rpx">{{
@@ -107,7 +106,6 @@
</view>
<view
v-if="$platform == 'android'"
class="chong_list_item"
style="flex-direction: initial; margin-right: 0"
>
@@ -154,8 +152,10 @@
</common-list>
</view>
</view>
<!-- <view style="text-align: center; margin-top: 20rpx; background-color: #5188e5; color: #fff; padding: 10rpx 0;" @click="onPageJump('/pages/index')">去测试页</view> -->
</view>
<u-popup :show="infoShow" mode="center" round="6" backgroundColor="#fff">
<view class="popup_box">
<view class="title">温馨提示</view>

View File

@@ -118,9 +118,11 @@
</view>
</view>
<text class="order_time">下单时间:{{item.createTime}}</text>
<view class="order_statusbtn">
<text v-if="item.orderStatus == 0" @click.stop="goPay(item)">继续付款</text>
<text v-if="item.orderStatus == 3">申请售后</text>
<view v-if="item.orderStatus == 0 && $platform == 'android'" class="order_statusbtn">
<text @click.stop="goPay(item)">继续付款</text>
</view>
<view v-if="item.orderStatus == 3" class="order_statusbtn">
<text>申请售后</text>
</view>
</view>
</view>

View File

@@ -359,7 +359,7 @@ export default {
color: "#fff",
});
}
if (this.orderContet.orderStatus == 0) {
if (this.orderContet.orderStatus == 0 && this.$platform == 'android') {
this.customButton.push({
width: "160rpx",
text: "继续付款",

View File

@@ -230,7 +230,7 @@ export default {
}, function(results) {
// results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction通用需将返回的支付凭证传给后端进行二次认证
that.ComplateRequestArr = results
console.log('未完成订单数组共有:', that.ComplateRequestArr.length)
console.log('未完成订单数组共有:', that.ComplateRequestArr)
if (results && results.length > 0) {
results.map((item, index) => {
that.finishTransaction(item);