From 77f6d11125b4571227aa87fde63fb2b88ea09d4b Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Tue, 10 May 2022 14:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/common/js/common.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index 68cc24e44..a68eb4acf 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -2038,13 +2038,19 @@ function HtmlToString(html_str) */ function GetQueryValue(field = null) { - // 参数值 - var query = window.location.search || null; - if(query == null) + // 路径参数值 + var path = window.location.pathname || null; + var query = (path == null || path == '/') ? '' : path + + // 问号后面的参数值 + var search = window.location.search || null; + if(search != null) { - query = window.location.pathname || null; - } else { - query = query.substring(1); + if(query != '') + { + query += '&'; + } + query += search.substring(1); } // 首两个是否为s=字符,存在则去除