未上传完成文件不让提交
This commit is contained in:
parent
1bf49e37b4
commit
edcee2f592
@ -301,6 +301,7 @@ export default {
|
||||
shijishichang: "Actual live broadcast duration",
|
||||
cshipinyaoqiu1: "The video should be no longer than 10 minutes",
|
||||
cshipinyaoqiu2: "Video size cannot exceed 500M",
|
||||
shangchuanwancheng: "Please wait for the file to be uploaded",
|
||||
shichangtishi:"",
|
||||
renshutishi: '',
|
||||
tixianzhu: "",
|
||||
|
@ -301,6 +301,7 @@ export default {
|
||||
shijishichang: "实际直播时长",
|
||||
cshipinyaoqiu1: "视频长度不能超过10分钟",
|
||||
cshipinyaoqiu2: "视频大小不能超过500m",
|
||||
shangchuanwancheng: "请等待文件上传完成",
|
||||
shichangtishi:"",
|
||||
renshutishi: '',
|
||||
tixianzhu:"",
|
||||
|
@ -542,6 +542,7 @@ export default defineComponent({
|
||||
NavBottom,
|
||||
},
|
||||
setup() {
|
||||
let issum = true;
|
||||
const lan: any = useI18n();
|
||||
interface SpeakItem {
|
||||
lang: string;
|
||||
@ -812,6 +813,10 @@ export default defineComponent({
|
||||
// for(let i in toRaw(formData.value).willsay){
|
||||
// console.log(toRaw(formData.value).willsay[i])
|
||||
// }
|
||||
if(!issum){
|
||||
message.error(lan.$t("shangchuanwancheng"))
|
||||
return;
|
||||
}
|
||||
const uesrinfo = toRaw(formData.value);
|
||||
// for (let m = 0; m < toRaw(chiveslist.value).length; m++) {
|
||||
// for (const i in uesrinfo.willsayValue) {
|
||||
@ -926,13 +931,14 @@ export default defineComponent({
|
||||
async function uploads(file: AntUpload) {
|
||||
|
||||
uploadprogress.value = 0;
|
||||
|
||||
issum = false;
|
||||
const res = await uploadflie(file.file, (info: any) => {
|
||||
console.log(info);
|
||||
uploadprogress.value = info.percent.toFixed(2) * 100;
|
||||
});
|
||||
userinfo.value.video = res.video.url;
|
||||
userinfo.value.videoid = res.fileId;
|
||||
issum = true;
|
||||
}
|
||||
|
||||
if (formData.value.video != "") {
|
||||
|
@ -147,6 +147,7 @@ export default defineComponent({
|
||||
NavBottom,
|
||||
},
|
||||
setup() {
|
||||
let issum= true;
|
||||
const lan: any = useI18n();
|
||||
interface FileItem {
|
||||
video: Array<string>;
|
||||
@ -254,6 +255,7 @@ export default defineComponent({
|
||||
const uploadprogress: Ref<number> = ref(0);
|
||||
const ifallowvideo = ref<boolean>(false);
|
||||
async function uploads(file: AntUpload) {
|
||||
issum = false;
|
||||
console.log(file);
|
||||
videofile.value = file.file;
|
||||
videos.value[0].addEventListener("durationchange", () => {
|
||||
@ -268,6 +270,7 @@ export default defineComponent({
|
||||
|
||||
form.value.fileid = res.fileId;
|
||||
form.value.fileurl = res.video.url;
|
||||
issum = true;
|
||||
}
|
||||
|
||||
function beforeVideoUpload(info?: any) {
|
||||
@ -285,6 +288,10 @@ export default defineComponent({
|
||||
*/
|
||||
const routes = useRoute();
|
||||
const onSubmit = async (e: FromSend) => {
|
||||
if(!issum){
|
||||
message.error(lan.$t("shangchuanwancheng"))
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
console.log(toRaw(form.value), 111);
|
||||
console.log(toRaw(form.value).video[0].length);
|
||||
|
@ -252,6 +252,7 @@ export default defineComponent({
|
||||
RankList,
|
||||
},
|
||||
setup() {
|
||||
let issum = true;
|
||||
const lan: any = useI18n();
|
||||
// 表单数据
|
||||
const form = ref({
|
||||
@ -361,6 +362,10 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
const onSubmit = (e: FromSend) => {
|
||||
if(!issum){
|
||||
message.error(lan.$t("shangchuanwancheng"))
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
validate()
|
||||
.then(() => {
|
||||
@ -475,6 +480,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
async function uploads(file: AntUpload) {
|
||||
issum = false;
|
||||
console.log(file);
|
||||
videofile.value = file.file;
|
||||
videos.value[0].addEventListener("durationchange", () => {
|
||||
@ -489,6 +495,7 @@ export default defineComponent({
|
||||
|
||||
form.value.fileid = res.fileId;
|
||||
form.value.fileurl = res.video.url;
|
||||
issum = true;
|
||||
}
|
||||
const ifallowpic = ref<boolean>(false);
|
||||
async function uploadspic(file: AntUpload) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user