From 8b72a37489de891f3b828ca2e8603a8596a30b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Fri, 15 Dec 2023 15:57:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Ddomain=20in()=E5=92=8C?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6=E4=B8=80?= =?UTF-8?q?=E8=B5=B7=E6=97=B6=EF=BC=8C=E8=AF=86=E5=88=ABin=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E7=AC=A6=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/advancedSearch/meta/parser.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/advancedSearch/meta/parser.js b/src/components/advancedSearch/meta/parser.js index 99c2c339..5b5108a2 100644 --- a/src/components/advancedSearch/meta/parser.js +++ b/src/components/advancedSearch/meta/parser.js @@ -1119,7 +1119,7 @@ export default class Parser { if (key === 'has') { returnObj.key += 'has(' + obj.label + item.substring(item.indexOf(','), item.length) + ' AND ' } else { - returnObj.key += obj.label + ' ' + item.substring(item.toLowerCase().indexOf(key.toLowerCase()), item.length) + ' AND ' + returnObj.key += obj.label + ' ' + item.substring(obj.label.length, item.length) + ' AND ' } } else if (returnObj.isKey) { returnObj.key = '[' + key + ']' @@ -1224,8 +1224,9 @@ export default class Parser { if (item.indexOf('it is test keyword') > -1) { const regex = /\d+/g const result1 = item.match(regex) - noAndList[index] = noAndList[index].replace(result1[0], '') - noAndList[index] = noAndList[index].replace('it is test keyword', tempList[result1[0]]) + result1.forEach((r, i) => { + noAndList[index] = noAndList[index].replace('it is test keyword' + r, tempList[result1[i]]) + }) } })