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

feat(stat): add uniStatistics to plus

上级 e40490d8
......@@ -16,6 +16,7 @@ export function initRecursiveMerge(
code: userManifestJson.versionCode,
},
locale: userManifestJson.locale,
uniStatistics: userManifestJson.uniStatistics,
},
{ plus: userManifestJson['app-plus'] }
)
......
import { recursive } from 'merge'
const wxPageOrientationMapping = {
auto: [
'portrait-primary',
......@@ -13,6 +14,15 @@ export function initPlus(
manifestJson: Record<string, any>,
pagesJson: UniApp.PagesJson
) {
// 根节点配置了统计
if (manifestJson.uniStatistics) {
manifestJson.plus.uniStatistics = recursive(
true,
manifestJson.uniStatistics,
manifestJson.plus.uniStatistics
)
delete manifestJson.uniStatistics
}
// 转换为老版本配置
if (manifestJson.plus.modules) {
manifestJson.permissions = manifestJson.plus.modules
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册