进度初始就出现
This commit is contained in:
parent
9dad777061
commit
5b1f165528
@ -19,6 +19,7 @@
|
|||||||
"trtc-js-sdk": "^4.6.5",
|
"trtc-js-sdk": "^4.6.5",
|
||||||
"vod-js-sdk-v6": "^1.4.10",
|
"vod-js-sdk-v6": "^1.4.10",
|
||||||
"vue": "^3.0.0-0",
|
"vue": "^3.0.0-0",
|
||||||
|
"vue-cropper": "^0.5.5",
|
||||||
"vue-router": "^4.0.0-0",
|
"vue-router": "^4.0.0-0",
|
||||||
"vuex": "^4.0.0-0"
|
"vuex": "^4.0.0-0"
|
||||||
},
|
},
|
||||||
|
8
src/import-png.d.ts
vendored
8
src/import-png.d.ts
vendored
@ -18,6 +18,14 @@ declare module 'tim-js-sdk'{
|
|||||||
export default value;
|
export default value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module 'vue-cropper'{
|
||||||
|
const VueCropper: any
|
||||||
|
export {
|
||||||
|
VueCropper
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
declare var FB: any;
|
declare var FB: any;
|
||||||
|
|
||||||
declare var TCPlayer: any;
|
declare var TCPlayer: any;
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mine" :style="{height:height + 'px'}">
|
<div class="mine" :style="{height:height + 'px'}">
|
||||||
<NavTop :type="1" style="flex-shrink:0"></NavTop>
|
<NavTop :type="1" style="flex-shrink:0"></NavTop>
|
||||||
<div class="body">
|
<div class="body" id="rbody">
|
||||||
<router-view/>
|
<router-view/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -930,11 +930,12 @@ export default defineComponent({
|
|||||||
const uploadprogress: Ref<number> = ref(0);
|
const uploadprogress: Ref<number> = ref(0);
|
||||||
async function uploads(file: AntUpload) {
|
async function uploads(file: AntUpload) {
|
||||||
|
|
||||||
uploadprogress.value = 0;
|
uploadprogress.value = 1;
|
||||||
issum = false;
|
issum = false;
|
||||||
const res = await uploadflie(file.file, (info: any) => {
|
const res = await uploadflie(file.file, (info: any) => {
|
||||||
console.log(info);
|
console.log(info);
|
||||||
uploadprogress.value = info.percent.toFixed(2) * 100;
|
const jindu = info.percent.toFixed(2) * 100
|
||||||
|
uploadprogress.value = jindu > 0 ? jindu : 1;
|
||||||
});
|
});
|
||||||
userinfo.value.video = res.video.url;
|
userinfo.value.video = res.video.url;
|
||||||
userinfo.value.videoid = res.fileId;
|
userinfo.value.videoid = res.fileId;
|
||||||
|
@ -258,13 +258,15 @@ export default defineComponent({
|
|||||||
issum = false;
|
issum = false;
|
||||||
console.log(file);
|
console.log(file);
|
||||||
videofile.value = file.file;
|
videofile.value = file.file;
|
||||||
|
uploadprogress.value = 1;
|
||||||
videos.value[0].addEventListener("durationchange", () => {
|
videos.value[0].addEventListener("durationchange", () => {
|
||||||
console.log(videos.value[0].duration);
|
console.log(videos.value[0].duration);
|
||||||
form.value.fileduration = videos.value[0].duration;
|
form.value.fileduration = videos.value[0].duration;
|
||||||
});
|
});
|
||||||
const res = await uploadflie(file.file, (info: any) => {
|
const res = await uploadflie(file.file, (info: any) => {
|
||||||
console.log(info);
|
console.log(info);
|
||||||
uploadprogress.value = info.percent.toFixed(2) * 100;
|
const jindu = info.percent.toFixed(2) * 100
|
||||||
|
uploadprogress.value = jindu > 0 ? jindu : 1;
|
||||||
});
|
});
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
|
@ -493,9 +493,11 @@ export default defineComponent({
|
|||||||
console.log(videos.value[0].duration);
|
console.log(videos.value[0].duration);
|
||||||
form.value.fileduration = videos.value[0].duration;
|
form.value.fileduration = videos.value[0].duration;
|
||||||
});
|
});
|
||||||
|
uploadprogress.value = 1;
|
||||||
const res = await uploadflie(file.file, (info: any) => {
|
const res = await uploadflie(file.file, (info: any) => {
|
||||||
console.log(info);
|
console.log(info);
|
||||||
uploadprogress.value = info.percent.toFixed(2) * 100;
|
const jindu = info.percent.toFixed(2) * 100
|
||||||
|
uploadprogress.value = jindu > 0 ? jindu : 1;
|
||||||
});
|
});
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
|
@ -9245,6 +9245,11 @@ vod-js-sdk-v6@^1.4.10:
|
|||||||
js-sha1 "^0.6.0"
|
js-sha1 "^0.6.0"
|
||||||
uuid "^3.3.2"
|
uuid "^3.3.2"
|
||||||
|
|
||||||
|
vue-cropper@^0.5.5:
|
||||||
|
version "0.5.5"
|
||||||
|
resolved "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.5.tgz#9bd1ba563c7faa268abd52fb2af4c6c28d33c962"
|
||||||
|
integrity sha512-5mGaBlS1EwLxUFwHHX2Q8zOZSiVfBUjOfolR+ZNKwu7Rh3u+GhwHYOyFkgZHhhoQBBNdyVB28O6W+MpMimhCbA==
|
||||||
|
|
||||||
vue-eslint-parser@^7.0.0, vue-eslint-parser@^7.1.1:
|
vue-eslint-parser@^7.0.0, vue-eslint-parser@^7.1.1:
|
||||||
version "7.1.1"
|
version "7.1.1"
|
||||||
resolved "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.1.1.tgz#c43c1c715ff50778b9a7e9a4e16921185f3425d3"
|
resolved "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.1.1.tgz#c43c1c715ff50778b9a7e9a4e16921185f3425d3"
|
||||||
|
Loading…
Reference in New Issue
Block a user