Sfoglia il codice sorgente

修复上传视频的格式和大小

shaogen1995 3 anni fa
parent
commit
777a360dc0

+ 1 - 1
new_backstage/src/components/uploadFile/index.vue

@@ -35,7 +35,7 @@ export default {
       this.loading = this.$loading(this.loadOption)
     },
     beforeMultipleUpload(file){
-      let typeArr = this.desc.indexOf('4dage')>-1 ? ['.4dage'] : ['avi','mov','rmvb','rm','flv','mp4','3gp']
+      let typeArr = this.desc.indexOf('4dage')>-1 ? ['.4dage'] : ['mp4']
       let type = this.isTypeBySend(file.name,typeArr);
       if (!type) {
         this.$message.error('只允许指定文件格式的文件');

+ 2 - 2
new_backstage/src/configue/http.js

@@ -8,9 +8,9 @@ const vue = new Vue();
 var isProduction = process.env.NODE_ENV === "production";
 let loading = "";
 // 线上打包
-// const serverName = isProduction ? "/" : "http://192.168.0.245:8003/";
+const serverName = isProduction ? "/" : "http://192.168.0.245:8003/";
 // 线下调试
-const serverName = isProduction ? "/" : "http://192.168.0.135:8003/";
+// const serverName = isProduction ? "/" : "http://192.168.0.135:8003/";
 
 const serverLocation = window.location.hostname;
 

+ 1 - 1
new_backstage/src/pages/content/collection/componets/video.vue

@@ -13,7 +13,7 @@
     </el-form-item>
 
     <el-form-item label="视频文件:" prop="filePath">
-      <uploadFile :url="fileUrl"  @update="data=>{form.fileName = data.fileName,form.filePath = data.filePath}" :filePath="form.filePath" :desc="'支持AVI、mov、rmvb、rm、FLV、mp4、3GP等格式的视频文件,大小不超过2GB'" />
+      <uploadFile :url="fileUrl"  @update="data=>{form.fileName = data.fileName,form.filePath = data.filePath}" :filePath="form.filePath" :desc="'支持mp4视频文件,大小不超过500MB'" />
       <video class="svideo" v-if="form.filePath" controls :src="form.filePath">
       </video>
     </el-form-item>

+ 2 - 2
web/src/config/http.js

@@ -2,9 +2,9 @@ import axios from 'axios'
 
 var isProduction = process.env.NODE_ENV === 'production'
 // 线上打包
-// const serverName = isProduction ? '/' : 'http://192.168.0.245:8003/'
+const serverName = isProduction ? '/' : 'http://192.168.0.245:8003/'
 // 线下调试
-const serverName = isProduction ? "/" : "http://192.168.0.135:8003/"
+// const serverName = isProduction ? "/" : "http://192.168.0.135:8003/"
 
 const orginLink = window.location.origin