Commit 1a87ee7c authored by 若依's avatar 若依 Committed by Gitee

防止get请求参数值为false或0等特殊值会导致无法正确的传参

Merge pull request !146 from wugh/hotfix/gitee-issue_I2A5FU
parents 3c4b01ab 886ce995
......@@ -25,7 +25,7 @@ service.interceptors.request.use(config => {
for (const propName of Object.keys(config.params)) {
const value = config.params[propName];
var part = encodeURIComponent(propName) + "=";
if (value && typeof(value) !== "undefined") {
if (value !== null && typeof(value) !== "undefined") {
if (typeof value === 'object') {
for (const key of Object.keys(value)) {
let params = propName + '[' + key + ']';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment