修改视频资源里编辑视频时没有进度条问题

This commit is contained in:
YeMingfei666 2024-12-10 14:43:04 +08:00
parent d48ba06c9c
commit 4fec1aeb5d
1 changed files with 10 additions and 2 deletions

View File

@ -1075,10 +1075,10 @@
>
您的浏览器不支持视频播放
</video>
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
<i v-if="!url&&percentage<=0" class="el-icon-plus avatar-uploader-icon iconss"></i>
<el-progress
type="circle"
v-if="percentage > 0 && percentage <= 100"
v-if="!url&&percentage > 0 && percentage <= 100"
:percentage="percentage"
color="#efefef"
></el-progress>
@ -2136,6 +2136,8 @@ export default {
},
methods: {
async onVideoFileCHange(data) {
this.url='';
this.percentage = 0;
console.log(data);
const date = new Date();
const start =
@ -2148,8 +2150,11 @@ export default {
const name = start + "/" + getUUID() + houzhui;
const fileRes = await this.ossClient.partUpload(name, data.raw, (p) => {
this.percentage = Math.floor(p * 100);
console.log(this.percentage)
// UI
});
console.log('fileRes');
console.log(fileRes);
if (!fileRes) {
this.percentage = 0;
@ -2693,6 +2698,7 @@ export default {
this.titles = "添加视频";
this.title = "";
this.url = "";
this.percentage=0;
this.videoId = "";
this.price = "";
this.titleImg = "";
@ -2705,9 +2711,11 @@ export default {
},
//
compileVideo(row) {
this.initOssClient();
this.titles = "修改视频";
this.title = row.courseDetailsName;
this.url = row.videoUrl;
this.percentage=0;
this.videoId = row.courseDetailsId;
this.isPrice = row.isPrice;
this.price = row.price;