@bytenew/bn-applet-ui 1.1.73 → 1.1.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28761,7 +28761,6 @@ var es_array_sort = __webpack_require__(6910);
28761
28761
 
28762
28762
 
28763
28763
 
28764
-
28765
28764
 
28766
28765
 
28767
28766
  var defaultData = []; //不包括省市级code的数据
@@ -30016,7 +30015,15 @@ function parseAddressByChat(address) {
30016
30015
  console.warn('当前环境不支持 fetch,无法调用大模型地址识别接口');
30017
30016
  return Promise.resolve(null);
30018
30017
  }
30019
- var url = '/v2/project/column/addressBychat?contents=' + address;
30018
+ // 本地开发环境(localhost/127.0.0.1 等)请求前加代理前缀 /proxyWay,走前端 devServer 代理转发;
30019
+ // 非本地环境(线上同域部署)不加前缀
30020
+ var baseUrl = '';
30021
+ if (typeof window !== 'undefined' && window.location) {
30022
+ var hostname = window.location.hostname;
30023
+ var isLocal = hostname === 'localhost' || hostname === '127.0.0.1' || hostname === '0.0.0.0' || hostname === '[::1]';
30024
+ baseUrl = isLocal ? '/proxyWay' : '';
30025
+ }
30026
+ var url = baseUrl + '/v2/project/column/addressBychat?contents=' + encodeURIComponent(address);
30020
30027
  return fetch(url, {
30021
30028
  method: 'GET'
30022
30029
  }).then(function (r) {