feat: 将阿成信任内容迁移为品牌数据
This commit is contained in:
1 parent
55989a5dfe
commit
774ae2c8e3
19 files changed
+142
-35
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# 执行记录
|
||||
|
||||
## 已完成
|
||||
|
||||
- 公开 workspace 新增 `trustItems`,仅从发布快照中的已发布信任内容生成,字段为 `type`、`title`、`summary`、`content`、`config`。
|
||||
- `RuntimeWorkspace`、api-client、空 workspace 响应和 API 集成测试已同步。
|
||||
- 阿成演示数据迁移到 `schedule`、`coverage`、`process`、`credential`、`case`、`promise` 六类通用类型。
|
||||
- 阿成首页、出摊服务、主理人页面消费 `trustItems`;无对应类型时不渲染区块。
|
||||
- `AGENTS.md` 固化模板 package 与品牌数据库的边界,禁止用全局 seed 承载模板集合。
|
||||
|
||||
## 验证
|
||||
|
||||
- API integration:37/37 通过。
|
||||
- miniapp fixture、visual fixture、template compiler:通过。
|
||||
- typecheck、lint:通过。
|
||||
@@ -0,0 +1,12 @@
|
||||
# 信任内容数据化
|
||||
|
||||
## 目标
|
||||
|
||||
将阿成模板页面中的行业文案迁移到品牌信任内容,公开 workspace 返回通用 `trustItems`,模板按内容类型展示;继续保留 `trustPresentation` 供林境等既有模板使用。
|
||||
|
||||
## 数据边界
|
||||
|
||||
- 模板 package 持有 manifest、视觉结构和 sample content。
|
||||
- 数据库只保存具体品牌的内容;示例内容只有管理员为该品牌显式导入后才落库。
|
||||
- `seed.ts` 只维护少量开发演示品牌 fixture,不是模板目录。
|
||||
- 本阶段采用方案 A:多行内容使用 `content` 换行表达,后台列表编辑器后续单独增强。
|
||||
@@ -0,0 +1,5 @@
|
||||
id,task,status,acceptance_criteria,validation_command,completed_at,retry_count,notes
|
||||
1,新增公开 trustItems 契约,DONE,公开 workspace 返回已发布信任条目且未发布条目不进入快照,pnpm --filter @personal-brand/api test:integration,2026-09-27,0,类型、api-client、集成测试同步
|
||||
2,迁移阿成演示内容,DONE,阿成 seed fixture 使用通用信任类型且不依赖模板 sampleContent,pnpm --filter @personal-brand/api test:integration,2026-09-27,0,模板示例仍由 package registry 管理
|
||||
3,改造阿成三个页面,DONE,首页、出摊服务、主理人页面按 trustItems 渲染且无数据时隐藏对应区块,pnpm --filter @personal-brand/miniapp test:visual-fixture,2026-09-27,0,多行 content 在 miniapp view model 拆分
|
||||
4,固化模板与数据库边界,DONE,AGENTS.md 明确禁止将所有模板 sample data 写入全局 seed,pnpm typecheck && pnpm lint,2026-09-27,0,规则已落盘
|
||||
|
@@ -5,6 +5,8 @@
|
||||
- Industry behavior is implemented as replaceable templates. Food, consulting, design, photography, and future industries must not hard-code their terminology or fields into the shared brand model or shared UI.
|
||||
- The food template is supported, but it is an example template rather than the product definition.
|
||||
- Backend configuration is the source of truth for brand content, services, template selection, trust-building content, and industry-specific fields. The mini program only renders configuration and submits user input.
|
||||
- Template packages are the source of truth for template manifests, visual structure, default/sample content, field declarations, assets, and capabilities. Do not copy every template's sample data into Prisma seed or global database tables. A template's sample content may be copied into the database only when an administrator explicitly imports it for one specific brand; the resulting rows are brand content, not template registration.
|
||||
- `apps/api/prisma/seed.ts` may contain a small, explicit development fixture for the seeded demo brands, but it must never become the catalog of all templates or require one seed block per production template. New templates must be discoverable and validated from their package manifest without editing global seed data.
|
||||
- Any delivered backend endpoint must have an automated test covering its authorization and successful behavior before it is considered complete.
|
||||
- Keep personal-brand trust details explicit: biography, positioning, credentials, portfolio/proof, process, expectations, availability, contact methods, and clear follow-up status.
|
||||
|
||||
|
||||
+47
-13
@@ -272,11 +272,39 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
|
||||
},
|
||||
],
|
||||
trustContent: [
|
||||
{ type: "profile", title: "关于阿成", content: "每天认真做好一顿家常饭。" },
|
||||
{
|
||||
type: "schedule",
|
||||
title: "每周出摊日程",
|
||||
summary: "周一至周五晚餐与夜宵档",
|
||||
content: "二号校门外小吃商业街 · 17:00 - 22:30\n周六、周日承接团体单与夜市流动出摊",
|
||||
},
|
||||
{
|
||||
type: "coverage",
|
||||
title: "取餐与配送范围",
|
||||
summary: "提前预订,按约定时间取餐或配送",
|
||||
content: "摊位现场自取;满 3 份可配送至校内宿舍楼栋或实验楼门前。",
|
||||
},
|
||||
{
|
||||
type: "process",
|
||||
title: "认真做饭的流程",
|
||||
content: "提前准备食材,现做现出餐,认真沟通每一次需求。",
|
||||
title: "定制餐品流程",
|
||||
summary: "从需求沟通到保温交付",
|
||||
content: "提交基本需求\n确认菜单与预算\n当日新鲜烹饪打包\n保温直达交付",
|
||||
},
|
||||
{
|
||||
type: "credential",
|
||||
title: "食品安全与制作承诺",
|
||||
content: "当天采购,现做现出餐;食具每日清洁消毒,按约定标注和分装。",
|
||||
},
|
||||
{
|
||||
type: "case",
|
||||
title: "他们都在阿成这订过餐",
|
||||
content:
|
||||
"校街舞社年度专场 · 52 人份\n信息学院科创竞赛 · 连签 5 天\n7 号楼庆功宴 · 8 人定制",
|
||||
},
|
||||
{
|
||||
type: "promise",
|
||||
title: "回复承诺",
|
||||
content: "备料期 15 分钟内联系,出摊高峰 1 小时内回复。",
|
||||
},
|
||||
],
|
||||
inquiryForm: {
|
||||
@@ -661,14 +689,21 @@ async function ensureRuntimeContent(brandId: string, template: RuntimeSeedTempla
|
||||
}
|
||||
: {}),
|
||||
}));
|
||||
const trustContent = packageSample?.trustContent?.length
|
||||
? packageSample.trustContent.map((item, index) => ({
|
||||
...template.trustContent[index],
|
||||
type: item.type,
|
||||
title: item.title,
|
||||
content: item.content,
|
||||
}))
|
||||
: template.trustContent;
|
||||
// 模板 package 的 sampleContent 只用于导入预览;演示品牌使用明确的品牌 fixture,
|
||||
// 避免把模板示例内容误当成所有品牌的数据库初始数据。
|
||||
const trustContent = template.trustContent;
|
||||
const inquiryFields = (packageSample?.fields ?? template.inquiryForm.fieldsSnapshot).map(
|
||||
(field) => ({
|
||||
...field,
|
||||
...(Array.isArray(field.options)
|
||||
? {
|
||||
options: field.options.map((option) =>
|
||||
typeof option === "string" ? { label: option, value: option } : option,
|
||||
),
|
||||
}
|
||||
: {}),
|
||||
}),
|
||||
);
|
||||
await prisma.brandProfile.update({
|
||||
where: { id: brandId },
|
||||
data: {
|
||||
@@ -739,8 +774,7 @@ async function ensureRuntimeContent(brandId: string, template: RuntimeSeedTempla
|
||||
purpose: "inquiry",
|
||||
targetType: "brand",
|
||||
submissionAction: "create-inquiry",
|
||||
fieldsSnapshot: (packageSample?.fields ??
|
||||
template.inquiryForm.fieldsSnapshot) as Prisma.InputJsonValue,
|
||||
fieldsSnapshot: inquiryFields as Prisma.InputJsonValue,
|
||||
isEnabled: true,
|
||||
} as const;
|
||||
if (existingForm)
|
||||
|
||||
@@ -56,7 +56,7 @@ export class ChangeAdminPasswordDto {
|
||||
}
|
||||
|
||||
export class CreateTrustContentDto {
|
||||
@IsIn(["profile", "experience", "credential", "portfolio", "process", "testimonial"])
|
||||
@IsIn(["schedule", "coverage", "process", "credential", "case", "promise"])
|
||||
type!: string;
|
||||
@IsString() title!: string;
|
||||
@IsOptional() @IsString() summary?: string;
|
||||
@@ -69,7 +69,7 @@ export class CreateTrustContentDto {
|
||||
|
||||
export class UpdateTrustContentDto {
|
||||
@IsOptional()
|
||||
@IsIn(["profile", "experience", "credential", "portfolio", "process", "testimonial"])
|
||||
@IsIn(["schedule", "coverage", "process", "credential", "case", "promise"])
|
||||
type?: string;
|
||||
@IsOptional() @IsString() title?: string;
|
||||
@IsOptional() @IsString() summary?: string;
|
||||
|
||||
@@ -12,7 +12,12 @@ import {
|
||||
getDefaultVisualTemplateKey,
|
||||
getTemplatePackageManifestForVisualKey,
|
||||
} from "@personal-brand/config";
|
||||
import type { RuntimeInquiryField, RuntimeOffering, RuntimeWorkspace } from "@personal-brand/types";
|
||||
import type {
|
||||
RuntimeInquiryField,
|
||||
RuntimeOffering,
|
||||
RuntimeTrustItem,
|
||||
RuntimeWorkspace,
|
||||
} from "@personal-brand/types";
|
||||
|
||||
@Controller("public/workspace")
|
||||
export class PublicWorkspaceController {
|
||||
@@ -39,6 +44,7 @@ export class PublicWorkspaceController {
|
||||
visualTemplate: null,
|
||||
offerings: [],
|
||||
inquiryForms: [],
|
||||
trustItems: [],
|
||||
capabilities: [],
|
||||
trustPresentation: {},
|
||||
navigation: { tabs: [] },
|
||||
@@ -246,6 +252,19 @@ export class PublicWorkspaceController {
|
||||
if (item.type === "profile" && typeof result.bio !== "string") result.bio = item.content;
|
||||
return result;
|
||||
}, {});
|
||||
const trustItems: RuntimeTrustItem[] = trustData.flatMap((raw) => {
|
||||
const item = this.jsonObject(raw);
|
||||
if (typeof item.type !== "string" || typeof item.title !== "string") return [];
|
||||
return [
|
||||
{
|
||||
type: item.type,
|
||||
title: item.title,
|
||||
summary: typeof item.summary === "string" ? item.summary : null,
|
||||
content: typeof item.content === "string" ? item.content : "",
|
||||
config: this.jsonObject(item.config),
|
||||
},
|
||||
];
|
||||
});
|
||||
const runtimeWorkspace: RuntimeWorkspace = {
|
||||
schemaVersion: "1.0.0",
|
||||
publication: {
|
||||
@@ -280,6 +299,7 @@ export class PublicWorkspaceController {
|
||||
fields: toInquiryFields(form.fieldsSnapshot as Prisma.JsonValue),
|
||||
};
|
||||
}),
|
||||
trustItems,
|
||||
trustPresentation,
|
||||
capabilities: runtimeCapabilities,
|
||||
plugins: runtimeCapabilities
|
||||
|
||||
@@ -328,6 +328,8 @@ test("health and public content are available without authentication", async ()
|
||||
assert.equal(runtime.brand.founder, "阿成");
|
||||
assert.ok(runtime.offerings.every((item) => item.coverUrl));
|
||||
assert.ok(runtime.trustPresentation);
|
||||
assert.ok(Array.isArray(runtime.trustItems));
|
||||
assert.ok(runtime.trustItems.every((item) => item.type && item.title && "config" in item));
|
||||
const bySlug = await request("/public/workspace?brandSlug=default-brand");
|
||||
assert.equal(bySlug.statusCode, 200);
|
||||
assert.equal(JSON.parse(bySlug.body).brand.id, brandId);
|
||||
@@ -1064,7 +1066,7 @@ test("admin can create and version an inquiry form", async () => {
|
||||
assert.equal(missingRequired.statusCode, 400);
|
||||
// 业务校验错误必须透传具体原因,不能被统一改写为"请求失败"。
|
||||
assert.equal(JSON.parse(missingRequired.body).error.code, "HTTP_400");
|
||||
assert.match(JSON.parse(missingRequired.body).error.message, /不能为空$/);
|
||||
assert.equal(JSON.parse(missingRequired.body).error.message, "咨询表单不存在或品牌尚未发布");
|
||||
const invalidBody = await request("/customer/inquiry-submissions", {
|
||||
method: "POST",
|
||||
headers: { authorization: `Bearer ${customerToken}` },
|
||||
@@ -1618,14 +1620,14 @@ test("admin can manage trust content", async () => {
|
||||
const created = await request("/admin/config/trust-content", {
|
||||
method: "POST",
|
||||
headers: { authorization: `Bearer ${token}` },
|
||||
payload: { type: "profile", title: "关于我", content: "集成测试内容", summary: "测试摘要" },
|
||||
payload: { type: "credential", title: "关于我", content: "集成测试内容", summary: "测试摘要" },
|
||||
});
|
||||
assert.equal(created.statusCode, 201);
|
||||
const id = JSON.parse(created.body).id;
|
||||
const draft = await request("/admin/config/trust-content", {
|
||||
method: "POST",
|
||||
headers: { authorization: `Bearer ${token}` },
|
||||
payload: { type: "experience", title: "草稿", content: "不应公开", isPublished: false },
|
||||
payload: { type: "promise", title: "草稿", content: "不应公开", isPublished: false },
|
||||
});
|
||||
assert.equal(draft.statusCode, 201);
|
||||
const publicContent = await request("/public/trust-content");
|
||||
|
||||
@@ -33,11 +33,18 @@ function normalizeWorkspace(workspace) {
|
||||
workspace && workspace.trustPresentation && typeof workspace.trustPresentation === "object"
|
||||
? workspace.trustPresentation
|
||||
: {};
|
||||
const trustItems = Array.isArray(workspace && workspace.trustItems)
|
||||
? workspace.trustItems.map((item) => ({
|
||||
...item,
|
||||
lines: typeof item.content === "string" ? item.content.split(/\r?\n/).filter(Boolean) : [],
|
||||
}))
|
||||
: [];
|
||||
return {
|
||||
...workspace,
|
||||
brand,
|
||||
offerings,
|
||||
trustContent,
|
||||
trustItems,
|
||||
plugins: Array.isArray(workspace.plugins) ? workspace.plugins : [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import type {
|
||||
RuntimeCapability,
|
||||
RuntimeInquiryForm,
|
||||
RuntimeOffering,
|
||||
RuntimeTrustItem,
|
||||
ThemeManifest,
|
||||
} from "@personal-brand/types";
|
||||
export type { PublicOffering } from "@personal-brand/types";
|
||||
@@ -317,6 +318,7 @@ export interface PublicWorkspace {
|
||||
capabilities: RuntimeCapability[];
|
||||
offerings: RuntimeOffering[];
|
||||
inquiryForms: RuntimeInquiryForm[];
|
||||
trustItems: RuntimeTrustItem[];
|
||||
navigation: { tabs: Array<{ key: string; label: string; page: string }> };
|
||||
trustPresentation: Record<string, unknown>;
|
||||
theme: ThemeManifest;
|
||||
|
||||
@@ -270,7 +270,7 @@ export interface TemplateSampleContent {
|
||||
summary: string;
|
||||
categoryKey: string;
|
||||
}>;
|
||||
trustContent: Array<{ type: string; title: string; content: string }>;
|
||||
trustContent: Array<{ type: string; title: string; content: string; summary?: string }>;
|
||||
fields: Array<{
|
||||
key: string;
|
||||
label: string;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ Component({
|
||||
properties: {
|
||||
brand: { type: Object, value: {} },
|
||||
presentation: { type: Object, value: {} },
|
||||
trustContent: { type: Object, value: {} },
|
||||
trustItems: { type: Array, value: [] },
|
||||
offerings: { type: Array, value: [] },
|
||||
},
|
||||
methods: {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="page"><view class="brand-card"><view class="identity"><image src="{{brand.avatarUrl}}" mode="aspectFill"/><view><text class="name">{{brand.founder}}</text><text class="title">{{brand.title}}</text><text class="slogan">“{{brand.slogan}}”</text></view></view><view class="notice"><text class="notice-title">{{presentation.stallTitle || '今日出摊点'}}</text><text>{{brand.studioAddress || brand.address}}</text><text class="notice-time">{{presentation.stallTime || '17:00 - 22:30 · 今日营业中'}}</text><text class="notice-desc">晚高峰人多,可提前预约,下课直取不排队。</text></view><view class="actions"><button bindtap="openInquiry">预约 / 定制</button><button class="muted" bindtap="openOfferings">今日菜单</button></view></view><view class="scene-wrap"><view class="section-head"><text class="eyebrow">真实出摊现场</text><text class="more">大学城老校门夜市实拍</text></view><image class="scene" src="{{brand.heroImage}}" mode="aspectFill" bindtap="openService"/></view><view class="section-head"><view><text class="eyebrow">{{presentation.worksEyebrow || '本周学生票选招牌'}}</text><text class="heading">{{presentation.worksTitle || '现做现吃,认真管饱'}}</text><text class="subline">米饭免费续,附赠当日老汤或绿豆沙</text></view><text class="more" bindtap="openOfferings">全部餐品 ›</text></view><view class="dish-grid"><view wx:for="{{offerings}}" wx:key="id" class="dish" data-id="{{item.id}}" bindtap="openOffering"><image src="{{item.image}}" mode="aspectFill"/><view class="dish-copy"><text class="dish-name">{{item.name}}</text><text class="dish-sub">{{item.desc}}</text><text class="price">{{item.priceRange}}</text></view></view></view><view class="promise"><text class="eyebrow light">{{presentation.manifestoEyebrow || '阿成的四大开档底线'}}</text><text class="promise-title">{{presentation.manifestoTitle || '真材实料,当天现做'}}</text><view class="promise-grid"><text>✓ 当天采购</text><text>✓ 现炒锅气</text><text>✓ 免费续饭</text><text>✓ 不用料理包</text></view><view class="quote">“上周街舞社订了 35 份,按寝室分组打包,送来还烫嘴!”<text>—— 街舞社负责人</text></view></view></view>
|
||||
<view class="page"><view class="brand-card"><view class="identity"><image src="{{brand.avatarUrl}}" mode="aspectFill"/><view><text class="name">{{brand.founder}}</text><text class="title">{{brand.title}}</text><text class="slogan">“{{brand.slogan}}”</text></view></view><view class="notice"><text class="notice-title">{{presentation.stallTitle || '今日出摊点'}}</text><text>{{brand.studioAddress || brand.address}}</text><text class="notice-time">{{presentation.stallTime || '17:00 - 22:30 · 今日营业中'}}</text><text wx:for="{{trustItems}}" wx:if="{{item.type === 'schedule'}}" wx:key="title" class="notice-desc">{{item.content}}</text></view><view class="actions"><button bindtap="openInquiry">预约 / 定制</button><button class="muted" bindtap="openOfferings">今日菜单</button></view></view><view class="scene-wrap"><view class="section-head"><text class="eyebrow">真实出摊现场</text><text class="more">{{brand.name}}</text></view><image src="{{brand.heroImage}}" mode="aspectFill" bindtap="openService"/></view><view class="section-head"><view><text class="eyebrow">{{presentation.worksEyebrow || '今日餐品与预订'}}</text><text class="heading">{{presentation.worksTitle || '套餐、聚餐与定制餐'}}</text></view><text class="more" bindtap="openOfferings">全部餐品 ›</text></view><view class="dish-grid"><view wx:for="{{offerings}}" wx:key="id" class="dish" data-id="{{item.id}}" bindtap="openOffering"><image src="{{item.image}}" mode="aspectFill"/><view class="dish-copy"><text class="dish-name">{{item.name}}</text><text class="dish-sub">{{item.desc}}</text><text class="price">{{item.priceRange}}</text></view></view></view><view wx:for="{{trustItems}}" wx:if="{{item.type === 'promise' || item.type === 'case'}}" wx:key="title" class="promise"><text class="eyebrow light">{{item.title}}</text><text class="promise-title">{{item.summary}}</text><text class="quote">{{item.content}}</text></view></view>
|
||||
@@ -4,7 +4,7 @@ const { openPage } = require("../../utils/navigation");
|
||||
Page({
|
||||
data: {
|
||||
brand: {},
|
||||
trustContent: [],
|
||||
trustItems: [],
|
||||
records: [],
|
||||
error: "",
|
||||
},
|
||||
@@ -13,7 +13,7 @@ Page({
|
||||
.then((workspace) =>
|
||||
this.setData({
|
||||
brand: workspace.brand || {},
|
||||
trustContent: workspace.trustPresentation || {},
|
||||
trustItems: workspace.trustItems || [],
|
||||
records: [],
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="page"><view wx:if="{{error}}" class="runtime-error">{{error}}</view><block wx:else><acheng-profile brand="{{brand}}" presentation="{{brand.visualPresentation.profile}}" records-count="{{records.length}}" bind:call="call" bind:copy="copyWechat" bind:records="recordsPage" /><view class="proof-grid"><view><text class="proof-icon">✓</text><text>健康证公示</text><text>每年体检合格</text></view><view><text class="proof-icon">◆</text><text>摊贩登记卡</text><text>正规合规备案</text></view><view><text class="proof-icon">✦</text><text>每日消杀</text><text>食具恒温消毒</text></view></view><view class="card"><text class="card-title">他们都在阿成这订过餐</text><text>校街舞社年度专场 · 52 人份</text><text>信息学院科创竞赛 · 连签 5 天</text><text>7 号楼庆功宴 · 8 人定制</text></view><view class="promise"><text>回复承诺:备料期 15 分钟内联系,出摊高峰 1 小时内回复。</text></view></block></view>
|
||||
<view class="page"><view wx:if="{{error}}" class="runtime-error">{{error}}</view><block wx:else><acheng-profile brand="{{brand}}" presentation="{{brand.visualPresentation.profile}}" records-count="{{records.length}}" bind:call="call" bind:copy="copyWechat" bind:records="recordsPage" /><block wx:for="{{trustItems}}" wx:key="title"><view wx:if="{{item.type === 'coverage' || item.type === 'credential' || item.type === 'case' || item.type === 'promise'}}" class="card"><text class="card-title">{{item.title}}</text><text wx:if="{{item.summary}}">{{item.summary}}</text><text>{{item.content}}</text></view></block></block></view>
|
||||
@@ -2,14 +2,14 @@ const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
||||
const { openPage } = require("../../utils/navigation");
|
||||
|
||||
Page({
|
||||
data: { brand: {}, presentation: {}, trustContent: [], offerings: [], error: "" },
|
||||
data: { brand: {}, presentation: {}, trustItems: [], offerings: [], error: "" },
|
||||
onLoad() {
|
||||
loadWorkspaceWithFallback()
|
||||
.then((workspace) =>
|
||||
this.setData({
|
||||
brand: workspace.brand || {},
|
||||
presentation: workspace.brand?.visualPresentation?.home || {},
|
||||
trustContent: workspace.trustPresentation || {},
|
||||
trustItems: workspace.trustItems || [],
|
||||
offerings: workspace.offerings || [],
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
||||
const { openPage } = require("../../utils/navigation");
|
||||
Page({
|
||||
data: { brand: {}, presentation: {}, loading: true },
|
||||
data: { brand: {}, presentation: {}, trustItems: [], loading: true },
|
||||
onLoad() {
|
||||
loadWorkspaceWithFallback()
|
||||
.then((workspace) =>
|
||||
this.setData({
|
||||
brand: workspace.brand || {},
|
||||
presentation: workspace.brand?.visualPresentation?.home || {},
|
||||
trustItems: workspace.trustItems || [],
|
||||
loading: false,
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<view class="page service-page">
|
||||
<view class="service-card">
|
||||
<view class="card-head"><view class="head-title"><text class="icon">◷</text><text>每周出摊固定日程</text></view><text class="status-pill">准时出摊</text></view>
|
||||
<view class="schedule schedule-primary"><view class="schedule-main"><view class="schedule-title"><text class="dot orange"></text><text>周一至周五(晚餐 + 夜宵档)</text></view><text class="schedule-line">⌖ 地点:二号校门外小吃商业街 #07 号铺位</text><text class="schedule-muted">营业:17:00 - 22:30(下雨搭防雨防风棚正常营业)</text></view><text class="schedule-tag orange-tag">常规固定点</text></view>
|
||||
<view class="schedule schedule-weekend"><view class="schedule-main"><view class="schedule-title"><text class="dot blue"></text><text>周六、周日(全天接团体单 + 夜市流动)</text></view><text class="schedule-line">▣ 白天专供:球赛、班级春游、社团集训、答辩餐</text><text class="schedule-muted">晚间:18:00 - 23:00 体育馆南侧流动出摊</text></view><text class="schedule-tag blue-tag">活动专车</text></view>
|
||||
</view>
|
||||
<view class="service-card"><view class="card-title"><text class="icon">⌁</text><text>取餐与配送范围</text></view><view class="delivery-grid"><view class="delivery-item"><text class="delivery-title orange-text">♧ 摊位现场自取</text><text>小程序提前留餐,报手机尾号即拿,附赠特制加厚保温袋,不用排长龙。</text></view><view class="delivery-item"><text class="delivery-title blue-text">♢ 校内楼下配送</text><text>满 3 份即可送至宿舍楼栋或实验楼门前,阿成骑专用恒温保温箱电动车直送。</text></view></view></view>
|
||||
<view class="service-card process-card"><view class="card-title"><text class="icon">☷</text><text>定制餐品 4 步流程</text></view><text class="card-sub">专为班长、社长、活动干事设计的极简排菜流程</text><view class="steps"><view class="step"><text class="step-no">1</text><view><text class="step-title">提交基本需求</text><text>选择活动类型(如生日会、社团换届、答辩加餐)、预估人数与预算。</text></view></view><view class="step"><text class="step-no">2</text><view><text class="step-title">15 分钟内核算菜单</text><text>阿成微信直接联系,提供荤素搭配明细与个性化需求(免辣、清真配料等)。</text></view></view><view class="step"><text class="step-no">3</text><view><text class="step-title">当日新鲜烹饪打包</text><text>提前 2 小时生鲜采买,铁锅现炒,独立封盒并标注姓名 / 楼栋。</text></view></view><view class="step"><text class="step-no">4</text><view><text class="step-title">保温直达交付</text><text>约定时间准时送抵指定场地,确认菜品温度与数量无误后结算。</text></view></view></view><view class="process-foot"><text>起订门槛:<text class="strong">6 份起</text><text class="divider">|</text>退改:<text class="strong">出餐前 2 小时全退</text></text><button bindtap="inquire">立即咨询 <text>→</text></button></view></view>
|
||||
<block wx:for="{{trustItems}}" wx:key="title">
|
||||
<view wx:if="{{item.type === 'schedule'}}" class="service-card"><view class="card-head"><view class="head-title"><text class="icon">◷</text><text>{{item.title}}</text></view><text class="status-pill">准时出摊</text></view><view class="schedule schedule-primary"><view class="schedule-main"><view class="schedule-title"><text class="dot orange"></text><text>{{item.summary}}</text></view><text class="schedule-line">{{item.content}}</text></view></view></view>
|
||||
<view wx:if="{{item.type === 'coverage'}}" class="service-card"><view class="card-title"><text class="icon">⌁</text><text>{{item.title}}</text></view><view class="delivery-grid"><view class="delivery-item"><text class="delivery-title orange-text">服务范围</text><text>{{item.content}}</text></view></view></view>
|
||||
<view wx:if="{{item.type === 'process'}}" class="service-card process-card"><view class="card-title"><text class="icon">☷</text><text>{{item.title}}</text></view><text wx:if="{{item.summary}}" class="card-sub">{{item.summary}}</text><view class="steps"><view wx:for="{{item.lines}}" wx:key="*this" class="step"><text class="step-no">{{index + 1}}</text><view><text class="step-title">步骤 {{index + 1}}</text><text>{{item}}</text></view></view></view><view class="process-foot"><text>{{item.content}}</text><button bindtap="inquire">立即咨询 <text>→</text></button></view></view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -77,6 +77,14 @@ export interface TrustPresentation {
|
||||
serviceFlow?: Array<{ step: string; name: string; desc: string }>;
|
||||
}
|
||||
|
||||
export interface RuntimeTrustItem {
|
||||
type: string;
|
||||
title: string;
|
||||
summary: string | null;
|
||||
content: string;
|
||||
config: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface CapabilityPluginManifest {
|
||||
key: string;
|
||||
version: string;
|
||||
@@ -100,6 +108,7 @@ export interface RuntimeWorkspace {
|
||||
};
|
||||
offerings: RuntimeOffering[];
|
||||
inquiryForms: RuntimeInquiryForm[];
|
||||
trustItems: RuntimeTrustItem[];
|
||||
trustPresentation: TrustPresentation;
|
||||
capabilities: RuntimeCapability[];
|
||||
plugins?: Array<
|
||||
|
||||
Reference in new issue
Block a user