diff --git a/apps/api/scripts/create-atelier-brand.mjs b/apps/api/scripts/create-atelier-brand.mjs new file mode 100644 index 0000000..0ea439e --- /dev/null +++ b/apps/api/scripts/create-atelier-brand.mjs @@ -0,0 +1,63 @@ +import assert from "node:assert/strict"; +import { PrismaService } from "../dist/prisma.service.js"; +import { TemplateWorkspaceService } from "../dist/template-workspace.service.js"; + +// 显式创建独立品牌;不注册模板样例,不导入内容,也不发布。 +const username = process.argv[2]; +if (!username) + throw new Error("Usage: node --env-file=.env scripts/create-atelier-brand.mjs "); +const prisma = new PrismaService(); +try { + const admin = await prisma.adminUser.findUniqueOrThrow({ where: { username } }); + assert.ok(admin.isEnabled && admin.role === "admin", "An enabled administrator is required"); + const slug = "atelier-studio"; + const existingBrands = await prisma.brandProfile.findMany({ + where: { slug: { not: slug } }, + orderBy: { id: "asc" }, + }); + const brand = await prisma.$transaction(async (tx) => { + let current = await tx.brandProfile.findUnique({ where: { slug } }); + if (current) { + assert.equal(current.templateKey, "personal", "Existing brand has a different industry"); + assert.equal( + current.config?.visualTemplateKey, + "atelier-solopreneur", + "Existing brand has a different visual template", + ); + } else { + current = await tx.brandProfile.create({ + data: { + slug, + name: "独立工坊 · 品牌小程序", + templateKey: "personal", + config: { visualTemplateKey: "atelier-solopreneur" }, + }, + }); + } + await tx.brandMembership.upsert({ + where: { adminUserId_brandId: { adminUserId: admin.id, brandId: current.id } }, + create: { adminUserId: admin.id, brandId: current.id, role: "owner" }, + update: {}, + }); + return current; + }); + if (!(await prisma.brandTemplateInstallation.findFirst({ where: { brandId: brand.id } }))) { + await new TemplateWorkspaceService(prisma).install(brand.id, "personal"); + } + assert.deepEqual( + await prisma.brandProfile.findMany({ where: { slug: { not: slug } }, orderBy: { id: "asc" } }), + existingBrands, + ); + console.log( + JSON.stringify({ + slug, + name: brand.name, + template: "atelier-solopreneur", + administrator: username, + sampleImported: false, + publishedByScript: false, + }), + ); +} finally { + await prisma.$disconnect(); +} diff --git a/apps/api/src/modules/workspace/admin-sample-content.service.ts b/apps/api/src/modules/workspace/admin-sample-content.service.ts index 511af59..00783ba 100644 --- a/apps/api/src/modules/workspace/admin-sample-content.service.ts +++ b/apps/api/src/modules/workspace/admin-sample-content.service.ts @@ -111,7 +111,8 @@ export class AdminSampleContentService { name: item.name, summary: item.summary, ...(item.coverUrl ? { coverUrl: item.coverUrl } : {}), - config: { categoryKey: item.categoryKey }, + ...(item.priceText ? { priceText: item.priceText } : {}), + config: { ...item.config, categoryKey: item.categoryKey } as Prisma.InputJsonValue, sortOrder, isEnabled: true, })), diff --git a/apps/api/test/http.integration.test.js b/apps/api/test/http.integration.test.js index 3c4d62b..16f00b8 100644 --- a/apps/api/test/http.integration.test.js +++ b/apps/api/test/http.integration.test.js @@ -2,6 +2,7 @@ import assert from "node:assert/strict"; import { randomUUID } from "node:crypto"; import { after, before, test } from "node:test"; import { PrismaClient } from "@prisma/client"; +import { getVisualTemplateManifest } from "@personal-brand/config"; import { createApp } from "../dist/main.js"; import { readIdentity, signIdentity } from "../dist/auth.js"; import { WechatAuthService } from "../dist/wechat-auth.js"; @@ -1189,6 +1190,12 @@ test("visual template compatibility is enforced by catalog, preview, and brand s const catalog = await request("/public/templates"); assert.equal(catalog.statusCode, 200); const visuals = JSON.parse(catalog.body).visuals; + for (const visual of visuals) { + const manifest = getVisualTemplateManifest(visual.key); + assert.ok(manifest, `Catalog visual must be installable: ${visual.key}`); + assert.equal(manifest.key, visual.key); + assert.deepEqual(manifest.supportedIndustryTemplates, visual.supportedIndustryTemplates); + } assert.deepEqual( visuals.find((visual) => visual.key === "linjing-editorial").supportedIndustryTemplates, ["personal", "doors"], @@ -3468,7 +3475,7 @@ test("atelier template imports selected package and preserves draft publication tagline: "独立开发者 · 品牌小程序构建", description: "专注个人品牌表达、内容管理与咨询承接。", config: { - visualTemplateKey: "atelier-solopreneur", + visualTemplateKey: "linjing-editorial", founder: "验收主理人", title: "产品设计 / 全栈开发", visualPresentation: { home: { subtitle: "保留已有品牌说明" } }, @@ -3501,6 +3508,18 @@ test("atelier template imports selected package and preserves draft publication 403, ); } + await json("/admin/config/brand", { + method: "PATCH", + headers, + payload: { config: { visualTemplateKey: "atelier-solopreneur" } }, + }); + const installation = await json("/admin/workspace/install", { + method: "POST", + headers, + payload: { templateKey: "personal" }, + }); + assert.equal(installation.visualTemplate.key, "atelier-solopreneur"); + assert.equal(installation.visualTemplate.tokens.colors.accent, "#183329"); const preview = await json("/admin/workspace/sample-content/preview", { headers }); assert.equal(preview.counts.fields, 5); await json("/admin/workspace/sample-content/import", { method: "POST", headers }); @@ -3523,6 +3542,16 @@ test("atelier template imports selected package and preserves draft publication where: { brandId: brand.id }, }); assert.match(exampleOffering.coverUrl, /^\/assets\/cases\//); + const sampleRuntime = await json("/admin/workspace/preview", { headers }); + for (const item of sampleRuntime.offerings) { + assert.equal(item.presentation.categoryLabel, "案例展示"); + assert.equal(item.priceText, "按需求确认范围与报价"); + assert.ok(item.presentation.spaceType); + assert.ok(item.presentation.details.background); + assert.ok(item.presentation.details.designConcept); + assert.ok(item.presentation.details.crafts.length); + assert.ok(item.presentation.details.materialsList.length); + } const offeringFields = [ ...new Map( manifest.admin.sections diff --git a/apps/taro/src/runtime/navigation.ts b/apps/taro/src/runtime/navigation.ts index be0bfd5..c84cd67 100644 --- a/apps/taro/src/runtime/navigation.ts +++ b/apps/taro/src/runtime/navigation.ts @@ -11,7 +11,8 @@ export const routes = { }; export type PageKey = keyof typeof routes; export function navigate(page: PageKey, params: Record = {}) { - const isTab = TEMPLATE_MANIFEST.navigation.some((tab) => tab.page === page); + const isTab = + !PREVIEW_ALL_TEMPLATES && TEMPLATE_MANIFEST.navigation.some((tab) => tab.page === page); if (isTab) { Taro.setStorageSync(`routeQuery:${page}`, params); void Taro.switchTab({ url: routes[page] }); diff --git a/apps/taro/src/runtime/preview-renderer.ts b/apps/taro/src/runtime/preview-renderer.ts new file mode 100644 index 0000000..1e9c161 --- /dev/null +++ b/apps/taro/src/runtime/preview-renderer.ts @@ -0,0 +1,10 @@ +export function resolvePreviewRenderer( + modules: Record, + config: unknown, +): T | undefined { + if (!config || typeof config !== "object" || Array.isArray(config)) return undefined; + const key = (config as Record).visualTemplateKey; + if (typeof key !== "string" || !key) return undefined; + const suffix = `/template-${key}/taro/index.tsx`; + return Object.entries(modules).find(([path]) => path.endsWith(suffix))?.[1]; +} diff --git a/apps/taro/src/runtime/template-preview-entry.tsx b/apps/taro/src/runtime/template-preview-entry.tsx index 51e682d..a2eff75 100644 --- a/apps/taro/src/runtime/template-preview-entry.tsx +++ b/apps/taro/src/runtime/template-preview-entry.tsx @@ -1,5 +1,6 @@ import type { ComponentType } from "react"; import type { TemplateProps } from "./template"; +import { resolvePreviewRenderer } from "./preview-renderer"; type TemplateRenderer = ComponentType; @@ -8,8 +9,7 @@ const renderers = import.meta.glob<{ }>("../../../../packages/template-*/taro/index.tsx", { eager: true }); export function TemplatePage(props: TemplateProps) { - const suffix = `/template-${TEMPLATE_KEY}/taro/index.tsx`; - const rendererModule = Object.entries(renderers).find(([path]) => path.endsWith(suffix))?.[1]; + const rendererModule = resolvePreviewRenderer(renderers, props.workspace.brand.config); if (!rendererModule) return
当前模板没有可用的 H5 预览 renderer
; const Renderer = rendererModule.TemplatePage; diff --git a/apps/taro/test/preview-renderer.test.mjs b/apps/taro/test/preview-renderer.test.mjs new file mode 100644 index 0000000..c95c278 --- /dev/null +++ b/apps/taro/test/preview-renderer.test.mjs @@ -0,0 +1,38 @@ +import assert from "node:assert/strict"; +import fs from "node:fs"; +import { test } from "node:test"; +import { resolvePreviewRenderer } from "../src/runtime/preview-renderer.ts"; + +const packages = new URL("../../../packages/", import.meta.url); +const manifests = fs + .readdirSync(packages) + .filter((name) => fs.existsSync(new URL(`${name}/taro/index.tsx`, packages))) + .map((name) => JSON.parse(fs.readFileSync(new URL(`${name}/template.json`, packages), "utf8"))); +const modules = Object.fromEntries( + manifests.map((manifest) => [ + `../../../../packages/template-${manifest.packageKey}/taro/index.tsx`, + { key: manifest.packageKey }, + ]), +); + +test("多模板预览随当前品牌配置切换所有真实模板,重复切换不保留旧 renderer", () => { + for (const manifest of [...manifests, ...manifests.reverse()]) { + assert.equal( + resolvePreviewRenderer(modules, { visualTemplateKey: manifest.packageKey })?.key, + manifest.packageKey, + ); + } +}); + +test("缺少或未知模板时不回落到首个模板", () => { + for (const config of [ + undefined, + null, + [], + {}, + { visualTemplateKey: "missing" }, + { visualTemplateKey: 1 }, + ]) { + assert.equal(resolvePreviewRenderer(modules, config), undefined); + } +}); diff --git a/docs/atelier-template-acceptance.md b/docs/atelier-template-acceptance.md index b38f726..a8adf6e 100644 --- a/docs/atelier-template-acceptance.md +++ b/docs/atelier-template-acceptance.md @@ -46,6 +46,32 @@ API 全量 lint 有 13 项既有错误,涉及 admin-membership.guard 的 any - H5 截图对照已覆盖主要页面结构;字体使用中文系统字体与衬线 fallback,不依赖 Google Fonts,图标与示例图片不是 Stitch 外链资源的逐像素复制。 - 原生编译器 fixture 只证明入口和结构,尚无微信开发者工具或真机视觉证据。 - 尚无正式 AppID / 生产 API 配置。合法域名、微信登录、剪贴板、字体缩放、底部安全区、提审与真机必须在正式配置后验证。 -- 未创建实际宣传品牌、未导入开发品牌数据、未上传或发布到微信。后续由管理员选择模板并显式导入样例。 +- 已补建本地独立宣传品牌 `atelier-studio`,并为 `admin` 建立 owner 成员关系及 personal 安装台账。已按管理员明确要求导入模板样例,未创建公开发布或上传微信;管理员刷新后从顶部品牌列表切换即可预览。旧品牌行业与配置保留。 + +## 切换入口遗漏修复 + +初版只验证隔离测试品牌的最终配置,没有覆盖实际可用品牌和安装入口。开发库原本仅有 food / doors 品牌,新模板限定 personal,故下拉列表不显示;另有旧版 Runtime manifest 注册遗漏,正常安装被拒绝。现在新增包从包声明与视觉定义投影安装 manifest,旧模板 manifest 保持原结果;集成测试增加目录中每个视觉均有安装 manifest,并对真实 atelier 品牌执行选择、安装和后续持久化验证。显式创建脚本见模板 README,不接入全局 seed。 因此当前状态是“模板代码与自动验证通过,可进入人工预览验收”,不宣称全部交互验收或正式上线完成。 + +## 后台画布错误模板修复 + +实际运行的 3000 Vite 服务仅发现阿成与林境两个 renderer,工坊进入备用 iframe;备用预览又错误使用编译期模板键。已刷新运行中模块,并修正备用预览按 Runtime 配置选择 renderer,未知模板不回落,同时避免多模板 H5 使用未配置的原生 tabBar。 + +真实数据库浏览器回归已验证:工坊选择与重载、阿成 → 林境 → 工坊的后台画布切换、备用 iframe 使用真实工坊草稿。未导入样例、未发布;截图位于 `.codex-tasks/atelier-switch/editor-preview.png` 与 `iframe-preview.png`。Taro 测试、类型检查、完整后台预览构建、格式检查及 template doctor 通过;这些证据不替代上述尚未完成的全字段和真机验收。 + +## 本地样例导入 + +按用户明确授权,通过现有管理员样例导入接口为 `atelier-studio` 导入 2 条示例服务 / 案例、1 条信任内容、5 个咨询字段及 1 张咨询表单,并补齐模板默认配置。浏览器在实际 3000 后台重载后,确认首页价值定位、差异化卡片、试点案例、服务群体及咨询行动文案正常显示。其他品牌配置保持原值,未创建发布版本。 + +图片补充回归:运行中的图片资源 glob 同样遗漏新增工坊包,导致两张案例图使用未解析的 `/assets/cases/` 地址。刷新资源模块后,在实际后台验证 `campus.jpg` 自然尺寸为 1000 × 667、`editorial.jpg` 为 1000 × 750,均加载成功。 + +## 详情内容与信息卡片修复 + +初始样例仅包含案例名称、摘要和封面,且导入服务未支持样例 offering 的详情配置,导致详情页空标题与内部类别键值。现从模板包补齐两条案例的合作方式、场景、背景、思路、交付要点和能力构成;导入器保存可选 priceText/config,类别使用已有 portfolio 声明。通过管理员 API 仅补齐本地工坊样例的缺失配置,其他品牌案例与发布版本未变。隔离数据库集成测试 50 + 2 项通过,新增断言覆盖真实草稿 Runtime 的完整详情。 + +信息卡片原先嵌套 Text 被共享 display:block 规则断行,标签与冒号分离。改为 flex 行、固定标签列和可换行内容列,类别及关键词单独分组。真实后台验证两条案例切换、图片自然尺寸与 320 / 375 宽度下标签顶端对齐、无溢出;截图为 `.codex-tasks/atelier-switch/detail-facts-320.png` 与 `detail-facts-375.png`。该回归证明后台 H5 显示,不替代微信真机验收。 + +## 小程序配置复用 + +按用户明确要求,本地 `atelier-studio` 复用 `linjing-doors` 的 AppID、API 地址、构建配置与加密上传凭据;保留工坊自身的 personal 行业及 atelier 模板选择,不复制林境品牌内容或发布记录。凭据仅保存在数据库,不写入源码、提交或日志。服务部署与微信上传、提审、发布是不同操作,本次不自动上传微信。 diff --git a/docs/template-completion-rules.md b/docs/template-completion-rules.md index 6d1b48f..d428be2 100644 --- a/docs/template-completion-rules.md +++ b/docs/template-completion-rules.md @@ -10,6 +10,8 @@ ## 完成门槛 +模板可用性必须覆盖真实入口:目录列出、当前品牌行业适配、管理员成员可见、选择保存、安装版本台账和重载预览。目录存在不代表可安装;新增包必须自动具备 Runtime manifest,回归不得仅在数据库预置最终 visualTemplateKey 而绕过选择与安装。用于独立宣传的模板须提供独立品牌的显式创建方法,不得通过更改现有品牌行业或放宽兼容限制解决。 + | 层次 | 需要证明 | 历史问题 | | ---------- | -------------------------------------------------- | ----------------------------------------- | | 数据来源 | 每个展示变量有真实绑定或只读理由 | description/slogan、未消费的 brandPromise | @@ -52,6 +54,8 @@ CI 可执行 pnpm test:template-doctor 和诊断命令。新模板自动扫描 ## 保存与预览补充 +新增模板后,检查实际运行的 Admin renderer 与图片资源模块发现列表,而不只检查新启动的服务;新增包的图片须逐张验证 naturalWidth 大于 0。跨目录新增包可能未使运行中的 Vite glob 缓存失效,须刷新模块或重启本地开发服务。组件画布与备用 iframe 都须按当前 Runtime 的 visualTemplateKey 选择 renderer;未知模板显示不可用,不能静默回落首个模板。多模板 H5 未配置原生 tabBar,导航不得调用 switchTab。回归覆盖所有真实模板来回切换及备用 iframe。 + 独立 H5 预览须覆盖真实公开数据加载、失败提示及重试恢复;请求成功或失败后都必须退出 loading,不能仅以 tabbar 出现判定页面可用。编辑器预览继续等待 workspaceDraft,不得因公开请求结束而提前显示失败。 H5 开发预览的 `/media` 请求须代理至 API 媒体服务,默认 `http://localhost:3001`,可通过 `MEDIA_API_TARGET` 覆盖,或从绝对地址 `API_BASE_URL` 推导 origin。图片回归检查实际加载尺寸,不能只检查图片节点存在;生产环境仍由部署网关提供 `/media` 路由。 diff --git a/packages/config/src/generated-template-packages.ts b/packages/config/src/generated-template-packages.ts index 0a6bcd4..d7e986b 100644 --- a/packages/config/src/generated-template-packages.ts +++ b/packages/config/src/generated-template-packages.ts @@ -2879,15 +2879,77 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[ kind: "service", name: "校园餐饮品牌", summary: "敏捷菜单 + 品牌展示 + 咨询承接", - categoryKey: "prototype", + categoryKey: "portfolio", coverUrl: "/assets/cases/campus.jpg", + priceText: "按需求确认范围与报价", + config: { + spaceType: "餐饮品牌展示与咨询承接", + series: "试点架构原型", + keywords: ["模板演示", "可持续运营", "后台配置"], + details: { + background: + "校园餐饮品牌需要让访客快速了解餐品、营业安排与预订方式。本案例是用于验证系统结构的试点模板,不代表真实客户项目。", + designConcept: + "以品牌介绍建立第一印象,通过菜单与服务说明帮助访客了解供给,再通过咨询表单承接具体需求。", + crafts: [ + "品牌介绍与餐品内容由后台维护", + "草稿预览与发布分离,确认后更新公开内容", + "咨询表单收集需求,支持后续人工跟进", + ], + materialsList: [ + { + name: "品牌展示", + spec: "首页、主理人介绍与信任内容", + }, + { + name: "餐品管理", + spec: "列表、详情与封面配置", + }, + { + name: "需求承接", + spec: "咨询表单与跟进记录", + }, + ], + }, + }, }, { kind: "service", name: "个人编辑型品牌", summary: "案例沉淀 + 专业表达 + 合作咨询", - categoryKey: "prototype", + categoryKey: "portfolio", coverUrl: "/assets/cases/editorial.jpg", + priceText: "按需求确认范围与报价", + config: { + spaceType: "个人品牌作品展示与合作咨询", + series: "试点架构原型", + keywords: ["模板演示", "可持续运营", "后台配置"], + details: { + background: + "个人品牌需要将定位、代表作品与合作方式组织成清晰的了解路径。本案例展示编辑型模板的结构,不构成客户合作背书。", + designConcept: + "围绕专业表达与作品沉淀组织页面,让访客先了解品牌与工作方式,再浏览案例细节并提出合作需求。", + crafts: [ + "个人定位、作品与流程可持续更新", + "案例详情展示背景、构建思路与交付要点", + "通过咨询入口衔接后续需求沟通", + ], + materialsList: [ + { + name: "专业表达", + spec: "定位、简介与品牌理念", + }, + { + name: "作品沉淀", + spec: "案例列表、详情与图片", + }, + { + name: "合作沟通", + spec: "合作说明、咨询表单与跟进记录", + }, + ], + }, + }, }, ], trustContent: [ @@ -4784,4 +4846,4 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[ }, ]; export const generatedTemplatePackageRegistryHash = - "4bfc51847279cd3095eb98b7a946c77805ae99a4b0487875321976b42f4fd725"; + "6adc3c65f086733a419417b1dd2c5b9241a22aa90bd178e0b5f8144c3737595f"; diff --git a/packages/config/src/template-sample-content.ts b/packages/config/src/template-sample-content.ts index e3a284a..6c1ad7e 100644 --- a/packages/config/src/template-sample-content.ts +++ b/packages/config/src/template-sample-content.ts @@ -10,6 +10,8 @@ export interface TemplateSampleContent { kind: "service" | "product" | "package" | "subscription"; name: string; coverUrl?: string; + priceText?: string; + config?: Record; summary: string; categoryKey: string; }>; diff --git a/packages/config/src/visual-manifests.ts b/packages/config/src/visual-manifests.ts index 6fbbc2f..2beff5c 100644 --- a/packages/config/src/visual-manifests.ts +++ b/packages/config/src/visual-manifests.ts @@ -1,5 +1,7 @@ import type { VisualTemplateKey } from "./template-keys.js"; import type { VisualTemplateDefinition, VisualTemplateManifest } from "./brand-contracts.js"; +import { getTemplatePackageManifestForVisualKey } from "./template-packages.js"; +import { getVisualTemplate } from "./visual-templates.js"; const linjingEditorialManifest: VisualTemplateManifest = { schemaVersion: "1.0", @@ -268,7 +270,124 @@ export const visualTemplateManifests: Record manifest.entrypoints[page.key]) + .map((page) => ({ + ...page, + renderer: manifest.renderers?.[page.key] ?? manifest.entrypoints[page.key] ?? page.key, + })), + assets: manifest.assetSlots.map((slot) => ({ + key: slot.key, + label: slot.label, + required: slot.required, + kind: + slot.kind === "icon" || slot.kind === "logo" || slot.kind === "texture" + ? slot.kind + : "image", + ...(slot.aspectRatio ? { aspectRatio: slot.aspectRatio } : {}), + })), + dataSlots: manifest.dataSlots.map((slot) => { + const source = slot.source; + if ( + source !== "brand" && + source !== "trust" && + source !== "offering" && + source !== "inquiry" && + source !== "records" && + source !== "profile" + ) + throw new Error(`Unsupported template data source: ${source}`); + return { ...slot, source }; + }), + capabilities: [...manifest.requiredCapabilities], + }; } export function isVisualTemplateCompatible( diff --git a/packages/template-atelier-solopreneur/README.md b/packages/template-atelier-solopreneur/README.md index d156f2c..3f90e8e 100644 --- a/packages/template-atelier-solopreneur/README.md +++ b/packages/template-atelier-solopreneur/README.md @@ -4,6 +4,16 @@ ## 内容与使用 +本模板适配独立的 `personal` 品牌,不会出现在 `food` 或 `doors` 品牌的视觉选项中。已有的阿成、林境品牌保持原行业。首次使用可显式创建宣传品牌并授权指定管理员: + +```sh +pnpm --filter @personal-brand/config build +pnpm --filter @personal-brand/api build +pnpm --filter @personal-brand/api exec node --env-file=.env scripts/create-atelier-brand.mjs admin +``` + +脚本可重复执行,不覆盖已有品牌,不导入样例或发布。刷新后台,在顶部品牌列表选择「独立工坊 · 品牌小程序」,再在「配置与发布」中显式导入示例内容。 + - 首页:价值定位、差异化卡片、试点案例、目标客户和咨询入口。 - 服务:交付体系、协作流程、信任基础与合作边界。 - 咨询:主理人、微信复制、FAQ 和咨询记录。 diff --git a/packages/template-atelier-solopreneur/taro/index.tsx b/packages/template-atelier-solopreneur/taro/index.tsx index bcda845..23f5e83 100644 --- a/packages/template-atelier-solopreneur/taro/index.tsx +++ b/packages/template-atelier-solopreneur/taro/index.tsx @@ -292,19 +292,35 @@ function Detail({ workspace, id }: Props & { id?: string }) { data-editor-target="atelier-solopreneur.detail.projectDetail" data-editor-record-id={item.id} > - - - {p.priceLabel}: - {item.priceRange} + + + + {p.priceLabel} + + {item.priceRange} + + + + {p.spaceLabel} + + {text(item.presentation.spaceType)} + + + {[item.category, item.area, item.series].filter(Boolean).map((value, index) => ( + + {value} + + ))} + + + {item.keywords.join(" · ")} - - {p.spaceLabel}: - {text(item.presentation.spaceType)} - - - {item.category} {item.area} {item.series} - - {item.keywords.join(" · ")} diff --git a/packages/template-atelier-solopreneur/taro/style.css b/packages/template-atelier-solopreneur/taro/style.css index 86a7340..1a83b1b 100644 --- a/packages/template-atelier-solopreneur/taro/style.css +++ b/packages/template-atelier-solopreneur/taro/style.css @@ -366,6 +366,37 @@ .atelier-detail-action { margin-top: 50px; } +.atelier-detail-facts { + margin-top: 28px; +} +.atelier-detail-row { + display: flex; + align-items: flex-start; + gap: 24px; +} +.atelier-detail-row + .atelier-detail-row { + margin-top: 20px; +} +.atelier-detail-label { + flex: 0 0 112px; + color: #777b73; +} +.atelier-detail-value { + flex: 1; + min-width: 0; + overflow-wrap: anywhere; +} +.atelier-detail-meta { + display: flex; + flex-wrap: wrap; + gap: 12px; + margin-top: 28px; + padding-top: 24px; + border-top: 1px solid #eeece6; +} +.atelier-detail-keywords { + margin-top: 16px; +} .atelier-detail-action .atelier-caption { text-align: center; margin-top: 16px; diff --git a/packages/template-atelier-solopreneur/template.json b/packages/template-atelier-solopreneur/template.json index d42e955..204a480 100644 --- a/packages/template-atelier-solopreneur/template.json +++ b/packages/template-atelier-solopreneur/template.json @@ -1363,15 +1363,73 @@ "kind": "service", "name": "校园餐饮品牌", "summary": "敏捷菜单 + 品牌展示 + 咨询承接", - "categoryKey": "prototype", - "coverUrl": "/assets/cases/campus.jpg" + "categoryKey": "portfolio", + "coverUrl": "/assets/cases/campus.jpg", + "priceText": "按需求确认范围与报价", + "config": { + "spaceType": "餐饮品牌展示与咨询承接", + "series": "试点架构原型", + "keywords": ["模板演示", "可持续运营", "后台配置"], + "details": { + "background": "校园餐饮品牌需要让访客快速了解餐品、营业安排与预订方式。本案例是用于验证系统结构的试点模板,不代表真实客户项目。", + "designConcept": "以品牌介绍建立第一印象,通过菜单与服务说明帮助访客了解供给,再通过咨询表单承接具体需求。", + "crafts": [ + "品牌介绍与餐品内容由后台维护", + "草稿预览与发布分离,确认后更新公开内容", + "咨询表单收集需求,支持后续人工跟进" + ], + "materialsList": [ + { + "name": "品牌展示", + "spec": "首页、主理人介绍与信任内容" + }, + { + "name": "餐品管理", + "spec": "列表、详情与封面配置" + }, + { + "name": "需求承接", + "spec": "咨询表单与跟进记录" + } + ] + } + } }, { "kind": "service", "name": "个人编辑型品牌", "summary": "案例沉淀 + 专业表达 + 合作咨询", - "categoryKey": "prototype", - "coverUrl": "/assets/cases/editorial.jpg" + "categoryKey": "portfolio", + "coverUrl": "/assets/cases/editorial.jpg", + "priceText": "按需求确认范围与报价", + "config": { + "spaceType": "个人品牌作品展示与合作咨询", + "series": "试点架构原型", + "keywords": ["模板演示", "可持续运营", "后台配置"], + "details": { + "background": "个人品牌需要将定位、代表作品与合作方式组织成清晰的了解路径。本案例展示编辑型模板的结构,不构成客户合作背书。", + "designConcept": "围绕专业表达与作品沉淀组织页面,让访客先了解品牌与工作方式,再浏览案例细节并提出合作需求。", + "crafts": [ + "个人定位、作品与流程可持续更新", + "案例详情展示背景、构建思路与交付要点", + "通过咨询入口衔接后续需求沟通" + ], + "materialsList": [ + { + "name": "专业表达", + "spec": "定位、简介与品牌理念" + }, + { + "name": "作品沉淀", + "spec": "案例列表、详情与图片" + }, + { + "name": "合作沟通", + "spec": "合作说明、咨询表单与跟进记录" + } + ] + } + } } ], "trustContent": [