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

fix(h5): router.base support relative path (./) #571 #1389

上级 badada0e
...@@ -60,9 +60,10 @@ function getH5Options (manifestJson) { ...@@ -60,9 +60,10 @@ function getH5Options (manifestJson) {
let base = h5.router.base let base = h5.router.base
if (base.indexOf('/') !== 0) { if (base.indexOf('/') !== 0 && base.indexOf('./') !== 0) {
base = '/' + base base = '/' + base
} }
if (base.substr(-1) !== '/') { if (base.substr(-1) !== '/') {
base = base + '/' base = base + '/'
} }
...@@ -98,4 +99,4 @@ module.exports = { ...@@ -98,4 +99,4 @@ module.exports = {
parseManifestJson, parseManifestJson,
getNetworkTimeout, getNetworkTimeout,
getH5Options getH5Options
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册