提交 eb992ac4 编写于 作者: fxy060608's avatar fxy060608

fix(h5): improve ensureURL for edge cases #1433 #1082 #661#445

上级 82042610
...@@ -2310,7 +2310,7 @@ function getLocation (base) { ...@@ -2310,7 +2310,7 @@ function getLocation (base) {
if (base && path.indexOf(base) === 0) { if (base && path.indexOf(base) === 0) {
path = path.slice(base.length); path = path.slice(base.length);
} }
return (path || '/') + window.location.search + window.location.hash return (path || '/') + stringifyQuery(resolveQuery(window.location.search)) + window.location.hash
} }
/* */ /* */
......
...@@ -2308,7 +2308,7 @@ function getLocation (base) { ...@@ -2308,7 +2308,7 @@ function getLocation (base) {
if (base && path.indexOf(base) === 0) { if (base && path.indexOf(base) === 0) {
path = path.slice(base.length); path = path.slice(base.length);
} }
return (path || '/') + window.location.search + window.location.hash return (path || '/') + stringifyQuery(resolveQuery(window.location.search)) + window.location.hash
} }
/* */ /* */
......
...@@ -2314,7 +2314,7 @@ function getLocation (base) { ...@@ -2314,7 +2314,7 @@ function getLocation (base) {
if (base && path.indexOf(base) === 0) { if (base && path.indexOf(base) === 0) {
path = path.slice(base.length); path = path.slice(base.length);
} }
return (path || '/') + window.location.search + window.location.hash return (path || '/') + stringifyQuery(resolveQuery(window.location.search)) + window.location.hash
} }
/* */ /* */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册