From e88f2ee14eff2b3793fbf945cebab655e6cafe7d Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 21 Apr 2022 13:31:15 +0800 Subject: [PATCH] feat(stat): add uniStatistics to plus --- .../lib/platforms/app-plus/index.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js index 0d8558f88..0dc7e52a9 100644 --- a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js +++ b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js @@ -143,12 +143,23 @@ module.exports = function (pagesJson, userManifestJson, isAppView) { name: userManifestJson.versionName, code: userManifestJson.versionCode }, - locale: userManifestJson.locale + locale: userManifestJson.locale, + uniStatistics: userManifestJson.uniStatistics }, { plus: userManifestJson['app-plus'] } ) + // 根节点配置了统计 + if (manifestJson.uniStatistics) { + manifestJson.plus.uniStatistics = merge.recursive( + true, + manifestJson.uniStatistics, + manifestJson.plus.uniStatistics + ) + delete manifestJson.uniStatistics + } + const splashscreenOptions = userManifestJson['app-plus'] && userManifestJson['app-plus'].splashscreen @@ -606,4 +617,4 @@ module.exports = function (pagesJson, userManifestJson, isAppView) { ) } return [app, manifest] -} +} -- GitLab