Sfoglia il codice sorgente

默认开启动态API,onlyoffice配置请求地址改为相对路径

cfort 9 mesi fa
parent
commit
54e819c9b8
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      public/config.js
  2. 1 1
      public/index.html

+ 1 - 1
public/config.js

@@ -1,6 +1,6 @@
 (function (global) {
      // 是否启用动态API,启用后,将根据访问IP的origin获取API地址
-    const ENABLE_DYNAMIC_API = false
+    const ENABLE_DYNAMIC_API = true
     const HOST_URL = `${location.origin}${location.pathname}`
     const BASE_URL = ENABLE_DYNAMIC_API ? HOST_URL : 'http://192.168.2.209/'
     //const BASE_URL = "http://192.168.2.209/";

+ 1 - 1
public/index.html

@@ -20,7 +20,7 @@
     <% } %>
     <title><%= VUE_APP_TITLE %></title>
 	<!-- <script type="text/javascript" src="<%= BASE_URL %>lib/onlyoffice/api.js"></script> -->
-    <script type="text/javascript" src="http://192.168.2.209/word/web-apps/apps/api/documents/api.js"></script>
+    <script type="text/javascript" src="/word/web-apps/apps/api/documents/api.js"></script>
     <style>
      html,body,#app{height:100%;margin:0;padding:0}
      .ibps-home{background-color:#303133;height:100%;display:flex;flex-direction:column}