From dcf4d6881f238ecfc0b9769c96a2a3c8521d3b75 Mon Sep 17 00:00:00 2001 From: luming Date: Mon, 10 Jul 2023 10:26:10 +0800 Subject: [PATCH] fix some error --- bingo.bat | 2 +- wuConfig.js | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bingo.bat b/bingo.bat index b7f07df..b87cd7b 100644 --- a/bingo.bat +++ b/bingo.bat @@ -1,4 +1,4 @@ -# WXAPPUNPACKER_PATH 项目路径 +::# WXAPPUNPACKER_PATH 项目路径 set WXAPPUNPACKER_PATH=%~dp0 set FILE_FORMAT=wxapkg diff --git a/wuConfig.js b/wuConfig.js index 80125f6..64f99d3 100644 --- a/wuConfig.js +++ b/wuConfig.js @@ -46,14 +46,17 @@ function doConfig(configFile, cb) { root = root.substring(1); } let newPages = []; - for (let page of subPackage.pages) { - let items = page.replace(root, ''); - newPages.push(items); - let subIndex = pages.indexOf(root + items); - if (subIndex !== -1) { - pages.splice(subIndex, 1); + if (subPackage.pages) { + for (let page of subPackage.pages) { + let items = page.replace(root, ''); + newPages.push(items); + let subIndex = pages.indexOf(root + items); + if (subIndex !== -1) { + pages.splice(subIndex, 1); + } } } + subPackage.root = root; subPackage.pages = newPages; subPackages.push(subPackage);