Skip to content

Commit 02fafca

Browse files
修复 jsonp post请求参数拼接错误
1 parent af36bd5 commit 02fafca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/common/util/FetchRequest.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,15 +405,16 @@ export var FetchRequest = {
405405
*/
406406
post: function (url, params, options) {
407407
options = options || {};
408+
url = this._processUrl(url, options);
408409
if (!this.supportDirectRequest(url, options)) {
409410
url = url.replace('.json', '.jsonp');
410411
var config = {
411-
url: url += "&_method=POST",
412+
url: Util.urlAppend(url, "_method=POST"),
412413
data: params
413414
};
414415
return RequestJSONPPromise.POST(config);
415416
}
416-
return this._fetch(this._processUrl(url, options), params, options, 'POST');
417+
return this._fetch(url, params, options, 'POST');
417418
},
418419
/**
419420
* @function FetchRequest.put

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy