RuoYi
2021-04-13 1624a63cff69ce198494431c93e542f545b552bb
ruoyi-ui/src/utils/ruoyi.js
@@ -172,4 +172,18 @@
      }
   }
   return tree;
}
/**
* 参数处理
* @param {*} params  参数
*/
export function tansParams(params) {
   let result = ''
   Object.keys(params).forEach((key) => {
      if (!Object.is(params[key], undefined) && !Object.is(params[key], null) && !Object.is(JSON.stringify(params[key]), '{}')) {
         result += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + '&'
      }
   })
   return result
}