Browse Source

修复视频格式问题,文字错误bug

shaogen1995 3 years ago
parent
commit
8b964d029c
4 changed files with 11 additions and 13 deletions
  1. 6 5
      src/components/tab3Dialog.vue
  2. 2 5
      src/components/tab5Dialog.vue
  3. 2 2
      src/utils/request.js
  4. 1 1
      src/views/login.vue

+ 6 - 5
src/components/tab3Dialog.vue

@@ -62,7 +62,7 @@
           >
             <el-button size="small" type="primary">点击上传</el-button>
             <div class="el-upload__tip" slot="tip">
-              支持AVI、mov、rmvb、rm、FLV、mp4、3GP等格式的视频文件,大小不超过1GB。
+              支持mp4格式的视频文件,大小不超过1GB。
             </div>
           </el-upload>
         </el-form-item>
@@ -170,10 +170,11 @@ export default {
     beforeFujian (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/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) => {
         if (file.name.length > 32) {
           this.$message.error('视频名字不能超过32个字')

+ 2 - 5
src/components/tab5Dialog.vue

@@ -80,7 +80,7 @@
           >
             <el-button size="small" type="primary">点击上传</el-button>
             <div class="el-upload__tip" slot="tip">
-              支持AVI、mov、rmvb、rm、FLV、mp4、3GP等格式的视频文件,大小不超过1GB。
+              支持mp4格式的视频文件,大小不超过1GB。
             </div>
           </el-upload>
         </el-form-item>
@@ -207,10 +207,7 @@ export default {
     beforeFujian (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/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) => {
         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
 })
 // 请求拦截器

+ 1 - 1
src/views/login.vue

@@ -18,7 +18,7 @@
       <div class="row">
         <el-input v-model="from.passWord" placeholder="密码" show-password></el-input>
       </div>
-      <div class="btn" @click="login">登 </div>
+      <div class="btn" @click="login">登 </div>
     </div>
   </div>
 </div>