Browse Source

允许上传 flac

allen 3 years ago
parent
commit
52e12b990e

+ 2 - 2
languages/en.js

@@ -114,8 +114,8 @@ module.exports = {
     uploadAPK: 'APK file upload',
     uploadFileMsg: 'Drag file here, or',
     uploadFileMsg2: 'Click to upload',
-    uploadFileMsg3: 'Only mp3 files can be uploaded',
-    uploadFileMsg4: 'The upload attachment size cannot exceed 5MB!',
+    uploadFileMsg3: 'Only mp3 or flac files can be uploaded',
+    uploadFileMsg4: 'The upload attachment size cannot exceed 50MB!',
     uploadFileMsg5: 'Only upload APK files',
     uploadFileName: 'File name',
     uploadFileNameMsg: 'The file name cannot be empty',

+ 2 - 2
languages/zh-CN.js

@@ -115,8 +115,8 @@ module.exports = {
     uploadAPK: 'APK文件上传',
     uploadFileMsg: '将文件拖到此处,或',
     uploadFileMsg2: '点击上传',
-    uploadFileMsg3: '只能上传mp3文件',
-    uploadFileMsg4: '上传附件大小不能超过 5MB!',
+    uploadFileMsg3: '只能上传mp3或flac文件',
+    uploadFileMsg4: '上传附件大小不能超过 50MB!',
     uploadFileMsg5: '只能上传APK文件',
     uploadFileName: '文件名称',
     uploadFileNameMsg: '文件名称不能为空',

+ 3 - 3
public/domain.js

@@ -1,7 +1,7 @@
 const domain = {
-  serverUrl: 'http://192.168.1.188:8005',
-  DeviceUrl: 'http://192.168.1.188:8006',
-  mediaUrl: 'http://192.168.1.188:8004',
+  serverUrl: 'http://192.168.1.54:8005',
+  DeviceUrl: 'http://192.168.1.54:8006',
+  mediaUrl: 'http://192.168.1.54:8004',
   OnlineSystemUrl: 'http://api.base.wdklian.com',
   apiMode: 'dev',
   uiVersion: 1 // 1 医院版,2 月子中心版,3养老院版

+ 4 - 4
src/views/ncs-broadcast/components/broadcastFileList.vue

@@ -46,7 +46,7 @@
                 drag
                 :action="`${uploadServer}/ncs/upload/uploadFile?scene=broadcast`"
                 :show-file-list="false"
-                accept=".mp3"
+                accept=".mp3,.flac"
                 :on-success="uploaded"
                 :before-upload="handleUploadBefore"
               >
@@ -394,13 +394,13 @@ export default {
         const filename = file.name
         const index = filename.lastIndexOf('.')
         const extension = filename.substring(index + 1)
-        const isMp3 = extension.toLowerCase() === 'mp3'
-        const isLt5M = file.size / 1024 / 1024 < 5
+        const isMp3 = (extension.toLowerCase() === 'mp3' || extension.toLowerCase() === 'flac')
+        const isLt50M = file.size / 1024 / 1024 < 50
         if (!isMp3) {
           this.$message.error(this.$t('action.uploadFileMsg3'))
           reject()
         }
-        if (!isLt5M) {
+        if (!isLt50M) {
           this.$message.error(this.$t('action.uploadFileMsg4'))
           reject()
         }

+ 1 - 1
src/views/ncs-broadcast/index.vue

@@ -229,7 +229,7 @@ export default {
   components: { ButtonCellRenderList, ListFilter, RadioFilter },
   data() {
     return {
-      rtcServer: "ws://192.168.1.188:8188/janus",
+      rtcServer: "ws://192.168.1.54:20022/janus",
       opaqueId: "streaming-"+randomString(12),
       janus: null,  //实例
       pluginHandle: null,   //插件