Skip to content

Commit

Permalink
Update jquip.ajax.js
Browse files Browse the repository at this point in the history
fix $.ajax
  • Loading branch information
mythz committed Sep 14, 2023
1 parent fc70e4d commit 8a206a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/jquip.ajax.js
Expand Up @@ -92,14 +92,15 @@ $['plug']("ajax", function ($) {
var isPost = o['type'] == "POST" || o['type'] == "PUT";
if( o['data'] && o['processData'] && typeof o['data'] == 'object' )
data = $['formData'](o['data']);


var d = url.indexOf('?') >= 0 ? '&' : '?'
if (!isPost && data) {
url += "?" + data;
url += d + data;
data = null;
if(!cache)
url=url+"&_="+(new Date().getTime());
}else(!isPost && !cache)
url=url+"?_="+(new Date().getTime());
url+=d+"_="+(new Date().getTime());
cache=null;
xhr.open(o['type'], url);

Expand Down

0 comments on commit 8a206a3

Please sign in to comment.