[go: nahoru, domu]

Skip to content

Commit

Permalink
场景串联:隐藏分组时测试只测当前列表的,解决 bug,优化参数传递和自动补全
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLemon committed May 7, 2024
1 parent dfcb484 commit e6502c8
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 64 deletions.
4 changes: 2 additions & 2 deletions apijson/CodeUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -7007,7 +7007,7 @@ res_data = rep.json()
var verifyType = isSubquery != true && value != null;

if (onlyTableAndColumn) {
key = new String(columnName);
key = StringUtil.get(columnName);
}
else {
//功能符 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Expand Down Expand Up @@ -7172,7 +7172,7 @@ res_data = rep.json()
}
else {
fun = '';
key = new String(columnName);
key = StringUtil.get(columnName);
}


Expand Down
28 changes: 20 additions & 8 deletions apijson/JSONResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -1162,18 +1162,30 @@ var JSONResponse = {

getType: function(o) { //typeof [] = 'object'
if (o == null) {
return 'object';
return 'object'; // FIXME return null
}

if (o instanceof Array) {
return 'array';
}

var t = typeof o;
if (t == 'number' && Number.isInteger(o)) {
if (JSONResponse.isBoolean(o)) {
return 'boolean';
}

if (JSONResponse.isInteger(o)) {
return 'integer';
}

return t;
if (JSONResponse.isNumber(o)) {
return 'number';
}

if (JSONResponse.isString(o)) {
return 'string';
}

return typeof o;
},

isObject: function(o) {
Expand All @@ -1184,16 +1196,16 @@ var JSONResponse = {
return o instanceof Array;
},
isString: function(o) {
return typeof o == 'string';
return typeof o == 'string' || o instanceof String;
},
isNumber: function(o) {
return typeof o == 'number';
return typeof o == 'number' || o instanceof Number;
},
isInteger: function(o) {
return JSONResponse.getType(o) == 'integer';
return Number.isInteger(o);
},
isBoolean: function(o) {
return typeof o == 'boolean';
return typeof o == 'boolean' || o instanceof Boolean;
},


Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@
var vVerify = document.getElementById("vVerify");
var vRemember = document.getElementById("vRemember");

vUrl.value = new String(URL_BASE + '/get'); //main.js里访问不到,可能是script引用顺序问题
vUrl.value = StringUtil.get(URL_BASE + '/get'); //main.js里访问不到,可能是script引用顺序问题

var vRequestMarkdown = document.getElementById('vRequestMarkdown');
var vMarkdown = document.getElementById('vMarkdown');
Expand Down
Loading

0 comments on commit e6502c8

Please sign in to comment.