From e571533c678c48c745e8b1d14df27cffaa49e127 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 18 Apr 2023 14:02:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=93=8D=E5=BA=94=E4=BD=93=E5=8C=85=E5=90=AB?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=EF=BC=8C=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E6=96=AD=E8=A8=80=E6=9B=BF=E6=8D=A2=E6=95=B0=E5=AD=97=E4=B8=BA?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=A4=B1=E8=B4=A5=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1025544 --user=王孝刚 【接口测试】github#23697,jsonpath提取的值缺失精度 https://www.tapd.cn/55049933/s/1363739 --- .../api/definition/components/assertion/ApiJsonpathSuggest.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue b/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue index 68e2ec46a7..a3bede9580 100644 --- a/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue +++ b/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue @@ -69,7 +69,7 @@ export default { open(objStr) { this.data = {}; try { - let stringedJSON = objStr.replace(/:\s*([-+Ee0-9.]+)/g, ': "$1"'); + let stringedJSON = objStr.replace(/:\s*(?!.*\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2})\s([-+Ee0-9.]+)/g, ': "$1"'); let param; let JSONBig = require('json-bigint')({"storeAsString": true}); // 解决精度丢失问题