diff --git a/frontend/app.js b/frontend/app.js index ef13a58..7cb4912 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -4,10 +4,8 @@ createApp({ data() { return { // API配置 - // API配置 - 动态适配localhost或生产环境 - apiBase: window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1' - ? 'http://localhost:40001' - : window.location.protocol + '//' + window.location.host, + // API配置 - 通过nginx代理访问 + apiBase: window.location.protocol + '//' + window.location.host, // 用户状态 isLoggedIn: false, diff --git a/frontend/share.html b/frontend/share.html index 5db22c5..ba0942e 100644 --- a/frontend/share.html +++ b/frontend/share.html @@ -583,10 +583,8 @@ createApp({ data() { return { - // API配置 - 动态适配localhost或生产环境 - apiBase: window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1' - ? 'http://localhost:40001' - : window.location.protocol + '//' + window.location.host, + // API配置 - 通过nginx代理访问 + apiBase: window.location.protocol + '//' + window.location.host, shareCode: '', password: '', needPassword: false,