Skip to content

Commit

Permalink
修复添加URL参数的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
small-Black committed Jul 29, 2016
1 parent 5270f93 commit 7cd80d6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion ajax-min.js

This file was deleted.

2 changes: 1 addition & 1 deletion ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function ajax(options) {
}
//若是使用get方法或JSONP,则手动添加到URL中
if (type === "get" || dataType === "jsonp") {
url += url.indexOf("?") > -1 ? data : "?" + data;
url += url.indexOf("?") > -1 ? (url.indexOf("=")>-1 ? "&"+data : data ): "?" + data;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions ajax.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7cd80d6

Please sign in to comment.