fix: 收敛模板编辑发布契约并还原餐饮页面视觉

This commit is contained in:
que01 committed 2026-10-08 13:36:59 +08:00
1 parent 20bcb43534
commit f4061a24bd
102 files changed
+4510 -870

No files matched your search

+8
View File
@@ -10,6 +10,14 @@
4. 如果需要替换运行时或能力包页面,必须在 `overrides` 中声明目录;未声明的同路径文件会被 compiler 拒绝。
5. 执行 `pnpm generate:template-catalog --write` 和 `pnpm template:check`。
## 模板完成门槛
- 每个 `entrypoints` 页面里由品牌编辑者提供的标题、说明、信任资料、业务详情和视觉文案,都必须由 Runtime 数据驱动,不能只在 WXML 中写成固定业务事实。
- 每个可编辑字段必须在 `admin.sections` 声明,并把 `page` 指向实际显示它的页面;测试会按页面检查 `presentation`、hero、profile、trust 和 offering 绑定,不能只在其他页面存在同名绑定。
- 每个 `trustContentTypes` 都必须声明至少一个实际展示页面;模板测试会检查 renderer 是否消费该类型,也会检查 renderer 使用的类型是否已声明在对应页面。
- `pnpm validate:templates` 会自动发现所有 `packages/template-*` 并运行上述绑定回归。模板不能在未通过该检查时标记完成。
- 通过自动检查后,还要用 `pnpm template:dev <key> --brand <slug>` 生成产物,检查真实内容、空状态和窄屏视觉;自动绑定测试不能替代微信开发者工具中的视觉验收。
最小可编译模板可参考 `packages/template-compiler/test/fixtures/template-drill-consultant`。
使用 `pnpm template:dev <key> --brand <slug>` 生成微信开发者工具项目。生产构建还必须提供 `--appid` 和 HTTPS `--api`。模板在构建时选择,运行时不会下载或解释模板代码。