@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.
|
@@ -28743,7 +28743,6 @@ var es_array_sort = __webpack_require__(6910);
|
|
|
28743
28743
|
|
|
28744
28744
|
|
|
28745
28745
|
|
|
28746
|
-
|
|
28747
28746
|
|
|
28748
28747
|
|
|
28749
28748
|
var defaultData = []; //不包括省市级code的数据
|
|
@@ -29998,7 +29997,15 @@ function parseAddressByChat(address) {
|
|
|
29998
29997
|
console.warn('当前环境不支持 fetch,无法调用大模型地址识别接口');
|
|
29999
29998
|
return Promise.resolve(null);
|
|
30000
29999
|
}
|
|
30001
|
-
|
|
30000
|
+
// 本地开发环境(localhost/127.0.0.1 等)请求前加代理前缀 /proxyWay,走前端 devServer 代理转发;
|
|
30001
|
+
// 非本地环境(线上同域部署)不加前缀
|
|
30002
|
+
var baseUrl = '';
|
|
30003
|
+
if (typeof window !== 'undefined' && window.location) {
|
|
30004
|
+
var hostname = window.location.hostname;
|
|
30005
|
+
var isLocal = hostname === 'localhost' || hostname === '127.0.0.1' || hostname === '0.0.0.0' || hostname === '[::1]';
|
|
30006
|
+
baseUrl = isLocal ? '/proxyWay' : '';
|
|
30007
|
+
}
|
|
30008
|
+
var url = baseUrl + '/v2/project/column/addressBychat?contents=' + encodeURIComponent(address);
|
|
30002
30009
|
return fetch(url, {
|
|
30003
30010
|
method: 'GET'
|
|
30004
30011
|
}).then(function (r) {
|
|
@@ -30067,8 +30074,6 @@ function _addressParse() {
|
|
|
30067
30074
|
_context.n = 2;
|
|
30068
30075
|
break;
|
|
30069
30076
|
}
|
|
30070
|
-
// 先设置本地识别错误提示,AI 识别成功/失败后覆盖为对应提示
|
|
30071
|
-
parse.msg = '自动识别识别错误:识别出的' + conflictLevel + '与输入地址不一致,请检查或手动填写';
|
|
30072
30077
|
_context.n = 1;
|
|
30073
30078
|
return parseAddressByChat(address);
|
|
30074
30079
|
case 1:
|
|
@@ -30084,7 +30089,7 @@ function _addressParse() {
|
|
|
30084
30089
|
parse.street = aiResult.street || '';
|
|
30085
30090
|
parse.addr = aiResult.addr || '';
|
|
30086
30091
|
parse.Abnormal = false;
|
|
30087
|
-
parse.msg = '
|
|
30092
|
+
parse.msg = aiResult.msg || '';
|
|
30088
30093
|
} else if (chatResult && chatResult.failMsg) {
|
|
30089
30094
|
// AI 识别失败:还用原来的识别内容,把接口返回的 msg 提示上来
|
|
30090
30095
|
parse.msg = '自动识别错误,ai识别结果' + chatResult.failMsg;
|