fix(接口定义): 修复推荐jsonpath断言索引超过10无法生成预期的缺陷

--bug=1021925 --user=王孝刚
[接口测试]GitHub#21303断言规则适用JSONPath推荐方式,当列表索引值超过10,期望值无法自动填写
https://www.tapd.cn/55049933/s/1327710
This commit is contained in:
wxg0103 2023-01-16 15:25:03 +08:00 committed by fit2-zhao
parent 5bbb4d2a0f
commit 837e1f3841
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ export default {
let param = params[index]; let param = params[index];
let childObj; let childObj;
let reg = /\[\d\]$/; let reg = /\[[0-9]+\]$/;
let regIndex = param.search(reg); let regIndex = param.search(reg);
if (regIndex > -1) { if (regIndex > -1) {
let paramName = param.substring(0, regIndex); let paramName = param.substring(0, regIndex);

View File

@ -135,7 +135,7 @@ export default {
let param = params[index]; let param = params[index];
let childObj; let childObj;
let reg = /\[\d\]$/; let reg = /\[[0-9]+\]$/;
let regIndex = param.search(reg); let regIndex = param.search(reg);
if (regIndex > -1) { if (regIndex > -1) {
let paramName = param.substring(0, regIndex); let paramName = param.substring(0, regIndex);