[bug修复] 解决get请求,如果参数值为false或0等特殊值会导致无法正确传参

master
wugh 4 years ago
parent 52264b6e2a
commit 886ce995af
  1. 2
      ruoyi-ui/src/utils/request.js

@ -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 + ']';

Loading…
Cancel
Save