Skip to content

Commit 4cb62b4

Browse files
committed
APIAuto:解决场景用例涉及 GET query, POST/PUT form 接口导致 JSON5 解析 key=value 报错
1 parent 97a8922 commit 4cb62b4

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

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

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11039,7 +11039,15 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1103911039

1104011040
res = res || {}
1104111041
var config = res.config || {}
11042-
cur.arg = App.getRequest(config.data || config.params, {})
11042+
var p = config.data || config.params
11043+
try {
11044+
cur.arg = App.getRequest(config.data || config.params, {})
11045+
} catch (e) {
11046+
if (typeof p != 'string' || p.indexOf('=') <= 0) {
11047+
throw e
11048+
}
11049+
cur.arg = getRequestFromURL('?' + p, true)
11050+
}
1104311051
cur.req = {
1104411052
method: method,
1104511053
url: config.url,

0 commit comments

Comments
 (0)