修改视频资源里编辑视频时没有进度条问题
This commit is contained in:
parent
d48ba06c9c
commit
4fec1aeb5d
|
|
@ -1075,10 +1075,10 @@
|
||||||
>
|
>
|
||||||
您的浏览器不支持视频播放
|
您的浏览器不支持视频播放
|
||||||
</video>
|
</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
|
<el-progress
|
||||||
type="circle"
|
type="circle"
|
||||||
v-if="percentage > 0 && percentage <= 100"
|
v-if="!url&&percentage > 0 && percentage <= 100"
|
||||||
:percentage="percentage"
|
:percentage="percentage"
|
||||||
color="#efefef"
|
color="#efefef"
|
||||||
></el-progress>
|
></el-progress>
|
||||||
|
|
@ -2136,6 +2136,8 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async onVideoFileCHange(data) {
|
async onVideoFileCHange(data) {
|
||||||
|
this.url='';
|
||||||
|
this.percentage = 0;
|
||||||
console.log(data);
|
console.log(data);
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
const start =
|
const start =
|
||||||
|
|
@ -2148,8 +2150,11 @@ export default {
|
||||||
const name = start + "/" + getUUID() + houzhui;
|
const name = start + "/" + getUUID() + houzhui;
|
||||||
const fileRes = await this.ossClient.partUpload(name, data.raw, (p) => {
|
const fileRes = await this.ossClient.partUpload(name, data.raw, (p) => {
|
||||||
this.percentage = Math.floor(p * 100);
|
this.percentage = Math.floor(p * 100);
|
||||||
|
console.log(this.percentage)
|
||||||
|
|
||||||
// 这里可以根据进度做相应的处理,例如更新UI等
|
// 这里可以根据进度做相应的处理,例如更新UI等
|
||||||
});
|
});
|
||||||
|
console.log('fileRes');
|
||||||
console.log(fileRes);
|
console.log(fileRes);
|
||||||
if (!fileRes) {
|
if (!fileRes) {
|
||||||
this.percentage = 0;
|
this.percentage = 0;
|
||||||
|
|
@ -2693,6 +2698,7 @@ export default {
|
||||||
this.titles = "添加视频";
|
this.titles = "添加视频";
|
||||||
this.title = "";
|
this.title = "";
|
||||||
this.url = "";
|
this.url = "";
|
||||||
|
this.percentage=0;
|
||||||
this.videoId = "";
|
this.videoId = "";
|
||||||
this.price = "";
|
this.price = "";
|
||||||
this.titleImg = "";
|
this.titleImg = "";
|
||||||
|
|
@ -2705,9 +2711,11 @@ export default {
|
||||||
},
|
},
|
||||||
// 修改视频
|
// 修改视频
|
||||||
compileVideo(row) {
|
compileVideo(row) {
|
||||||
|
this.initOssClient();
|
||||||
this.titles = "修改视频";
|
this.titles = "修改视频";
|
||||||
this.title = row.courseDetailsName;
|
this.title = row.courseDetailsName;
|
||||||
this.url = row.videoUrl;
|
this.url = row.videoUrl;
|
||||||
|
this.percentage=0;
|
||||||
this.videoId = row.courseDetailsId;
|
this.videoId = row.courseDetailsId;
|
||||||
this.isPrice = row.isPrice;
|
this.isPrice = row.isPrice;
|
||||||
this.price = row.price;
|
this.price = row.price;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue