We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7eff2f commit 2c414aeCopy full SHA for 2c414ae
file_classification_webapi/static/js/config.js
@@ -1,5 +1,5 @@
1
-// API基础URL
2
-const BASE_URL = 'http://127.0.0.1:8082';
+// API基础URL - 自动获取当前访问的域名和端口,以支持跨设备访问
+const BASE_URL = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');
3
4
// 导出配置
5
window.APP_CONFIG = {
0 commit comments