Browse Source

增加rmvb视频格式

shaogen1995 3 years ago
parent
commit
9b8d87ba55
3 changed files with 5 additions and 5 deletions
  1. 2 2
      src/components/tab3Dialog.vue
  2. 1 1
      src/components/tab5Dialog.vue
  3. 2 2
      src/utils/request.js

+ 2 - 2
src/components/tab3Dialog.vue

@@ -168,12 +168,12 @@ export default {
     },
     // 上传附件
     beforeFujian (file) {
-      // console.log('附件上传前', file)
+      console.log('附件上传前', file)
       const sizeOk = file.size / 1024 / 1024 < 1024
       const typeOk =
         file.type === 'video/mp4' ||
         file.type === 'video/avi' ||
-        file.type === 'video/quicktime' || file.type === 'video/rmvb' || file.type === 'video/rm' || (file.type === '' && file.name.includes('.flv')) || file.type === 'video/3gpp'
+        file.type === 'video/quicktime' || file.type === 'video/rmvb' || file.type === 'video/rm' || (file.type === '' && (file.name.includes('.flv') || file.name.includes('.rmvb'))) || file.type === 'video/3gpp'
       return new Promise((resolve, reject) => {
         if (file.name.length > 32) {
           this.$message.error('视频名字不能超过32个字')

+ 1 - 1
src/components/tab5Dialog.vue

@@ -210,7 +210,7 @@ export default {
       const typeOk =
         file.type === 'video/mp4' ||
         file.type === 'video/avi' ||
-        file.type === 'video/quicktime' || file.type === 'video/rmvb' || file.type === 'video/rm' || (file.type === '' && file.name.includes('.flv')) || file.type === 'video/3gpp'
+        file.type === 'video/quicktime' || file.type === 'video/rmvb' || file.type === 'video/rm' || (file.type === '' && (file.name.includes('.flv') || file.name.includes('.rmvb'))) || file.type === 'video/3gpp'
       return new Promise((resolve, reject) => {
         if (file.name.length > 32) {
           this.$message.error('视频名字不能超过32个字')

+ 2 - 2
src/utils/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 const service = axios.create({
   // baseURL: 'http://192.168.0.135:8011/', // 本地调试
-  // baseURL: 'http://8.135.106.227:8012/', // 线上调试
-  baseURL: '', // build
+  baseURL: 'http://8.135.106.227:8012/', // 线上调试
+  // baseURL: '', // build
   timeout: 5000
 })
 // 请求拦截器