bug
This commit is contained in:
		| @@ -51,7 +51,7 @@ | ||||
|           <el-form-item label="视频简介" style="width: 100%" prop="videoIntroduction" :rules="[{required: true, message: '请输入视频简介', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.videoIntroduction" type="textarea" size="small" :rows="4" placeholder="请输入视频简介"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="视频" prop="files" style="width: 100%;" :rules="[{required: true, message: '请上传视频', trigger: 'change'}]"> | ||||
|           <el-form-item v-loading="isLoading" label="视频" prop="files" style="width: 100%;" :rules="[{required: true, message: '请上传视频', trigger: 'change'}]"> | ||||
|             <el-upload :show-file-list="false" ref="upload1" action :http-request="submitUpload" :accept="accept" :limit="1"> | ||||
|               <div class="video" v-if="!form.files.length"> | ||||
|                 <div class="icon"> | ||||
| @@ -100,6 +100,7 @@ | ||||
|       return { | ||||
|         accept: '.mp4', | ||||
|         id: '', | ||||
|         isLoading: false, | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
| @@ -188,6 +189,7 @@ | ||||
|             let formData = new FormData() | ||||
|             formData.append('file', file.file) | ||||
|             formData.append('bizType', 1) | ||||
|             this.isLoading = true | ||||
|             this.instance.post(`/admin/file/addVideo`, formData).then(res => { | ||||
|               if (res && res.data) { | ||||
|                 let videoList = res.data[0].split(";") | ||||
| @@ -201,6 +203,10 @@ | ||||
|                   url: videoList[0] | ||||
|                 }] | ||||
|               } | ||||
|  | ||||
|               this.isLoading = false | ||||
|             }).catch(() => { | ||||
|               this.isLoading = false | ||||
|             }) | ||||
|           } else { | ||||
|             return this.$message.error("视频格式错误") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user