替换var 为const/let

删除未使用import
替换 == 为 ===
This commit is contained in:
xingyu4j
2022-11-08 13:31:08 +08:00
parent c9e11e7636
commit 011dc23699
66 changed files with 305 additions and 319 deletions

View File

@ -49,12 +49,12 @@ service.interceptors.request.use(config => {
let url = config.url + '?';
for (const propName of Object.keys(config.params)) {
const value = config.params[propName];
var part = encodeURIComponent(propName) + "=";
const part = encodeURIComponent(propName) + '='
if (value !== null && typeof(value) !== "undefined") {
if (typeof value === 'object') {
for (const key of Object.keys(value)) {
let params = propName + '[' + key + ']';
var subPart = encodeURIComponent(params) + "=";
const subPart = encodeURIComponent(params) + '='
url += subPart + encodeURIComponent(value[key]) + "&";
}
} else {