@bytenew/bn-applet-ui 1.1.73 → 1.1.75

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) {
@@ -30085,8 +30092,6 @@ function _addressParse() {
30085
30092
  _context.n = 2;
30086
30093
  break;
30087
30094
  }
30088
- // 先设置本地识别错误提示,AI 识别成功/失败后覆盖为对应提示
30089
- parse.msg = '自动识别识别错误:识别出的' + conflictLevel + '与输入地址不一致,请检查或手动填写';
30090
30095
  _context.n = 1;
30091
30096
  return parseAddressByChat(address);
30092
30097
  case 1:
@@ -30102,7 +30107,7 @@ function _addressParse() {
30102
30107
  parse.street = aiResult.street || '';
30103
30108
  parse.addr = aiResult.addr || '';
30104
30109
  parse.Abnormal = false;
30105
- parse.msg = '自动识别错误,已使用ai重新识别';
30110
+ parse.msg = aiResult.msg || '';
30106
30111
  } else if (chatResult && chatResult.failMsg) {
30107
30112
  // AI 识别失败:还用原来的识别内容,把接口返回的 msg 提示上来
30108
30113
  parse.msg = '自动识别错误,ai识别结果' + chatResult.failMsg;