From e717135aa986827ebf0a42cdee70ebf888d98987 Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Tue, 29 Dec 2020 09:33:37 +0800 Subject: [PATCH] 优化顶部导航显示与交互 --- bases/Fetcher.js | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bases/Fetcher.js b/bases/Fetcher.js index f845bae..a80b451 100644 --- a/bases/Fetcher.js +++ b/bases/Fetcher.js @@ -102,8 +102,10 @@ const params = Qs.stringify(data); const data2 = {}; params.split('&').forEach(param => { - const item = param.split('='); - data2[decodeURIComponent(item[0])] = decodeURIComponent(item[1]); + if (param) { + const item = param.split('='); + data2[decodeURIComponent(item[0])] = decodeURIComponent(item[1]); + } }); return this.query('post', url, data2, remap, options); } @@ -439,7 +441,7 @@ } else { // 修复补齐 if (type === 'fix') { - if (!path || /^\/(upload|static)/.test(path)) { + if (!path || /^(http|\/upload|\/static)/.test(path)) { return path; } else { return '/upload/' + path; -- Gitblit v1.9.1