浏览代码

配置修改

zhuliu 1 年之前
父节点
当前提交
b5967357a1
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 3 2
      src/config/index.js
  2. 1 1
      src/utils/common.js

+ 3 - 2
src/config/index.js

@@ -3,6 +3,7 @@ export default {
     updateTime:'2023-08-04 08:00:00',
     specialDays:['05-12','09-18','12-13'],
     host: window.location.host,
-    staticURL: process.env.NODE_ENV === 'production' ? '139.224.24.90' : '192.168.1.24',
-    WebSocketPath: process.env.NODE_ENV === 'production' ? '139.224.24.90:8879' : '192.168.1.24:8877',
+    url:process.env.NODE_ENV === 'production' ? 'https://xsip.cn:8080' : 'http://192.168.2.24:8080',
+    staticURL: process.env.NODE_ENV === 'production' ? 'https://xsip.cn/onlinePreview' : 'http://192.168.2.24:8012',
+    WebSocketPath: process.env.NODE_ENV === 'production' ? 'wss://xsip.cn:8080' : 'ws://192.168.2.24:8877',
 }

+ 1 - 1
src/utils/common.js

@@ -365,7 +365,7 @@ treeToArray(data,prop={children:children}){
     }
     var src = this.checkViewer(guid)
     var previewUrl = src + '&fullfilename='+guid +'.'+type
-    return `${Config.staticURL}/onlinePreview?url=` + encodeURIComponent(Base64.encode(Config.staticURL+previewUrl))
+    return `${Config.staticURL}/onlinePreview?url=` + encodeURIComponent(Base64.encode(Config.url+previewUrl))
   },
 
   //跳转预览界面