fix: 收口模板预览状态与媒体矩阵

This commit is contained in:
que01 committed 2026-10-16 22:53:05 +08:00
1 parent 5bf54096be
commit b1e8012ded
28 files changed
+1015 -56

No files matched your search

+2
View File
@@ -26,3 +26,5 @@ media/
.codex-tasks/
docker-compose.override.yml
.env.production
apps/api/storage/
@@ -106,7 +106,10 @@ export const Image = React.forwardRef(({ mode, src, style, ...props }, ref) => {
ref,
src:
assets && typeof src === "string" && src.startsWith("/assets/")
? assets[src]?.dataUrl
? // 导入包资源以 /assets 开头;本地多模板预览的 renderer 可能额外携带包 key 前缀。
(assets[src]?.dataUrl ??
assets[src.replace(`/assets/${key}/`, "/assets/")]?.dataUrl ??
src)
: resolveImageSource(src, key),
style: { objectFit: mode === "aspectFit" ? "contain" : "cover", ...style },
});
@@ -361,8 +361,11 @@ export class AdminTemplatePackageService {
const version = await this.prisma.templatePackageVersion.findUnique({ where: { id } });
if (!version) throw new BadRequestException("模板版本不存在");
if (version.status === target) return { changed: false, version: this.publicVersion(version) };
// retired 是目录可见性的终态,但平台管理员可以显式重新发布;品牌安装与历史快照不受影响。
const valid =
target === "published" ? version.status === "imported" : version.status === "published";
target === "published"
? version.status === "imported" || version.status === "retired"
: version.status === "published";
if (!valid) throw new ConflictException(`模板版本当前状态为 ${version.status},不能执行此操作`);
const updated = await this.prisma.$transaction(async (tx) => {
const changed = await tx.templatePackageVersion.updateMany({
@@ -440,7 +440,11 @@ export class AdminTemplatePreviewService {
templateKey: industryTemplate.key,
tagline: identity?.tagline ?? `${industryTemplate.name}模板示例`,
description: identity?.description ?? "这是模板预览数据,不属于任何真实品牌。",
avatarUrl: identity?.avatarUrl ?? null,
avatarUrl:
identity?.avatarUrl ??
(typeof brandConfig.avatarUrl === "string" && brandConfig.avatarUrl.trim()
? brandConfig.avatarUrl
: null),
coverUrl: identity?.coverUrl ?? null,
hours: identity?.hours ?? "示例营业时间",
address: identity?.address ?? "示例服务范围",
+17 -1
View File
@@ -275,7 +275,7 @@ test("平台模板管理员可以按行业预览版本,且预览不写入品
assert.ok(body.preview.pages.find((page) => page.key === "home").modules.length > 0);
assert.ok(
body.preview.assets.some(
(asset) => asset.binding === "brand.avatarUrl" && asset.status === "missing",
(asset) => asset.binding === "brand.avatarUrl" && asset.status === "ready",
),
);
assert.ok(
@@ -283,6 +283,8 @@ test("平台模板管理员可以按行业预览版本,且预览不写入品
(asset) => asset.binding === "offering.coverUrl" && asset.status === "ready",
),
);
assert.match(body.preview.assetFiles["/assets/avatar.jpg"].dataUrl, /^data:image\/jpeg;base64,/);
assert.match(body.preview.assetFiles["/assets/avatar.jpg"].sha256, /^[a-f0-9]{64}$/);
assert.match(
body.preview.assetFiles["/assets/cases/campus.jpg"].dataUrl,
/^data:image\/jpeg;base64,/,
@@ -491,6 +493,20 @@ test("平台模板管理员可以按行业预览版本,且预览不写入品
headers,
});
assert.equal(retiredPreview.statusCode, 409);
// 撤回是目录可见性状态;平台管理员必须能显式恢复已撤回版本。
const republished = await request(`/admin/templates/${versionId}/publish`, {
method: "POST",
headers,
});
assert.equal(republished.statusCode, 201, republished.body);
assert.equal(JSON.parse(republished.body).changed, true);
assert.equal(JSON.parse(republished.body).version.status, "published");
const republishedPreview = await request(
`/admin/templates/${versionId}/preview?industry=personal`,
{ headers },
);
assert.equal(republishedPreview.statusCode, 200, republishedPreview.body);
});
test("admin routes remain guarded when an API prefix is configured", async () => {
@@ -115,6 +115,25 @@ test("template preview matrix keeps every deployed package, industry, and versio
assert.equal(firstPreview.preview.safety.submissions, "disabled");
assert.ok(firstPreview.workspace.offerings.length > 0);
// 每个已部署包的预览都必须有可显示的主理人身份和已验证媒体槽位。
assert.match(firstPreview.workspace.brand.founder ?? "", /\S/);
assert.match(firstPreview.workspace.brand.avatarUrl ?? "", /^\/assets\//);
assert.equal(firstPreview.preview.assets.length, fixture.manifest.assetSlots.length);
assert.deepEqual(
firstPreview.preview.assets.map((item) => item.status),
fixture.manifest.assetSlots.map(() => "ready"),
);
assert.deepEqual(
firstPreview.preview.diagnostics.filter((item) => item.code !== "LEGACY_PREVIEW_SAMPLE"),
[],
);
assert.equal(
firstPreview.preview.fixtureSource,
fixture.manifest.packageKey === "atelier-solopreneur"
? "previewFixture"
: "legacy-sampleContent",
);
// 版本 ID 进入模拟品牌 ID,不同版本不会共享同一模拟品牌身份。
assert.match(firstPreview.workspace.brand.id, new RegExp(`^template-preview:${first.id}`));
assert.match(
@@ -102,7 +102,7 @@ test("模板管理可重试预览,并切换我的、详情和禁止提交的
);
await expect(modal.getByText("演示数据:独立预览内容")).toBeVisible();
await modal.getByText("资源诊断", { exact: true }).click();
await expect(modal.getByText("内容缺失", { exact: true }).first()).toBeVisible();
await expect(modal.getByText("内容缺失", { exact: true })).toHaveCount(0);
await expect(modal.getByText("包内资源已验证", { exact: true }).first()).toBeVisible();
await captureVisualEvidence("home");
const choosePage = async (label: string) => {
@@ -119,7 +119,7 @@ test("模板管理可重试预览,并切换我的、详情和禁止提交的
await modal.getByLabel("预览页面").click();
await page.locator(".ant-select-item-option-content").getByText("首页", { exact: true }).click();
await modal.getByText("资源诊断", { exact: true }).click();
await expect(modal.getByText("内容缺失", { exact: true }).first()).toBeVisible();
await expect(modal.getByText("内容缺失", { exact: true })).toHaveCount(0);
await expect(modal.getByText("包内资源已验证", { exact: true }).first()).toBeVisible();
await choosePage("我的");
await expect(modal.locator(".component-template-preview")).toContainText("我的咨询记录");
@@ -0,0 +1,230 @@
import assert from "node:assert/strict";
import { execFileSync } from "node:child_process";
import { mkdirSync, readdirSync, readFileSync, rmSync } from "node:fs";
import os from "node:os";
import path from "node:path";
import { test, expect, type Page } from "@playwright/test";
type PackedManifest = {
packageKey: string;
version: string;
displayName: string;
supportedIndustryTemplates: string[];
};
type PackedChecksums = {
contentChecksum: string;
};
type PreviewVersion = {
id: string;
packageKey: string;
version: string;
displayName: string;
status: "imported";
manifestSnapshot: PackedManifest;
importedBy: { displayName: string };
validationReport: Record<string, unknown>;
manifestSummary: { supportedIndustryTemplates: string[] };
artifactPath: string;
archiveChecksum: string;
contentChecksum: string;
};
type PreviewBundle = {
preview: Record<string, unknown>;
version: PreviewVersion;
};
type MediaCase = {
packageKey: string;
industry: string;
founder: string;
};
const mediaCases: MediaCase[] = [
{ packageKey: "acheng-campus-food", industry: "food", founder: "阿成" },
{ packageKey: "atelier-solopreneur", industry: "personal", founder: "林予 · 示例主理人" },
{ packageKey: "linjing-editorial", industry: "personal", founder: "示例主理人" },
{ packageKey: "linjing-editorial", industry: "doors", founder: "示例主理人" },
];
async function buildPreviewFixture(mediaCase: MediaCase) {
// 使用真实 template:pack 产物和 API preview service,避免在浏览器测试里手写演示数据。
const output = await new Promise<string>((resolve, reject) => {
const temporary = path.join(
os.tmpdir(),
`template-preview-media-${mediaCase.packageKey}-${mediaCase.industry}`,
);
try {
rmSync(temporary, { recursive: true, force: true });
mkdirSync(temporary, { recursive: true });
execFileSync(
process.execPath,
[
path.resolve(process.cwd(), "../../scripts/template-pack.cjs"),
"--template",
mediaCase.packageKey,
"--out",
temporary,
],
{ cwd: path.resolve(process.cwd(), "../.."), stdio: "ignore" },
);
const archive = readdirSync(temporary).find((file) => file.endsWith(".tar.gz"));
assert.ok(archive);
const root = path.join(temporary, archive.slice(0, -7));
const manifest = JSON.parse(
readFileSync(path.join(root, "template.json"), "utf8"),
) as PackedManifest;
const checksums = JSON.parse(
readFileSync(path.join(root, "checksums.json"), "utf8"),
) as PackedChecksums;
const archivePath = path.join(temporary, archive);
const version: PreviewVersion = {
id: `preview-media-${mediaCase.packageKey}-${mediaCase.industry}`,
packageKey: manifest.packageKey,
version: manifest.version,
displayName: manifest.displayName,
status: "imported",
manifestSnapshot: manifest,
importedBy: { displayName: "模板管理员" },
validationReport: {},
manifestSummary: { supportedIndustryTemplates: manifest.supportedIndustryTemplates },
artifactPath: archivePath,
archiveChecksum: "",
contentChecksum: checksums.contentChecksum,
};
const serialized = JSON.stringify({ version, industry: mediaCase.industry });
const stdout = execFileSync(
process.execPath,
[
"--input-type=module",
"-e",
`
import 'reflect-metadata';
import { createHash } from 'node:crypto';
import { readFileSync } from 'node:fs';
import { AdminTemplatePreviewAssetsService } from './dist/modules/admin/admin-template-preview-assets.service.js';
import { AdminTemplatePreviewService } from './dist/modules/admin/admin-template-preview.service.js';
let input = '';
for await (const chunk of process.stdin) input += chunk;
const { version, industry } = JSON.parse(input);
version.archiveChecksum = createHash('sha256').update(readFileSync(version.artifactPath)).digest('hex');
const service = new AdminTemplatePreviewService(
{
templatePackageVersion: { findUnique: async () => version },
templatePackageAuditLog: { create: async () => ({}) },
},
new AdminTemplatePreviewAssetsService(),
);
process.stdout.write(JSON.stringify(await service.preview(version.id, industry, 'visual-matrix-admin')));
`,
],
{
cwd: path.resolve("../api"),
input: serialized,
encoding: "utf8",
maxBuffer: 32 * 1024 * 1024,
},
);
resolve(JSON.stringify({ preview: JSON.parse(stdout) as Record<string, unknown>, version }));
} catch (error) {
reject(error instanceof Error ? error : new Error(String(error)));
} finally {
rmSync(temporary, { recursive: true, force: true });
}
});
return JSON.parse(output) as PreviewBundle;
}
async function selectPreviewIndustry(page: Page, industry: string) {
await page.getByLabel("预览行业").click();
await page
.locator(".ant-select-item-option-content")
.getByText(industry, { exact: true })
.click();
}
test("导入包预览矩阵展示身份、资源和完整媒体槽位", async ({ page }) => {
const evidenceDirectory = process.env.TEMPLATE_PREVIEW_VISUAL_EVIDENCE;
let sequence = 0;
for (const mediaCase of mediaCases) {
sequence += 1;
await test.step(`${mediaCase.packageKey}/${mediaCase.industry}`, async () => {
const { preview, version } = await buildPreviewFixture(mediaCase);
assert.ok(version);
await page.addInitScript(() => {
localStorage.setItem("adminToken", "fixture-token");
localStorage.setItem("adminPlatformTemplateRole", "template_admin");
});
let attempts = 0;
const writes: string[] = [];
await page.route("**/api/**", async (route) => {
const url = new URL(route.request().url());
if (route.request().method() !== "GET") writes.push(url.pathname);
if (url.pathname.endsWith("/preview")) {
attempts += 1;
return route.fulfill({
status: attempts === 1 ? 400 : 200,
json:
attempts === 1
? { error: { code: "HTTP_400", message: "预览测试失败,请重试" } }
: preview,
});
}
if (url.pathname.endsWith("/admin/templates"))
return route.fulfill({
json: {
items: [version],
page: 1,
pageSize: 20,
total: 1,
},
});
if (url.pathname.endsWith("/admin/brands")) return route.fulfill({ json: [] });
return route.fulfill({ json: { name: "测试工作区" } });
});
await page.goto(`${process.env.ADMIN_URL || "http://localhost:3000"}/admin/templates`);
const modal = page.getByRole("dialog");
await page.getByRole("button", { name: /预览/ }).click();
await expect(modal.getByText("预览测试失败,请重试")).toBeVisible();
await modal.getByRole("button", { name: /重试/ }).click();
await expect(modal.locator(".component-template-preview")).toContainText(mediaCase.founder);
if (mediaCase.industry !== version.manifestSummary.supportedIndustryTemplates[0]) {
await selectPreviewIndustry(page, mediaCase.industry);
}
// 覆盖此前疏漏:不仅检查数据存在,还要证明包内媒体渲染为可显示图像。
const images = modal.locator('.component-template-preview img[src^="data:image/"]');
await expect(images.first()).toBeVisible();
const imageCount = await images.count();
expect(imageCount).toBeGreaterThan(0);
await expect
.poll(() =>
Promise.all(
Array.from({ length: imageCount }, (_, index) =>
images.nth(index).evaluate((image: HTMLImageElement) => image.naturalWidth),
),
).then((values) => Math.min(...values)),
)
.toBeGreaterThan(0);
// 独立 fixture 与补齐后的 legacy sample 都不应显示资源缺失。
await expect(modal.getByText("内容缺失", { exact: true })).toHaveCount(0);
expect(writes).toEqual([]);
if (evidenceDirectory) {
mkdirSync(evidenceDirectory, { recursive: true });
await page.screenshot({
path: path.join(
evidenceDirectory,
`${String(sequence).padStart(2, "0")}-${mediaCase.packageKey}-${mediaCase.industry}.png`,
),
});
}
await page.unroute("**/api/**");
});
}
});
+3 -3
View File
@@ -4,17 +4,17 @@
{
"packageKey": "acheng-campus-food",
"packageName": "@personal-brand/template-acheng-campus-food",
"version": "1.0.0"
"version": "1.0.1"
},
{
"packageKey": "linjing-editorial",
"packageName": "@personal-brand/template-linjing-editorial",
"version": "1.0.1"
"version": "1.0.3"
},
{
"packageKey": "atelier-solopreneur",
"packageName": "@personal-brand/template-atelier-solopreneur",
"version": "1.2.0"
"version": "1.3.0"
}
]
}
+12 -1
View File
@@ -209,11 +209,12 @@ admin.sections 和 renderer 必须互相校验:每个可见、可编辑的品
importing -> rejected
importing -> imported -> validating -> invalid
validating -> previewable -> published -> retired
retired -> published
- imported 表示文件入库,不表示可使用;
- previewable 表示 manifest、资源、renderer、行业兼容性和 preview fixture 通过;
- published 才能被品牌管理员选择;
- retired 不影响已有安装、历史快照和预览证据;
- retired 不影响已有安装、历史快照和预览证据;平台管理员可显式重新发布,恢复目录可见性;
- 任意状态迁移都写审计,重复请求使用 operation/idempotency key。
### 7.3 品牌模板和内容状态
@@ -435,6 +436,16 @@ Phase 3 短期隔离 session 进展(2026-10-16):
- Admin 预览按版本和行业保留短期 token 供失败重试复用;请求失败时删除对应 token,行业/版本选择和业务记录选择仍保留。
- 自动化覆盖 session 成功复用、复用不新增审计、跨管理员拒绝、未知 token 拒绝、版本/行业绑定、shared client URL 和 Admin 重试上下文。本轮 API HTTP integration `52/52`、upload `2/2`、Client `6/6`、Admin unit `3/3` 和全仓 typecheck 通过;origin/CSP 隔离与最终矩阵验收仍待完成。
Phase 3 现场验收纠偏(2026-10-16):
- 现场核对发现 `retired` 曾是终态,但页面仍展示“发布”操作,状态机与 UI 矛盾。已允许平台模板管理员执行 `retired -> published`,只恢复目录可见性,不改动 immutable 包和历史快照;integration test 覆盖撤回、不可预览、重新发布、重新可预览。
- 现场核对发现旧模板 `sampleContent` 只有少量业务数据,`brandConfig` 和媒体槽位为空,导致 food/linjing 预览像缺数据。已为 `acheng-campus-food@1.0.1`、`linjing-editorial@1.0.3` 补齐包内演示主图、头像、封面和视觉文案;旧版本保持 immutable 并撤回。
- atelier 独立 fixture 也没有头像。已升为 `atelier-solopreneur@1.3.0`,在 `previewFixture.personal.brand` 中加入包内头像,继续保持预览数据与 bootstrap sample 分离。
- 修复 Admin 导入包预览中 food renderer 的资源 key 前缀映射:包内 `/assets/service/*.png` 等图标现在可从 archive 校验后的 data URL 渲染,不回退到本地部署资源。
- 矩阵 API 回归新增断言:每个支持行业的主理人身份非空、头像指向包内资源、所有 asset slot 都是 `ready`、除 `LEGACY_PREVIEW_SAMPLE` 外没有诊断。
- 新增 Playwright 媒体矩阵:覆盖 `acheng/food`、`atelier/personal`、`linjing/personal`、`linjing/doors`,使用真实 `template:pack` 产物和 API preview service;验证失败重试、founder 可见、所有 `data:` 图像 `naturalWidth > 0`、无“内容缺失”、无真实写入请求。四张截图已人工检查。
- 本轮本地目录以最新已发布版本为准:`acheng-campus-food@1.0.1`、`atelier-solopreneur@1.3.0`、`linjing-editorial@1.0.3`;被取代的旧演示版本进入 retired。
Phase 3 隔离、导航和矩阵收口(2026-10-16):
- Admin dev/preview 响应增加 CSP、`Referrer-Policy: no-referrer` 和 `X-Content-Type-Options: nosniff`。preview/生产 CSP 为 `default-src 'self'`、`script-src 'self'`、`object-src 'none'`、`base-uri 'none'`、`frame-ancestors 'self'`、`form-action 'self'`;图片和媒体允许 `self/data/blob` 以读取通过 checksum 校验的包内资源,样式保留 `unsafe-inline` 以支持现有 React UI。生产构建同时保留 CSP meta 作为静态托管防线。
+3 -3
View File
@@ -14,9 +14,9 @@
### 仓库内视觉模板包
- acheng-campus-food@1.0.0:餐饮场景,使用 food 行业能力。
- linjing-editorial@1.0.1:林境建筑画册,可用于 doors 和 personal 组合。
- atelier-solopreneur@1.2.0:独立工坊方向,适配 personal 行业。
- acheng-campus-food@1.0.1:餐饮场景,使用 food 行业能力。
- linjing-editorial@1.0.3:林境建筑画册,可用于 doors 和 personal 组合。
- atelier-solopreneur@1.3.0:独立工坊方向,适配 personal 行业。
以上是仓库盘点,不表示三个包都已经通过线上导入、预览、品牌安装和微信上传验收。生成目录当前位于 packages/config/src/generated-template-packages.ts,后续必须由导出和 conformance 流程生成并校验。
@@ -4,7 +4,7 @@ import type { TemplatePackageManifest } from "./index.js";
export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[] = [
{
packageKey: "acheng-campus-food",
version: "1.0.0",
version: "1.0.1",
displayName: "阿成校园餐",
defaultBrandSlug: "default-brand",
runtimeContract: "1.0",
@@ -1246,12 +1246,34 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
name: "示例·今日套餐",
summary: "现做家常套餐示例内容。",
categoryKey: "set-meal",
coverUrl: "/assets/content/package-01.jpg",
priceText: "¥28 起 / 份",
config: {
media: [
{
url: "/assets/content/package-01.jpg",
alt: "",
type: "image",
},
],
},
},
{
kind: "service",
name: "示例·聚餐定制",
summary: "按人数和口味沟通定制餐品。",
categoryKey: "private-chef",
coverUrl: "/assets/content/private-chef.jpg",
priceText: "按人数和菜单确认",
config: {
media: [
{
url: "/assets/content/private-chef.jpg",
alt: "",
type: "image",
},
],
},
},
],
trustContent: [
@@ -1503,6 +1525,75 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
},
],
capabilityKey: "booking",
brandConfig: {
visualTemplateKey: "acheng-campus-food",
founder: "阿成",
title: "私房菜主理人",
slogan: "认真做好每一顿家常饭。",
phone: "",
wechat: "",
studioAddress: "大学城生活区东门附近",
avatarUrl: "/assets/owner/portrait.jpg",
heroImage: "/assets/content/package-01.jpg",
visualPresentation: {
home: {
stallTitle: "服务地点",
primaryAction: "咨询 / 预订",
secondaryAction: "查看菜单",
worksEyebrow: "今日推荐",
worksTitle: "热门套餐",
worksAction: "查看全部 →",
manifestoTitle: "我们的服务承诺",
},
offerings: {
title: "餐品与定制",
subtitle: "现做家常餐、团体餐和活动定制",
materialLabel: "包含:",
hardwareLabel: "定制说明:",
detailAction: "查看详情 →",
inquiryAction: "预订 / 咨询",
},
detail: {
priceLabel: "价格参考",
spaceLabel: "适合场景",
backgroundTitle: "餐品说明",
conceptTitle: "备餐方式",
craftsTitle: "服务内容",
materialsTitle: "交付说明",
inquiryAction: "预订 / 咨询",
inquiryHint: "提交后会由主理人与你确认时间、数量和地点。",
},
profile: {
phoneLabel: "联系电话",
wechatLabel: "微信",
addressLabel: "服务地点",
callAction: "呼叫",
copyAction: "复制",
recordsTitle: "我的订单与咨询",
recordsCountUnit: "条记录",
},
inquiry: {
eyebrow: "ORDER",
title: "餐品预订",
subtitle: "留下用餐时间和人数,我会尽快确认。",
submitLabel: "提交预订需求",
},
success: {
eyebrow: "ORDER",
title: "已收到你的需求",
intro: "确认备餐时间和数量后,我会尽快回复。",
recordsAction: "查看咨询记录",
homeAction: "返回首页",
},
records: {
title: "我的咨询记录",
createAction: "新增咨询",
emptyTitle: "还没有咨询记录",
emptyDescription: "提交一次需求,开始与主理人沟通。",
emptyAction: "开始咨询",
},
},
},
},
},
pages: [
@@ -1516,7 +1607,7 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
},
{
packageKey: "atelier-solopreneur",
version: "1.2.0",
version: "1.3.0",
displayName: "独立工坊 · 品牌小程序",
defaultBrandSlug: "atelier-studio",
runtimeContract: "1.0",
@@ -3363,6 +3454,7 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
hours: "工作日 10:00–18:00",
address: "远程协作 · 全国",
deliveryNote: "演示内容不接受真实咨询。",
avatarUrl: "/assets/avatar.jpg",
},
content: {
templateKey: "personal",
@@ -3812,7 +3904,7 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
},
{
packageKey: "linjing-editorial",
version: "1.0.1",
version: "1.0.3",
displayName: "林境建筑画册",
defaultBrandSlug: "linjing-doors",
runtimeContract: "1.0",
@@ -5141,24 +5233,68 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
name: "序章·入户门",
summary: "为别墅入口定制的整樘门系统",
categoryKey: "entrance-door",
coverUrl: "/assets/content/doors-hero.jpg",
priceText: "按项目确认",
config: {
media: [
{
url: "/assets/content/doors-hero.jpg",
alt: "",
type: "image",
},
],
},
},
{
kind: "product",
name: "庭院·边界门",
summary: "连接建筑与庭院的定制门",
categoryKey: "garden-door",
coverUrl: "/assets/content/doors-yard-gate.jpg",
priceText: "按项目确认",
config: {
media: [
{
url: "/assets/content/doors-yard-gate.jpg",
alt: "",
type: "image",
},
],
},
},
{
kind: "product",
name: "室内·静谧门",
summary: "统一室内空间秩序的户内门",
categoryKey: "interior-door",
coverUrl: "/assets/content/doors-room-door.jpg",
priceText: "按项目确认",
config: {
media: [
{
url: "/assets/content/doors-room-door.jpg",
alt: "",
type: "image",
},
],
},
},
{
kind: "service",
name: "一对一门系统设计咨询",
summary: "从现场到方案的完整设计沟通",
categoryKey: "custom",
coverUrl: "/assets/content/personal-consulting.jpg",
priceText: "按项目确认",
config: {
media: [
{
url: "/assets/content/personal-consulting.jpg",
alt: "",
type: "image",
},
],
},
},
],
trustContent: [
@@ -5302,6 +5438,79 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
},
],
capabilityKey: "inquiry",
brandConfig: {
visualTemplateKey: "linjing-editorial",
templateData: {
designPhilosophy: "先厘清问题,再设计表达",
},
title: "门系统设计师",
slogan: "让门成为空间秩序的一部分。",
phone: "",
wechat: "",
studioAddress: "上海·设计工作室",
avatarUrl: "/assets/content/personal-avatar.jpg",
heroImage: "/assets/content/doors-hero.jpg",
visualPresentation: {
home: {
founderBadge: "接受项目沟通",
proofEyebrow: "专业经验与合作成果",
proofTitle: "经验与方法",
manifestoEyebrow: "工作原则",
manifestoTitle: "先厘清问题,再设计表达",
worksEyebrow: "项目案例",
worksTitle: "门系统项目",
worksAction: "查看全部 →",
},
offerings: {
title: "门系统项目",
subtitle: "从入户门到室内门的一体化设计",
materialLabel: "包含:",
hardwareLabel: "定制说明:",
detailAction: "查看详情 →",
inquiryAction: "发起咨询",
},
detail: {
priceLabel: "价格参考",
spaceLabel: "适合场景",
backgroundTitle: "项目背景",
conceptTitle: "设计思路",
craftsTitle: "交付要点",
materialsTitle: "材料与说明",
inquiryAction: "发起咨询",
inquiryHint: "提交信息后由主理人与您沟通。",
},
profile: {
phoneLabel: "联系电话",
wechatLabel: "微信",
addressLabel: "工作地点",
callAction: "呼叫",
copyAction: "复制",
recordsTitle: "我的咨询记录",
recordsCountUnit: "条记录",
},
inquiry: {
eyebrow: "COLLABORATION",
title: "合作咨询",
subtitle: "留下你的需求与目标,主理人会尽快联系。",
submitLabel: "提交咨询",
},
success: {
eyebrow: "COLLABORATION",
title: "已收到你的咨询",
intro: "主理人会尽快与你联系。",
recordsAction: "查看咨询记录",
homeAction: "返回首页",
},
records: {
title: "我的咨询记录",
createAction: "新增咨询",
emptyTitle: "还没有咨询记录",
emptyDescription: "提交一次咨询,开始与你的主理人沟通。",
emptyAction: "开始咨询",
},
},
founder: "示例主理人",
},
},
personal: {
templateKey: "personal",
@@ -5312,12 +5521,34 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
name: "示例·品牌定位咨询",
summary: "梳理品牌定位与下一步行动。",
categoryKey: "consulting",
coverUrl: "/assets/content/personal-consulting.jpg",
priceText: "按需求确认",
config: {
media: [
{
url: "/assets/content/personal-consulting.jpg",
alt: "",
type: "image",
},
],
},
},
{
kind: "service",
name: "示例·长期顾问支持",
summary: "围绕表达和转化提供持续支持。",
categoryKey: "advisory",
coverUrl: "/assets/content/personal-advisory.jpg",
priceText: "按服务周期确认",
config: {
media: [
{
url: "/assets/content/personal-advisory.jpg",
alt: "",
type: "image",
},
],
},
},
],
trustContent: [
@@ -5353,6 +5584,79 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
},
],
capabilityKey: "inquiry",
brandConfig: {
visualTemplateKey: "linjing-editorial",
templateData: {
designPhilosophy: "先厘清问题,再设计表达",
},
title: "品牌策略顾问",
slogan: "用清晰的定位与可执行的表达,让专业被看见。",
phone: "",
wechat: "",
studioAddress: "上海市徐汇区创意园区",
avatarUrl: "/assets/content/personal-avatar.jpg",
heroImage: "/assets/content/personal-consulting.jpg",
visualPresentation: {
home: {
founderBadge: "接受项目沟通",
proofEyebrow: "专业经验与合作成果",
proofTitle: "经验与方法",
manifestoEyebrow: "工作原则",
manifestoTitle: "先厘清问题,再设计表达",
worksEyebrow: "合作方式",
worksTitle: "品牌策略与顾问服务",
worksAction: "查看全部 →",
},
offerings: {
title: "合作方式",
subtitle: "围绕定位、表达与业务转化,选择适合当前阶段的支持。",
materialLabel: "包含:",
hardwareLabel: "定制说明:",
detailAction: "查看详情 →",
inquiryAction: "发起咨询",
},
detail: {
priceLabel: "价格参考",
spaceLabel: "适合场景",
backgroundTitle: "项目背景",
conceptTitle: "设计思路",
craftsTitle: "交付要点",
materialsTitle: "材料与说明",
inquiryAction: "发起咨询",
inquiryHint: "提交信息后由主理人与您沟通。",
},
profile: {
phoneLabel: "联系电话",
wechatLabel: "微信",
addressLabel: "工作地点",
callAction: "呼叫",
copyAction: "复制",
recordsTitle: "我的咨询记录",
recordsCountUnit: "条记录",
},
inquiry: {
eyebrow: "COLLABORATION",
title: "合作咨询",
subtitle: "留下你的需求与目标,主理人会尽快联系。",
submitLabel: "提交咨询",
},
success: {
eyebrow: "COLLABORATION",
title: "已收到你的咨询",
intro: "主理人会尽快与你联系。",
recordsAction: "查看咨询记录",
homeAction: "返回首页",
},
records: {
title: "我的咨询记录",
createAction: "新增咨询",
emptyTitle: "还没有咨询记录",
emptyDescription: "提交一次咨询,开始与你的主理人沟通。",
emptyAction: "开始咨询",
},
},
founder: "示例主理人",
},
},
},
pages: ["pages/index/index", "pages/services/index", "pages/bookings/index"],
@@ -5360,4 +5664,4 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[
},
];
export const generatedTemplatePackageRegistryHash =
"57108a2e3263a9776cd2ec26d76a401eb66bed16ee250bef11464cffcc874d89";
"1248f6a1ba4525e9d4c72d3d45523ad30b21ad5878c956457e4040630300dbd4";
Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

