fix: 让信任内容管理保持行业无关

This commit is contained in:
que01 committed 2026-09-27 12:34:34 +08:00
1 parent 774ae2c8e3
commit 6d7fae95b3
7 files changed
+66 -26

No files matched your search

@@ -7,9 +7,11 @@
- 阿成演示数据迁移到 `schedule`、`coverage`、`process`、`credential`、`case`、`promise` 六类通用类型。
- 阿成首页、出摊服务、主理人页面消费 `trustItems`;无对应类型时不渲染区块。
- `AGENTS.md` 固化模板 package 与品牌数据库的边界,禁止用全局 seed 承载模板集合。
- Admin 信任内容页面改用通用中文类型和逐行填写说明,不再出现餐饮专属管理术语;演示 seed 与模板 sampleContent 已移除旧 `profile/portfolio` 类型。
## 验证
- API integration:37/37 通过。
- miniapp fixture、visual fixture、template compiler:通过。
- typecheck、lint:通过。
- Admin typecheck、production build、template catalog validation:通过。
@@ -20,12 +20,36 @@ import { ImageUrlField } from "../../components/ImageUrlField.js";
import { MutationError, QueryState } from "../../components/QueryState.js";
const types = [
{ value: "profile", label: "个人经历" },
{ value: "experience", label: "工作经验" },
{ value: "credential", label: "资历与证明" },
{ value: "portfolio", label: "案例与作品" },
{ value: "process", label: "合作流程" },
{ value: "testimonial", label: "客户反馈" },
{
value: "schedule",
label: "时间与服务安排",
help: "说明你通常什么时候提供服务、接受预约或处理订单。多项内容可以分行填写。",
},
{
value: "coverage",
label: "服务范围与方式",
help: "说明服务地点、覆盖范围、适用对象或承接边界。多项内容可以分行填写。",
},
{
value: "process",
label: "合作流程",
help: "说明客户从提出需求到完成合作会经历哪些步骤,每行写一步。",
},
{
value: "credential",
label: "资质与专业证明",
help: "说明资质、经验、制作标准或让客户放心的专业依据。",
},
{
value: "case",
label: "案例与客户反馈",
help: "写代表性案例、服务结果或客户评价,多条内容可以分行填写。",
},
{
value: "promise",
label: "服务承诺与响应说明",
help: "说明回复时间、交付承诺、售后方式或合作预期。",
},
];
export function TrustContentPage() {
@@ -71,7 +95,7 @@ export function TrustContentPage() {
...(item.coverUrl ? { coverUrl: item.coverUrl } : {}),
isPublished: item.isPublished,
}
: { type: "profile", isPublished: false },
: { type: "credential", isPublished: false },
);
};
return (
@@ -146,7 +170,7 @@ export function TrustContentPage() {
destroyOnClose
>
<Form form={form} layout="vertical" onFinish={(values) => save.mutate(values)}>
<Form.Item name="type" label="证据类型" rules={[{ required: true }]}>
<Form.Item name="type" label="内容用途" rules={[{ required: true }]}>
<Select options={types} />
</Form.Item>
<Form.Item name="title" label="标题" rules={[{ required: true }]}>
@@ -155,8 +179,18 @@ export function TrustContentPage() {
<Form.Item name="summary" label="摘要">
<Input />
</Form.Item>
<Form.Item name="content" label="详细内容" rules={[{ required: true }]}>
<Input.TextArea rows={8} showCount maxLength={2000} />
<Form.Item
name="content"
label="详细内容"
help="每行写一项,页面会按模板样式展示。不要填写 HTML 或代码。"
rules={[{ required: true }]}
>
<Input.TextArea
rows={8}
showCount
maxLength={2000}
placeholder="例如:\n周一至周五 17:00 - 22:30\n周末接受团体预约"
/>
</Form.Item>
<Form.Item
name="coverUrl"
+3 -3
View File
@@ -144,7 +144,7 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
],
trustContent: [
{
type: "profile",
type: "credential",
title: "关于林然",
content: "专注帮助专业服务者建立可信、清晰且能带来合作的个人品牌表达。",
},
@@ -565,7 +565,7 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
],
trustContent: [
{
type: "profile",
type: "credential",
title: "主理人的门作观",
content:
"国家注册高级室内建筑师,专注高定大门及私宅空间门类系统研发 14 年。拒绝建材量产拼装,以门与空间同构的建筑理念,亲自主理选材、构造深化与落地试装。",
@@ -604,7 +604,7 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
},
},
{
type: "portfolio",
type: "case",
title: "别墅门系统案例",
content: "围绕入户、庭院和室内空间建立完整门系统。",
},
@@ -307,7 +307,7 @@ export const generatedTemplatePackageRegistry = [
],
"trustContent": [
{
"type": "profile",
"type": "credential",
"title": "关于主理人",
"content": "示例内容,待品牌主理人完善。"
},
@@ -712,12 +712,12 @@ export const generatedTemplatePackageRegistry = [
],
"trustContent": [
{
"type": "profile",
"type": "credential",
"title": "主理人的门作观",
"content": "示例内容,待品牌主理人完善。"
},
{
"type": "portfolio",
"type": "case",
"title": "别墅门系统案例",
"content": "示例内容,待品牌主理人完善。"
},
@@ -870,7 +870,7 @@ export const generatedTemplatePackageRegistry = [
],
"trustContent": [
{
"type": "profile",
"type": "credential",
"title": "关于主理人",
"content": "示例内容,待品牌主理人完善。"
},
@@ -912,4 +912,4 @@ export const generatedTemplatePackageRegistry = [
}
];
export const generatedTemplatePackageRegistryHash =
"a2e3390bbd1557c4ae8836266c83cb13a265a693ac05927e3cacc3d73cdb1741";
"ebcac61077ff8d4097065555e86c651b93f99f91196b55b9503a13c6dcb9631a";
+4 -4
View File
@@ -310,8 +310,8 @@ const doorsSampleContent: TemplateSampleContent = {
},
],
trustContent: [
{ type: "profile", title: "主理人的门作观", content: "示例内容,待品牌主理人完善。" },
{ type: "portfolio", title: "别墅门系统案例", content: "示例内容,待品牌主理人完善。" },
{ type: "credential", title: "主理人的门作观", content: "示例内容,待品牌主理人完善。" },
{ type: "case", title: "别墅门系统案例", content: "示例内容,待品牌主理人完善。" },
{ type: "process", title: "从测量到交付", content: "示例内容,待品牌主理人完善。" },
{ type: "credential", title: "材料与工艺标准", content: "示例内容,待品牌主理人完善。" },
],
@@ -341,7 +341,7 @@ const foodSampleContent: TemplateSampleContent = {
},
],
trustContent: [
{ type: "profile", title: "关于主理人", content: "示例内容,待品牌主理人完善。" },
{ type: "credential", title: "关于主理人", content: "示例内容,待品牌主理人完善。" },
{ type: "process", title: "从预订到取餐", content: "示例内容,待品牌主理人完善。" },
],
fields: [
@@ -369,7 +369,7 @@ const personalSampleContent: TemplateSampleContent = {
},
],
trustContent: [
{ type: "profile", title: "关于主理人", content: "示例内容,待品牌主理人完善。" },
{ type: "credential", title: "关于主理人", content: "示例内容,待品牌主理人完善。" },
{ type: "process", title: "合作方法", content: "示例内容,待品牌主理人完善。" },
],
fields: [
@@ -299,7 +299,7 @@
}
],
"trustContent": [
{ "type": "profile", "title": "关于主理人", "content": "示例内容,待品牌主理人完善。" },
{ "type": "credential", "title": "关于主理人", "content": "示例内容,待品牌主理人完善。" },
{ "type": "process", "title": "从预订到取餐", "content": "示例内容,待品牌主理人完善。" }
],
"fields": [
@@ -299,9 +299,13 @@
}
],
"trustContent": [
{ "type": "profile", "title": "主理人的门作观", "content": "示例内容,待品牌主理人完善。" },
{
"type": "portfolio",
"type": "credential",
"title": "主理人的门作观",
"content": "示例内容,待品牌主理人完善。"
},
{
"type": "case",
"title": "别墅门系统案例",
"content": "示例内容,待品牌主理人完善。"
},
@@ -402,7 +406,7 @@
}
],
"trustContent": [
{ "type": "profile", "title": "关于主理人", "content": "示例内容,待品牌主理人完善。" },
{ "type": "credential", "title": "关于主理人", "content": "示例内容,待品牌主理人完善。" },
{ "type": "process", "title": "合作方法", "content": "示例内容,待品牌主理人完善。" }
],
"fields": [