|
@@ -62,7 +62,7 @@
|
|
>
|
|
>
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
<div class="el-upload__tip" slot="tip">
|
|
<div class="el-upload__tip" slot="tip">
|
|
- 支持AVI、mov、rmvb、rm、FLV、mp4、3GP等格式的视频文件,大小不超过1GB。
|
|
|
|
|
|
+ 支持mp4格式的视频文件,大小不超过1GB。
|
|
</div>
|
|
</div>
|
|
</el-upload>
|
|
</el-upload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -170,10 +170,11 @@ export default {
|
|
beforeFujian (file) {
|
|
beforeFujian (file) {
|
|
console.log('附件上传前', file)
|
|
console.log('附件上传前', file)
|
|
const sizeOk = file.size / 1024 / 1024 < 1024
|
|
const sizeOk = file.size / 1024 / 1024 < 1024
|
|
- const typeOk =
|
|
|
|
- file.type === 'video/mp4' ||
|
|
|
|
- file.type === 'video/avi' ||
|
|
|
|
- file.type === 'video/quicktime' || file.type === 'video/rm' || (file.type === '' && (file.name.includes('.flv') || file.name.includes('.rmvb'))) || file.type === 'video/3gpp'
|
|
|
|
|
|
+ // const typeOk =
|
|
|
|
+ // file.type === 'video/mp4' ||
|
|
|
|
+ // file.type === 'video/avi' ||
|
|
|
|
+ // file.type === 'video/quicktime' || file.type === 'video/rm' || (file.type === '' && (file.name.includes('.flv') || file.name.includes('.rmvb'))) || file.type === 'video/3gpp'
|
|
|
|
+ const typeOk = file.type === 'video/mp4'
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
if (file.name.length > 32) {
|
|
if (file.name.length > 32) {
|
|
this.$message.error('视频名字不能超过32个字')
|
|
this.$message.error('视频名字不能超过32个字')
|