@@ -1,6 +1,6 @@
{
"name": "@personal-brand/template-acheng-campus-food",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"type": "module",
"files": [
@@ -1,6 +1,6 @@
{
"packageKey": "acheng-campus-food",
"version": "1.0.0",
"version": "1.0.1",
"displayName": "阿成校园餐",
"defaultBrandSlug": "default-brand",
"runtimeContract": "1.0",
@@ -500,9 +500,18 @@
"label": "餐品类别",
"input": "select",
"options": [
{ "value": "set-meal", "label": "套餐" },
{ "value": "private-chef", "label": "私厨" },
{ "value": "custom", "label": "定制餐品" }
{
"value": "set-meal",
"label": "套餐"
},
{
"value": "private-chef",
"label": "私厨"
},
{
"value": "custom",
"label": "定制餐品"
}
],
"previewTarget": "acheng-campus-food.offerings.item"
}
@@ -611,9 +620,18 @@
"label": "餐品类别",
"input": "select",
"options": [
{ "value": "set-meal", "label": "套餐" },
{ "value": "private-chef", "label": "私厨" },
{ "value": "custom", "label": "定制餐品" }
{
"value": "set-meal",
"label": "套餐"
},
{
"value": "private-chef",
"label": "私厨"
},
{
"value": "custom",
"label": "定制餐品"
}
],
"previewTarget": "acheng-campus-food.detail.dishDetail"
},
@@ -1223,13 +1241,35 @@
"kind": "package",
"name": "示例·今日套餐",
"summary": "现做家常套餐示例内容。",
"categoryKey": "set-meal"
"categoryKey": "set-meal",
"coverUrl": "/assets/content/package-01.jpg",
"priceText": "¥28 起 / 份",
"config": {
"media": [
{
"url": "/assets/content/package-01.jpg",
"alt": "",
"type": "image"
}
]
}
},
{
"kind": "service",
"name": "示例·聚餐定制",
"summary": "按人数和口味沟通定制餐品。",
"categoryKey": "private-chef"
"categoryKey": "private-chef",
"coverUrl": "/assets/content/private-chef.jpg",
"priceText": "按人数和菜单确认",
"config": {
"media": [
{
"url": "/assets/content/private-chef.jpg",
"alt": "",
"type": "image"
}
]
}
}
],
"trustContent": [
@@ -1478,7 +1518,76 @@
"required": true
}
],
"capabilityKey": "booking"
"capabilityKey": "booking",
"brandConfig": {
"visualTemplateKey": "acheng-campus-food",
"founder": "阿成",
"title": "私房菜主理人",
"slogan": "认真做好每一顿家常饭。",
"phone": "",
"wechat": "",
"studioAddress": "大学城生活区东门附近",
"avatarUrl": "/assets/owner/portrait.jpg",
"heroImage": "/assets/content/package-01.jpg",
"visualPresentation": {
"home": {
"stallTitle": "服务地点",
"primaryAction": "咨询 / 预订",
"secondaryAction": "查看菜单",
"worksEyebrow": "今日推荐",
"worksTitle": "热门套餐",
"worksAction": "查看全部 →",
"manifestoTitle": "我们的服务承诺"
},
"offerings": {
"title": "餐品与定制",
"subtitle": "现做家常餐、团体餐和活动定制",
"materialLabel": "包含:",
"hardwareLabel": "定制说明:",
"detailAction": "查看详情 →",
"inquiryAction": "预订 / 咨询"
},
"detail": {
"priceLabel": "价格参考",
"spaceLabel": "适合场景",
"backgroundTitle": "餐品说明",
"conceptTitle": "备餐方式",
"craftsTitle": "服务内容",
"materialsTitle": "交付说明",
"inquiryAction": "预订 / 咨询",
"inquiryHint": "提交后会由主理人与你确认时间、数量和地点。"
},
"profile": {
"phoneLabel": "联系电话",
"wechatLabel": "微信",
"addressLabel": "服务地点",
"callAction": "呼叫",
"copyAction": "复制",
"recordsTitle": "我的订单与咨询",
"recordsCountUnit": "条记录"
},
"inquiry": {
"eyebrow": "ORDER",
"title": "餐品预订",
"subtitle": "留下用餐时间和人数,我会尽快确认。",
"submitLabel": "提交预订需求"
},
"success": {
"eyebrow": "ORDER",
"title": "已收到你的需求",
"intro": "确认备餐时间和数量后,我会尽快回复。",
"recordsAction": "查看咨询记录",
"homeAction": "返回首页"
},
"records": {
"title": "我的咨询记录",
"createAction": "新增咨询",
"emptyTitle": "还没有咨询记录",
"emptyDescription": "提交一次需求,开始与主理人沟通。",
"emptyAction": "开始咨询"
}
}
}
}
},
"pages": [
Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

@@ -1,6 +1,6 @@
{
"name": "@personal-brand/template-atelier-solopreneur",
"version": "1.2.0",
"version": "1.3.0",
"private": true,
"type": "module",
"files": [
@@ -1,6 +1,6 @@
{
"packageKey": "atelier-solopreneur",
"version": "1.2.0",
"version": "1.3.0",
"displayName": "独立工坊 · 品牌小程序",
"defaultBrandSlug": "atelier-studio",
"runtimeContract": "1.0",
@@ -1832,7 +1832,8 @@
"description": "为独立主理人提供品牌定位、产品设计与小程序开发支持。这些内容仅用于演示模板。",
"hours": "工作日 10:00–18:00",
"address": "远程协作 · 全国",
"deliveryNote": "演示内容不接受真实咨询。"
"deliveryNote": "演示内容不接受真实咨询。",
"avatarUrl": "/assets/avatar.jpg"
},
"content": {
"templateKey": "personal",
Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

@@ -1,6 +1,6 @@
{
"name": "@personal-brand/template-linjing-editorial",
"version": "1.0.1",
"version": "1.0.3",
"private": true,
"type": "module",
"files": [
+281 -24
View File
@@ -1,6 +1,6 @@
{
"packageKey": "linjing-editorial",
"version": "1.0.1",
"version": "1.0.3",
"displayName": "林境建筑画册",
"defaultBrandSlug": "linjing-doors",
"runtimeContract": "1.0",
@@ -228,11 +228,26 @@
"label": "案例类别",
"input": "select",
"options": [
{ "value": "entrance-door", "label": "入户大门" },
{ "value": "garden-door", "label": "庭院围墙门" },
{ "value": "interior-door", "label": "室内户内门" },
{ "value": "stealth-door", "label": "装饰隐形门" },
{ "value": "custom", "label": "设计咨询" }
{
"value": "entrance-door",
"label": "入户大门"
},
{
"value": "garden-door",
"label": "庭院围墙门"
},
{
"value": "interior-door",
"label": "室内户内门"
},
{
"value": "stealth-door",
"label": "装饰隐形门"
},
{
"value": "custom",
"label": "设计咨询"
}
],
"previewTarget": "linjing-editorial.home.offering"
},
@@ -671,11 +686,26 @@
"label": "案例类别",
"input": "select",
"options": [
{ "value": "entrance-door", "label": "入户大门" },
{ "value": "garden-door", "label": "庭院围墙门" },
{ "value": "interior-door", "label": "室内户内门" },
{ "value": "stealth-door", "label": "装饰隐形门" },
{ "value": "custom", "label": "设计咨询" }
{
"value": "entrance-door",
"label": "入户大门"
},
{
"value": "garden-door",
"label": "庭院围墙门"
},
{
"value": "interior-door",
"label": "室内户内门"
},
{
"value": "stealth-door",
"label": "装饰隐形门"
},
{
"value": "custom",
"label": "设计咨询"
}
],
"previewTarget": "linjing-editorial.offerings.item"
},
@@ -809,11 +839,26 @@
"label": "案例类别",
"input": "select",
"options": [
{ "value": "entrance-door", "label": "入户大门" },
{ "value": "garden-door", "label": "庭院围墙门" },
{ "value": "interior-door", "label": "室内户内门" },
{ "value": "stealth-door", "label": "装饰隐形门" },
{ "value": "custom", "label": "设计咨询" }
{
"value": "entrance-door",
"label": "入户大门"
},
{
"value": "garden-door",
"label": "庭院围墙门"
},
{
"value": "interior-door",
"label": "室内户内门"
},
{
"value": "stealth-door",
"label": "装饰隐形门"
},
{
"value": "custom",
"label": "设计咨询"
}
],
"previewTarget": "linjing-editorial.detail.projectDetail"
},
@@ -1283,25 +1328,69 @@
"kind": "product",
"name": "序章·入户门",
"summary": "为别墅入口定制的整樘门系统",
"categoryKey": "entrance-door"
"categoryKey": "entrance-door",
"coverUrl": "/assets/content/doors-hero.jpg",
"priceText": "按项目确认",
"config": {
"media": [
{
"url": "/assets/content/doors-hero.jpg",
"alt": "",
"type": "image"
}
]
}
},
{
"kind": "product",
"name": "庭院·边界门",
"summary": "连接建筑与庭院的定制门",
"categoryKey": "garden-door"
"categoryKey": "garden-door",
"coverUrl": "/assets/content/doors-yard-gate.jpg",
"priceText": "按项目确认",
"config": {
"media": [
{
"url": "/assets/content/doors-yard-gate.jpg",
"alt": "",
"type": "image"
}
]
}
},
{
"kind": "product",
"name": "室内·静谧门",
"summary": "统一室内空间秩序的户内门",
"categoryKey": "interior-door"
"categoryKey": "interior-door",
"coverUrl": "/assets/content/doors-room-door.jpg",
"priceText": "按项目确认",
"config": {
"media": [
{
"url": "/assets/content/doors-room-door.jpg",
"alt": "",
"type": "image"
}
]
}
},
{
"kind": "service",
"name": "一对一门系统设计咨询",
"summary": "从现场到方案的完整设计沟通",
"categoryKey": "custom"
"categoryKey": "custom",
"coverUrl": "/assets/content/personal-consulting.jpg",
"priceText": "按项目确认",
"config": {
"media": [
{
"url": "/assets/content/personal-consulting.jpg",
"alt": "",
"type": "image"
}
]
}
}
],
"trustContent": [
@@ -1444,7 +1533,80 @@
"required": false
}
],
"capabilityKey": "inquiry"
"capabilityKey": "inquiry",
"brandConfig": {
"visualTemplateKey": "linjing-editorial",
"templateData": {
"designPhilosophy": "先厘清问题,再设计表达"
},
"title": "门系统设计师",
"slogan": "让门成为空间秩序的一部分。",
"phone": "",
"wechat": "",
"studioAddress": "上海·设计工作室",
"avatarUrl": "/assets/content/personal-avatar.jpg",
"heroImage": "/assets/content/doors-hero.jpg",
"visualPresentation": {
"home": {
"founderBadge": "接受项目沟通",
"proofEyebrow": "专业经验与合作成果",
"proofTitle": "经验与方法",
"manifestoEyebrow": "工作原则",
"manifestoTitle": "先厘清问题,再设计表达",
"worksEyebrow": "项目案例",
"worksTitle": "门系统项目",
"worksAction": "查看全部 →"
},
"offerings": {
"title": "门系统项目",
"subtitle": "从入户门到室内门的一体化设计",
"materialLabel": "包含:",
"hardwareLabel": "定制说明:",
"detailAction": "查看详情 →",
"inquiryAction": "发起咨询"
},
"detail": {
"priceLabel": "价格参考",
"spaceLabel": "适合场景",
"backgroundTitle": "项目背景",
"conceptTitle": "设计思路",
"craftsTitle": "交付要点",
"materialsTitle": "材料与说明",
"inquiryAction": "发起咨询",
"inquiryHint": "提交信息后由主理人与您沟通。"
},
"profile": {
"phoneLabel": "联系电话",
"wechatLabel": "微信",
"addressLabel": "工作地点",
"callAction": "呼叫",
"copyAction": "复制",
"recordsTitle": "我的咨询记录",
"recordsCountUnit": "条记录"
},
"inquiry": {
"eyebrow": "COLLABORATION",
"title": "合作咨询",
"subtitle": "留下你的需求与目标,主理人会尽快联系。",
"submitLabel": "提交咨询"
},
"success": {
"eyebrow": "COLLABORATION",
"title": "已收到你的咨询",
"intro": "主理人会尽快与你联系。",
"recordsAction": "查看咨询记录",
"homeAction": "返回首页"
},
"records": {
"title": "我的咨询记录",
"createAction": "新增咨询",
"emptyTitle": "还没有咨询记录",
"emptyDescription": "提交一次咨询,开始与你的主理人沟通。",
"emptyAction": "开始咨询"
}
},
"founder": "示例主理人"
}
},
"personal": {
"templateKey": "personal",
@@ -1454,13 +1616,35 @@
"kind": "service",
"name": "示例·品牌定位咨询",
"summary": "梳理品牌定位与下一步行动。",
"categoryKey": "consulting"
"categoryKey": "consulting",
"coverUrl": "/assets/content/personal-consulting.jpg",
"priceText": "按需求确认",
"config": {
"media": [
{
"url": "/assets/content/personal-consulting.jpg",
"alt": "",
"type": "image"
}
]
}
},
{
"kind": "service",
"name": "示例·长期顾问支持",
"summary": "围绕表达和转化提供持续支持。",
"categoryKey": "advisory"
"categoryKey": "advisory",
"coverUrl": "/assets/content/personal-advisory.jpg",
"priceText": "按服务周期确认",
"config": {
"media": [
{
"url": "/assets/content/personal-advisory.jpg",
"alt": "",
"type": "image"
}
]
}
}
],
"trustContent": [
@@ -1495,7 +1679,80 @@
"required": true
}
],
"capabilityKey": "inquiry"
"capabilityKey": "inquiry",
"brandConfig": {
"visualTemplateKey": "linjing-editorial",
"templateData": {
"designPhilosophy": "先厘清问题,再设计表达"
},
"title": "品牌策略顾问",
"slogan": "用清晰的定位与可执行的表达,让专业被看见。",
"phone": "",
"wechat": "",
"studioAddress": "上海市徐汇区创意园区",
"avatarUrl": "/assets/content/personal-avatar.jpg",
"heroImage": "/assets/content/personal-consulting.jpg",
"visualPresentation": {
"home": {
"founderBadge": "接受项目沟通",
"proofEyebrow": "专业经验与合作成果",
"proofTitle": "经验与方法",
"manifestoEyebrow": "工作原则",
"manifestoTitle": "先厘清问题,再设计表达",
"worksEyebrow": "合作方式",
"worksTitle": "品牌策略与顾问服务",
"worksAction": "查看全部 →"
},
"offerings": {
"title": "合作方式",
"subtitle": "围绕定位、表达与业务转化,选择适合当前阶段的支持。",
"materialLabel": "包含:",
"hardwareLabel": "定制说明:",
"detailAction": "查看详情 →",
"inquiryAction": "发起咨询"
},
"detail": {
"priceLabel": "价格参考",
"spaceLabel": "适合场景",
"backgroundTitle": "项目背景",
"conceptTitle": "设计思路",
"craftsTitle": "交付要点",
"materialsTitle": "材料与说明",
"inquiryAction": "发起咨询",
"inquiryHint": "提交信息后由主理人与您沟通。"
},
"profile": {
"phoneLabel": "联系电话",
"wechatLabel": "微信",
"addressLabel": "工作地点",
"callAction": "呼叫",
"copyAction": "复制",
"recordsTitle": "我的咨询记录",
"recordsCountUnit": "条记录"
},
"inquiry": {
"eyebrow": "COLLABORATION",
"title": "合作咨询",
"subtitle": "留下你的需求与目标,主理人会尽快联系。",
"submitLabel": "提交咨询"
},
"success": {
"eyebrow": "COLLABORATION",
"title": "已收到你的咨询",
"intro": "主理人会尽快与你联系。",
"recordsAction": "查看咨询记录",
"homeAction": "返回首页"
},
"records": {
"title": "我的咨询记录",
"createAction": "新增咨询",
"emptyTitle": "还没有咨询记录",
"emptyDescription": "提交一次咨询,开始与你的主理人沟通。",
"emptyAction": "开始咨询"
}
},
"founder": "示例主理人"
}
}
},
"pages": ["pages/index/index", "pages/services/index", "pages/bookings/index"]