fix(接口定义): 修复推荐断言精度缺失的缺陷 (#17189)

--bug=1016060 --user=王孝刚
[接口测试]github#17107调用接口成功后,返回报文中某个返回值是100.00,推荐断言显示的是100,断言判断的是100.0
https://www.tapd.cn/55049933/s/1229064

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
MeterSphere Bot 2022-08-22 16:28:33 +08:00 committed by GitHub
parent 82c4369f6d
commit 8e4302303b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -68,9 +68,10 @@ export default {
open(objStr) { open(objStr) {
this.data = {}; this.data = {};
try { try {
let stringedJSON = objStr.replace(/:\s*([-+Ee0-9.]+)/g, ': "$1"');
// //
let JSONBig = require('json-bigint')({"storeAsString": true}); let JSONBig = require('json-bigint')({"storeAsString": true});
let param = JSON.parse(JSON.stringify(JSONBig.parse(objStr))); let param = JSON.parse(JSON.stringify(JSONBig.parse(stringedJSON)));
if (param instanceof Array) { if (param instanceof Array) {
this.$warning('不支持解析JSON数组'); this.$warning('不支持解析JSON数组');
return; return;