diff --git a/.codex-tasks/template-audit-execution/raw/manual-review.json b/.codex-tasks/template-audit-execution/raw/manual-review.json index d3b2518..a3d5edf 100644 --- a/.codex-tasks/template-audit-execution/raw/manual-review.json +++ b/.codex-tasks/template-audit-execution/raw/manual-review.json @@ -2748,6 +2748,281 @@ "packages/template-linjing-editorial/template.json", "apps/api/test/http.integration.test.js" ] + }, + { + "template": "atelier-solopreneur", + "code": "CONDITIONAL_RENDER_REVIEW", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "line": 16, + "message": "条件显示需验证全部分支与空数据入口。", + "reviewStatus": "source-reviewed", + "decision": "咨询按钮状态来自共享 inquiryPluginState;启用可进入真实表单,禁用显示能力配置提示且禁止点击。源码已检查,禁用能力的完整浏览器分支未做,不等同全交互完成。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "UNRESOLVED_RENDER_VALUE", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "target": "atelier.home.features", + "page": "home", + "expression": "String(index + 1).padStart", + "line": 49, + "message": "需要核对循环项或间接映射,不能视为已覆盖。", + "reviewStatus": "source-reviewed", + "decision": "序号由列表索引加一生成,仅为只读排列编号;列表展示业务字段均由对应 list 的 itemFields 声明,增删后重新编号。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "CONDITIONAL_RENDER_REVIEW", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "target": "atelier.home.case", + "line": 73, + "message": "条件显示需验证全部分支与空数据入口。", + "reviewStatus": "source-reviewed", + "decision": "案例封面存在时渲染真实图片,否则使用无外链装饰占位或省略详情图片;封面字段仍可编辑,案例名称和摘要始终显示。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "UNRESOLVED_RENDER_VALUE", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "target": "atelier.offerings.deliverables", + "page": "offerings", + "expression": "String(index + 1).padStart", + "line": 128, + "message": "需要核对循环项或间接映射,不能视为已覆盖。", + "reviewStatus": "source-reviewed", + "decision": "序号由列表索引加一生成,仅为只读排列编号;列表展示业务字段均由对应 list 的 itemFields 声明,增删后重新编号。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "DYNAMIC_TARGET_REVIEW", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "line": 170, + "message": "动态目标需用真实 manifest 和实际记录验证分支。", + "reviewStatus": "source-reviewed", + "decision": "服务页信任项采用 trust:${item.type} 与真实 item.id;manifest 只声明 offerings 页 credential,标题/摘要/正文由 TrustContent 编辑。未创建记录时由后台信任内容入口配置。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "UNSCOPED_RENDER_VALUE", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "binding": "trust.title", + "line": 176, + "message": "展示变量没有可证明的编辑区域。", + "reviewStatus": "source-reviewed", + "decision": "该字段属于服务页动态 trust:${item.type},保留 data-editor-record-id;对应 credential 声明提供 title/summary/content 全部标准字段。动态目标静态分析不能证明作用域,源码逐项核对。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "UNSCOPED_RENDER_VALUE", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "binding": "trust.summary", + "line": 177, + "message": "展示变量没有可证明的编辑区域。", + "reviewStatus": "source-reviewed", + "decision": "该字段属于服务页动态 trust:${item.type},保留 data-editor-record-id;对应 credential 声明提供 title/summary/content 全部标准字段。动态目标静态分析不能证明作用域,源码逐项核对。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "UNSCOPED_RENDER_VALUE", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "binding": "trust.content", + "line": 178, + "message": "展示变量没有可证明的编辑区域。", + "reviewStatus": "source-reviewed", + "decision": "该字段属于服务页动态 trust:${item.type},保留 data-editor-record-id;对应 credential 声明提供 title/summary/content 全部标准字段。动态目标静态分析不能证明作用域,源码逐项核对。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "CONDITIONAL_RENDER_REVIEW", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "target": "atelier.profile.identity", + "line": 211, + "message": "条件显示需验证全部分支与空数据入口。", + "reviewStatus": "source-reviewed", + "decision": "头像仅在 avatarUrl 非空时展示,空值不渲染 Image;字段仍在 manifest 和侧栏可编辑,其他身份字段不受影响。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "UNRESOLVED_RENDER_VALUE", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "target": "atelier.profile.faqs", + "page": "profile", + "expression": "String(index + 1).padStart", + "line": 252, + "message": "需要核对循环项或间接映射,不能视为已覆盖。", + "reviewStatus": "source-reviewed", + "decision": "序号由列表索引加一生成,仅为只读排列编号;列表展示业务字段均由对应 list 的 itemFields 声明,增删后重新编号。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "CONDITIONAL_RENDER_REVIEW", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "target": "atelier.profile.faqs", + "line": 254, + "message": "条件显示需验证全部分支与空数据入口。", + "reviewStatus": "source-reviewed", + "decision": "FAQ 展开状态为只读交互状态,业务问题与答案均在 faqs 列表的 title/description 声明;H5 实际点击验证展开。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "CONDITIONAL_RENDER_REVIEW", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "target": "atelier.profile.faqs", + "line": 256, + "message": "条件显示需验证全部分支与空数据入口。", + "reviewStatus": "source-reviewed", + "decision": "FAQ 展开状态为只读交互状态,业务问题与答案均在 faqs 列表的 title/description 声明;H5 实际点击验证展开。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "CONDITIONAL_RENDER_REVIEW", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "target": "atelier-solopreneur.detail.projectDetail", + "line": 285, + "message": "条件显示需验证全部分支与空数据入口。", + "reviewStatus": "source-reviewed", + "decision": "案例封面存在时渲染真实图片,否则使用无外链装饰占位或省略详情图片;封面字段仍可编辑,案例名称和摘要始终显示。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "DYNAMIC_TARGET_REVIEW", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "line": 392, + "message": "动态目标需用真实 manifest 和实际记录验证分支。", + "reviewStatus": "source-reviewed", + "decision": "formTargets 为固定映射,模板只对 inquiry 注入 chips 和隐私区,其余共享页面保持原 children;没有动态业务 binding。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "TARGET_RENDER_UNVERIFIED", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "page": "success", + "target": "atelier.success.copy", + "message": "未找到字面量区域,需验证动态目标或组件路径。", + "reviewStatus": "source-reviewed", + "decision": "formTargets 将 inquiry/success/records 明确映射到真实 manifest 目标;共享 Inquiry/Success/Records 消费同页 visualPresentation,表单字段另由 inquiry-field 目标编辑。API 真实保存发布通过,H5 表单校验通过;成功页与记录页完整浏览器操作尚待补充。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] + }, + { + "template": "atelier-solopreneur", + "code": "TARGET_RENDER_UNVERIFIED", + "severity": "review", + "file": "packages/template-atelier-solopreneur/taro/index.tsx", + "page": "records", + "target": "atelier.records.copy", + "message": "未找到字面量区域,需验证动态目标或组件路径。", + "reviewStatus": "source-reviewed", + "decision": "formTargets 将 inquiry/success/records 明确映射到真实 manifest 目标;共享 Inquiry/Success/Records 消费同页 visualPresentation,表单字段另由 inquiry-field 目标编辑。API 真实保存发布通过,H5 表单校验通过;成功页与记录页完整浏览器操作尚待补充。", + "evidence": [ + "packages/template-atelier-solopreneur/template.json", + "packages/template-atelier-solopreneur/taro/index.tsx", + "apps/api/test/http.integration.test.js", + "docs/atelier-template-acceptance.md" + ] } ] } diff --git a/apps/admin/src/features/publication/PublicationPage.tsx b/apps/admin/src/features/publication/PublicationPage.tsx index e57128a..1cb17f4 100644 --- a/apps/admin/src/features/publication/PublicationPage.tsx +++ b/apps/admin/src/features/publication/PublicationPage.tsx @@ -350,7 +350,7 @@ export function PublicationPage({ canManageTemplate }: { canManageTemplate: bool {Object.entries(sample.data.counts) .map(([key, count]) => `${key} ${count} 项`) .join("、")} - ;发布前请替换示例文案和图片。 + ;同时补齐当前模板缺失的页面初始配置,保留已有配置和已启用表单。发布前请替换示例文案和图片。

)} 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 f9e844b..511af59 100644 --- a/apps/api/src/modules/workspace/admin-sample-content.service.ts +++ b/apps/api/src/modules/workspace/admin-sample-content.service.ts @@ -1,6 +1,6 @@ import { BadRequestException, Injectable } from "@nestjs/common"; import { Prisma } from "@prisma/client"; -import { getTemplateSampleContent } from "@personal-brand/config"; +import { getTemplateSampleContent, getDefaultVisualTemplateKey } from "@personal-brand/config"; import { validateFieldSnapshot } from "@personal-brand/validation"; import { PrismaService } from "../../prisma.service.js"; import { TemplateWorkspaceService } from "../../template-workspace.service.js"; @@ -14,7 +14,20 @@ export class AdminSampleContentService { async preview(brandId: string) { const templateKey = await this.templateWorkspace.getEffectiveTemplateKey(brandId); - const sample = getTemplateSampleContent(templateKey); + const brand = await this.prisma.brandProfile.findUnique({ + where: { id: brandId }, + select: { config: true }, + }); + const config = + brand?.config && typeof brand.config === "object" && !Array.isArray(brand.config) + ? (brand.config as Record) + : {}; + const sample = getTemplateSampleContent( + templateKey, + typeof config.visualTemplateKey === "string" + ? config.visualTemplateKey + : getDefaultVisualTemplateKey(templateKey), + ); if (!sample) throw new BadRequestException("模板示例内容不存在"); const [offerings, trustContent, fields, enabledForms] = await Promise.all([ this.prisma.offering.count({ where: { brandId } }), @@ -37,7 +50,20 @@ export class AdminSampleContentService { async import(brandId: string, actorId: string) { const templateKey = await this.templateWorkspace.getEffectiveTemplateKey(brandId); - const sample = getTemplateSampleContent(templateKey); + const brand = await this.prisma.brandProfile.findUnique({ + where: { id: brandId }, + select: { config: true }, + }); + const config = + brand?.config && typeof brand.config === "object" && !Array.isArray(brand.config) + ? (brand.config as Record) + : {}; + const sample = getTemplateSampleContent( + templateKey, + typeof config.visualTemplateKey === "string" + ? config.visualTemplateKey + : getDefaultVisualTemplateKey(templateKey), + ); if (!sample) throw new BadRequestException("模板示例内容不存在"); if (validateFieldSnapshot(sample.fields).length) throw new BadRequestException("模板咨询表单示例字段无效"); @@ -49,12 +75,42 @@ export class AdminSampleContentService { }); if (existing || existingOffering) throw new BadRequestException("示例内容已经导入"); const result = await this.prisma.$transaction(async (tx) => { + if (sample.brandConfig) { + // 仅显式导入时补齐缺失配置,已有品牌内容(包括空值)始终优先。 + const merge = ( + defaults: Record, + saved: Record, + ): Record => + Object.fromEntries( + [...new Set([...Object.keys(defaults), ...Object.keys(saved)])].map((key) => { + const a = defaults[key]; + const b = saved[key]; + if (!Object.prototype.hasOwnProperty.call(saved, key)) return [key, a]; + return [ + key, + a && + b && + typeof a === "object" && + typeof b === "object" && + !Array.isArray(a) && + !Array.isArray(b) + ? merge(a as Record, b as Record) + : b, + ]; + }), + ); + await tx.brandProfile.update({ + where: { id: brandId }, + data: { config: merge(sample.brandConfig, config) as Prisma.InputJsonValue }, + }); + } const offerings = await tx.offering.createMany({ data: sample.offerings.map((item, sortOrder) => ({ brandId, kind: item.kind, name: item.name, summary: item.summary, + ...(item.coverUrl ? { coverUrl: item.coverUrl } : {}), config: { categoryKey: item.categoryKey }, sortOrder, isEnabled: true, diff --git a/apps/api/test/http.integration.test.js b/apps/api/test/http.integration.test.js index c9e6df3..3c4d62b 100644 --- a/apps/api/test/http.integration.test.js +++ b/apps/api/test/http.integration.test.js @@ -3455,3 +3455,272 @@ test("admin can advance booking status but cannot skip the state machine", async }); assert.equal(skipped.statusCode, 400); }); + +test("atelier template imports selected package and preserves draft publication isolation", async () => { + const slug = "atelier-acceptance-" + randomUUID(); + const user = await prisma.adminUser.findUniqueOrThrow({ where: { username: "admin" } }); + const originalOther = await prisma.brandProfile.findUniqueOrThrow({ where: { id: brandId } }); + const brand = await prisma.brandProfile.create({ + data: { + slug, + name: "品牌小程序工坊", + templateKey: "personal", + tagline: "独立开发者 · 品牌小程序构建", + description: "专注个人品牌表达、内容管理与咨询承接。", + config: { + visualTemplateKey: "atelier-solopreneur", + founder: "验收主理人", + title: "产品设计 / 全栈开发", + visualPresentation: { home: { subtitle: "保留已有品牌说明" } }, + }, + }, + }); + const headers = { + authorization: `Bearer ${signIdentity({ subject: user.id, brandId: brand.id, role: "admin" })}`, + }; + await prisma.brandMembership.create({ + data: { brandId: brand.id, adminUserId: user.id, role: "owner" }, + }); + const json = async (url, options = {}) => { + const response = await request(url, options); + assert.ok(response.statusCode < 300, response.body); + return JSON.parse(response.body); + }; + try { + for (const path of ["preview", "import"]) { + const method = path === "import" ? "POST" : "GET"; + const url = "/admin/workspace/sample-content/" + path; + assert.equal((await request(url, { method })).statusCode, 401); + assert.equal( + (await request(url, { method, headers: { authorization: "Bearer invalid" } })).statusCode, + 401, + ); + assert.equal( + (await request(url, { method, headers: { authorization: `Bearer ${customerToken}` } })) + .statusCode, + 403, + ); + } + 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 }); + const imported = await json("/admin/config/brand", { headers }); + assert.equal(imported.config.visualPresentation.home.subtitle, "保留已有品牌说明"); + assert.equal(imported.config.atelier.deliverables.length, 7); + const form = await prisma.inquiryForm.findFirstOrThrow({ where: { brandId: brand.id } }); + assert.equal(form.name, "品牌小程序需求意向单"); + assert.deepEqual( + form.fieldsSnapshot.map((field) => field.key), + ["name", "industry", "needs", "timeline", "contact"], + ); + assert.equal( + (await request("/admin/workspace/sample-content/import", { method: "POST", headers })) + .statusCode, + 400, + ); + const manifest = (await json("/admin/workspace", { headers })).templateContent; + const exampleOffering = await prisma.offering.findFirstOrThrow({ + where: { brandId: brand.id }, + }); + assert.match(exampleOffering.coverUrl, /^\/assets\/cases\//); + const offeringFields = [ + ...new Map( + manifest.admin.sections + .flatMap((section) => section.fields) + .filter((field) => field.binding.startsWith("offering.")) + .map((field) => [field.binding, field]), + ).values(), + ]; + const offeringPatch = { config: structuredClone(exampleOffering.config) }; + for (const field of offeringFields) { + const token = "atelier-offering-" + field.key; + const value = + field.input === "list" + ? [ + field.itemValueKey + ? token + : Object.fromEntries( + field.itemFields.map((child) => [child.key, token + "-" + child.key]), + ), + ] + : field.input === "image" + ? "https://example.com/atelier-case.jpg" + : field.input === "select" + ? field.options[0].value + : token; + const path = field.binding.split(".").slice(1); + const last = path.pop(); + const parent = path.reduce((current, key) => (current[key] ??= {}), offeringPatch); + parent[last] = value; + } + await json("/admin/workspace/offerings/" + exampleOffering.id, { + method: "PATCH", + headers, + payload: offeringPatch, + }); + const storedOffering = await prisma.offering.findUniqueOrThrow({ + where: { id: exampleOffering.id }, + }); + const draftOffering = (await json("/admin/workspace/preview", { headers })).offerings.find( + (item) => item.id === exampleOffering.id, + ); + const { runtimeContractForBinding } = await import("@personal-brand/types"); + for (const field of offeringFields) { + const path = field.binding.split(".").slice(1); + const read = (value, path) => path.reduce((current, key) => current?.[key], value); + assert.deepEqual( + read(storedOffering, path), + read(offeringPatch, path), + field.binding + " offering persistence", + ); + const runtimePath = + field.binding === "offering.config.detailHero" + ? ["presentation", "heroImage"] + : runtimeContractForBinding(field.binding) + .runtimePath.replace("workspace.offerings[].", "") + .split("."); + assert.deepEqual( + read(draftOffering, runtimePath), + read(offeringPatch, path), + field.binding + " offering projection", + ); + } + await prisma.offering.update({ + where: { id: exampleOffering.id }, + data: { + name: exampleOffering.name, + summary: exampleOffering.summary, + coverUrl: exampleOffering.coverUrl, + priceText: exampleOffering.priceText, + config: exampleOffering.config, + }, + }); + const defaults = structuredClone(imported.config); + const patch = { config: structuredClone(defaults) }; + delete patch.config.visualTemplateKey; + const read = (value, path) => path.reduce((current, key) => current?.[key], value); + const write = (value, path, replacement) => { + const last = path.pop(); + const parent = path.reduce((current, key) => (current[key] ??= {}), value); + parent[last] = replacement; + }; + const fields = [ + ...new Map( + manifest.admin.sections + .flatMap((section) => section.fields) + .filter((field) => field.binding.startsWith("brand.")) + .map((field) => [field.binding, field]), + ).values(), + ]; + for (const field of fields) { + const token = "验收-" + field.key; + const value = + field.input === "list" + ? [ + Object.fromEntries( + field.itemFields.map((child) => [child.key, token + "-" + child.key]), + ), + ] + : field.input === "image" + ? "https://example.com/atelier-avatar.jpg" + : token; + write(patch, field.binding.split(".").slice(1), value); + } + await json("/admin/config/brand", { method: "PATCH", headers, payload: patch }); + const saved = await json("/admin/config/brand", { headers }); + const draft = await json("/admin/workspace/preview", { headers }); + for (const field of fields) { + const path = field.binding.split(".").slice(1); + assert.deepEqual(read(saved, path), read(patch, path), field.binding + " persistence"); + assert.deepEqual( + read(draft.brand, path[0] === "config" ? path.slice(1) : path), + read(patch, path), + field.binding + " preview", + ); + } + assert.equal((await json("/public/workspace?brandSlug=" + slug)).brand, null); + // 恢复设计基线用于视觉回归,再验证发布后的草稿隔离。 + await json("/admin/config/brand", { + method: "PATCH", + headers, + payload: { config: defaults, avatarUrl: null, contactWechat: null }, + }); + await prisma.trustContent.updateMany({ + where: { brandId: brand.id }, + data: { isPublished: true }, + }); + await json("/admin/releases/publish", { + method: "POST", + headers, + payload: { note: "宣传模板独立品牌验收" }, + }); + const published = await json("/public/workspace?brandSlug=" + slug); + assert.equal(published.brand.visualPresentation.home.subtitle, "保留已有品牌说明"); + const next = structuredClone(defaults); + next.visualPresentation.home.title = "仅草稿可见的新标题"; + await json("/admin/config/brand", { method: "PATCH", headers, payload: { config: next } }); + assert.equal( + (await json("/admin/workspace/preview", { headers })).brand.visualPresentation.home.title, + "仅草稿可见的新标题", + ); + assert.equal( + (await json("/public/workspace?brandSlug=" + slug)).brand.visualPresentation.home.title, + defaults.visualPresentation.home.title, + ); + await json("/admin/releases/publish", { + method: "POST", + headers, + payload: { note: "发布新标题" }, + }); + assert.equal( + (await json("/public/workspace?brandSlug=" + slug)).brand.visualPresentation.home.title, + "仅草稿可见的新标题", + ); + const customerHeaders = { + authorization: `Bearer ${signIdentity({ subject: "atelier-test-customer", brandId: brand.id, role: "customer" })}`, + }; + assert.equal( + ( + await request("/customer/inquiry-submissions", { + method: "POST", + headers: customerHeaders, + payload: { formId: form.id, values: {} }, + }) + ).statusCode, + 400, + ); + const submitted = await json("/customer/inquiry-submissions", { + method: "POST", + headers: customerHeaders, + payload: { + formId: form.id, + values: { + name: "验收品牌", + industry: "独立设计 / 建筑", + needs: "展示作品与承接合作", + timeline: "先期评估", + contact: "acceptance_wechat", + }, + }, + }); + assert.ok(submitted.id); + assert.equal( + (await prisma.inquirySubmission.findUniqueOrThrow({ where: { id: submitted.id } })).brandId, + brand.id, + ); + assert.deepEqual( + (await prisma.brandProfile.findUniqueOrThrow({ where: { id: brandId } })).config, + originalOther.config, + ); + if (process.env.ATELIER_ACCEPTANCE_OUTPUT) { + const { mkdir, writeFile } = await import("node:fs/promises"); + await mkdir(process.env.ATELIER_ACCEPTANCE_OUTPUT, { recursive: true }); + await writeFile( + process.env.ATELIER_ACCEPTANCE_OUTPUT + "/published-runtime.json", + JSON.stringify(published, null, 2), + ); + } + } finally { + await prisma.brandProfile.delete({ where: { id: brand.id } }); + } +}); diff --git a/apps/taro/config/index.ts b/apps/taro/config/index.ts index e9db9d3..a269bdf 100644 --- a/apps/taro/config/index.ts +++ b/apps/taro/config/index.ts @@ -17,13 +17,16 @@ const templates = fs const key = process.env.TEMPLATE_KEY || templates[0]; if (!key) throw new Error("No Taro template package found"); if (!templates.includes(key)) throw new Error(`Unsupported Taro template: ${key}`); -process.env.TARO_APP_ID ||= process.env.WEAPP_APP_ID; +process.env.TARO_APP_ID ||= process.env.WEAPP_APP_ID || "touristappid"; const template = path.join(root, "packages", `template-${key}`); const manifest = JSON.parse(fs.readFileSync(path.join(template, "template.json"), "utf8")) as { packageKey: string; defaultBrandSlug?: string; }; if (manifest.packageKey !== key) throw new Error(`Template key mismatch: ${key}`); +const templateApp = JSON.parse( + fs.readFileSync(path.join(template, "miniapp/app.json"), "utf8"), +) as { tabBar?: { color?: string; selectedColor?: string; backgroundColor?: string } }; const brand = process.env.BRAND_SLUG || manifest.defaultBrandSlug || "default-brand"; fs.cpSync(path.join(template, "miniapp/assets"), path.resolve(__dirname, "../src/assets"), { recursive: true, @@ -46,6 +49,7 @@ export default defineConfig({ : path.join(template, "taro"), }, defineConstants: { + TEMPLATE_TAB_STYLE: JSON.stringify(templateApp.tabBar || {}), TEMPLATE_KEY: JSON.stringify(key), BRAND_SLUG: JSON.stringify(brand), API_BASE_URL: JSON.stringify(process.env.API_BASE_URL || "http://localhost:3001"), diff --git a/apps/taro/src/app.config.ts b/apps/taro/src/app.config.ts index f1eecd6..66d7bae 100644 --- a/apps/taro/src/app.config.ts +++ b/apps/taro/src/app.config.ts @@ -24,9 +24,9 @@ export default defineAppConfig({ ...(!PREVIEW_ALL_TEMPLATES ? { tabBar: { - color: "#8b8178", - selectedColor: "#3b2118", - backgroundColor: "#ffffff", + color: TEMPLATE_TAB_STYLE.color || "#8b8178", + selectedColor: TEMPLATE_TAB_STYLE.selectedColor || "#3b2118", + backgroundColor: TEMPLATE_TAB_STYLE.backgroundColor || "#ffffff", list: TEMPLATE_MANIFEST.navigation.map((tab) => ({ pagePath: routes[tab.page], text: tab.label, diff --git a/apps/taro/src/components/Inquiry.tsx b/apps/taro/src/components/Inquiry.tsx index f36334a..361796a 100644 --- a/apps/taro/src/components/Inquiry.tsx +++ b/apps/taro/src/components/Inquiry.tsx @@ -21,9 +21,13 @@ import "./forms.css"; export function Inquiry({ workspace, preview = false, + choiceStyle = "picker", + beforeSubmit, }: { workspace: RuntimeWorkspace; preview?: boolean; + choiceStyle?: "chips" | "picker"; + beforeSubmit?: React.ReactNode; }) { const router = useRouter(); const [offeringId, setOfferingId] = useState(router.params.offeringId || ""); @@ -107,7 +111,8 @@ export function Inquiry({ const value = values[field.key]; const stringValue = typeof value === "string" ? value : ""; const chips = - compactForm && field.key === "type" && ["select", "radio"].includes(field.type); + (choiceStyle === "chips" || (compactForm && field.key === "type")) && + ["select", "radio"].includes(field.type); return ( + {beforeSubmit} {error && ( {error} diff --git a/apps/taro/src/env.d.ts b/apps/taro/src/env.d.ts index 71f4495..a168130 100644 --- a/apps/taro/src/env.d.ts +++ b/apps/taro/src/env.d.ts @@ -1,3 +1,8 @@ +declare const TEMPLATE_TAB_STYLE: { + color?: string; + selectedColor?: string; + backgroundColor?: string; +}; declare const TEMPLATE_KEY: string; declare const BRAND_SLUG: string; declare const API_BASE_URL: string; diff --git a/config/template-build.json b/config/template-build.json index 010cfe8..db9e09d 100644 --- a/config/template-build.json +++ b/config/template-build.json @@ -10,6 +10,11 @@ "packageKey": "linjing-editorial", "packageName": "@personal-brand/template-linjing-editorial", "version": "1.0.0" + }, + { + "packageKey": "atelier-solopreneur", + "packageName": "@personal-brand/template-atelier-solopreneur", + "version": "1.0.0" } ] } diff --git a/docs/adr/0028-template-selected-sample-import.md b/docs/adr/0028-template-selected-sample-import.md new file mode 100644 index 0000000..519c84e --- /dev/null +++ b/docs/adr/0028-template-selected-sample-import.md @@ -0,0 +1,21 @@ +# 0028 按当前视觉模板显式导入示例 + +## Context + +个人品牌行业现有林境画册与独立工坊两套视觉模板。仅按行业选择第一个示例包,会让独立工坊导入错误表单。宣传模板还需要可编辑的页面初始内容。 + +## Decision + +示例预览与导入根据当前品牌的行业与视觉模板选择包内 sampleContent。可选 brandConfig 仅在管理员显式导入时补齐缺失配置;已有值、空字符串、null 和列表优先保留。可选 offering.coverUrl 同时导入案例封面。内容保存为品牌草稿,沿用发布快照隔离。 + +## Alternatives + +不将宣传模板写入全局 seed,也不在 renderer 中维护无法由后台编辑的样例 fallback。保留未指定视觉模板时的历史行业查询行为,避免改变现有调用方。 + +## Consequences + +同一行业可拥有独立示例表单和内容。已有启用表单不会被覆盖。导入仍要求管理员权限和品牌隔离,重复导入继续拒绝。示例信任内容导入为未发布状态,需要管理员确认。 + +## Migration plan + +无数据库 schema 迁移。现有品牌、两套模板包和默认视觉选择保持原样;新品牌选择独立工坊后显式导入示例。API 集成测试使用隔离 schema 验证全字段保存重载、发布隔离、授权和咨询持久化。 diff --git a/docs/atelier-template-acceptance.md b/docs/atelier-template-acceptance.md new file mode 100644 index 0000000..b38f726 --- /dev/null +++ b/docs/atelier-template-acceptance.md @@ -0,0 +1,51 @@ +# 独立工坊宣传模板验收记录 + +日期:2026-10-15。模板:`atelier-solopreneur@1.0.0`。 + +## 已实现 + +- 独立模板包、真实 manifest、Taro 页面与原生模板入口,三项导航:首页、服务、咨询。 +- 首页、服务、咨询、案例详情、意向表单、成功页、咨询记录。 +- 暖白与森林绿视觉;文案、列表子字段、主理人、联系方式、案例和信任内容均有后台配置入口。 +- 包内示例显式导入,不新增全局 seed、不更改已有品牌与两套模板包。 +- 当前视觉模板决定示例来源;已有配置和启用表单保留;案例封面来自包内资源。 +- 咨询表单 chips 为共享 Inquiry 的可选样式,不改默认模板行为;校验失败保留输入,不伪造成功。 +- Taro TabBar 从模板 miniapp/app.json 读取配色;缺少 AppID 时使用开发用 touristappid。 + +## 自动验证通过 + +| 检查 | 结果与证据 | +| ---------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `pnpm template:doctor` | 三套模板 staticStatus=pass;新模板无 blocker、无未登记 review;completionStatus 仍为 unverified | +| `pnpm template:check` | 三套包契约、10 项编译器测试、三套原生 fixture 校验通过 | +| API integration | 50 项通过;上传相关另 2 项通过;隔离 schema 自动创建与清理 | +| 新模板真实持久化 | 测试读取真实 manifest,对所有独立品牌 binding 和案例 binding 注入独特值,检查数据库重载与 Runtime 投影 | +| 授权 | 示例预览 / 导入覆盖未登录、无效凭证、客户角色与管理员成功路径 | +| 导入 | 选中本包的 5 字段表单、7 项交付列表、包内封面;保留旧配置;重复导入拒绝 | +| 发布 | 未发布时公开为空;发布后可读;修改草稿不污染公开快照;再发布生效 | +| 咨询 | 缺必填项失败;真实提交成功落库;品牌隔离通过 | +| Taro | typecheck、lint、产物契约与运行时测试通过 | +| Admin | 生产构建通过;已接入自动发现的模板 renderer | +| 格式 | `pnpm format:check` 与 `git diff --check` 通过 | +| 开发构建 | H5 / weapp 构建及产物遮蔽通过;weapp AppID 为 touristappid | +| H5 视觉和交互 | 使用上述隔离数据库导出的已发布 Runtime,四个主要页面检查 375 / 390 / 430 宽度;无横向溢出;FAQ 展开、必填校验通过 | +| 区域命中 | 实际叶子内容点击命中:首页 9 个、服务 8 个、咨询 6 个声明区域;不是 Admin 全操作验收 | + +测试源:`apps/api/test/http.integration.test.js` 的 `atelier template imports selected package and preserves draft publication isolation`。 + +本地证据保存在 `.codex-tasks/atelier-template/raw/`:数据库导出的 Runtime、执行日志、模板诊断、浏览器脚本与截图。Runtime 为临时隔离测试品牌数据,不包含客户数据或令牌。截图中的“保留已有品牌说明”为测试保留旧内容的预期结果。 + +## 全量 lint 遗留阻塞 + +API 全量 lint 有 13 项既有错误,涉及 admin-membership.guard 的 any、控制器未使用导入和旧上传测试类型;Admin 全量 lint 有 7 项既有错误,涉及 Dashboard 的 any、编辑器与 PublicationPage 的未使用变量。此次没有扩大这些修改范围。跟进归属为平台维护者,合并前需清理;完整日志为 raw/atelier-api-lint.log 和 raw/atelier-admin-lint.log。本次新模板、Taro、修改的 API 服务和配置文件定向 lint 已通过。 + +## 未验证及限制 + +- 尚未在真实 Admin 登录会话中逐字段完成“点击、编辑、保存、重载、发布”的全操作回归。API 全字段持久化和 H5 区域命中是分别验证,不能等同完整 Admin 验收。 +- 成功页、记录页、详情页及所有空态 / 错误 / 能力禁用分支尚未完成全套浏览器截图验收。 +- H5 截图对照已覆盖主要页面结构;字体使用中文系统字体与衬线 fallback,不依赖 Google Fonts,图标与示例图片不是 Stitch 外链资源的逐像素复制。 +- 原生编译器 fixture 只证明入口和结构,尚无微信开发者工具或真机视觉证据。 +- 尚无正式 AppID / 生产 API 配置。合法域名、微信登录、剪贴板、字体缩放、底部安全区、提审与真机必须在正式配置后验证。 +- 未创建实际宣传品牌、未导入开发品牌数据、未上传或发布到微信。后续由管理员选择模板并显式导入样例。 + +因此当前状态是“模板代码与自动验证通过,可进入人工预览验收”,不宣称全部交互验收或正式上线完成。 diff --git a/packages/config/src/generated-template-packages.ts b/packages/config/src/generated-template-packages.ts index db2f343..0a6bcd4 100644 --- a/packages/config/src/generated-template-packages.ts +++ b/packages/config/src/generated-template-packages.ts @@ -1514,6 +1514,1726 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[ overrides: ["pages/inquiry", "pages/inquiry-success", "pages/offering", "pages/records"], visualTemplateKey: "acheng-campus-food", }, + { + packageKey: "atelier-solopreneur", + version: "1.0.0", + displayName: "独立工坊 · 品牌小程序", + defaultBrandSlug: "atelier-studio", + runtimeContract: "1.0", + supportedIndustryTemplates: ["personal"], + entrypoints: { + home: "pages/index/index", + offerings: "pages/services/index", + detail: "pages/offering/detail", + inquiry: "pages/inquiry/index", + success: "pages/inquiry-success/index", + records: "pages/records/index", + profile: "pages/bookings/index", + }, + navigation: [ + { + key: "home", + label: "首页", + page: "home", + iconPath: "assets/tab/home.png", + selectedIconPath: "assets/tab/home-selected.png", + }, + { + key: "offerings", + label: "服务", + page: "offerings", + iconPath: "assets/tab/works.png", + selectedIconPath: "assets/tab/works-selected.png", + }, + { + key: "profile", + label: "咨询", + page: "profile", + iconPath: "assets/tab/profile.png", + selectedIconPath: "assets/tab/profile-selected.png", + }, + ], + requiredCapabilities: ["offerings", "inquiry"], + dataSlots: [ + { + key: "brand.identity", + source: "brand", + required: true, + description: "品牌定位与联系渠道", + }, + { + key: "offerings.list", + source: "offering", + required: true, + description: "试点模板与服务案例", + }, + { + key: "inquiry.form", + source: "inquiry", + required: true, + description: "品牌需求意向表单", + }, + { + key: "records.items", + source: "records", + required: true, + description: "访客咨询跟进记录", + }, + ], + templateFields: [], + assetSlots: [ + { + key: "brand.portrait", + binding: "brand.avatarUrl", + target: "brand", + label: "主理人头像", + help: "请上传本人真实头像,留空时不展示。", + required: false, + kind: "portrait", + aspectRatio: "1:1", + }, + { + key: "offering.cover", + binding: "offering.coverUrl", + target: "offering", + label: "试点模板封面", + help: "用于说明案例或模板场景,可上传真实页面截图。", + required: false, + kind: "image", + aspectRatio: "4:3", + }, + ], + admin: { + sections: [ + { + key: "home_intro", + title: "首页价值定位", + description: "修改后保存为草稿,发布后对访客生效。", + page: "home", + target: "brand", + previewTargets: [ + { + key: "atelier.home.intro", + label: "首页价值定位", + }, + ], + fields: [ + { + key: "eyebrow", + binding: "brand.config.visualPresentation.home.eyebrow", + label: "定位标签", + input: "text", + previewTarget: "atelier.home.intro", + }, + { + key: "title", + binding: "brand.config.visualPresentation.home.title", + label: "首页标题", + input: "text", + previewTarget: "atelier.home.intro", + }, + { + key: "subtitle", + binding: "brand.config.visualPresentation.home.subtitle", + label: "价值说明", + input: "textarea", + previewTarget: "atelier.home.intro", + }, + { + key: "primaryAction", + binding: "brand.config.visualPresentation.home.primaryAction", + label: "咨询按钮", + input: "text", + previewTarget: "atelier.home.intro", + }, + { + key: "secondaryAction", + binding: "brand.config.visualPresentation.home.secondaryAction", + label: "服务按钮", + input: "text", + previewTarget: "atelier.home.intro", + }, + ], + }, + { + key: "home_featuresHeading", + title: "差异化标题", + description: "修改后保存为草稿,发布后对访客生效。", + page: "home", + target: "brand", + previewTargets: [ + { + key: "atelier.home.featuresHeading", + label: "差异化标题", + }, + ], + fields: [ + { + key: "featuresTitle", + binding: "brand.config.visualPresentation.home.featuresTitle", + label: "区块标题", + input: "text", + previewTarget: "atelier.home.featuresHeading", + }, + { + key: "featuresEnglish", + binding: "brand.config.visualPresentation.home.featuresEnglish", + label: "英文说明", + input: "text", + previewTarget: "atelier.home.featuresHeading", + }, + ], + }, + { + key: "home_casesHeading", + title: "试点模板标题", + description: "修改后保存为草稿,发布后对访客生效。", + page: "home", + target: "brand", + previewTargets: [ + { + key: "atelier.home.casesHeading", + label: "试点模板标题", + }, + ], + fields: [ + { + key: "casesTitle", + binding: "brand.config.visualPresentation.home.casesTitle", + label: "案例标题", + input: "text", + previewTarget: "atelier.home.casesHeading", + }, + { + key: "casesSubtitle", + binding: "brand.config.visualPresentation.home.casesSubtitle", + label: "案例说明", + input: "text", + previewTarget: "atelier.home.casesHeading", + }, + { + key: "caseAction", + binding: "brand.config.visualPresentation.home.caseAction", + label: "案例按钮", + input: "text", + previewTarget: "atelier.home.casesHeading", + }, + ], + }, + { + key: "home_audienceHeading", + title: "服务群体标题", + description: "修改后保存为草稿,发布后对访客生效。", + page: "home", + target: "brand", + previewTargets: [ + { + key: "atelier.home.audienceHeading", + label: "服务群体标题", + }, + ], + fields: [ + { + key: "audienceTitle", + binding: "brand.config.visualPresentation.home.audienceTitle", + label: "群体标题", + input: "text", + previewTarget: "atelier.home.audienceHeading", + }, + { + key: "audienceEnglish", + binding: "brand.config.visualPresentation.home.audienceEnglish", + label: "英文说明", + input: "text", + previewTarget: "atelier.home.audienceHeading", + }, + ], + }, + { + key: "home_cta", + title: "首页行动入口", + description: "修改后保存为草稿,发布后对访客生效。", + page: "home", + target: "brand", + previewTargets: [ + { + key: "atelier.home.cta", + label: "首页行动入口", + }, + ], + fields: [ + { + key: "ctaTitle", + binding: "brand.config.visualPresentation.home.ctaTitle", + label: "行动标题", + input: "text", + previewTarget: "atelier.home.cta", + }, + { + key: "ctaSubtitle", + binding: "brand.config.visualPresentation.home.ctaSubtitle", + label: "行动说明", + input: "text", + previewTarget: "atelier.home.cta", + }, + { + key: "ctaAction", + binding: "brand.config.visualPresentation.home.ctaAction", + label: "行动按钮", + input: "text", + previewTarget: "atelier.home.cta", + }, + ], + }, + { + key: "offerings_intro", + title: "服务页介绍", + description: "修改后保存为草稿,发布后对访客生效。", + page: "offerings", + target: "brand", + previewTargets: [ + { + key: "atelier.offerings.intro", + label: "服务页介绍", + }, + ], + fields: [ + { + key: "eyebrow", + binding: "brand.config.visualPresentation.offerings.eyebrow", + label: "服务标签", + input: "text", + previewTarget: "atelier.offerings.intro", + }, + { + key: "title", + binding: "brand.config.visualPresentation.offerings.title", + label: "服务标题", + input: "text", + previewTarget: "atelier.offerings.intro", + }, + { + key: "subtitle", + binding: "brand.config.visualPresentation.offerings.subtitle", + label: "服务说明", + input: "text", + previewTarget: "atelier.offerings.intro", + }, + ], + }, + { + key: "offerings_deliverablesHeading", + title: "交付体系标题", + description: "修改后保存为草稿,发布后对访客生效。", + page: "offerings", + target: "brand", + previewTargets: [ + { + key: "atelier.offerings.deliverablesHeading", + label: "交付体系标题", + }, + ], + fields: [ + { + key: "deliverablesTitle", + binding: "brand.config.visualPresentation.offerings.deliverablesTitle", + label: "标题", + input: "text", + previewTarget: "atelier.offerings.deliverablesHeading", + }, + { + key: "deliverablesEnglish", + binding: "brand.config.visualPresentation.offerings.deliverablesEnglish", + label: "说明", + input: "text", + previewTarget: "atelier.offerings.deliverablesHeading", + }, + ], + }, + { + key: "offerings_processHeading", + title: "协作流程标题", + description: "修改后保存为草稿,发布后对访客生效。", + page: "offerings", + target: "brand", + previewTargets: [ + { + key: "atelier.offerings.processHeading", + label: "协作流程标题", + }, + ], + fields: [ + { + key: "processTitle", + binding: "brand.config.visualPresentation.offerings.processTitle", + label: "标题", + input: "text", + previewTarget: "atelier.offerings.processHeading", + }, + { + key: "processEnglish", + binding: "brand.config.visualPresentation.offerings.processEnglish", + label: "说明", + input: "text", + previewTarget: "atelier.offerings.processHeading", + }, + ], + }, + { + key: "offerings_proofHeading", + title: "信任基石标题", + description: "修改后保存为草稿,发布后对访客生效。", + page: "offerings", + target: "brand", + previewTargets: [ + { + key: "atelier.offerings.proofHeading", + label: "信任基石标题", + }, + ], + fields: [ + { + key: "proofTitle", + binding: "brand.config.visualPresentation.offerings.proofTitle", + label: "标题", + input: "text", + previewTarget: "atelier.offerings.proofHeading", + }, + { + key: "proofEnglish", + binding: "brand.config.visualPresentation.offerings.proofEnglish", + label: "说明", + input: "text", + previewTarget: "atelier.offerings.proofHeading", + }, + ], + }, + { + key: "offerings_cta", + title: "服务页行动入口", + description: "修改后保存为草稿,发布后对访客生效。", + page: "offerings", + target: "brand", + previewTargets: [ + { + key: "atelier.offerings.cta", + label: "服务页行动入口", + }, + ], + fields: [ + { + key: "ctaTitle", + binding: "brand.config.visualPresentation.offerings.ctaTitle", + label: "行动标题", + input: "text", + previewTarget: "atelier.offerings.cta", + }, + { + key: "ctaSubtitle", + binding: "brand.config.visualPresentation.offerings.ctaSubtitle", + label: "行动说明", + input: "text", + previewTarget: "atelier.offerings.cta", + }, + { + key: "ctaAction", + binding: "brand.config.visualPresentation.offerings.ctaAction", + label: "行动按钮", + input: "text", + previewTarget: "atelier.offerings.cta", + }, + ], + }, + { + key: "profile_intro", + title: "咨询页介绍", + description: "修改后保存为草稿,发布后对访客生效。", + page: "profile", + target: "brand", + previewTargets: [ + { + key: "atelier.profile.intro", + label: "咨询页介绍", + }, + ], + fields: [ + { + key: "eyebrow", + binding: "brand.config.visualPresentation.profile.eyebrow", + label: "排期说明", + input: "text", + previewTarget: "atelier.profile.intro", + }, + { + key: "title", + binding: "brand.config.visualPresentation.profile.title", + label: "咨询标题", + input: "text", + previewTarget: "atelier.profile.intro", + }, + { + key: "subtitle", + binding: "brand.config.visualPresentation.profile.subtitle", + label: "咨询说明", + input: "text", + previewTarget: "atelier.profile.intro", + }, + ], + }, + { + key: "profile_contact", + title: "联系与响应说明", + description: "修改后保存为草稿,发布后对访客生效。", + page: "profile", + target: "brand", + previewTargets: [ + { + key: "atelier.profile.contact", + label: "联系与响应说明", + }, + ], + fields: [ + { + key: "inquiryAction", + binding: "brand.config.visualPresentation.profile.inquiryAction", + label: "意向入口", + input: "text", + previewTarget: "atelier.profile.contact", + }, + { + key: "timeHint", + binding: "brand.config.visualPresentation.profile.timeHint", + label: "填写时间", + input: "text", + previewTarget: "atelier.profile.contact", + }, + { + key: "wechatLabel", + binding: "brand.config.visualPresentation.profile.wechatLabel", + label: "微信标签", + input: "text", + previewTarget: "atelier.profile.contact", + }, + { + key: "copyAction", + binding: "brand.config.visualPresentation.profile.copyAction", + label: "复制按钮", + input: "text", + previewTarget: "atelier.profile.contact", + }, + { + key: "contactHint", + binding: "brand.config.visualPresentation.profile.contactHint", + label: "联系提示", + input: "text", + previewTarget: "atelier.profile.contact", + }, + { + key: "promise", + binding: "brand.config.visualPresentation.profile.promise", + label: "合作说明", + input: "text", + previewTarget: "atelier.profile.contact", + }, + { + key: "recordsAction", + binding: "brand.config.visualPresentation.profile.recordsAction", + label: "记录入口", + input: "text", + previewTarget: "atelier.profile.contact", + }, + { + key: "contactWechat", + binding: "brand.contactWechat", + label: "微信号(与主理人介绍同步)", + input: "text", + previewTarget: "atelier.profile.contact", + }, + ], + }, + { + key: "profile_faqHeading", + title: "常见问题标题", + description: "修改后保存为草稿,发布后对访客生效。", + page: "profile", + target: "brand", + previewTargets: [ + { + key: "atelier.profile.faqHeading", + label: "常见问题标题", + }, + ], + fields: [ + { + key: "faqTitle", + binding: "brand.config.visualPresentation.profile.faqTitle", + label: "标题", + input: "text", + previewTarget: "atelier.profile.faqHeading", + }, + { + key: "faqSubtitle", + binding: "brand.config.visualPresentation.profile.faqSubtitle", + label: "说明", + input: "text", + previewTarget: "atelier.profile.faqHeading", + }, + ], + }, + { + key: "profile_footer", + title: "页尾寄语", + description: "修改后保存为草稿,发布后对访客生效。", + page: "profile", + target: "brand", + previewTargets: [ + { + key: "atelier.profile.footer", + label: "页尾寄语", + }, + ], + fields: [ + { + key: "footerQuote", + binding: "brand.config.visualPresentation.profile.footerQuote", + label: "英文寄语", + input: "textarea", + previewTarget: "atelier.profile.footer", + }, + { + key: "footerNote", + binding: "brand.config.visualPresentation.profile.footerNote", + label: "中文寄语", + input: "text", + previewTarget: "atelier.profile.footer", + }, + ], + }, + { + key: "profile_identity", + title: "主理人介绍", + description: "修改后保存为草稿,发布后对访客生效。", + page: "profile", + target: "brand", + previewTargets: [ + { + key: "atelier.profile.identity", + label: "主理人介绍", + }, + ], + fields: [ + { + key: "founder", + binding: "brand.config.founder", + label: "主理人姓名", + input: "text", + previewTarget: "atelier.profile.identity", + }, + { + key: "title", + binding: "brand.config.title", + label: "身份与专长", + input: "text", + previewTarget: "atelier.profile.identity", + }, + { + key: "avatarUrl", + binding: "brand.avatarUrl", + label: "主理人头像", + input: "image", + previewTarget: "atelier.profile.identity", + }, + { + key: "description", + binding: "brand.description", + label: "主理人介绍", + input: "textarea", + previewTarget: "atelier.profile.identity", + }, + { + key: "contactWechat", + binding: "brand.contactWechat", + label: "微信号", + input: "text", + previewTarget: "atelier.profile.identity", + }, + ], + }, + { + key: "inquiry_intro", + title: "意向单说明", + description: "修改后保存为草稿,发布后对访客生效。", + page: "inquiry", + target: "brand", + previewTargets: [ + { + key: "atelier.inquiry.intro", + label: "意向单说明", + }, + ], + fields: [ + { + key: "eyebrow", + binding: "brand.config.visualPresentation.inquiry.eyebrow", + label: "阶段标签", + input: "text", + previewTarget: "atelier.inquiry.intro", + }, + { + key: "title", + binding: "brand.config.visualPresentation.inquiry.title", + label: "表单标题", + input: "text", + previewTarget: "atelier.inquiry.intro", + }, + { + key: "subtitle", + binding: "brand.config.visualPresentation.inquiry.subtitle", + label: "表单说明", + input: "text", + previewTarget: "atelier.inquiry.intro", + }, + { + key: "submitLabel", + binding: "brand.config.visualPresentation.inquiry.submitLabel", + label: "提交按钮", + input: "text", + previewTarget: "atelier.inquiry.intro", + }, + { + key: "note", + binding: "brand.config.visualPresentation.inquiry.note", + label: "表单补充说明", + input: "textarea", + previewTarget: "atelier.inquiry.intro", + }, + ], + }, + { + key: "inquiry_privacy", + title: "表单隐私说明", + description: "修改后保存为草稿,发布后对访客生效。", + page: "inquiry", + target: "brand", + previewTargets: [ + { + key: "atelier.inquiry.privacy", + label: "表单隐私说明", + }, + ], + fields: [ + { + key: "privacyTitle", + binding: "brand.config.visualPresentation.inquiry.privacyTitle", + label: "隐私标题", + input: "text", + previewTarget: "atelier.inquiry.privacy", + }, + { + key: "privacyNote", + binding: "brand.config.visualPresentation.inquiry.privacyNote", + label: "隐私说明", + input: "textarea", + previewTarget: "atelier.inquiry.privacy", + }, + { + key: "followupHint", + binding: "brand.config.visualPresentation.inquiry.followupHint", + label: "跟进预期", + input: "text", + previewTarget: "atelier.inquiry.privacy", + }, + ], + }, + { + key: "success_copy", + title: "提交成功说明", + description: "修改后保存为草稿,发布后对访客生效。", + page: "success", + target: "brand", + previewTargets: [ + { + key: "atelier.success.copy", + label: "提交成功说明", + }, + ], + fields: [ + { + key: "eyebrow", + binding: "brand.config.visualPresentation.success.eyebrow", + label: "成功标签", + input: "text", + previewTarget: "atelier.success.copy", + }, + { + key: "title", + binding: "brand.config.visualPresentation.success.title", + label: "成功标题", + input: "text", + previewTarget: "atelier.success.copy", + }, + { + key: "intro", + binding: "brand.config.visualPresentation.success.intro", + label: "后续说明", + input: "textarea", + previewTarget: "atelier.success.copy", + }, + { + key: "recordsAction", + binding: "brand.config.visualPresentation.success.recordsAction", + label: "记录按钮", + input: "text", + previewTarget: "atelier.success.copy", + }, + { + key: "homeAction", + binding: "brand.config.visualPresentation.success.homeAction", + label: "首页按钮", + input: "text", + previewTarget: "atelier.success.copy", + }, + ], + }, + { + key: "records_copy", + title: "咨询记录文案", + description: "修改后保存为草稿,发布后对访客生效。", + page: "records", + target: "brand", + previewTargets: [ + { + key: "atelier.records.copy", + label: "咨询记录文案", + }, + ], + fields: [ + { + key: "title", + binding: "brand.config.visualPresentation.records.title", + label: "记录标题", + input: "text", + previewTarget: "atelier.records.copy", + }, + { + key: "createAction", + binding: "brand.config.visualPresentation.records.createAction", + label: "新增按钮", + input: "text", + previewTarget: "atelier.records.copy", + }, + { + key: "emptyTitle", + binding: "brand.config.visualPresentation.records.emptyTitle", + label: "空状态标题", + input: "text", + previewTarget: "atelier.records.copy", + }, + { + key: "emptyDescription", + binding: "brand.config.visualPresentation.records.emptyDescription", + label: "空状态说明", + input: "text", + previewTarget: "atelier.records.copy", + }, + { + key: "emptyAction", + binding: "brand.config.visualPresentation.records.emptyAction", + label: "空状态按钮", + input: "text", + previewTarget: "atelier.records.copy", + }, + ], + }, + { + key: "projectDetail", + title: "案例详情", + description: "以下内容分别填写在每个案例中,空白内容不会展示。", + page: "detail", + target: "offering", + fields: [ + { + key: "name", + binding: "offering.name", + label: "案例名称", + input: "text", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "summary", + binding: "offering.summary", + label: "案例简介", + input: "textarea", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "priceText", + binding: "offering.priceText", + label: "合作方式 / 报价说明", + input: "text", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "coverUrl", + binding: "offering.coverUrl", + label: "案例封面", + input: "image", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "categoryLabel", + binding: "offering.config.categoryKey", + label: "案例类别", + input: "select", + options: [ + { + value: "portfolio", + label: "案例展示", + }, + { + value: "consulting", + label: "需求咨询", + }, + { + value: "advisory", + label: "长期支持", + }, + { + value: "custom", + label: "其他服务", + }, + ], + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "detailHero", + binding: "offering.config.detailHero", + label: "详情主图", + input: "image", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "area", + binding: "offering.config.area", + label: "项目地点", + input: "text", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "series", + binding: "offering.config.series", + label: "方案名称", + input: "text", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "spaceType", + binding: "offering.config.spaceType", + label: "适用场景", + input: "text", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "background", + binding: "offering.config.details.background", + label: "项目背景", + input: "textarea", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "designConcept", + binding: "offering.config.details.designConcept", + label: "设计理念", + input: "textarea", + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "keywords", + binding: "offering.config.keywords", + label: "项目关键词", + input: "list", + itemValueKey: "value", + itemFields: [ + { + key: "value", + label: "关键词", + }, + ], + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "crafts", + binding: "offering.config.details.crafts", + label: "交付要点", + input: "list", + itemValueKey: "value", + itemFields: [ + { + key: "value", + label: "交付内容", + }, + ], + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + { + key: "materialsList", + binding: "offering.config.details.materialsList", + label: "能力构成", + input: "list", + itemFields: [ + { + key: "name", + label: "能力名称", + }, + { + key: "spec", + label: "能力说明", + }, + ], + previewTarget: "atelier-solopreneur.detail.projectDetail", + }, + ], + previewTargets: [ + { + key: "atelier-solopreneur.detail.projectDetail", + label: "案例详情", + }, + ], + }, + { + key: "detailCopy", + title: "详情页说明", + description: "说明案例内容、价格与咨询后的真实处理方式。", + page: "detail", + target: "brand", + fields: [ + { + key: "priceLabel", + binding: "brand.config.visualPresentation.detail.priceLabel", + label: "价格说明标题", + input: "text", + previewTarget: "atelier-solopreneur.detail.detailCopy", + }, + { + key: "spaceLabel", + binding: "brand.config.visualPresentation.detail.spaceLabel", + label: "适用空间标题", + input: "text", + previewTarget: "atelier-solopreneur.detail.detailCopy", + }, + { + key: "backgroundTitle", + binding: "brand.config.visualPresentation.detail.backgroundTitle", + label: "项目背景标题", + input: "text", + previewTarget: "atelier-solopreneur.detail.detailCopy", + }, + { + key: "conceptTitle", + binding: "brand.config.visualPresentation.detail.conceptTitle", + label: "设计理念标题", + input: "text", + previewTarget: "atelier-solopreneur.detail.detailCopy", + }, + { + key: "craftsTitle", + binding: "brand.config.visualPresentation.detail.craftsTitle", + label: "工艺要点标题", + input: "text", + previewTarget: "atelier-solopreneur.detail.detailCopy", + }, + { + key: "materialsTitle", + binding: "brand.config.visualPresentation.detail.materialsTitle", + label: "材料说明标题", + input: "text", + previewTarget: "atelier-solopreneur.detail.detailCopy", + }, + ], + previewTargets: [ + { + key: "atelier-solopreneur.detail.detailCopy", + label: "详情页说明", + }, + ], + }, + { + key: "detailAction", + title: "详情页咨询入口", + description: "公共按钮与提示,对所有业务详情生效。", + page: "detail", + target: "brand", + fields: [ + { + key: "inquiryAction", + binding: "brand.config.visualPresentation.detail.inquiryAction", + label: "咨询按钮文字", + input: "text", + previewTarget: "atelier-solopreneur.detail.action", + }, + { + key: "inquiryHint", + binding: "brand.config.visualPresentation.detail.inquiryHint", + label: "咨询后的处理说明", + help: "只填写能兑现的服务安排。", + input: "textarea", + previewTarget: "atelier-solopreneur.detail.action", + }, + ], + previewTargets: [ + { + key: "atelier-solopreneur.detail.action", + label: "详情页咨询入口", + }, + ], + }, + { + key: "home_case", + title: "试点案例卡片", + description: "修改后保存为草稿,发布后对访客生效。", + page: "home", + target: "offering", + previewTargets: [ + { + key: "atelier.home.case", + label: "试点案例卡片", + }, + ], + fields: [ + { + key: "name", + binding: "offering.name", + label: "案例名称", + input: "text", + previewTarget: "atelier.home.case", + }, + { + key: "summary", + binding: "offering.summary", + label: "案例说明", + input: "textarea", + previewTarget: "atelier.home.case", + }, + { + key: "coverUrl", + binding: "offering.coverUrl", + label: "案例封面", + input: "image", + previewTarget: "atelier.home.case", + }, + ], + }, + { + key: "home_badges", + title: "交付标签", + description: "修改后保存为草稿,发布后对访客生效。", + page: "home", + target: "brand", + previewTargets: [ + { + key: "atelier.home.badges", + label: "交付标签", + }, + ], + fields: [ + { + key: "badges", + binding: "brand.config.atelier.badges", + label: "交付标签", + input: "list", + previewTarget: "atelier.home.badges", + itemFields: [ + { + key: "title", + label: "标题", + }, + ], + }, + ], + }, + { + key: "home_features", + title: "差异化构建卡片", + description: "修改后保存为草稿,发布后对访客生效。", + page: "home", + target: "brand", + previewTargets: [ + { + key: "atelier.home.features", + label: "差异化构建卡片", + }, + ], + fields: [ + { + key: "features", + binding: "brand.config.atelier.features", + label: "差异化构建卡片", + input: "list", + previewTarget: "atelier.home.features", + itemFields: [ + { + key: "tag", + label: "标签", + }, + { + key: "title", + label: "标题", + }, + { + key: "description", + label: "说明", + }, + ], + }, + ], + }, + { + key: "home_audiences", + title: "服务群体", + description: "修改后保存为草稿,发布后对访客生效。", + page: "home", + target: "brand", + previewTargets: [ + { + key: "atelier.home.audiences", + label: "服务群体", + }, + ], + fields: [ + { + key: "audiences", + binding: "brand.config.atelier.audiences", + label: "服务群体", + input: "list", + previewTarget: "atelier.home.audiences", + itemFields: [ + { + key: "symbol", + label: "符号", + }, + { + key: "title", + label: "标题", + }, + { + key: "description", + label: "说明", + }, + ], + }, + ], + }, + { + key: "offerings_deliverables", + title: "交付体系", + description: "修改后保存为草稿,发布后对访客生效。", + page: "offerings", + target: "brand", + previewTargets: [ + { + key: "atelier.offerings.deliverables", + label: "交付体系", + }, + ], + fields: [ + { + key: "deliverables", + binding: "brand.config.atelier.deliverables", + label: "交付体系", + input: "list", + previewTarget: "atelier.offerings.deliverables", + itemFields: [ + { + key: "title", + label: "标题", + }, + { + key: "tag", + label: "标签", + }, + { + key: "description", + label: "说明", + }, + ], + }, + ], + }, + { + key: "offerings_process", + title: "协作步骤", + description: "修改后保存为草稿,发布后对访客生效。", + page: "offerings", + target: "brand", + previewTargets: [ + { + key: "atelier.offerings.process", + label: "协作步骤", + }, + ], + fields: [ + { + key: "process", + binding: "brand.config.atelier.process", + label: "协作步骤", + input: "list", + previewTarget: "atelier.offerings.process", + itemFields: [ + { + key: "title", + label: "标题", + }, + { + key: "description", + label: "说明", + }, + ], + }, + ], + }, + { + key: "offerings_proofs", + title: "信任基石", + description: "修改后保存为草稿,发布后对访客生效。", + page: "offerings", + target: "brand", + previewTargets: [ + { + key: "atelier.offerings.proofs", + label: "信任基石", + }, + ], + fields: [ + { + key: "proofs", + binding: "brand.config.atelier.proofs", + label: "信任基石", + input: "list", + previewTarget: "atelier.offerings.proofs", + itemFields: [ + { + key: "title", + label: "标题", + }, + { + key: "description", + label: "说明", + }, + ], + }, + ], + }, + { + key: "profile_faqs", + title: "常见问题", + description: "修改后保存为草稿,发布后对访客生效。", + page: "profile", + target: "brand", + previewTargets: [ + { + key: "atelier.profile.faqs", + label: "常见问题", + }, + ], + fields: [ + { + key: "faqs", + binding: "brand.config.atelier.faqs", + label: "常见问题", + input: "list", + previewTarget: "atelier.profile.faqs", + itemFields: [ + { + key: "title", + label: "标题", + }, + { + key: "description", + label: "说明", + }, + ], + }, + ], + }, + ], + }, + trustContentTypes: [ + { + type: "credential", + label: "系统基础与合作边界", + adminFields: { + title: "说明标题", + summary: "说明摘要", + content: "系统基础与合作说明", + }, + pages: ["offerings"], + required: true, + }, + ], + sampleContent: { + personal: { + templateKey: "personal", + inquiryFormName: "品牌小程序需求意向单", + offerings: [ + { + kind: "service", + name: "校园餐饮品牌", + summary: "敏捷菜单 + 品牌展示 + 咨询承接", + categoryKey: "prototype", + coverUrl: "/assets/cases/campus.jpg", + }, + { + kind: "service", + name: "个人编辑型品牌", + summary: "案例沉淀 + 专业表达 + 合作咨询", + categoryKey: "prototype", + coverUrl: "/assets/cases/editorial.jpg", + }, + ], + trustContent: [ + { + type: "credential", + title: "系统基础与合作边界", + content: + "当前已实现两套试点模板、网页内容管理、草稿预览与发布、咨询承接能力。具体交付页面、上线材料、费用、排期与后续支持范围,需要在需求沟通后确认。", + }, + ], + fields: [ + { + key: "name", + label: "称呼 / 品牌名称", + type: "text", + required: true, + }, + { + key: "industry", + label: "你的主营领域", + type: "radio", + required: true, + options: [ + { + label: "独立设计 / 建筑", + value: "独立设计 / 建筑", + }, + { + label: "摄影 / 视觉艺术", + value: "摄影 / 视觉艺术", + }, + { + label: "独立商业咨询", + value: "独立商业咨询", + }, + { + label: "教练 / 身心疗愈", + value: "教练 / 身心疗愈", + }, + { + label: "个人 IP / 创作者", + value: "个人 IP / 创作者", + }, + { + label: "精品品牌 / 实体", + value: "精品品牌 / 实体", + }, + { + label: "其他", + value: "其他", + }, + ], + }, + { + key: "needs", + label: "目前主要诉求与现状", + type: "textarea", + required: true, + }, + { + key: "timeline", + label: "预期启动排期", + type: "radio", + required: false, + options: [ + { + label: "本月内", + value: "本月内", + }, + { + label: "下月起", + value: "下月起", + }, + { + label: "先期评估", + value: "先期评估", + }, + ], + }, + { + key: "contact", + label: "联系方式(微信 / 电话)", + type: "text", + required: true, + }, + ], + capabilityKey: "inquiry", + brandConfig: { + visualPresentation: { + home: { + eyebrow: "独立开发者 · 品牌小程序构建", + title: "把个人品牌做成\n可持续运营的小程序", + subtitle: + "不只是做一个展示页面,而是为你搭建专业展示、内容运营与长期承接咨询的小程序系统。", + primaryAction: "预约咨询 / 聊聊需求", + secondaryAction: "查看服务架构", + featuresTitle: "差异化构建逻辑", + featuresEnglish: "Bespoke System", + casesTitle: "试点架构原型", + casesSubtitle: "验证模板 · 点击进入结构解析", + caseAction: "查看详情架构 →", + audienceTitle: "专属服务群体", + audienceEnglish: "Target Creators", + ctaTitle: "开启你的品牌小程序", + ctaSubtitle: "从策略梳理到上线的一站式交付", + ctaAction: "立即沟通", + }, + offerings: { + eyebrow: "完整独立交付 · 匠心构建", + title: "全链路服务与透明协作", + subtitle: "站在产品与长期运营的角度设计,专注交付可持续更新的个人品牌数字资产。", + deliverablesTitle: "交付体系", + deliverablesEnglish: "7 Deliverables", + processTitle: "协作流程", + processEnglish: "5 Phases · 节点透明可溯", + proofTitle: "信任基石", + proofEnglish: "Why bespoke", + ctaTitle: "对流程有疑问?直接聊聊", + ctaSubtitle: "一起梳理当前的品牌数字化需求,评估适合的结构与启动时间。", + ctaAction: "预约需求沟通", + }, + profile: { + eyebrow: "开放需求沟通 · 排期以实际确认为准", + title: "聊聊你的品牌小程序", + subtitle: "描述你的当前业务、目标用户和遇到的挑战,一起梳理适合的结构与上线路径。", + inquiryAction: "预约需求沟通 · 填写意向单", + timeHint: "约 3 分钟", + wechatLabel: "微信直聊", + copyAction: "复制微信", + contactHint: "尚未配置微信号,可先填写意向单", + promise: "先梳理可行性与时间节点,再确认合作范围", + recordsAction: "查看我的咨询记录 →", + faqTitle: "常见疑问解答", + faqSubtitle: "把透明与确定性放在第一位,说明合作的常见顾虑与流程。", + footerQuote: "Bespoke digital architecture for clear minds.", + footerNote: "用心打磨每一处体验 · 期待与你的灵感交汇", + }, + inquiry: { + eyebrow: "Atelier Note · 品牌意向梳理", + title: "品牌意向梳理 · 3 分钟完成", + subtitle: "用于需求梳理与排期评估,请填写当前业务、目标用户与主要诉求。", + submitLabel: "提交意向 · 预约沟通", + privacyTitle: "信息使用说明", + privacyNote: + "你提交的信息仅用于本次需求评估与后续联系。请勿填写密码、证件号码等敏感信息。", + followupHint: "提交后可在咨询记录中查看状态,具体响应时间以主理人确认为准。", + note: "填写的信息仅用于需求沟通与排期评估。", + }, + success: { + eyebrow: "已提交", + title: "意向已送达工坊", + intro: "已收到你的需求清单,将结合业务情况评估可行性,并通过你留下的联系方式沟通。", + recordsAction: "查看咨询记录", + homeAction: "返回首页", + }, + records: { + title: "我的品牌咨询", + createAction: "填写新需求", + emptyTitle: "还没有咨询记录", + emptyDescription: "提交品牌需求后,可以在这里查看后续跟进状态。", + emptyAction: "填写品牌需求", + }, + detail: { + priceLabel: "合作方式", + spaceLabel: "适用场景", + backgroundTitle: "案例与业务背景", + conceptTitle: "构建思路", + craftsTitle: "交付要点", + materialsTitle: "能力构成", + inquiryAction: "聊聊类似需求", + inquiryHint: "具体范围与报价在需求确认后提供。", + }, + }, + atelier: { + badges: [ + { + title: "完整可交付小程序", + }, + { + title: "支持后台随时更新", + }, + { + title: "支持长期演进", + }, + ], + features: [ + { + tag: "敏捷控制台", + title: "不是静态页面,而是可持续更新的系统", + description: + "拥有独立管理后台,案例作品、核心业务与介绍随时增删修改,让日常更新回归内容本身。", + }, + { + tag: "信任转化", + title: "先梳理定位与信任结构", + description: + "优先厘清客户的了解路径与业务背书,从第一屏价值表达,到高意向咨询的承接。", + }, + { + tag: "陪伴演进", + title: "交付之后,支持长期迭代", + description: "从上线协助到阶段性功能扩展,让品牌载体伴随业务持续成长。", + }, + ], + audiences: [ + { + symbol: "◎", + title: "摄影师", + description: "样片沉淀", + }, + { + symbol: "◇", + title: "咨询顾问", + description: "信任转化", + }, + { + symbol: "✎", + title: "独立设计", + description: "作品展呈", + }, + { + symbol: "↗", + title: "教练疗愈", + description: "需求预约", + }, + { + symbol: "▤", + title: "IP 创作者", + description: "私域载体", + }, + { + symbol: "⌂", + title: "小微实体", + description: "产品看板", + }, + ], + deliverables: [ + { + title: "品牌定位梳理", + tag: "清晰聚焦", + description: "提炼核心专长与目标客户画像,明确小程序核心诉求与转化路径。", + }, + { + title: "页面结构设计", + tag: "信任动线", + description: "梳理信息架构与信任动线,建立递进式了解路径。", + }, + { + title: "小程序视觉设计", + tag: "克制美学", + description: "结合微信使用习惯设计界面,用精致排版强化专业辨识度。", + }, + { + title: "内容字段规划", + tag: "结构资产", + description: "规范案例、服务与常见问题字段,让内容持续沉淀。", + }, + { + title: "后台管理配置", + tag: "自主维护", + description: "通过网页后台修改内容、上传图片,保存为草稿,确认后发布。", + }, + { + title: "发布上线协助", + tag: "上线协作", + description: "协助准备微信主体与类目材料、配置和提审,审核结果以微信平台为准。", + }, + { + title: "后续运营支持", + tag: "长期支持", + description: "提供操作说明与迭代建议,具体支持范围在合作时确认。", + }, + ], + process: [ + { + title: "需求沟通", + description: "交流专业背景、获客渠道与核心需求,评估可行性与排期。", + }, + { + title: "品牌结构梳理", + description: "提炼品牌关键词与信息架构,统一页面目标。", + }, + { + title: "界面设计确认", + description: "确认原型、视觉、排版与交互细节。", + }, + { + title: "内容配置与上线", + description: "录入案例与服务资料,联调、提审并协助发布。", + }, + { + title: "长期演进迭代", + description: "根据反馈完善内容,按约定范围迭代功能。", + }, + ], + proofs: [ + { + title: "已有系统基础", + description: "两套试点模板验证展示、配置与咨询链路。", + }, + { + title: "支持后台管理", + description: "内容由品牌自行维护,草稿确认后再发布。", + }, + { + title: "模块化扩展", + description: "复用稳定的系统能力,按需求扩展页面与服务。", + }, + { + title: "定位先于视觉", + description: "先说明你是谁、为谁服务、为什么值得信任。", + }, + { + title: "直接沟通与持续支持", + description: "独立主理人直接对接,合作边界与后续支持提前确认。", + }, + ], + faqs: [ + { + title: "还没整理好品牌文案,可以开始吗?", + description: + "可以先沟通。第一阶段一起梳理定位、核心业务与已有素材,再确定需要补齐的内容。", + }, + { + title: "后续内容可以自己修改吗?", + description: + "可以通过网页管理后台维护简介、案例、服务与表单。保存先形成草稿,确认并发布后,公开小程序才更新。", + }, + { + title: "可以先做轻量版本验证吗?", + description: + "可以。优先用展示、服务介绍与意向咨询等核心页面验证需求,再依据反馈扩展。", + }, + { + title: "设计和上线怎么配合?", + description: + "需求对齐、结构梳理、视觉确认、内容配置与上线分阶段推进。微信认证与审核由平台决定,所需材料和分工提前确认。", + }, + ], + }, + }, + }, + }, + pages: ["pages/index/index", "pages/services/index", "pages/bookings/index"], + visualTemplateKey: "atelier-solopreneur", + }, { packageKey: "linjing-editorial", version: "1.0.0", @@ -3064,4 +4784,4 @@ export const generatedTemplatePackageRegistry: readonly TemplatePackageManifest[ }, ]; export const generatedTemplatePackageRegistryHash = - "56656913de9cbf7f406e705cfea33698f2404b23f3b6fe9423345a8bef57708e"; + "4bfc51847279cd3095eb98b7a946c77805ae99a4b0487875321976b42f4fd725"; diff --git a/packages/config/src/template-sample-content.ts b/packages/config/src/template-sample-content.ts index 16783ba..e3a284a 100644 --- a/packages/config/src/template-sample-content.ts +++ b/packages/config/src/template-sample-content.ts @@ -1,12 +1,15 @@ import type { BrandTemplateKey } from "./template-keys.js"; +import { getDefaultVisualTemplateKey } from "./visual-templates.js"; import { templatePackageRegistry } from "./template-packages.js"; export interface TemplateSampleContent { templateKey: BrandTemplateKey; + brandConfig?: Record; inquiryFormName: string; offerings: Array<{ kind: "service" | "product" | "package" | "subscription"; name: string; + coverUrl?: string; summary: string; categoryKey: string; }>; @@ -136,9 +139,22 @@ export const templateSampleContent = { doors: doorsSampleContent, } as const; -export function getTemplateSampleContent(templateKey: string): TemplateSampleContent | undefined { - const packageSample = templatePackageRegistry.find((item) => - item.supportedIndustryTemplates.includes(templateKey), +export function getTemplateSampleContent( + templateKey: string, + visualTemplateKey?: string, +): TemplateSampleContent | undefined { + const selected = visualTemplateKey + ? templatePackageRegistry.find( + (item) => + item.packageKey === visualTemplateKey && + item.supportedIndustryTemplates.includes(templateKey), + ) + : undefined; + if (selected) return selected.sampleContent?.[templateKey]; + const packageSample = templatePackageRegistry.find( + (item) => + item.packageKey === getDefaultVisualTemplateKey(templateKey) && + item.supportedIndustryTemplates.includes(templateKey), )?.sampleContent?.[templateKey]; return packageSample ?? templateSampleContent[templateKey as keyof typeof templateSampleContent]; } diff --git a/packages/config/src/visual-templates.ts b/packages/config/src/visual-templates.ts index 61a216e..ce26e7a 100644 --- a/packages/config/src/visual-templates.ts +++ b/packages/config/src/visual-templates.ts @@ -38,6 +38,24 @@ export const visualTemplates: Record { + const brand = workspace.brand || {}; + this.setData({ + brand, + presentation: brand.visualPresentation?.profile || {}, + config: brand.atelier || {}, + offerings: workspace.offerings || [], + loading: false, + }); + }) + .catch((error) => this.setData({ error: error.message, loading: false })); + }, + inquiry() { + openPage("/pages/inquiry/index"); + }, + services() { + openPage("/pages/services/index"); + }, + contact() { + openPage("/pages/bookings/index"); + }, + records() { + openPage("/pages/records/index"); + }, + detail(event) { + openPage("/pages/offering/detail?id=" + encodeURIComponent(event.currentTarget.dataset.id)); + }, + toggle(event) { + const index = Number(event.currentTarget.dataset.index); + this.setData({ opened: this.data.opened === index ? -1 : index }); + }, + copy() { + if (this.data.brand.contactWechat) wx.setClipboardData({ data: this.data.brand.contactWechat }); + }, +}); diff --git a/packages/template-atelier-solopreneur/miniapp/pages/bookings/index.json b/packages/template-atelier-solopreneur/miniapp/pages/bookings/index.json new file mode 100644 index 0000000..2e674e6 --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/bookings/index.json @@ -0,0 +1 @@ +{ "navigationBarTitleText": "咨询", "usingComponents": {} } diff --git a/packages/template-atelier-solopreneur/miniapp/pages/bookings/index.wxml b/packages/template-atelier-solopreneur/miniapp/pages/bookings/index.wxml new file mode 100644 index 0000000..8292c24 --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/bookings/index.wxml @@ -0,0 +1 @@ +正在加载…{{error}}{{presentation.eyebrow}}{{presentation.title}}{{presentation.subtitle}}{{brand.founder}}{{brand.title}}{{brand.description}}{{presentation.wechatLabel}}{{brand.contactWechat || presentation.contactHint}}{{presentation.promise}}{{presentation.faqTitle}}{{presentation.faqSubtitle}}{{index+1}} · {{item.title}} {{opened===index ? "−" : "+"}}{{item.description}}{{presentation.footerQuote}}{{presentation.footerNote}} diff --git a/packages/template-atelier-solopreneur/miniapp/pages/bookings/index.wxss b/packages/template-atelier-solopreneur/miniapp/pages/bookings/index.wxss new file mode 100644 index 0000000..d67146d --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/bookings/index.wxss @@ -0,0 +1,149 @@ +page { + background: #fbf9f5; + color: #1b1c1a; + font-size: 28rpx; + line-height: 1.7; +} +text { + display: block; +} +.page { + padding: 40rpx; +} +.intro { + margin-bottom: 36rpx; +} +.eyebrow { + display: inline-block; + background: #eaf0e9; + color: #183329; + border-radius: 99rpx; + padding: 4rpx 16rpx; + font-size: 21rpx; +} +.title { + font-size: 46rpx; + font-weight: 600; + line-height: 1.45; + white-space: pre-line; + margin: 22rpx 0; +} +.body { + font-size: 26rpx; + color: #555953; + line-height: 1.8; + white-space: pre-line; +} +.heading { + display: flex; + justify-content: space-between; + align-items: center; + margin: 60rpx 0 24rpx; + font-size: 30rpx; +} +.heading > text:last-child, +.caption { + font-size: 21rpx; + color: #777971; +} +.card, +.case { + background: white; + border: 1rpx solid #efede7; + border-radius: 28rpx; + padding: 30rpx; + margin-bottom: 24rpx; +} +.card-title { + font-size: 30rpx; + font-weight: 600; + margin-bottom: 12rpx; +} +.tag { + font-size: 20rpx; + color: #8d7956; + text-align: right; +} +.actions, +.cases { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 20rpx; +} +.badges { + display: flex; + flex-wrap: wrap; + gap: 16rpx; + font-size: 21rpx; + margin-top: 24rpx; +} +.audiences { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 16rpx; +} +.audiences .card { + padding: 18rpx 8rpx; + text-align: center; + font-size: 24rpx; +} +.case { + padding: 18rpx; + min-width: 0; +} +.case image { + width: 100%; + height: 200rpx; + border-radius: 16rpx; +} +.cta { + background: #183329; + color: white; + padding: 30rpx; + border-radius: 28rpx; + margin: 50rpx 0; +} +.cta .body { + color: #c5d1c6; +} +.identity { + display: flex; + align-items: center; + gap: 24rpx; + margin-bottom: 24rpx; +} +.identity image { + width: 96rpx; + height: 96rpx; + border-radius: 50%; +} +.wechat { + background: #f5f3ed; + padding: 24rpx; + border-radius: 20rpx; + margin: 20rpx 0; +} +.footer { + text-align: center; + margin: 70rpx 0; +} +button { + display: flex; + align-items: center; + justify-content: center; + min-height: 88rpx; + background: #183329; + color: white; + border: 0; + border-radius: 24rpx; + padding: 12rpx 20rpx; + font-size: 25rpx; + margin: 20rpx 0; +} +button::after { + border: 0; +} +.cta button { + background: white; + color: #183329; +} diff --git a/packages/template-atelier-solopreneur/miniapp/pages/index/index.js b/packages/template-atelier-solopreneur/miniapp/pages/index/index.js new file mode 100644 index 0000000..702f741 --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/index/index.js @@ -0,0 +1,53 @@ +const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace"); +const { openPage } = require("../../utils/navigation"); +Page({ + data: { + brand: {}, + presentation: {}, + config: {}, + offerings: [], + error: "", + loading: true, + opened: -1, + }, + onLoad() { + this.reload(); + }, + reload() { + this.setData({ loading: true, error: "" }); + loadWorkspaceWithFallback() + .then((workspace) => { + const brand = workspace.brand || {}; + this.setData({ + brand, + presentation: brand.visualPresentation?.home || {}, + config: brand.atelier || {}, + offerings: workspace.offerings || [], + loading: false, + }); + }) + .catch((error) => this.setData({ error: error.message, loading: false })); + }, + inquiry() { + openPage("/pages/inquiry/index"); + }, + services() { + openPage("/pages/services/index"); + }, + contact() { + openPage("/pages/bookings/index"); + }, + records() { + openPage("/pages/records/index"); + }, + detail(event) { + openPage("/pages/offering/detail?id=" + encodeURIComponent(event.currentTarget.dataset.id)); + }, + toggle(event) { + const index = Number(event.currentTarget.dataset.index); + this.setData({ opened: this.data.opened === index ? -1 : index }); + }, + copy() { + if (this.data.brand.contactWechat) wx.setClipboardData({ data: this.data.brand.contactWechat }); + }, +}); diff --git a/packages/template-atelier-solopreneur/miniapp/pages/index/index.json b/packages/template-atelier-solopreneur/miniapp/pages/index/index.json new file mode 100644 index 0000000..2fa6801 --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/index/index.json @@ -0,0 +1 @@ +{ "navigationBarTitleText": "首页", "usingComponents": {} } diff --git a/packages/template-atelier-solopreneur/miniapp/pages/index/index.wxml b/packages/template-atelier-solopreneur/miniapp/pages/index/index.wxml new file mode 100644 index 0000000..8884d3f --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/index/index.wxml @@ -0,0 +1 @@ +正在加载…{{error}}{{presentation.eyebrow}}{{presentation.title}}{{presentation.subtitle}}✓ {{item.title}}{{presentation.featuresTitle}}{{presentation.featuresEnglish}}{{item.tag}}{{item.title}}{{item.description}}{{presentation.casesTitle}}{{presentation.casesSubtitle}}{{presentation.caseAction}}{{item.name}}{{item.summary}}{{presentation.audienceTitle}}{{presentation.audienceEnglish}}{{item.symbol}}{{item.title}}{{item.description}}{{presentation.ctaTitle}}{{presentation.ctaSubtitle}} diff --git a/packages/template-atelier-solopreneur/miniapp/pages/index/index.wxss b/packages/template-atelier-solopreneur/miniapp/pages/index/index.wxss new file mode 100644 index 0000000..d67146d --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/index/index.wxss @@ -0,0 +1,149 @@ +page { + background: #fbf9f5; + color: #1b1c1a; + font-size: 28rpx; + line-height: 1.7; +} +text { + display: block; +} +.page { + padding: 40rpx; +} +.intro { + margin-bottom: 36rpx; +} +.eyebrow { + display: inline-block; + background: #eaf0e9; + color: #183329; + border-radius: 99rpx; + padding: 4rpx 16rpx; + font-size: 21rpx; +} +.title { + font-size: 46rpx; + font-weight: 600; + line-height: 1.45; + white-space: pre-line; + margin: 22rpx 0; +} +.body { + font-size: 26rpx; + color: #555953; + line-height: 1.8; + white-space: pre-line; +} +.heading { + display: flex; + justify-content: space-between; + align-items: center; + margin: 60rpx 0 24rpx; + font-size: 30rpx; +} +.heading > text:last-child, +.caption { + font-size: 21rpx; + color: #777971; +} +.card, +.case { + background: white; + border: 1rpx solid #efede7; + border-radius: 28rpx; + padding: 30rpx; + margin-bottom: 24rpx; +} +.card-title { + font-size: 30rpx; + font-weight: 600; + margin-bottom: 12rpx; +} +.tag { + font-size: 20rpx; + color: #8d7956; + text-align: right; +} +.actions, +.cases { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 20rpx; +} +.badges { + display: flex; + flex-wrap: wrap; + gap: 16rpx; + font-size: 21rpx; + margin-top: 24rpx; +} +.audiences { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 16rpx; +} +.audiences .card { + padding: 18rpx 8rpx; + text-align: center; + font-size: 24rpx; +} +.case { + padding: 18rpx; + min-width: 0; +} +.case image { + width: 100%; + height: 200rpx; + border-radius: 16rpx; +} +.cta { + background: #183329; + color: white; + padding: 30rpx; + border-radius: 28rpx; + margin: 50rpx 0; +} +.cta .body { + color: #c5d1c6; +} +.identity { + display: flex; + align-items: center; + gap: 24rpx; + margin-bottom: 24rpx; +} +.identity image { + width: 96rpx; + height: 96rpx; + border-radius: 50%; +} +.wechat { + background: #f5f3ed; + padding: 24rpx; + border-radius: 20rpx; + margin: 20rpx 0; +} +.footer { + text-align: center; + margin: 70rpx 0; +} +button { + display: flex; + align-items: center; + justify-content: center; + min-height: 88rpx; + background: #183329; + color: white; + border: 0; + border-radius: 24rpx; + padding: 12rpx 20rpx; + font-size: 25rpx; + margin: 20rpx 0; +} +button::after { + border: 0; +} +.cta button { + background: white; + color: #183329; +} diff --git a/packages/template-atelier-solopreneur/miniapp/pages/services/index.js b/packages/template-atelier-solopreneur/miniapp/pages/services/index.js new file mode 100644 index 0000000..788bc38 --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/services/index.js @@ -0,0 +1,54 @@ +const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace"); +const { openPage } = require("../../utils/navigation"); +Page({ + data: { + brand: {}, + presentation: {}, + config: {}, + offerings: [], + error: "", + loading: true, + opened: -1, + }, + onLoad() { + this.reload(); + }, + reload() { + this.setData({ loading: true, error: "" }); + loadWorkspaceWithFallback() + .then((workspace) => { + const brand = workspace.brand || {}; + this.setData({ + brand, + presentation: brand.visualPresentation?.offerings || {}, + config: brand.atelier || {}, + offerings: workspace.offerings || [], + trustItems: workspace.trustItems || [], + loading: false, + }); + }) + .catch((error) => this.setData({ error: error.message, loading: false })); + }, + inquiry() { + openPage("/pages/inquiry/index"); + }, + services() { + openPage("/pages/services/index"); + }, + contact() { + openPage("/pages/bookings/index"); + }, + records() { + openPage("/pages/records/index"); + }, + detail(event) { + openPage("/pages/offering/detail?id=" + encodeURIComponent(event.currentTarget.dataset.id)); + }, + toggle(event) { + const index = Number(event.currentTarget.dataset.index); + this.setData({ opened: this.data.opened === index ? -1 : index }); + }, + copy() { + if (this.data.brand.contactWechat) wx.setClipboardData({ data: this.data.brand.contactWechat }); + }, +}); diff --git a/packages/template-atelier-solopreneur/miniapp/pages/services/index.json b/packages/template-atelier-solopreneur/miniapp/pages/services/index.json new file mode 100644 index 0000000..ae56a7a --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/services/index.json @@ -0,0 +1 @@ +{ "navigationBarTitleText": "服务", "usingComponents": {} } diff --git a/packages/template-atelier-solopreneur/miniapp/pages/services/index.wxml b/packages/template-atelier-solopreneur/miniapp/pages/services/index.wxml new file mode 100644 index 0000000..98e0d25 --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/services/index.wxml @@ -0,0 +1 @@ +正在加载…{{error}}{{presentation.eyebrow}}{{presentation.title}}{{presentation.subtitle}}{{presentation.deliverablesTitle}}{{presentation.deliverablesEnglish}}{{item.tag}}{{index+1}} · {{item.title}}{{item.description}}{{presentation.processTitle}}{{presentation.processEnglish}}{{item.tag}}{{index+1}} · {{item.title}}{{item.description}}{{presentation.proofTitle}}{{presentation.proofEnglish}}{{item.tag}}{{index+1}} · {{item.title}}{{item.description}}{{item.title}}{{item.summary}}{{item.content}}{{presentation.ctaTitle}}{{presentation.ctaSubtitle}} diff --git a/packages/template-atelier-solopreneur/miniapp/pages/services/index.wxss b/packages/template-atelier-solopreneur/miniapp/pages/services/index.wxss new file mode 100644 index 0000000..d67146d --- /dev/null +++ b/packages/template-atelier-solopreneur/miniapp/pages/services/index.wxss @@ -0,0 +1,149 @@ +page { + background: #fbf9f5; + color: #1b1c1a; + font-size: 28rpx; + line-height: 1.7; +} +text { + display: block; +} +.page { + padding: 40rpx; +} +.intro { + margin-bottom: 36rpx; +} +.eyebrow { + display: inline-block; + background: #eaf0e9; + color: #183329; + border-radius: 99rpx; + padding: 4rpx 16rpx; + font-size: 21rpx; +} +.title { + font-size: 46rpx; + font-weight: 600; + line-height: 1.45; + white-space: pre-line; + margin: 22rpx 0; +} +.body { + font-size: 26rpx; + color: #555953; + line-height: 1.8; + white-space: pre-line; +} +.heading { + display: flex; + justify-content: space-between; + align-items: center; + margin: 60rpx 0 24rpx; + font-size: 30rpx; +} +.heading > text:last-child, +.caption { + font-size: 21rpx; + color: #777971; +} +.card, +.case { + background: white; + border: 1rpx solid #efede7; + border-radius: 28rpx; + padding: 30rpx; + margin-bottom: 24rpx; +} +.card-title { + font-size: 30rpx; + font-weight: 600; + margin-bottom: 12rpx; +} +.tag { + font-size: 20rpx; + color: #8d7956; + text-align: right; +} +.actions, +.cases { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 20rpx; +} +.badges { + display: flex; + flex-wrap: wrap; + gap: 16rpx; + font-size: 21rpx; + margin-top: 24rpx; +} +.audiences { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 16rpx; +} +.audiences .card { + padding: 18rpx 8rpx; + text-align: center; + font-size: 24rpx; +} +.case { + padding: 18rpx; + min-width: 0; +} +.case image { + width: 100%; + height: 200rpx; + border-radius: 16rpx; +} +.cta { + background: #183329; + color: white; + padding: 30rpx; + border-radius: 28rpx; + margin: 50rpx 0; +} +.cta .body { + color: #c5d1c6; +} +.identity { + display: flex; + align-items: center; + gap: 24rpx; + margin-bottom: 24rpx; +} +.identity image { + width: 96rpx; + height: 96rpx; + border-radius: 50%; +} +.wechat { + background: #f5f3ed; + padding: 24rpx; + border-radius: 20rpx; + margin: 20rpx 0; +} +.footer { + text-align: center; + margin: 70rpx 0; +} +button { + display: flex; + align-items: center; + justify-content: center; + min-height: 88rpx; + background: #183329; + color: white; + border: 0; + border-radius: 24rpx; + padding: 12rpx 20rpx; + font-size: 25rpx; + margin: 20rpx 0; +} +button::after { + border: 0; +} +.cta button { + background: white; + color: #183329; +} diff --git a/packages/template-atelier-solopreneur/package.json b/packages/template-atelier-solopreneur/package.json new file mode 100644 index 0000000..b4128d3 --- /dev/null +++ b/packages/template-atelier-solopreneur/package.json @@ -0,0 +1,24 @@ +{ + "name": "@personal-brand/template-atelier-solopreneur", + "version": "1.0.0", + "private": true, + "type": "module", + "files": [ + "template.json", + "miniapp", + "README.md", + "taro" + ], + "dependencies": { + "@tarojs/components": "4.3.0", + "@tarojs/taro": "4.3.0", + "react": "18.3.1", + "@personal-brand/types": "workspace:*", + "@tarojs/plugin-platform-weapp": "4.3.0", + "@tarojs/plugin-platform-h5": "4.3.0", + "react-dom": "18.3.1" + }, + "devDependencies": { + "@types/react": "18.3.18" + } +} diff --git a/packages/template-atelier-solopreneur/taro/index.tsx b/packages/template-atelier-solopreneur/taro/index.tsx new file mode 100644 index 0000000..bcda845 --- /dev/null +++ b/packages/template-atelier-solopreneur/taro/index.tsx @@ -0,0 +1,395 @@ +import { useState, cloneElement, isValidElement, type ReactNode } from "react"; +import { View, Text, Image, Button } from "@tarojs/components"; +import Taro from "@tarojs/taro"; +import type { RuntimeWorkspace } from "@personal-brand/types"; +import type { TemplateProps } from "../../../apps/taro/src/runtime/template"; +import { navigate } from "../../../apps/taro/src/runtime/navigation"; +import { object, rows, text, presentation, offering } from "../../../apps/taro/src/runtime/content"; +import { inquiryPluginState } from "../../../apps/taro/src/runtime/plugins"; +import "./style.css"; + +type Props = { workspace: RuntimeWorkspace }; +function InquiryAction({ workspace, label }: Props & { label: string }) { + const state = inquiryPluginState(workspace); + return ( + + ); +} +function Home({ workspace }: Props) { + const p = presentation(workspace, "home"); + const config = object(workspace.brand.atelier); + return ( + + + {p.eyebrow} + {p.title} + {p.subtitle} + + + + + + + {rows(config.badges).map((item, index) => ( + ✓ {item.title} + ))} + + + {p.featuresTitle} + {p.featuresEnglish} + + + {rows(config.features).map((item, index) => ( + + + {String(index + 1).padStart(2, "0")} + {item.tag} + + {item.title} + {item.description} + + ))} + + + + {p.casesTitle} + {p.casesSubtitle} + + {p.caseAction} + + + {workspace.offerings.map((item) => ( + navigate("detail", { id: item.id })} + > + {item.coverUrl ? ( + + ) : ( + + ↗ + + )} + + {item.name} + {item.summary} + → + + + ))} + + + {p.audienceTitle} + {p.audienceEnglish} + + + {rows(config.audiences).map((item, index) => ( + + {item.symbol} + {item.title} + {item.description} + + ))} + + + + {p.ctaTitle} + {p.ctaSubtitle} + + + + + ); +} +function Services({ workspace }: Props) { + const p = presentation(workspace, "offerings"); + const config = object(workspace.brand.atelier); + return ( + + + {p.eyebrow} + {p.title} + {p.subtitle} + + + {p.deliverablesTitle} + {p.deliverablesEnglish} + + + {rows(config.deliverables).map((item, index) => ( + + {String(index + 1).padStart(2, "0")} + + + {item.title} + {item.tag} + + {item.description} + + + ))} + + + {p.processTitle} + {p.processEnglish} + + + {rows(config.process).map((item, index) => ( + + {index + 1} + + {item.title} + {item.description} + + + ))} + + + {p.proofTitle} + {p.proofEnglish} + + + {rows(config.proofs).map((item, index) => ( + + ◇ + + {item.title} + {item.description} + + + ))} + + {workspace.trustItems.map((item) => ( + + {item.title} + {item.summary} + {item.content} + + ))} + + {p.ctaTitle} + {p.ctaSubtitle} + + + + ); +} +function Profile({ workspace }: Props) { + const [opened, setOpened] = useState(null); + const b = workspace.brand; + const p = presentation(workspace, "profile"); + const config = object(b.atelier); + async function copyWechat() { + try { + await Taro.setClipboardData({ data: text(b.contactWechat) }); + } catch { + void Taro.showToast({ title: "复制失败,请重试", icon: "none" }); + } + } + return ( + + + {p.eyebrow} + {p.title} + {p.subtitle} + + + + + {text(b.avatarUrl) && } + + {text(b.founder)} + {text(b.title)} + + + {text(b.description)} + + + + + + {p.wechatLabel} + {text(b.contactWechat) || p.contactHint} + + + + ✓ {p.promise} + + + + + {p.faqTitle} + {p.faqSubtitle} + + + {rows(config.faqs).map((item, index) => ( + + + {opened === index && ( + {item.description} + )} + + ))} + + + {p.footerQuote} + {p.footerNote} + + + ); +} +function Detail({ workspace, id }: Props & { id?: string }) { + const found = workspace.offerings.find((item) => item.id === id); + const p = presentation(workspace, "detail"); + if (!found) + return ( + + 未找到该案例 + + ); + const item = offering(found); + return ( + + + {item.image && ( + + )} + {item.name} + {item.desc} + + + + + {p.priceLabel}: + {item.priceRange} + + + {p.spaceLabel}: + {text(item.presentation.spaceType)} + + + {item.category} {item.area} {item.series} + + {item.keywords.join(" · ")} + + + + {p.backgroundTitle} + + + {item.details.background} + + {p.conceptTitle} + + {item.details.designConcept} + + {p.craftsTitle} + + {item.details.crafts.map((line, index) => ( + + {line} + + ))} + + {p.materialsTitle} + + {item.details.materialsList.map((row, index) => ( + + {row.name} {row.spec} + + ))} + + + + {p.inquiryHint} + + + ); +} +const formTargets: Record = { + inquiry: "atelier.inquiry.intro", + success: "atelier.success.copy", + records: "atelier.records.copy", +}; +export function TemplatePage({ workspace, page, children, offeringId }: TemplateProps) { + if (page === "home") + return ( + + + + ); + if (page === "offerings" || page === "service") + return ( + + + + ); + if (page === "profile") + return ( + + + + ); + if (page === "detail") + return ( + + + + ); + const p = presentation(workspace, "inquiry"); + const privacy = ( + + {p.note} + {p.privacyTitle} + {p.privacyNote} + {p.followupHint} + + ); + const content = + page === "inquiry" && + isValidElement<{ choiceStyle?: string; beforeSubmit?: ReactNode }>(children) + ? cloneElement(children, { choiceStyle: "chips", beforeSubmit: privacy }) + : children; + return ( + + {content} + + ); +} diff --git a/packages/template-atelier-solopreneur/taro/style.css b/packages/template-atelier-solopreneur/taro/style.css new file mode 100644 index 0000000..86a7340 --- /dev/null +++ b/packages/template-atelier-solopreneur/taro/style.css @@ -0,0 +1,450 @@ +.atelier { + --brand-button-height: 96px; + color: #1b1c1a; + background: #fbf9f5; + min-height: 100vh; + font-family: "PingFang SC", "Microsoft YaHei", sans-serif; + font-size: 28px; + line-height: 1.65; +} +.atelier-page { + padding: 48px 40px 72px; +} +.atelier text { + display: block; +} +.atelier button { + background: #183329; + color: #fff; + border-radius: 24px; + font-size: 26px; + padding: 16px 22px; +} +.atelier-intro { + margin-bottom: 36px; +} +.atelier-eyebrow { + display: inline-block !important; + background: #eaf0e9; + color: #183329; + border-radius: 100px; + padding: 4px 16px; + font-size: 21px; + letter-spacing: 1px; +} +.atelier-title { + font-family: "Songti SC", "Noto Serif CJK SC", serif; + font-size: 46px; + font-weight: 600; + line-height: 1.45; + white-space: pre-line; + margin: 22px 0 16px; +} +.atelier-body { + font-size: 26px; + color: #555953; + line-height: 1.8; + white-space: pre-line; +} +.atelier-actions { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 20px; + margin-top: 36px; +} +.atelier .atelier-secondary { + background: #fff; + color: #183329; + border: 1px solid #ebe8e3; +} +.atelier-badges { + display: flex; + flex-wrap: wrap; + gap: 12px 24px; + font-size: 21px; + color: #555953; + min-height: 40px; +} +.atelier-heading { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + margin: 64px 0 24px; + font-size: 30px; + font-weight: 600; +} +.atelier-heading > text:last-child { + font-size: 19px; + font-weight: 400; + color: #777971; + letter-spacing: 1px; +} +.atelier-stack { + display: flex; + flex-direction: column; + gap: 24px; + min-height: 32px; +} +.atelier-card { + background: #fff; + padding: 32px; + border-radius: 30px; + border: 1px solid #f0eeea; +} +.atelier-card-top { + display: flex; + justify-content: space-between; + align-items: center; + gap: 12px; + margin-bottom: 16px; +} +.atelier-number { + font-family: Georgia, serif; + font-size: 30px; + font-style: italic; + color: #8d7956; + flex-shrink: 0; +} +.atelier-tag { + color: #555953; + background: #f3f3ee; + border-radius: 8px; + padding: 3px 10px; + font-size: 19px; + white-space: nowrap; +} +.atelier-card-title { + font-size: 30px; + font-weight: 600; + line-height: 1.6; + margin-bottom: 10px; +} +.atelier-caption { + color: #777971; + font-size: 21px; + font-weight: 400; + line-height: 1.7; +} +.atelier-cases { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 20px; +} +.atelier-case { + min-width: 0; + border-radius: 24px; + background: #fff; + border: 1px solid #efede7; + overflow: hidden; +} +.atelier-case image, +.atelier-case-placeholder { + width: 100%; + height: 200px; +} +.atelier-case-placeholder { + background: linear-gradient(135deg, #e1e9dd, #f1e4cd); + display: flex; + align-items: center; + justify-content: center; + font: + 72px Georgia, + serif; + color: #183329; +} +.atelier-case-copy { + padding: 20px; +} +.atelier-case .atelier-card-title { + font-size: 27px; +} +.atelier-case-arrow { + color: #8d7956; + margin-top: 12px; + text-align: right; +} +.atelier-audiences { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 16px; + min-height: 40px; +} +.atelier-audience { + text-align: center; + background: #fff; + border-radius: 24px; + padding: 22px 8px; + font-size: 25px; +} +.atelier-symbol { + font-size: 36px; + color: #183329; +} +.atelier-cta { + display: flex; + align-items: center; + gap: 20px; + justify-content: space-between; + background: #183329; + color: #fff; + border-radius: 28px; + padding: 30px; + margin-top: 56px; +} +.atelier-cta > view { + flex: 1; +} +.atelier-cta .atelier-caption, +.atelier-cta .atelier-body { + color: #c5d1c6; +} +.atelier-cta button { + --brand-button-height: 72px; + width: auto; + background: #fff; + color: #183329; + flex-shrink: 0; + font-size: 23px; +} +.atelier-cta-large { + display: block; +} +.atelier-cta-large button { + margin-top: 24px; + width: 100%; + background: #fcdfb1; +} +.atelier-deliverable { + display: grid; + grid-template-columns: 42px 1fr; + gap: 22px; +} +.atelier-deliverable .atelier-card-top { + align-items: start; + margin-bottom: 8px; +} +.atelier-deliverable .atelier-card-title { + font-size: 29px; +} +.atelier-process { + padding-left: 12px; + min-height: 40px; +} +.atelier-step { + display: grid; + grid-template-columns: 38px 1fr; + gap: 20px; + position: relative; + padding-bottom: 36px; +} +.atelier-step:not(:last-child)::before { + content: ""; + position: absolute; + top: 34px; + bottom: 0; + left: 16px; + border-left: 1px solid #deded5; +} +.atelier-step-dot { + background: #183329; + color: #fff; + width: 34px; + height: 34px; + border-radius: 50%; + font-size: 22px; + text-align: center; + line-height: 34px; + margin-top: 8px; +} +.atelier-proof { + background: #f5f3ed; + padding: 30px; + border-radius: 26px; + min-height: 40px; +} +.atelier-proof-item { + display: grid; + grid-template-columns: 30px 1fr; + gap: 18px; + margin-bottom: 26px; +} +.atelier-proof-item > text { + color: #8d7956; +} +.atelier-proof-item:last-child { + margin-bottom: 0; +} +.atelier-identity { + display: flex; + align-items: center; + gap: 24px; +} +.atelier-identity image { + width: 96px; + height: 96px; + border-radius: 50%; + flex-shrink: 0; +} +.atelier-bio { + margin: 26px 0 32px; +} +.atelier-wechat { + display: flex; + justify-content: space-between; + align-items: center; + gap: 16px; + padding: 24px; + background: #f5f3ed; + border-radius: 22px; + margin-top: 20px; +} +.atelier-wechat > view { + min-width: 0; + overflow-wrap: anywhere; +} +.atelier .atelier-copy { + --brand-button-height: 56px; + width: auto; + padding: 6px 14px; + font-size: 20px; + color: #183329; + background: #e8eae3; + flex-shrink: 0; +} +.atelier-contact-note { + font-size: 20px; + text-align: center; + margin-top: 24px; + color: #777971; +} +.atelier .atelier-records { + --brand-button-height: 60px; + background: transparent; + color: #183329; + font-size: 22px; + margin-top: 12px; +} +.atelier-faq-heading { + margin: 60px 0 30px; +} +.atelier-faq { + padding: 24px; +} +.atelier .atelier-question { + --brand-button-height: 72px; + display: grid; + grid-template-columns: 36px 1fr 22px; + gap: 16px; + background: transparent; + color: #183329; + text-align: left; + padding: 4px; +} +.atelier-question .atelier-number { + font-size: 22px; +} +.atelier-answer { + margin: 24px 0 8px 52px; +} +.atelier-footer { + text-align: center; + margin-top: 90px; + padding: 20px 0; +} +.atelier-footer > text:first-child { + font: + italic 30px/1.6 Georgia, + serif; + margin-bottom: 16px; +} +.atelier-detail-image { + width: 100%; + height: 400px; + border-radius: 28px; +} +.atelier-detail-action { + margin-top: 50px; +} +.atelier-detail-action .atelier-caption { + text-align: center; + margin-top: 16px; +} +.atelier-forms .inquiry-page, +.atelier-forms .success-page, +.atelier-forms .records-page { + background: #fbf9f5; + padding: 40px; +} +.atelier-forms .form-intro { + background: #f2f0e9; + border-radius: 26px; + padding: 30px; +} +.atelier-forms .form-field { + background: #fff; + border-radius: 26px; + padding: 28px; + margin-bottom: 22px; +} +.atelier-forms .field-input { + background: #f5f4ef; + border: 1px solid #efede7; + border-radius: 18px; +} +.atelier-forms .form-title { + color: #183329; + font-family: "Songti SC", serif; +} +.atelier-forms .submit-button { + background: #183329; +} +.atelier-privacy { + padding: 0 40px 60px; +} +.atelier-privacy .atelier-caption { + margin-top: 24px; +} +.atelier-forms .option-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 14px; +} +.atelier-forms .choice { + --brand-button-height: 80px; + color: #555953; + background: #f5f4ef; + border: 1px solid transparent; + font-size: 23px; + padding: 14px 10px; +} +.atelier-forms .choice.selected { + color: #183329; + background: #eaf0e9; + border-color: #183329; +} +.atelier-forms .atelier-privacy { + padding: 28px; + background: #f2f0e9; + border-radius: 24px; + margin: 10px 0 28px; +} +.atelier-trust { + margin-top: 30px; +} +.atelier-forms .inquiry-form { + background: transparent; + padding: 0; + border: 0; + border-radius: 0; +} +.atelier .required { + display: inline; + color: #8d7956; +} +.atelier-forms .field-grid { + gap: 0; +} +.atelier-forms .field-textarea { + min-height: 220px; +} diff --git a/packages/template-atelier-solopreneur/template.json b/packages/template-atelier-solopreneur/template.json new file mode 100644 index 0000000..d42e955 --- /dev/null +++ b/packages/template-atelier-solopreneur/template.json @@ -0,0 +1,1710 @@ +{ + "packageKey": "atelier-solopreneur", + "version": "1.0.0", + "displayName": "独立工坊 · 品牌小程序", + "defaultBrandSlug": "atelier-studio", + "runtimeContract": "1.0", + "supportedIndustryTemplates": ["personal"], + "entrypoints": { + "home": "pages/index/index", + "offerings": "pages/services/index", + "detail": "pages/offering/detail", + "inquiry": "pages/inquiry/index", + "success": "pages/inquiry-success/index", + "records": "pages/records/index", + "profile": "pages/bookings/index" + }, + "navigation": [ + { + "key": "home", + "label": "首页", + "page": "home", + "iconPath": "assets/tab/home.png", + "selectedIconPath": "assets/tab/home-selected.png" + }, + { + "key": "offerings", + "label": "服务", + "page": "offerings", + "iconPath": "assets/tab/works.png", + "selectedIconPath": "assets/tab/works-selected.png" + }, + { + "key": "profile", + "label": "咨询", + "page": "profile", + "iconPath": "assets/tab/profile.png", + "selectedIconPath": "assets/tab/profile-selected.png" + } + ], + "requiredCapabilities": ["offerings", "inquiry"], + "dataSlots": [ + { + "key": "brand.identity", + "source": "brand", + "required": true, + "description": "品牌定位与联系渠道" + }, + { + "key": "offerings.list", + "source": "offering", + "required": true, + "description": "试点模板与服务案例" + }, + { + "key": "inquiry.form", + "source": "inquiry", + "required": true, + "description": "品牌需求意向表单" + }, + { + "key": "records.items", + "source": "records", + "required": true, + "description": "访客咨询跟进记录" + } + ], + "templateFields": [], + "assetSlots": [ + { + "key": "brand.portrait", + "binding": "brand.avatarUrl", + "target": "brand", + "label": "主理人头像", + "help": "请上传本人真实头像,留空时不展示。", + "required": false, + "kind": "portrait", + "aspectRatio": "1:1" + }, + { + "key": "offering.cover", + "binding": "offering.coverUrl", + "target": "offering", + "label": "试点模板封面", + "help": "用于说明案例或模板场景,可上传真实页面截图。", + "required": false, + "kind": "image", + "aspectRatio": "4:3" + } + ], + "admin": { + "sections": [ + { + "key": "home_intro", + "title": "首页价值定位", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "home", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.home.intro", + "label": "首页价值定位" + } + ], + "fields": [ + { + "key": "eyebrow", + "binding": "brand.config.visualPresentation.home.eyebrow", + "label": "定位标签", + "input": "text", + "previewTarget": "atelier.home.intro" + }, + { + "key": "title", + "binding": "brand.config.visualPresentation.home.title", + "label": "首页标题", + "input": "text", + "previewTarget": "atelier.home.intro" + }, + { + "key": "subtitle", + "binding": "brand.config.visualPresentation.home.subtitle", + "label": "价值说明", + "input": "textarea", + "previewTarget": "atelier.home.intro" + }, + { + "key": "primaryAction", + "binding": "brand.config.visualPresentation.home.primaryAction", + "label": "咨询按钮", + "input": "text", + "previewTarget": "atelier.home.intro" + }, + { + "key": "secondaryAction", + "binding": "brand.config.visualPresentation.home.secondaryAction", + "label": "服务按钮", + "input": "text", + "previewTarget": "atelier.home.intro" + } + ] + }, + { + "key": "home_featuresHeading", + "title": "差异化标题", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "home", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.home.featuresHeading", + "label": "差异化标题" + } + ], + "fields": [ + { + "key": "featuresTitle", + "binding": "brand.config.visualPresentation.home.featuresTitle", + "label": "区块标题", + "input": "text", + "previewTarget": "atelier.home.featuresHeading" + }, + { + "key": "featuresEnglish", + "binding": "brand.config.visualPresentation.home.featuresEnglish", + "label": "英文说明", + "input": "text", + "previewTarget": "atelier.home.featuresHeading" + } + ] + }, + { + "key": "home_casesHeading", + "title": "试点模板标题", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "home", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.home.casesHeading", + "label": "试点模板标题" + } + ], + "fields": [ + { + "key": "casesTitle", + "binding": "brand.config.visualPresentation.home.casesTitle", + "label": "案例标题", + "input": "text", + "previewTarget": "atelier.home.casesHeading" + }, + { + "key": "casesSubtitle", + "binding": "brand.config.visualPresentation.home.casesSubtitle", + "label": "案例说明", + "input": "text", + "previewTarget": "atelier.home.casesHeading" + }, + { + "key": "caseAction", + "binding": "brand.config.visualPresentation.home.caseAction", + "label": "案例按钮", + "input": "text", + "previewTarget": "atelier.home.casesHeading" + } + ] + }, + { + "key": "home_audienceHeading", + "title": "服务群体标题", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "home", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.home.audienceHeading", + "label": "服务群体标题" + } + ], + "fields": [ + { + "key": "audienceTitle", + "binding": "brand.config.visualPresentation.home.audienceTitle", + "label": "群体标题", + "input": "text", + "previewTarget": "atelier.home.audienceHeading" + }, + { + "key": "audienceEnglish", + "binding": "brand.config.visualPresentation.home.audienceEnglish", + "label": "英文说明", + "input": "text", + "previewTarget": "atelier.home.audienceHeading" + } + ] + }, + { + "key": "home_cta", + "title": "首页行动入口", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "home", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.home.cta", + "label": "首页行动入口" + } + ], + "fields": [ + { + "key": "ctaTitle", + "binding": "brand.config.visualPresentation.home.ctaTitle", + "label": "行动标题", + "input": "text", + "previewTarget": "atelier.home.cta" + }, + { + "key": "ctaSubtitle", + "binding": "brand.config.visualPresentation.home.ctaSubtitle", + "label": "行动说明", + "input": "text", + "previewTarget": "atelier.home.cta" + }, + { + "key": "ctaAction", + "binding": "brand.config.visualPresentation.home.ctaAction", + "label": "行动按钮", + "input": "text", + "previewTarget": "atelier.home.cta" + } + ] + }, + { + "key": "offerings_intro", + "title": "服务页介绍", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "offerings", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.offerings.intro", + "label": "服务页介绍" + } + ], + "fields": [ + { + "key": "eyebrow", + "binding": "brand.config.visualPresentation.offerings.eyebrow", + "label": "服务标签", + "input": "text", + "previewTarget": "atelier.offerings.intro" + }, + { + "key": "title", + "binding": "brand.config.visualPresentation.offerings.title", + "label": "服务标题", + "input": "text", + "previewTarget": "atelier.offerings.intro" + }, + { + "key": "subtitle", + "binding": "brand.config.visualPresentation.offerings.subtitle", + "label": "服务说明", + "input": "text", + "previewTarget": "atelier.offerings.intro" + } + ] + }, + { + "key": "offerings_deliverablesHeading", + "title": "交付体系标题", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "offerings", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.offerings.deliverablesHeading", + "label": "交付体系标题" + } + ], + "fields": [ + { + "key": "deliverablesTitle", + "binding": "brand.config.visualPresentation.offerings.deliverablesTitle", + "label": "标题", + "input": "text", + "previewTarget": "atelier.offerings.deliverablesHeading" + }, + { + "key": "deliverablesEnglish", + "binding": "brand.config.visualPresentation.offerings.deliverablesEnglish", + "label": "说明", + "input": "text", + "previewTarget": "atelier.offerings.deliverablesHeading" + } + ] + }, + { + "key": "offerings_processHeading", + "title": "协作流程标题", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "offerings", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.offerings.processHeading", + "label": "协作流程标题" + } + ], + "fields": [ + { + "key": "processTitle", + "binding": "brand.config.visualPresentation.offerings.processTitle", + "label": "标题", + "input": "text", + "previewTarget": "atelier.offerings.processHeading" + }, + { + "key": "processEnglish", + "binding": "brand.config.visualPresentation.offerings.processEnglish", + "label": "说明", + "input": "text", + "previewTarget": "atelier.offerings.processHeading" + } + ] + }, + { + "key": "offerings_proofHeading", + "title": "信任基石标题", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "offerings", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.offerings.proofHeading", + "label": "信任基石标题" + } + ], + "fields": [ + { + "key": "proofTitle", + "binding": "brand.config.visualPresentation.offerings.proofTitle", + "label": "标题", + "input": "text", + "previewTarget": "atelier.offerings.proofHeading" + }, + { + "key": "proofEnglish", + "binding": "brand.config.visualPresentation.offerings.proofEnglish", + "label": "说明", + "input": "text", + "previewTarget": "atelier.offerings.proofHeading" + } + ] + }, + { + "key": "offerings_cta", + "title": "服务页行动入口", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "offerings", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.offerings.cta", + "label": "服务页行动入口" + } + ], + "fields": [ + { + "key": "ctaTitle", + "binding": "brand.config.visualPresentation.offerings.ctaTitle", + "label": "行动标题", + "input": "text", + "previewTarget": "atelier.offerings.cta" + }, + { + "key": "ctaSubtitle", + "binding": "brand.config.visualPresentation.offerings.ctaSubtitle", + "label": "行动说明", + "input": "text", + "previewTarget": "atelier.offerings.cta" + }, + { + "key": "ctaAction", + "binding": "brand.config.visualPresentation.offerings.ctaAction", + "label": "行动按钮", + "input": "text", + "previewTarget": "atelier.offerings.cta" + } + ] + }, + { + "key": "profile_intro", + "title": "咨询页介绍", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "profile", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.profile.intro", + "label": "咨询页介绍" + } + ], + "fields": [ + { + "key": "eyebrow", + "binding": "brand.config.visualPresentation.profile.eyebrow", + "label": "排期说明", + "input": "text", + "previewTarget": "atelier.profile.intro" + }, + { + "key": "title", + "binding": "brand.config.visualPresentation.profile.title", + "label": "咨询标题", + "input": "text", + "previewTarget": "atelier.profile.intro" + }, + { + "key": "subtitle", + "binding": "brand.config.visualPresentation.profile.subtitle", + "label": "咨询说明", + "input": "text", + "previewTarget": "atelier.profile.intro" + } + ] + }, + { + "key": "profile_contact", + "title": "联系与响应说明", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "profile", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.profile.contact", + "label": "联系与响应说明" + } + ], + "fields": [ + { + "key": "inquiryAction", + "binding": "brand.config.visualPresentation.profile.inquiryAction", + "label": "意向入口", + "input": "text", + "previewTarget": "atelier.profile.contact" + }, + { + "key": "timeHint", + "binding": "brand.config.visualPresentation.profile.timeHint", + "label": "填写时间", + "input": "text", + "previewTarget": "atelier.profile.contact" + }, + { + "key": "wechatLabel", + "binding": "brand.config.visualPresentation.profile.wechatLabel", + "label": "微信标签", + "input": "text", + "previewTarget": "atelier.profile.contact" + }, + { + "key": "copyAction", + "binding": "brand.config.visualPresentation.profile.copyAction", + "label": "复制按钮", + "input": "text", + "previewTarget": "atelier.profile.contact" + }, + { + "key": "contactHint", + "binding": "brand.config.visualPresentation.profile.contactHint", + "label": "联系提示", + "input": "text", + "previewTarget": "atelier.profile.contact" + }, + { + "key": "promise", + "binding": "brand.config.visualPresentation.profile.promise", + "label": "合作说明", + "input": "text", + "previewTarget": "atelier.profile.contact" + }, + { + "key": "recordsAction", + "binding": "brand.config.visualPresentation.profile.recordsAction", + "label": "记录入口", + "input": "text", + "previewTarget": "atelier.profile.contact" + }, + { + "key": "contactWechat", + "binding": "brand.contactWechat", + "label": "微信号(与主理人介绍同步)", + "input": "text", + "previewTarget": "atelier.profile.contact" + } + ] + }, + { + "key": "profile_faqHeading", + "title": "常见问题标题", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "profile", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.profile.faqHeading", + "label": "常见问题标题" + } + ], + "fields": [ + { + "key": "faqTitle", + "binding": "brand.config.visualPresentation.profile.faqTitle", + "label": "标题", + "input": "text", + "previewTarget": "atelier.profile.faqHeading" + }, + { + "key": "faqSubtitle", + "binding": "brand.config.visualPresentation.profile.faqSubtitle", + "label": "说明", + "input": "text", + "previewTarget": "atelier.profile.faqHeading" + } + ] + }, + { + "key": "profile_footer", + "title": "页尾寄语", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "profile", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.profile.footer", + "label": "页尾寄语" + } + ], + "fields": [ + { + "key": "footerQuote", + "binding": "brand.config.visualPresentation.profile.footerQuote", + "label": "英文寄语", + "input": "textarea", + "previewTarget": "atelier.profile.footer" + }, + { + "key": "footerNote", + "binding": "brand.config.visualPresentation.profile.footerNote", + "label": "中文寄语", + "input": "text", + "previewTarget": "atelier.profile.footer" + } + ] + }, + { + "key": "profile_identity", + "title": "主理人介绍", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "profile", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.profile.identity", + "label": "主理人介绍" + } + ], + "fields": [ + { + "key": "founder", + "binding": "brand.config.founder", + "label": "主理人姓名", + "input": "text", + "previewTarget": "atelier.profile.identity" + }, + { + "key": "title", + "binding": "brand.config.title", + "label": "身份与专长", + "input": "text", + "previewTarget": "atelier.profile.identity" + }, + { + "key": "avatarUrl", + "binding": "brand.avatarUrl", + "label": "主理人头像", + "input": "image", + "previewTarget": "atelier.profile.identity" + }, + { + "key": "description", + "binding": "brand.description", + "label": "主理人介绍", + "input": "textarea", + "previewTarget": "atelier.profile.identity" + }, + { + "key": "contactWechat", + "binding": "brand.contactWechat", + "label": "微信号", + "input": "text", + "previewTarget": "atelier.profile.identity" + } + ] + }, + { + "key": "inquiry_intro", + "title": "意向单说明", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "inquiry", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.inquiry.intro", + "label": "意向单说明" + } + ], + "fields": [ + { + "key": "eyebrow", + "binding": "brand.config.visualPresentation.inquiry.eyebrow", + "label": "阶段标签", + "input": "text", + "previewTarget": "atelier.inquiry.intro" + }, + { + "key": "title", + "binding": "brand.config.visualPresentation.inquiry.title", + "label": "表单标题", + "input": "text", + "previewTarget": "atelier.inquiry.intro" + }, + { + "key": "subtitle", + "binding": "brand.config.visualPresentation.inquiry.subtitle", + "label": "表单说明", + "input": "text", + "previewTarget": "atelier.inquiry.intro" + }, + { + "key": "submitLabel", + "binding": "brand.config.visualPresentation.inquiry.submitLabel", + "label": "提交按钮", + "input": "text", + "previewTarget": "atelier.inquiry.intro" + }, + { + "key": "note", + "binding": "brand.config.visualPresentation.inquiry.note", + "label": "表单补充说明", + "input": "textarea", + "previewTarget": "atelier.inquiry.intro" + } + ] + }, + { + "key": "inquiry_privacy", + "title": "表单隐私说明", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "inquiry", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.inquiry.privacy", + "label": "表单隐私说明" + } + ], + "fields": [ + { + "key": "privacyTitle", + "binding": "brand.config.visualPresentation.inquiry.privacyTitle", + "label": "隐私标题", + "input": "text", + "previewTarget": "atelier.inquiry.privacy" + }, + { + "key": "privacyNote", + "binding": "brand.config.visualPresentation.inquiry.privacyNote", + "label": "隐私说明", + "input": "textarea", + "previewTarget": "atelier.inquiry.privacy" + }, + { + "key": "followupHint", + "binding": "brand.config.visualPresentation.inquiry.followupHint", + "label": "跟进预期", + "input": "text", + "previewTarget": "atelier.inquiry.privacy" + } + ] + }, + { + "key": "success_copy", + "title": "提交成功说明", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "success", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.success.copy", + "label": "提交成功说明" + } + ], + "fields": [ + { + "key": "eyebrow", + "binding": "brand.config.visualPresentation.success.eyebrow", + "label": "成功标签", + "input": "text", + "previewTarget": "atelier.success.copy" + }, + { + "key": "title", + "binding": "brand.config.visualPresentation.success.title", + "label": "成功标题", + "input": "text", + "previewTarget": "atelier.success.copy" + }, + { + "key": "intro", + "binding": "brand.config.visualPresentation.success.intro", + "label": "后续说明", + "input": "textarea", + "previewTarget": "atelier.success.copy" + }, + { + "key": "recordsAction", + "binding": "brand.config.visualPresentation.success.recordsAction", + "label": "记录按钮", + "input": "text", + "previewTarget": "atelier.success.copy" + }, + { + "key": "homeAction", + "binding": "brand.config.visualPresentation.success.homeAction", + "label": "首页按钮", + "input": "text", + "previewTarget": "atelier.success.copy" + } + ] + }, + { + "key": "records_copy", + "title": "咨询记录文案", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "records", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.records.copy", + "label": "咨询记录文案" + } + ], + "fields": [ + { + "key": "title", + "binding": "brand.config.visualPresentation.records.title", + "label": "记录标题", + "input": "text", + "previewTarget": "atelier.records.copy" + }, + { + "key": "createAction", + "binding": "brand.config.visualPresentation.records.createAction", + "label": "新增按钮", + "input": "text", + "previewTarget": "atelier.records.copy" + }, + { + "key": "emptyTitle", + "binding": "brand.config.visualPresentation.records.emptyTitle", + "label": "空状态标题", + "input": "text", + "previewTarget": "atelier.records.copy" + }, + { + "key": "emptyDescription", + "binding": "brand.config.visualPresentation.records.emptyDescription", + "label": "空状态说明", + "input": "text", + "previewTarget": "atelier.records.copy" + }, + { + "key": "emptyAction", + "binding": "brand.config.visualPresentation.records.emptyAction", + "label": "空状态按钮", + "input": "text", + "previewTarget": "atelier.records.copy" + } + ] + }, + { + "key": "projectDetail", + "title": "案例详情", + "description": "以下内容分别填写在每个案例中,空白内容不会展示。", + "page": "detail", + "target": "offering", + "fields": [ + { + "key": "name", + "binding": "offering.name", + "label": "案例名称", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "summary", + "binding": "offering.summary", + "label": "案例简介", + "input": "textarea", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "priceText", + "binding": "offering.priceText", + "label": "合作方式 / 报价说明", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "coverUrl", + "binding": "offering.coverUrl", + "label": "案例封面", + "input": "image", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "categoryLabel", + "binding": "offering.config.categoryKey", + "label": "案例类别", + "input": "select", + "options": [ + { + "value": "portfolio", + "label": "案例展示" + }, + { + "value": "consulting", + "label": "需求咨询" + }, + { + "value": "advisory", + "label": "长期支持" + }, + { + "value": "custom", + "label": "其他服务" + } + ], + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "detailHero", + "binding": "offering.config.detailHero", + "label": "详情主图", + "input": "image", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "area", + "binding": "offering.config.area", + "label": "项目地点", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "series", + "binding": "offering.config.series", + "label": "方案名称", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "spaceType", + "binding": "offering.config.spaceType", + "label": "适用场景", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "background", + "binding": "offering.config.details.background", + "label": "项目背景", + "input": "textarea", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "designConcept", + "binding": "offering.config.details.designConcept", + "label": "设计理念", + "input": "textarea", + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "keywords", + "binding": "offering.config.keywords", + "label": "项目关键词", + "input": "list", + "itemValueKey": "value", + "itemFields": [ + { + "key": "value", + "label": "关键词" + } + ], + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "crafts", + "binding": "offering.config.details.crafts", + "label": "交付要点", + "input": "list", + "itemValueKey": "value", + "itemFields": [ + { + "key": "value", + "label": "交付内容" + } + ], + "previewTarget": "atelier-solopreneur.detail.projectDetail" + }, + { + "key": "materialsList", + "binding": "offering.config.details.materialsList", + "label": "能力构成", + "input": "list", + "itemFields": [ + { + "key": "name", + "label": "能力名称" + }, + { + "key": "spec", + "label": "能力说明" + } + ], + "previewTarget": "atelier-solopreneur.detail.projectDetail" + } + ], + "previewTargets": [ + { + "key": "atelier-solopreneur.detail.projectDetail", + "label": "案例详情" + } + ] + }, + { + "key": "detailCopy", + "title": "详情页说明", + "description": "说明案例内容、价格与咨询后的真实处理方式。", + "page": "detail", + "target": "brand", + "fields": [ + { + "key": "priceLabel", + "binding": "brand.config.visualPresentation.detail.priceLabel", + "label": "价格说明标题", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.detailCopy" + }, + { + "key": "spaceLabel", + "binding": "brand.config.visualPresentation.detail.spaceLabel", + "label": "适用空间标题", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.detailCopy" + }, + { + "key": "backgroundTitle", + "binding": "brand.config.visualPresentation.detail.backgroundTitle", + "label": "项目背景标题", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.detailCopy" + }, + { + "key": "conceptTitle", + "binding": "brand.config.visualPresentation.detail.conceptTitle", + "label": "设计理念标题", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.detailCopy" + }, + { + "key": "craftsTitle", + "binding": "brand.config.visualPresentation.detail.craftsTitle", + "label": "工艺要点标题", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.detailCopy" + }, + { + "key": "materialsTitle", + "binding": "brand.config.visualPresentation.detail.materialsTitle", + "label": "材料说明标题", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.detailCopy" + } + ], + "previewTargets": [ + { + "key": "atelier-solopreneur.detail.detailCopy", + "label": "详情页说明" + } + ] + }, + { + "key": "detailAction", + "title": "详情页咨询入口", + "description": "公共按钮与提示,对所有业务详情生效。", + "page": "detail", + "target": "brand", + "fields": [ + { + "key": "inquiryAction", + "binding": "brand.config.visualPresentation.detail.inquiryAction", + "label": "咨询按钮文字", + "input": "text", + "previewTarget": "atelier-solopreneur.detail.action" + }, + { + "key": "inquiryHint", + "binding": "brand.config.visualPresentation.detail.inquiryHint", + "label": "咨询后的处理说明", + "help": "只填写能兑现的服务安排。", + "input": "textarea", + "previewTarget": "atelier-solopreneur.detail.action" + } + ], + "previewTargets": [ + { + "key": "atelier-solopreneur.detail.action", + "label": "详情页咨询入口" + } + ] + }, + { + "key": "home_case", + "title": "试点案例卡片", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "home", + "target": "offering", + "previewTargets": [ + { + "key": "atelier.home.case", + "label": "试点案例卡片" + } + ], + "fields": [ + { + "key": "name", + "binding": "offering.name", + "label": "案例名称", + "input": "text", + "previewTarget": "atelier.home.case" + }, + { + "key": "summary", + "binding": "offering.summary", + "label": "案例说明", + "input": "textarea", + "previewTarget": "atelier.home.case" + }, + { + "key": "coverUrl", + "binding": "offering.coverUrl", + "label": "案例封面", + "input": "image", + "previewTarget": "atelier.home.case" + } + ] + }, + { + "key": "home_badges", + "title": "交付标签", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "home", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.home.badges", + "label": "交付标签" + } + ], + "fields": [ + { + "key": "badges", + "binding": "brand.config.atelier.badges", + "label": "交付标签", + "input": "list", + "previewTarget": "atelier.home.badges", + "itemFields": [ + { + "key": "title", + "label": "标题" + } + ] + } + ] + }, + { + "key": "home_features", + "title": "差异化构建卡片", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "home", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.home.features", + "label": "差异化构建卡片" + } + ], + "fields": [ + { + "key": "features", + "binding": "brand.config.atelier.features", + "label": "差异化构建卡片", + "input": "list", + "previewTarget": "atelier.home.features", + "itemFields": [ + { + "key": "tag", + "label": "标签" + }, + { + "key": "title", + "label": "标题" + }, + { + "key": "description", + "label": "说明" + } + ] + } + ] + }, + { + "key": "home_audiences", + "title": "服务群体", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "home", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.home.audiences", + "label": "服务群体" + } + ], + "fields": [ + { + "key": "audiences", + "binding": "brand.config.atelier.audiences", + "label": "服务群体", + "input": "list", + "previewTarget": "atelier.home.audiences", + "itemFields": [ + { + "key": "symbol", + "label": "符号" + }, + { + "key": "title", + "label": "标题" + }, + { + "key": "description", + "label": "说明" + } + ] + } + ] + }, + { + "key": "offerings_deliverables", + "title": "交付体系", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "offerings", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.offerings.deliverables", + "label": "交付体系" + } + ], + "fields": [ + { + "key": "deliverables", + "binding": "brand.config.atelier.deliverables", + "label": "交付体系", + "input": "list", + "previewTarget": "atelier.offerings.deliverables", + "itemFields": [ + { + "key": "title", + "label": "标题" + }, + { + "key": "tag", + "label": "标签" + }, + { + "key": "description", + "label": "说明" + } + ] + } + ] + }, + { + "key": "offerings_process", + "title": "协作步骤", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "offerings", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.offerings.process", + "label": "协作步骤" + } + ], + "fields": [ + { + "key": "process", + "binding": "brand.config.atelier.process", + "label": "协作步骤", + "input": "list", + "previewTarget": "atelier.offerings.process", + "itemFields": [ + { + "key": "title", + "label": "标题" + }, + { + "key": "description", + "label": "说明" + } + ] + } + ] + }, + { + "key": "offerings_proofs", + "title": "信任基石", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "offerings", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.offerings.proofs", + "label": "信任基石" + } + ], + "fields": [ + { + "key": "proofs", + "binding": "brand.config.atelier.proofs", + "label": "信任基石", + "input": "list", + "previewTarget": "atelier.offerings.proofs", + "itemFields": [ + { + "key": "title", + "label": "标题" + }, + { + "key": "description", + "label": "说明" + } + ] + } + ] + }, + { + "key": "profile_faqs", + "title": "常见问题", + "description": "修改后保存为草稿,发布后对访客生效。", + "page": "profile", + "target": "brand", + "previewTargets": [ + { + "key": "atelier.profile.faqs", + "label": "常见问题" + } + ], + "fields": [ + { + "key": "faqs", + "binding": "brand.config.atelier.faqs", + "label": "常见问题", + "input": "list", + "previewTarget": "atelier.profile.faqs", + "itemFields": [ + { + "key": "title", + "label": "标题" + }, + { + "key": "description", + "label": "说明" + } + ] + } + ] + } + ] + }, + "trustContentTypes": [ + { + "type": "credential", + "label": "系统基础与合作边界", + "adminFields": { + "title": "说明标题", + "summary": "说明摘要", + "content": "系统基础与合作说明" + }, + "pages": ["offerings"], + "required": true + } + ], + "sampleContent": { + "personal": { + "templateKey": "personal", + "inquiryFormName": "品牌小程序需求意向单", + "offerings": [ + { + "kind": "service", + "name": "校园餐饮品牌", + "summary": "敏捷菜单 + 品牌展示 + 咨询承接", + "categoryKey": "prototype", + "coverUrl": "/assets/cases/campus.jpg" + }, + { + "kind": "service", + "name": "个人编辑型品牌", + "summary": "案例沉淀 + 专业表达 + 合作咨询", + "categoryKey": "prototype", + "coverUrl": "/assets/cases/editorial.jpg" + } + ], + "trustContent": [ + { + "type": "credential", + "title": "系统基础与合作边界", + "content": "当前已实现两套试点模板、网页内容管理、草稿预览与发布、咨询承接能力。具体交付页面、上线材料、费用、排期与后续支持范围,需要在需求沟通后确认。" + } + ], + "fields": [ + { + "key": "name", + "label": "称呼 / 品牌名称", + "type": "text", + "required": true + }, + { + "key": "industry", + "label": "你的主营领域", + "type": "radio", + "required": true, + "options": [ + { + "label": "独立设计 / 建筑", + "value": "独立设计 / 建筑" + }, + { + "label": "摄影 / 视觉艺术", + "value": "摄影 / 视觉艺术" + }, + { + "label": "独立商业咨询", + "value": "独立商业咨询" + }, + { + "label": "教练 / 身心疗愈", + "value": "教练 / 身心疗愈" + }, + { + "label": "个人 IP / 创作者", + "value": "个人 IP / 创作者" + }, + { + "label": "精品品牌 / 实体", + "value": "精品品牌 / 实体" + }, + { + "label": "其他", + "value": "其他" + } + ] + }, + { + "key": "needs", + "label": "目前主要诉求与现状", + "type": "textarea", + "required": true + }, + { + "key": "timeline", + "label": "预期启动排期", + "type": "radio", + "required": false, + "options": [ + { + "label": "本月内", + "value": "本月内" + }, + { + "label": "下月起", + "value": "下月起" + }, + { + "label": "先期评估", + "value": "先期评估" + } + ] + }, + { + "key": "contact", + "label": "联系方式(微信 / 电话)", + "type": "text", + "required": true + } + ], + "capabilityKey": "inquiry", + "brandConfig": { + "visualPresentation": { + "home": { + "eyebrow": "独立开发者 · 品牌小程序构建", + "title": "把个人品牌做成\n可持续运营的小程序", + "subtitle": "不只是做一个展示页面,而是为你搭建专业展示、内容运营与长期承接咨询的小程序系统。", + "primaryAction": "预约咨询 / 聊聊需求", + "secondaryAction": "查看服务架构", + "featuresTitle": "差异化构建逻辑", + "featuresEnglish": "Bespoke System", + "casesTitle": "试点架构原型", + "casesSubtitle": "验证模板 · 点击进入结构解析", + "caseAction": "查看详情架构 →", + "audienceTitle": "专属服务群体", + "audienceEnglish": "Target Creators", + "ctaTitle": "开启你的品牌小程序", + "ctaSubtitle": "从策略梳理到上线的一站式交付", + "ctaAction": "立即沟通" + }, + "offerings": { + "eyebrow": "完整独立交付 · 匠心构建", + "title": "全链路服务与透明协作", + "subtitle": "站在产品与长期运营的角度设计,专注交付可持续更新的个人品牌数字资产。", + "deliverablesTitle": "交付体系", + "deliverablesEnglish": "7 Deliverables", + "processTitle": "协作流程", + "processEnglish": "5 Phases · 节点透明可溯", + "proofTitle": "信任基石", + "proofEnglish": "Why bespoke", + "ctaTitle": "对流程有疑问?直接聊聊", + "ctaSubtitle": "一起梳理当前的品牌数字化需求,评估适合的结构与启动时间。", + "ctaAction": "预约需求沟通" + }, + "profile": { + "eyebrow": "开放需求沟通 · 排期以实际确认为准", + "title": "聊聊你的品牌小程序", + "subtitle": "描述你的当前业务、目标用户和遇到的挑战,一起梳理适合的结构与上线路径。", + "inquiryAction": "预约需求沟通 · 填写意向单", + "timeHint": "约 3 分钟", + "wechatLabel": "微信直聊", + "copyAction": "复制微信", + "contactHint": "尚未配置微信号,可先填写意向单", + "promise": "先梳理可行性与时间节点,再确认合作范围", + "recordsAction": "查看我的咨询记录 →", + "faqTitle": "常见疑问解答", + "faqSubtitle": "把透明与确定性放在第一位,说明合作的常见顾虑与流程。", + "footerQuote": "Bespoke digital architecture for clear minds.", + "footerNote": "用心打磨每一处体验 · 期待与你的灵感交汇" + }, + "inquiry": { + "eyebrow": "Atelier Note · 品牌意向梳理", + "title": "品牌意向梳理 · 3 分钟完成", + "subtitle": "用于需求梳理与排期评估,请填写当前业务、目标用户与主要诉求。", + "submitLabel": "提交意向 · 预约沟通", + "privacyTitle": "信息使用说明", + "privacyNote": "你提交的信息仅用于本次需求评估与后续联系。请勿填写密码、证件号码等敏感信息。", + "followupHint": "提交后可在咨询记录中查看状态,具体响应时间以主理人确认为准。", + "note": "填写的信息仅用于需求沟通与排期评估。" + }, + "success": { + "eyebrow": "已提交", + "title": "意向已送达工坊", + "intro": "已收到你的需求清单,将结合业务情况评估可行性,并通过你留下的联系方式沟通。", + "recordsAction": "查看咨询记录", + "homeAction": "返回首页" + }, + "records": { + "title": "我的品牌咨询", + "createAction": "填写新需求", + "emptyTitle": "还没有咨询记录", + "emptyDescription": "提交品牌需求后,可以在这里查看后续跟进状态。", + "emptyAction": "填写品牌需求" + }, + "detail": { + "priceLabel": "合作方式", + "spaceLabel": "适用场景", + "backgroundTitle": "案例与业务背景", + "conceptTitle": "构建思路", + "craftsTitle": "交付要点", + "materialsTitle": "能力构成", + "inquiryAction": "聊聊类似需求", + "inquiryHint": "具体范围与报价在需求确认后提供。" + } + }, + "atelier": { + "badges": [ + { + "title": "完整可交付小程序" + }, + { + "title": "支持后台随时更新" + }, + { + "title": "支持长期演进" + } + ], + "features": [ + { + "tag": "敏捷控制台", + "title": "不是静态页面,而是可持续更新的系统", + "description": "拥有独立管理后台,案例作品、核心业务与介绍随时增删修改,让日常更新回归内容本身。" + }, + { + "tag": "信任转化", + "title": "先梳理定位与信任结构", + "description": "优先厘清客户的了解路径与业务背书,从第一屏价值表达,到高意向咨询的承接。" + }, + { + "tag": "陪伴演进", + "title": "交付之后,支持长期迭代", + "description": "从上线协助到阶段性功能扩展,让品牌载体伴随业务持续成长。" + } + ], + "audiences": [ + { + "symbol": "◎", + "title": "摄影师", + "description": "样片沉淀" + }, + { + "symbol": "◇", + "title": "咨询顾问", + "description": "信任转化" + }, + { + "symbol": "✎", + "title": "独立设计", + "description": "作品展呈" + }, + { + "symbol": "↗", + "title": "教练疗愈", + "description": "需求预约" + }, + { + "symbol": "▤", + "title": "IP 创作者", + "description": "私域载体" + }, + { + "symbol": "⌂", + "title": "小微实体", + "description": "产品看板" + } + ], + "deliverables": [ + { + "title": "品牌定位梳理", + "tag": "清晰聚焦", + "description": "提炼核心专长与目标客户画像,明确小程序核心诉求与转化路径。" + }, + { + "title": "页面结构设计", + "tag": "信任动线", + "description": "梳理信息架构与信任动线,建立递进式了解路径。" + }, + { + "title": "小程序视觉设计", + "tag": "克制美学", + "description": "结合微信使用习惯设计界面,用精致排版强化专业辨识度。" + }, + { + "title": "内容字段规划", + "tag": "结构资产", + "description": "规范案例、服务与常见问题字段,让内容持续沉淀。" + }, + { + "title": "后台管理配置", + "tag": "自主维护", + "description": "通过网页后台修改内容、上传图片,保存为草稿,确认后发布。" + }, + { + "title": "发布上线协助", + "tag": "上线协作", + "description": "协助准备微信主体与类目材料、配置和提审,审核结果以微信平台为准。" + }, + { + "title": "后续运营支持", + "tag": "长期支持", + "description": "提供操作说明与迭代建议,具体支持范围在合作时确认。" + } + ], + "process": [ + { + "title": "需求沟通", + "description": "交流专业背景、获客渠道与核心需求,评估可行性与排期。" + }, + { + "title": "品牌结构梳理", + "description": "提炼品牌关键词与信息架构,统一页面目标。" + }, + { + "title": "界面设计确认", + "description": "确认原型、视觉、排版与交互细节。" + }, + { + "title": "内容配置与上线", + "description": "录入案例与服务资料,联调、提审并协助发布。" + }, + { + "title": "长期演进迭代", + "description": "根据反馈完善内容,按约定范围迭代功能。" + } + ], + "proofs": [ + { + "title": "已有系统基础", + "description": "两套试点模板验证展示、配置与咨询链路。" + }, + { + "title": "支持后台管理", + "description": "内容由品牌自行维护,草稿确认后再发布。" + }, + { + "title": "模块化扩展", + "description": "复用稳定的系统能力,按需求扩展页面与服务。" + }, + { + "title": "定位先于视觉", + "description": "先说明你是谁、为谁服务、为什么值得信任。" + }, + { + "title": "直接沟通与持续支持", + "description": "独立主理人直接对接,合作边界与后续支持提前确认。" + } + ], + "faqs": [ + { + "title": "还没整理好品牌文案,可以开始吗?", + "description": "可以先沟通。第一阶段一起梳理定位、核心业务与已有素材,再确定需要补齐的内容。" + }, + { + "title": "后续内容可以自己修改吗?", + "description": "可以通过网页管理后台维护简介、案例、服务与表单。保存先形成草稿,确认并发布后,公开小程序才更新。" + }, + { + "title": "可以先做轻量版本验证吗?", + "description": "可以。优先用展示、服务介绍与意向咨询等核心页面验证需求,再依据反馈扩展。" + }, + { + "title": "设计和上线怎么配合?", + "description": "需求对齐、结构梳理、视觉确认、内容配置与上线分阶段推进。微信认证与审核由平台决定,所需材料和分工提前确认。" + } + ] + } + } + } + }, + "pages": ["pages/index/index", "pages/services/index", "pages/bookings/index"] +} diff --git a/packages/template-atelier-solopreneur/tsconfig.json b/packages/template-atelier-solopreneur/tsconfig.json new file mode 100644 index 0000000..a069d71 --- /dev/null +++ b/packages/template-atelier-solopreneur/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../apps/taro/tsconfig.json", + "include": ["taro"] +} diff --git a/packages/template-contract/src/index.ts b/packages/template-contract/src/index.ts index 9b8fab0..e1161a6 100644 --- a/packages/template-contract/src/index.ts +++ b/packages/template-contract/src/index.ts @@ -122,6 +122,7 @@ export type TemplateTrustContentType = { }; export type TemplateSampleContent = { + brandConfig?: Record; templateKey: string; inquiryFormName: string; offerings: Array>; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index feddc4c..56c270c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -254,6 +254,34 @@ importers: specifier: 18.3.18 version: 18.3.18 + packages/template-atelier-solopreneur: + dependencies: + '@personal-brand/types': + specifier: workspace:* + version: link:../types + '@tarojs/components': + specifier: 4.3.0 + version: 4.3.0(@tarojs/helper@4.3.0)(@types/react@18.3.18)(postcss@8.5.28)(rollup@3.30.0) + '@tarojs/plugin-platform-h5': + specifier: 4.3.0 + version: 4.3.0(@tarojs/taro@4.3.0(@tarojs/components@4.3.0(@tarojs/helper@4.3.0)(@types/react@18.3.18)(postcss@8.5.28)(rollup@3.30.0))(@tarojs/helper@4.3.0)(@tarojs/shared@4.3.0)(@types/react@18.3.18)(postcss@8.5.28)(rollup@3.30.0))(@types/react@18.3.18)(postcss@8.5.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@3.30.0)(solid-js@1.9.17) + '@tarojs/plugin-platform-weapp': + specifier: 4.3.0 + version: 4.3.0(@tarojs/service@4.3.0)(@tarojs/shared@4.3.0) + '@tarojs/taro': + specifier: 4.3.0 + version: 4.3.0(@tarojs/components@4.3.0(@tarojs/helper@4.3.0)(@types/react@18.3.18)(postcss@8.5.28)(rollup@3.30.0))(@tarojs/helper@4.3.0)(@tarojs/shared@4.3.0)(@types/react@18.3.18)(postcss@8.5.28)(rollup@3.30.0) + react: + specifier: 18.3.1 + version: 18.3.1 + react-dom: + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) + devDependencies: + '@types/react': + specifier: 18.3.18 + version: 18.3.18 + packages/template-compiler: dependencies: '@personal-brand/template-contract':