From 95f954d5ddccc3f1fd1febd937ddcd34967f37ea Mon Sep 17 00:00:00 2001 From: WJCHumble <1957503379@qq.com> Date: Sat, 19 Dec 2020 20:36:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BF=AB=E5=BA=94=E7=94=A8=20manifest.j?= =?UTF-8?q?son=20=E7=9A=84=20router=20=E7=9A=84=20key=20=E4=B8=8D=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E4=BB=A5=20/=20=E5=BC=80=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cml-quickapp-plugin/pack/createManifest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cml-quickapp-plugin/pack/createManifest.js b/packages/cml-quickapp-plugin/pack/createManifest.js index 1bd15a5..f4846c8 100644 --- a/packages/cml-quickapp-plugin/pack/createManifest.js +++ b/packages/cml-quickapp-plugin/pack/createManifest.js @@ -14,7 +14,7 @@ module.exports = function(jsonNode, compiler) { resultRouter.pages = resultRouter.pages || {}; if(projectRouter && projectRouter.routes) { projectRouter.routes.forEach((item, index)=>{ - let matches = item.path.match(/(.*)\/(.*)$/); + let matches = item.path.substr(1).match(/(.*)\/(.*)$/); if(matches) { let key = matches[1]; let value = matches[2]; @@ -72,4 +72,4 @@ module.exports = function(jsonNode, compiler) { } compiler.writeFile('/src/manifest.json', JSON.stringify(manifestObj,'', 4)); -} \ No newline at end of file +}