Skip to content

Commit 6ab903e

Browse files
committed
APIAuto: 参数注入函数传参兼容复杂表达式
1 parent a2d4673 commit 6ab903e

File tree

1 file changed

+3
-3
lines changed
  • APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js

1 file changed

+3
-3
lines changed

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11046,7 +11046,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1104611046
+ '\n+,-,step 前后都不能有空格等其它字符!');
1104711047
}
1104811048

11049-
var args = StringUtil.split(value.substring(start + 1, end), ', ') || []
11049+
var args = parseJSON('[' + value.substring(start + 1, end) + ']') // StringUtil.split(value.substring(start + 1, end), ', ') || []
1105011050

1105111051
if (fun == ORDER_DB) {
1105211052
request4Db(JSONResponse.getTableName(pathKeys[pathKeys.length - 2]), which, p_k, pathKeys, key, lastKeyInPath, false, isDesc, step, args[4]); //request4Db(key + (isDesc ? '-' : '+'), step);
@@ -11127,8 +11127,8 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1112711127
else {
1112811128
fun = funWithOrder; //还原,其它函数不支持 升降序和跨步!
1112911129

11130-
if (fun == RANDOM_DB) { // FIXME 改用 parseJSON('[' + value.substring(start + 1, end) + ']') 兼容复杂表达式
11131-
var args = StringUtil.split(value.substring(start + 1, end), ', ') || []
11130+
if (fun == RANDOM_DB) {
11131+
var args = parseJSON('[' + value.substring(start + 1, end) + ']') // StringUtil.split(value.substring(start + 1, end), ', ') || []
1113211132
request4Db(JSONResponse.getTableName(pathKeys[pathKeys.length - 2]), which, p_k, pathKeys, key, lastKeyInPath, true, null, null, args[4]); //'random()');
1113311133
continue;
1113411134
}

0 commit comments

Comments
 (0)