feat: V1.2 P0 批次入库——四页合规/作品详情页/后端详情接口

This commit is contained in:
Sisyphus committed 2026-08-15 15:13:51 +08:00
1 parent f53f0a2b25
commit 346f41d391
23 files changed
+3495 -173

No files matched your search

+414
View File
@@ -0,0 +1,414 @@
# PERLER LAB · 四页合规文案数据(T-130)
> 任务: T-130 | 产出角色: PM-Agent | 日期: 2026-08-15
> 用途: 供前端 **T-126~T-129**(隐私政策/服务条款/关于我们/联系我们四页组件)读取渲染。
> 数据来源: `docs/COMPLIANCE-PAGES.md`(CP-01~05 清单/法律风险)、`competitor-analysis/gap-crawl.md` §T-119(竞品 privacy 12 章 / terms 7 章 / about 团队结构 / contact 表单)、`docs/BUSINESS-MODEL.md`(免费 12 项 F-01~F-12 / 付费 9 项 P-01~P-09 / 套餐定价)、`docs/LAUNCH.md` §4(兑换码/退款/FAQ)、`docs/PRD.md`(风险#3 设备绑定 localStorage)。
> 渲染约定: 每页 = `route` + `title` + `chapters[]`;每章 = `title`(zh/en)+ `body[]` 要点(zh/en 双语,前端直接渲染为段落/列表)。
---
## 全局常量(前端引用)
| 常量 | 值 |
|---|---|
| product_zh | 拼豆工坊 PERLER LAB |
| product_en | PERLER LAB |
| product_domain | https://perler-lab.com |
| support_email | support@perler-lab.com |
| last_updated | 2026-08-15 |
| effective_date | 2026-08-15 |
---
# 页面 1/4 · 隐私政策 Privacy Policy
- **route**: `/privacy-policy`
- **title_zh**: 隐私政策
- **title_en**: Privacy Policy
- **lastUpdated**: 2026-08-15
- **meta_zh**: 拼豆工坊 PERLER LAB 隐私政策:图片本地处理不上传、AI 生成数据流、兑换码与权益存储、用户权利与联系方式。
- **meta_en**: PERLER LAB Privacy Policy: local image processing, AI generation data flow, redemption codes and credit storage, your rights, and contact details.
## 章节 1 · 概述 Overview
- title_en: **1. Overview**
- **zh**: 欢迎使用拼豆工坊 PERLER LAB(以下称"本服务")。本隐私政策说明我们如何在您使用「图片转拼豆图纸」「AI 拼豆生成(chibi)」「兑换码」等功能时收集、使用、存储与保护您的信息。使用本服务即表示您已阅读并同意本政策。
- **en**: Welcome to PERLER LAB ("the Service"). This Privacy Policy explains how we collect, use, store and protect your information when you use image-to-pattern conversion, AI pattern generation (chibi), redemption codes and other features. By using the Service, you agree to this policy.
- **zh**: 本政策适用于 https://perler-lab.com 及其全部子页面。我们坚持「最小必要」与「本地优先」的隐私设计原则。
- **en**: This policy applies to https://perler-lab.com and all of its subpages. We follow the privacy-by-design principles of data minimization and local-first processing.
## 章节 2 · 图片处理:本地优先(普通图纸生成)
- title_en: **2. Image Processing: Local-First (Standard Pattern Generation)**
- **zh**: 普通图纸生成(上传图片 → 采样 → 量化 → 色板匹配 → 预览 → 导出)**全部在您的浏览器本地完成**。您上传的图片、中间计算数据与生成的图纸不会上传到我们的服务器。
- **en**: Standard pattern generation (upload → sample → quantize → palette match → preview → export) runs **entirely in your browser**. Your image, intermediate data and generated pattern are never uploaded to our servers.
- **zh**: 本地处理是本服务的默认路径,也是我们与竞品差异化的核心隐私卖点。
- **en**: Local processing is the default path and a core privacy selling point that differentiates us from competitors.
- **zh**: 导出文件(PNG/PDF 等)由浏览器直接生成并保存到您的设备,服务器不保存任何副本。
- **en**: Export files (PNG/PDF etc.) are generated by your browser and saved to your device; the server keeps no copy.
## 章节 3 · 图片处理:AI 生成(chibi,服务端上传)
- title_en: **3. Image Processing: AI Generation (chibi, Server-Side Upload)**
- **zh**: 使用 **AI 拼豆生成(chibi)** 功能时,您选择的参考图片会由服务器转发至第三方 AI 模型供应商,用于风格化生成。图片仅在生成过程中被短暂处理,生成完成后即从服务器删除,不用于模型训练,也不会向其他任何第三方披露。
- **en**: When you use **AI pattern generation (chibi)**, your selected reference image is forwarded by our server to a third-party AI model provider for stylized generation. The image is processed only for the duration of generation, then deleted from our servers. It is never used for model training or disclosed to any other third party.
- **zh**: 每次 AI 生成消耗 1 次权益(兑换码),且**仅成功生成才扣费**;失败不扣。
- **en**: Each AI generation consumes 1 credit from your redemption code, and **you are only charged when generation succeeds**; failed attempts cost nothing.
- **zh**: 「本地处理」与「AI 服务端上传」是两条独立的图片处理路径:普通生成不上传,仅 AI 生成功能会上传,请知悉。
- **en**: "Local processing" and "AI server-side upload" are two separate image-processing paths: standard generation never uploads; only the AI generation feature uploads your image. Please be aware of this distinction.
## 章节 4 · 兑换码与权益数据
- title_en: **4. Redemption Codes and Credit Data**
- **zh**: 您输入的兑换码会发送至服务器进行校验与核销,服务器保存兑换记录、核销流水与权益消费日志,用于防止重复兑换、套利与滥用风控。
- **en**: The redemption code you enter is sent to our server for validation and redemption. We store redemption records, consumption logs and credit-usage logs for anti-fraud, anti-scalping and abuse control.
- **zh**: 兑换码与消费记录属于与您相关的业务数据,我们按最小必要原则保存(见章节 8)。
- **en**: Redemption codes and consumption records are business data related to you; we retain them on a data-minimization basis (see Section 8).
- **zh**: 我们不收集您的姓名、手机号、支付账号等敏感个人信息(当前 MVP 通过兑换码渠道购买,无账号体系)。
- **en**: We do not collect sensitive personal information such as your name, phone number or payment account (the MVP sells through redemption codes and has no account system).
## 章节 5 · 设备绑定与本地存储
- title_en: **5. Device Binding and Local Storage**
- **zh** ⚠️ **重要告知**:您的权益次数与已保存的图纸存储在浏览器本地存储(localStorage)中,与当前设备绑定。**更换设备、更换浏览器或清除浏览器缓存可能导致权益记录无法找回**,请务必妥善保存兑换码。
- **en** ⚠️ **Important notice**: Your credit balance and saved patterns are stored in your browser's localStorage and bound to the current device. **Switching devices or browsers, or clearing your browser cache, may make your credits unrecoverable.** Please keep your redemption code safe.
- **zh**: 本服务当前不提供账号体系,权益不同步云端;在引入账号同步前,本地存储是唯一的权益载体。
- **en**: The Service currently has no account system and credits are not synced to the cloud. Until account sync is introduced, localStorage is the only carrier of your credits.
## 章节 6 · Cookie 政策
- title_en: **6. Cookie Policy**
- **zh**: 本服务使用 Cookie 与同类本地存储技术以维持基础功能(如语言偏好、图纸草稿、权益状态)与匿名访问统计。
- **en**: We use cookies and similar local storage technologies to support basic features (language preference, pattern drafts, credit status) and anonymous traffic statistics.
- **zh**: 您可通过浏览器设置管理或删除 Cookie;禁用 Cookie 后部分功能可能无法正常使用。
- **en**: You can manage or delete cookies through your browser settings; some features may not work when cookies are disabled.
- **zh**: 本服务无广告投放,不使用第三方广告跟踪 Cookie。
- **en**: The Service runs no advertising and uses no third-party ad-tracking cookies.
## 章节 7 · 第三方服务
- title_en: **7. Third-Party Services**
- **zh**: 本服务可能接入以下第三方:① **AI 模型供应商**(chibi 生成,仅转发生成请求,见章节 3);② **分析服务**(如 Google Analytics 或自建埋点,见章节 6);③ **内容分发网络 CDN**(静态资源加速,仅处理基础请求元数据);④ **域名解析与主机服务**。第三方仅在提供服务所必需的范围内处理数据,并受其自身隐私政策约束。
- **en**: The Service may engage the following third parties: ① **AI model providers** (for chibi generation, receiving only generation requests, see Section 3); ② **analytics services** (e.g. Google Analytics or self-hosted tracking, see Section 6); ③ **CDNs** (static asset delivery, processing only basic request metadata); ④ **domain and hosting services**. Third parties process data only as strictly necessary and are bound by their own privacy policies.
- **zh**: 若 AI 模型供应商位于中国大陆境外,涉及的数据出境处理将遵循适用的法律规定;正式商业化前完成合规评估(详见 COMPLIANCE-PAGES §2.2)。
- **en**: If an AI model provider is located outside mainland China, any cross-border data processing will comply with applicable law; a compliance review will be completed before full commercialization (see COMPLIANCE-PAGES §2.2).
- **zh**: 除本政策披露外,我们**不会**向任何第三方出售、出租或交易您的个人信息。
- **en**: Beyond what is disclosed in this policy, we **do not** sell, rent or trade your personal information to any third party.
## 章节 8 · 数据存储与保留
- title_en: **8. Data Storage and Retention**
- **zh**: 服务器端保存的数据(兑换码库、核销与消费日志、AI 生成记录)按「最小必要」原则保存,保留期限以满足服务运行、安全风控与法律义务所需为限。
- **en**: Server-side data (redemption records, consumption and usage logs, AI generation records) is kept on a data-minimization basis, retained only as long as needed for service operation, security controls and legal obligations.
- **zh**: 普通生成的图片与图纸数据默认只存在于您的浏览器,不进入服务器,无需保留与删除。
- **en**: Images and pattern data from standard generation live only in your browser by default; they never reach our servers, so no retention or deletion is needed.
- **zh**: 您可通过下方联系方式请求删除服务器端与您相关的记录,我们会在 15 个工作日内处理。
- **en**: You may request deletion of server-side records related to you through the contact details below; we respond within 15 working days.
## 章节 9 · 用户权利
- title_en: **9. Your Rights**
- **zh**: 依据《中华人民共和国个人信息保护法》,您有权对与您相关的个人信息行使**查询、复制、更正、删除**权利,并有权就我们的处理行为提出投诉。
- **en**: Under the Personal Information Protection Law of the PRC, you have the right to **access, copy, rectify and delete** your personal information, and to raise complaints about our processing.
- **zh**: 行使权利请发送邮件至 **support@perler-lab.com**,我们将在 15 个工作日内响应并处理。
- **en**: To exercise these rights, email **support@perler-lab.com**; we respond within 15 working days.
- **zh**: 本地存储的数据(图纸、权益)由您自行管理:清除浏览器数据即可移除,无需联系我们。
- **en**: Local data (patterns, credits) is managed by you directly: clearing your browser data removes it, with no need to contact us.
## 章节 10 · 儿童隐私
- title_en: **10. Children's Privacy**
- **zh**: 本服务支持亲子拼豆场景。如您未满 14 周岁,请在监护人陪同下使用,并在征得监护人同意后操作。
- **en**: The Service supports family crafting. If you are under 14, please use the Service with a parent or guardian and only after obtaining their consent.
- **zh**: 我们不会在知情的情况下收集 14 周岁以下儿童的个人信息;如发现误收集,将立即删除相关记录。
- **en**: We do not knowingly collect personal information from children under 14; if we discover such data, we delete it promptly.
## 章节 11 · 数据安全
- title_en: **11. Data Security**
- **zh**: 我们采取合理的技术与管理措施保护信息,包括 HTTPS 加密传输、访问控制、风控限流与日志审计。
- **en**: We apply reasonable technical and administrative safeguards, including HTTPS encryption, access controls, rate limiting and log auditing.
- **zh**: 请注意,任何互联网传输与存储方式都无法保证绝对安全;如发生影响您权益的数据安全事件,我们将依法履行通知义务。
- **en**: Please note that no method of internet transmission or storage is absolutely secure. If a data incident affecting your rights occurs, we will fulfil our notification obligations under law.
## 章节 12 · 政策变更与联系方式
- title_en: **12. Changes to This Policy & Contact**
- **zh**: 我们可能不时更新本政策,最新版本将发布在本页面并标注生效日期;重大变更将通过站内公告或显著提示通知。
- **en**: We may update this policy from time to time. The latest version will be published on this page with its effective date; material changes will be announced via on-site notice.
- **zh**: 生效日期:**2026-08-15**。
- **en**: Effective date: **August 15, 2026**.
- **zh**: 如对本政策有任何疑问或想行使权利,请通过**联系我们**页或邮件 **support@perler-lab.com** 与我们联系。
- **en**: For any questions about this policy or to exercise your rights, please reach us via the **Contact** page or at **support@perler-lab.com**.
---
# 页面 2/4 · 服务条款 Terms of Service
- **route**: `/terms-of-service`
- **title_zh**: 服务条款
- **title_en**: Terms of Service
- **lastUpdated**: 2026-08-15
- **meta_zh**: 拼豆工坊 PERLER LAB 服务条款:免费/付费权益边界、兑换码规则、用户上传版权责任、知识产权与商用授权、免责与责任限制。
- **meta_en**: PERLER LAB Terms of Service: free and paid feature boundaries, redemption code rules, user upload responsibilities, intellectual property and commercial licensing, disclaimers and liability limits.
## 章节 1 · 服务描述与接受条款
- title_en: **1. Service Description and Acceptance**
- **zh**: 拼豆工坊 PERLER LAB 是一个在线拼豆图纸生成工具,提供图片转拼豆图纸(免费)与 AI 拼豆生成、高清/多格式导出、无水印、商用授权等增值功能(兑换码付费)。
- **en**: PERLER LAB is an online bead-pattern generator that offers image-to-pattern conversion (free) plus value-added features such as AI generation, HD/multi-format export, watermark-free export and commercial licensing (paid via redemption codes).
- **zh**: 使用本服务即表示您已阅读、理解并同意本条款的全部内容;如不同意,请停止使用本服务。
- **en**: By using the Service, you acknowledge that you have read, understood and agreed to these Terms in full. If you do not agree, please stop using the Service.
## 章节 2 · 免费与付费权益边界
- title_en: **2. Free and Paid Feature Boundaries**
- **zh**: 本服务采用「核心免费、增值付费」模式,免费功能共 12 项(F-01~F-12),覆盖图片上传、参数调整、图纸生成核心、完整预览、备料清单、基础编辑器、基础下载、兑换码兑换、色号表浏览、图纸本地保存、分享 URL、帮助中心。
- **en**: The Service follows a "free core, paid premium" model. There are 12 free features (F-01–F-12) covering upload, parameter adjustment, core pattern generation, full preview, materials list, basic editor, standard download, code redemption, color charts, local save, share links and the help center.
- **zh**: 付费功能共 9 项(P-01~P-09):AI 拼豆生成、高清 PNG 下载、PDF 高清打印导出、无水印导出、SVG/JSON 工程文件导出、高级编辑工具、批量生成/导出、商用授权、AI 结果转正式图纸,均通过兑换码按次消耗。
- **en**: There are 9 paid features (P-01–P-09): AI generation, HD PNG download, HD PDF print export, watermark-free export, SVG/JSON project export, advanced editing tools, batch generation/export, commercial licensing and AI-result-to-pattern conversion, all consumed per-use via redemption codes.
- **zh**: 免费与付费清单以本条款及官网公示为准,我方保留按商业模式迭代调整付费功能范围的权利,调整会以显著方式通知。
- **en**: The free and paid feature lists are governed by these Terms and public announcements. We reserve the right to adjust the scope of paid features as our business model evolves, with material changes announced prominently.
## 章节 3 · 兑换码规则
- title_en: **3. Redemption Code Rules**
- **zh**: **兑换方式**:在首页点击「输入兑换码解锁」,输入兑换码后权益自动到账,权益存储于当前设备浏览器(见章节 4)。
- **en**: **Redemption**: click "Redeem code" on the homepage, enter your code, and credits are credited to your account, stored in your current browser (see Section 4).
- **zh**: **有效期**:兑换码**长期有效**,无有效期限制。
- **en**: **Validity**: redemption codes are **valid indefinitely** with no expiry.
- **zh**: **退款规则**:虚拟权益**一经使用不支持退款**;未使用或部分未使用的兑换码,可联系客服协商处理。
- **en**: **Refunds**: virtual credits are **non-refundable once used**; unused or partially unused codes may be negotiated with customer service.
- **zh**: **渠道隔离**:代理码走代理通道、个人码走个人通道,**不可混用**;异常兑换行为将触发风控。
- **en**: **Channel separation**: agent codes use the agent channel and personal codes use the personal channel; they **cannot be mixed**. Abnormal redemption triggers our risk controls.
- **zh**: 兑换码请通过官方渠道购买;通过非官方渠道购码导致的风险由您自行承担。
- **en**: Purchase codes only through official channels; risks from buying codes through unofficial channels are borne by you.
## 章节 4 · 设备绑定权益
- title_en: **4. Device-Bound Credits**
- **zh** ⚠️ 权益保存在当前设备的浏览器本地存储中,**换设备、换浏览器或清除缓存可能无法找回**。请妥善保存兑换码,避免权益丢失。
- **en** ⚠️ Credits are stored in your current browser's localStorage. **Switching devices/browsers or clearing cache may make them unrecoverable.** Keep your redemption code safe.
- **zh**: 我方不因用户自行清除浏览器数据导致的权益丢失承担责任,但会通过客服为您提供兑换码重绑等力所能及的协助。
- **en**: We are not liable for credit loss caused by you clearing your own browser data, but our support team will do its best to assist, such as re-binding a redemption code.
## 章节 5 · 用户责任(上传内容版权)
- title_en: **5. User Responsibilities (Copyright of Uploaded Content)**
- **zh**: 您上传图片用于生成图纸时,**保证对图片拥有合法使用权**,不侵犯他人的著作权、商标权、肖像权、隐私权等合法权益。
- **en**: When you upload an image for pattern generation, you **warrant that you have the legal right to use it** and that it does not infringe anyone's copyright, trademark, right of publicity, privacy or other lawful rights.
- **zh**: 您授权本服务在生成所需范围内处理您上传的图片(本地处理或 AI 生成转发,详见隐私政策)。
- **en**: You grant the Service the right to process your uploaded image to the extent needed for generation (locally, or forwarded for AI generation as described in the Privacy Policy).
- **zh**: 禁止上传违法、侵权、色情、暴力、歧视性或违反公序良俗的内容;如发现,我方有权拒绝生成并保留向权利人及监管部门报告的权利。
- **en**: Do not upload unlawful, infringing, obscene, violent, discriminatory or otherwise objectionable content. We may refuse generation and reserve the right to report to rights holders and authorities.
- **zh**: 生成图纸仅供个人手作参考;**商用需购买商用授权(P-08)**,包括代做接单、批量售卖图纸等情形。
- **en**: Generated patterns are for personal crafting reference only; **commercial use (including commissioned work and bulk pattern sales) requires a commercial license (P-08)**.
## 章节 6 · 知识产权
- title_en: **6. Intellectual Property**
- **zh**: 本服务的网站界面、生成算法、色板数据、品牌标识、文档等知识产权归拼豆工坊 PERLER LAB 所有,受相关法律保护。
- **en**: The Service's website design, generation algorithms, palette data, branding and documentation are owned by PERLER LAB and protected by applicable law.
- **zh**: 色板数据来自各拼豆品牌的公开资料,用于工具功能;若涉及第三方权利,均按合理使用或公开数据许可处理。
- **en**: Palette data is sourced from public materials of bead brands for tool functionality; any third-party rights are handled under fair use or open-data licensing.
- **zh**: 由本工具生成的作品图纸,其使用权归生成者本人;个人使用免费,商用须按章节 5 取得授权。
- **en**: Patterns generated with this tool are yours to use; personal use is free, and commercial use requires the license described in Section 5.
- **zh**: 未经我方书面许可,不得复制、分发、反向工程本服务的代码、算法或商业运营方式。
- **en**: Without our written permission, you may not copy, redistribute or reverse-engineer the Service's code, algorithms or business operations.
## 章节 7 · 禁止行为
- title_en: **7. Prohibited Conduct**
- **zh**: 您不得从事以下行为:① 滥用、共享、转售兑换码或绕过代理/个人渠道;② 批量抓取、爬取本服务内容或数据;③ 逆向工程、篡改前端代码或伪造核销请求;④ 利用本服务实施欺诈、侵权、违法活动;⑤ 干扰本服务正常运行或攻击服务器。
- **en**: You may not: ① abuse, share, resell redemption codes or bypass agent/personal channels; ② bulk-scrape or crawl Service content or data; ③ reverse-engineer, tamper with front-end code or forge consumption requests; ④ engage in fraud, infringement or unlawful activity; ⑤ disrupt normal operation of, or attack, the Service's servers.
- **zh**: 违反本节将导致权益冻结、兑换码失效或账号级限制,情节严重的将依法处理。
- **en**: Violations may result in credit freezing, code invalidation or service-level restrictions, and legal action in serious cases.
## 章节 8 · 免责声明
- title_en: **8. Disclaimer of Warranties**
- **zh**: 本服务按「现状」和「可用」原则提供,**不对生成图纸的准确性、完整性、适用性作任何保证**;图纸结果受原图质量、参数设置与算法限制影响。
- **en**: The Service is provided "as is" and "as available". **We make no warranties as to the accuracy, completeness or fitness of generated patterns**; results depend on source-image quality, parameter settings and algorithmic limits.
- **zh**: AI 生成结果仅供参考,可能出现风格偏差、元素缺失等不完美情况;对 AI 结果的最终使用责任由您自行承担。
- **en**: AI generation results are for reference only and may contain style deviations or missing elements; you bear full responsibility for how you use AI output.
## 章节 9 · 责任限制
- title_en: **9. Limitation of Liability**
- **zh**: 在法律允许的范围内,我方不对因使用或无法使用本服务而产生的**间接、偶然、特殊或后果性损失**承担责任(包括但不限于数据丢失、商机损失、权益损失)。
- **en**: To the extent permitted by law, we are not liable for **indirect, incidental, special or consequential damages** arising from your use of or inability to use the Service (including but not limited to data loss, loss of business or loss of credits).
- **zh**: 我方在责任成立时的赔偿总额,不超过您为本服务已实际支付的对价。
- **en**: Our total liability, when established, does not exceed the amount you have actually paid for the Service.
## 章节 10 · 服务变更与终止
- title_en: **10. Changes to and Termination of the Service**
- **zh**: 我们可能不时更新、调整或暂停部分功能以改进服务,并通过站内公告等方式通知。
- **en**: We may update, adjust or suspend features from time to time to improve the Service, with notice given via on-site announcements.
- **zh**: 如您严重违反本条款,我方有权暂停或终止向您提供服务,并保留追究责任的权利;已购买且未使用的权益按章节 3 处理。
- **en**: If you materially breach these Terms, we may suspend or terminate your access and reserve the right to pursue claims; unused credits purchased are handled per Section 3.
## 章节 11 · 法律适用与争议解决
- title_en: **11. Governing Law and Dispute Resolution**
- **zh**: 本条款适用中华人民共和国法律(仅为本条款之目的,不含港澳台地区)。
- **en**: These Terms are governed by the laws of the People's Republic of China (for the purpose of these Terms only, excluding Hong Kong, Macao and Taiwan).
- **zh**: 因本服务产生的争议,双方应友好协商解决;协商不成的,提交服务器所在地有管辖权的人民法院诉讼解决。
- **en**: Disputes arising from the Service shall first be resolved through friendly negotiation; if negotiation fails, they shall be submitted to the competent people's court where the servers are located.
## 章节 12 · 变更条款与联系方式
- title_en: **12. Changes to These Terms & Contact**
- **zh**: 我们可能不时更新本条款,最新版本将发布在本页面并标注生效日期;重大变更将通过显著方式通知。
- **en**: We may update these Terms from time to time. The latest version will be published on this page with its effective date; material changes will be communicated prominently.
- **zh**: 生效日期:**2026-08-15**。如有疑问,请通过**联系我们**页或邮件 **support@perler-lab.com** 联系。
- **en**: Effective date: **August 15, 2026**. For questions, contact us via the **Contact** page or **support@perler-lab.com**.
---
# 页面 3/4 · 关于我们 About
- **route**: `/about`
- **title_zh**: 关于我们
- **title_en**: About Us
- **lastUpdated**: 2026-08-15
- **meta_zh**: 关于拼豆工坊 PERLER LAB:图片转拼豆图纸 + AI 拼豆生成器,免费核心功能,本地处理隐私优先,算法精度与 AI 能力是差异化优势。
- **meta_en**: About PERLER LAB: image-to-bead-pattern converter and AI pattern generator, free core features, local-first privacy, with algorithmic precision and AI generation as differentiators.
## 章节 1 · 产品定位
- title_en: **1. What We Build**
- **zh**: **PERLER LAB 拼豆工坊**是一个在线拼豆图纸生成器:上传一张图片,即可自动生成带色号、颗数与网格编号的拼豆图纸,支持参数反复调整与完整预览。
- **en**: **PERLER LAB** is an online bead-pattern generator: upload an image and automatically get a complete pattern with color codes, bead counts and grid numbers, with unlimited parameter tweaking and full preview.
- **zh**: 除常规图纸生成外,我们还提供 **AI 拼豆生成(chibi)**,把照片转成像素拼豆风格的创作起点,是拼豆工具中少有的 AI 能力。
- **en**: Beyond standard generation, we offer **AI pattern generation (chibi)**, turning photos into pixel-bead-style starting points, an AI capability rarely found in bead tools.
## 章节 2 · 核心特性
- title_en: **2. Core Features**
- **zh**: 免费核心闭环:上传 → 生成 → 预览 → 备料清单 → 基础下载,全程免费、无需注册,且**图片在浏览器本地处理,不上传服务器**。
- **en**: A free core loop: upload → generate → preview → materials list → standard download, all free with no sign-up required, and **images are processed locally in your browser, never uploaded**.
- **zh**: 增值付费项通过兑换码按次解锁:AI 生成、高清/PDF/无水印导出、SVG/JSON 工程文件、高级编辑、批量与商用授权。
- **en**: Value-added features unlock via redemption codes on a per-use basis: AI generation, HD/PDF/watermark-free export, SVG/JSON project files, advanced editing, batch operations and commercial licensing.
- **zh**: 支持 MARD、Artkal-C、Perler、Hama、Nabbi、IKEA 等多品牌色板切换与完整备料统计。
- **en**: Multiple brand palettes (MARD, Artkal-C, Perler, Hama, Nabbi, IKEA) with full materials statistics.
- **zh**: 图纸可本地保存、分享链接,帮助中心覆盖实操教程与 FAQ。
- **en**: Patterns can be saved locally and shared via link; the help center covers tutorials and FAQs.
## 章节 3 · 我们的团队
- title_en: **3. Our Team**
- **zh**: PERLER LAB 由一群拼豆爱好者与开发者组成,我们既写算法,也亲手拼豆。
- **en**: PERLER LAB is built by a team of bead crafters and developers. We write algorithms, and we place beads ourselves.
- **zh**: 团队分工覆盖:生成算法与图像处理(采样/量化/色板匹配)、AI 生成与模型接入、前后端工程、色板数据与内容运营。
- **en**: The team spans pattern algorithms and image processing (sampling/quantization/palette matching), AI generation and model integration, front-end/back-end engineering, palette data and content operations.
- **zh**: 我们保持小而精的团队结构,贴近用户反馈快速迭代(详见「联系我们」)。
- **en**: We keep a small, focused team that stays close to user feedback and iterates quickly (see "Contact Us").
## 章节 4 · 我们的愿景
- title_en: **4. Our Vision**
- **zh**: 让每个人都能把想留下的画面,变成一颗一颗可以亲手拼出来的豆。
- **en**: Let everyone turn an image they want to keep into beads they can place with their own hands.
- **zh**: 我们相信「工具应免费、透明、好用」:核心能力不设墙,隐私默认受保护,结果随时可导出可分享。
- **en**: We believe tools should be free, transparent and delightful: the core stays open, privacy is protected by default, and results are always exportable and shareable.
- **zh**: 长期方向:从「图纸生成器」走向「拼豆创作社区」,让图纸、教程与创作者互相连接。
- **en**: Long term, we aim to grow from a "pattern generator" into a "bead crafting community" connecting patterns, tutorials and creators.
## 章节 5 · 我们与竞品的差异
- title_en: **5. What Makes Us Different**
- **zh**: **算法精度**:采样、量化与色板匹配针对拼豆场景优化,还原度与色彩一致性表现更稳定,备料清单分色精准。
- **en**: **Algorithmic precision**: sampling, quantization and palette matching are optimized for bead crafting, giving stable fidelity and color consistency with accurate per-color materials lists.
- **zh**: **AI 生成能力**:提供 AI 拼豆生成(chibi),这是许多同类工具没有的增值能力,为创作提供全新起点。
- **en**: **AI generation**: we offer AI pattern generation (chibi), a value-add many similar tools lack, giving creators a whole new starting point.
- **zh**: **隐私优先**:图片本地处理、无需注册、无广告,信任从第一张图纸开始。
- **en**: **Privacy first**: local image processing, no sign-up, no ads. Trust starts with your first pattern.
- **zh**: **免费核心闭环**:对齐行业最佳实践,生成、预览、备料、基础下载全免费,付费只针对高清、无水印、AI 等增值项。
- **en**: **A free core loop**: aligned with industry best practice, generation, preview, materials and standard download are all free; payment applies only to HD, watermark-free, AI and similar premium items.
## 章节 6 · 联系我们
- title_en: **6. Contact**
- **zh**: 想合作、反馈或需要帮助?欢迎通过**联系我们**页或邮件 **support@perler-lab.com** 与我们联系,我们会在 1~3 个工作日内回复。
- **en**: Want to partner, give feedback or get help? Reach us via the **Contact** page or **support@perler-lab.com**; we reply within 1–3 working days.
---
# 页面 4/4 · 联系我们 Contact
- **route**: `/contact`
- **title_zh**: 联系我们
- **title_en**: Contact Us
- **lastUpdated**: 2026-08-15
- **meta_zh**: 联系拼豆工坊 PERLER LAB:客服邮箱、响应时效、问题分类(功能/兑换码权益/代理合作/侵权投诉)与代理合作入口。
- **meta_en**: Contact PERLER LAB: support email, response time, issue categories (features/credits/agency/copyright) and the partnership entry.
## 章节 1 · 客服邮箱
- title_en: **1. Email Us**
- **zh**: 客服邮箱:**support@perler-lab.com**
- **en**: Support email: **support@perler-lab.com**
- **zh**: 邮件请附上:问题描述、使用环境(浏览器/设备)、截图或兑换码(如有),可显著加快处理速度。
- **en**: For faster help, include: a description of the issue, your environment (browser/device), screenshots and the redemption code (if relevant).
- **zh**: 兑换码相关邮件请注意隐私:出于安全考虑,请不要在邮件正文直接粘贴完整兑换码。
- **en**: Please be careful with redemption codes: for security, do not paste a full code directly in the email body.
## 章节 2 · 响应时效
- title_en: **2. Response Time**
- **zh**: 我们承诺在 **1~3 个工作日**内回复您的邮件;紧急问题(如权益异常、侵权投诉)会优先处理。
- **en**: We reply within **1–3 working days**; urgent issues (e.g. credit anomalies, copyright complaints) are prioritized.
- **zh**: 高峰期(如节假日活动)响应可能略有延迟,敬请谅解。
- **en**: During peak periods (holidays, promotions) responses may take slightly longer. Thank you for your patience.
## 章节 3 · 问题分类
- title_en: **3. How Can We Help**
- **zh**: ① **功能问题**:上传/生成/导出/编辑器使用问题 → 建议先查看**帮助中心** FAQ,解决不了再发邮件。
- **en**: ① **Feature issues**: upload/generation/export/editor problems → check the **Help Center** FAQ first, then email us if still stuck.
- **zh**: ② **兑换码与权益**:兑换失败、权益扣减异常、退款协商 → 邮件注明兑换码与问题截图。
- **en**: ② **Redemption codes & credits**: redemption failure, abnormal deduction, refund requests → include the code and screenshots.
- **zh**: ③ **代理合作**:代理套餐、批量出图、阶梯价咨询 → 见下方「代理合作」。
- **en**: ③ **Agency partnership**: agent packages, batch generation, tiered pricing → see "Partnership" below.
- **zh**: ④ **侵权投诉**:认为本服务处理的内容侵犯您的权利(含 DMCA 类投诉)→ 邮件说明权属与具体内容,我们会在核实后 48 小时内处理。
- **en**: ④ **Copyright complaints**: if you believe content processed by the Service infringes your rights (including DMCA-style notices) → state your rights and the specific content; we handle verified notices within 48 hours.
## 章节 4 · 代理合作
- title_en: **4. Agency Partnership**
- **zh**: PERLER LAB 面向拼豆定制商家与个人接单者开放**代理合作**:以批发价购次,按单零售,差价即利润。
- **en**: PERLER LAB welcomes **agency partnerships** for bead-custom shops and freelancers: buy credits at wholesale price, retail per order, and keep the margin.
- **zh**: 代理套餐:入门 ¥139/200 次 · 标准 ¥299/500 次 · 核心 ¥499/1000 次,权益长期有效;批量采购 ≥1000 次可谈阶梯价。
- **en**: Agent packages: Starter ¥139/200 credits · Standard ¥299/500 credits · Core ¥499/1000 credits, valid indefinitely; tiered pricing negotiable for ≥1000 credits.
- **zh**: 申请方式:邮件至 **support@perler-lab.com**,标题注明「代理合作 + 您的微信号/联系方式」,我们会发送报价单与开通指引。
- **en**: To apply, email **support@perler-lab.com** with "Agency partnership + your contact" in the subject; we'll send the price list and onboarding guide.
## 章节 5 · 反馈渠道
- title_en: **5. Feedback**
- **zh**: 功能建议、Bug 报告、内容合作建议,欢迎随时发邮件或在帮助中心反馈入口提交。
- **en**: Feature suggestions, bug reports and content-collaboration ideas are always welcome via email or the feedback entry in the Help Center.
- **zh**: 你的每一条反馈都会进入我们的迭代清单,优秀建议将获赠权益(体验包兑换码)以表感谢。
- **en**: Every piece of feedback goes into our iteration backlog; valuable suggestions may earn a gift (a starter-pack redemption code) as thanks.
## 章节 6 · 帮助中心跳转
- title_en: **6. Help Center**
- **zh**: 常见问题请先查阅 **帮助中心**(FAQ 35 条 / 8 类:选豆、配色、打印、熨烫、裱框、兑换码权益、AI 专区、平台使用),大部分问题无需等待人工回复。
- **en**: Please check the **Help Center** first (35 FAQs across 8 categories: bead selection, color matching, printing, ironing, framing, codes & credits, AI zone, platform usage). Most questions can be answered there without waiting for a human.
- **zh**: 帮助中心入口:页面底部导航「帮助」或 /help。
- **en**: The Help Center is available via the "Help" link in the footer or at /help.
---
## 附:前端渲染映射建议(供 T-126~T-129 参考)
- 每页渲染: 页面标题(title)→ 正文各章节标题(chapters[].title)→ 各章节要点(body[] 每条的 zh/en)。
- 双语切换: 前端 i18n 按语言取对应字段;当前默认 zh,en 字段就绪供 i18n 扩展(对齐 FAQ-DATA.md 的双语数据约定)。
- ⚠️ 高亮项: 隐私政策章节 5(设备绑定)、服务条款章节 4(设备绑定)、章节 3(退款规则)建议以警示样式(⚠️)突出展示,满足「显著告知」的合规要求。
- 生效日期: 每页 lastUpdated 字段可直接渲染在页面顶部或底部。
---
*报告完。文案覆盖 COMPLIANCE-PAGES.md §2.2 全部必备章节(CP-01 隐私 12 章 / CP-02 条款 12 章 / CP-03 联系 6 章 / CP-04 关于 6 章),免费付费边界与 BUSINESS-MODEL.md(F-01~F-12 / P-01~P-09)一致,兑换码/退款规则与 LAUNCH.md §4.1 一致,设备绑定告知对齐 PRD 风险#3。*
+25
View File
@@ -51,6 +51,31 @@ export function initDatabase(config?: DbConfig): Database.Database {
*/
function runMigrations(db: Database.Database): void {
db.exec(SCHEMA_SQL);
migrateShowcaseSpec(db);
}
/**
* 为 T-099~T-102 期间创建的旧 showcase_works 表补齐规格列。
* 新库由 SCHEMA_SQL 一次性建全列;旧库逐列 ALTER TABLE ADD COLUMN(幂等)。
*/
function migrateShowcaseSpec(db: Database.Database): void {
const columns = new Set(
(db.prepare("PRAGMA table_info(showcase_works)").all() as Array<{ name: string }>).map(
(col) => col.name,
),
);
if (columns.size === 0) return; // 表不存在:新库将由 SCHEMA_SQL 建全列
const additions: ReadonlyArray<[name: string, declaration: string]> = [
["width", "INTEGER"],
["height", "INTEGER"],
["brand", "TEXT"],
["materials", "TEXT"],
];
for (const [name, declaration] of additions) {
if (!columns.has(name)) {
db.exec(`ALTER TABLE showcase_works ADD COLUMN ${name} ${declaration}`);
}
}
}
/**
+7 -1
View File
@@ -110,13 +110,19 @@ CREATE INDEX IF NOT EXISTS idx_download_grants_code ON download_grants(code);
-- chibi Showcase 作品表
-- title: 作品标题;image_data: base64 dataURL 或 http(s) URL;
-- tags: 标签数组 JSON 文本(如 '["宠物","猫"]');source: 作品来源(如 chibi/manual)
-- 规格列(T-131 详情页需要):width/height 图纸宽高(格);brand 材料品牌(如 MARD);
-- materials 用料清单 JSON 文本(如 '[{"code":"A7","count":980}]',name 可选),缺省为 NULL
CREATE TABLE IF NOT EXISTS showcase_works (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
image_data TEXT NOT NULL,
tags TEXT NOT NULL DEFAULT '[]',
source TEXT NOT NULL DEFAULT 'manual',
created_at TEXT NOT NULL DEFAULT (datetime('now'))
created_at TEXT NOT NULL DEFAULT (datetime('now')),
width INTEGER,
height INTEGER,
brand TEXT,
materials TEXT
);
-- 索引:按创建时间倒序查询作品列表(Showcase 展示页主路径)
+201 -3
View File
@@ -2,12 +2,16 @@
* chibi Showcase 作品 API。
*
* POST /api/showcase/works(T-099 发布接口)
* Request: { title: string, imageData: string, tags?: string[], source?: string }
* Request: { title: string, imageData: string, tags?: string[], source?: string,
* width?: number, height?: number, brand?: string, materials?: MaterialLine[] }
* Response: 201 { id: number }
* 400 { error: "请输入作品标题" } 标题为空
* 400 { error: "作品标题过长" } 标题超过 100 字符
* 400 { error: "图片格式无效" } imageData 非 base64 dataURL 也非 http(s) URL
* 400 { error: "标签格式无效" } tags 不是数组
* 400 { error: "尺寸参数无效" } width/height 非 1..512 整数
* 400 { error: "品牌格式无效" } brand 非字符串/超长
* 400 { error: "用料清单格式无效" } materials 非法
* 500 服务器内部错误
*
* GET /api/showcase/works(T-100 展示页列表)
@@ -16,6 +20,12 @@
* total, page, limit }(items 按 created_at DESC, id DESC)
* 400 { error: "分页参数无效" } page/limit 非正整数
*
* GET /api/showcase/works/:id(T-131 作品详情)
* Response: 200 { id, title, imageUrl, tags, source, createdAt,
* spec: { width, height, brand, materials } }
* 400 { error: "作品 ID 无效" } id 非正整数
* 404 { error: "作品不存在" } id 无对应记录
*
* GET /api/showcase/meta(T-101 展示页 SEO 元数据)
* Query: lang=zh|en(缺省 zh)
* Response: 200 { title, description, ogImage, jsonLd }
@@ -25,7 +35,12 @@ import { Router } from "express";
import type { Request, Response } from "express";
import type Database from "better-sqlite3";
import { getDb } from "../db/index.js";
import { insertWork, type ShowcaseWorkRow } from "./service.js";
import {
insertWork,
getWorkById,
type ShowcaseWorkRow,
type MaterialLine,
} from "./service.js";
/** 标题最大长度。 */
const MAX_TITLE_LENGTH = 100;
@@ -36,6 +51,21 @@ const MAX_TAGS = 20;
/** 单个标签最大长度。 */
const MAX_TAG_LENGTH = 30;
/** 图纸单边最大格数(与服务端导出能力 512×512 对齐)。 */
const MAX_GRID_SIZE = 512;
/** 用料清单最大条目数(与前端分享码 256 色上限对齐)。 */
const MAX_MATERIALS = 256;
/** 品牌名最大长度。 */
const MAX_BRAND_LENGTH = 50;
/** 用料清单单行色号最大长度。 */
const MAX_MATERIAL_CODE_LENGTH = 20;
/** 用料清单单行名称最大长度。 */
const MAX_MATERIAL_NAME_LENGTH = 30;
/** base64 dataURL:data:image/<type>;base64,<data>(data 可含 +/ 与 = 填充)。 */
const DATA_URL_RE = /^data:image\/[a-zA-Z0-9.+-]+;base64,[A-Za-z0-9+/=]+$/;
@@ -106,7 +136,38 @@ export function createShowcaseRouter(injectedDb?: Database.Database): Router {
? body.source.trim().slice(0, 50)
: "manual";
const id = insertWork(resolveDb(injectedDb), { title, imageData, tags, source });
// ---- 规格字段(T-131:详情页需要的尺寸/品牌/用料信息,均可选)----
const width = validateOptionalGridSize(body.width);
if (width.error !== null) {
res.status(400).json({ error: width.error });
return;
}
const height = validateOptionalGridSize(body.height);
if (height.error !== null) {
res.status(400).json({ error: height.error });
return;
}
const brand = validateBrand(body.brand);
if (brand.error !== null) {
res.status(400).json({ error: brand.error });
return;
}
const materials = validateMaterials(body.materials);
if (materials.error !== null) {
res.status(400).json({ error: materials.error });
return;
}
const id = insertWork(resolveDb(injectedDb), {
title,
imageData,
tags,
source,
width: width.value,
height: height.value,
brand: brand.value,
materials: materials.value,
});
res.status(201).json({ id });
} catch (err) {
console.error("POST /api/showcase/works error:", err);
@@ -152,6 +213,31 @@ export function createShowcaseRouter(injectedDb?: Database.Database): Router {
res.status(200).json({ items, total: totalRow.total, page, limit });
});
/**
* GET /api/showcase/works/:id — 作品详情(T-131)。
* 按 id 查询单作品:返回基础字段 + spec 规格块(尺寸/品牌/用料清单,缺省可空)。
* id 非正整数 → 400;记录不存在 → 404。
*/
router.get("/works/:id", (req: Request, res: Response): void => {
try {
const id = parsePositiveId(req.params["id"]);
if (id === null) {
res.status(400).json({ error: "作品 ID 无效" });
return;
}
const db = resolveDb(injectedDb);
const row = getWorkById(db, id);
if (row === undefined) {
res.status(404).json({ error: "作品不存在" });
return;
}
res.status(200).json(toWorkDetail(row));
} catch (err) {
console.error("GET /api/showcase/works/:id error:", err);
res.status(500).json({ error: "服务器内部错误,请稍后重试" });
}
});
/**
* GET /api/showcase/meta — 展示页 SEO 元数据(多语言)。
* 供前端注入 og:title / og:description / og:image,并附带 JSON-LD
@@ -248,6 +334,118 @@ function toShowcaseWork(row: ShowcaseWorkRow): {
};
}
/** 解析路径参数 :id 为合法正整数(AUTOINCREMENT id ≥ 1);非法返回 null。 */
function parsePositiveId(raw: unknown): number | null {
if (typeof raw !== "string" || raw.trim() === "") return null;
if (!/^[1-9]\d*$/.test(raw.trim())) return null;
const n = Number(raw.trim());
if (!Number.isSafeInteger(n) || n < 1) return null;
return n;
}
/** 校验可选规格整数(1..MAX_GRID_SIZE);缺省/空返回 null,非法返回错误信息。 */
function validateOptionalGridSize(raw: unknown): { value: number | null; error: string | null } {
if (raw === undefined || raw === null) return { value: null, error: null };
if (typeof raw !== "number" || !Number.isInteger(raw) || raw < 1 || raw > MAX_GRID_SIZE) {
return { value: null, error: "尺寸参数无效" };
}
return { value: raw, error: null };
}
/** 校验可选品牌名(非空字符串,≤50 字符);非法返回错误信息。 */
function validateBrand(raw: unknown): { value: string | null; error: string | null } {
if (raw === undefined || raw === null) return { value: null, error: null };
if (typeof raw !== "string") return { value: null, error: "品牌格式无效" };
const trimmed = raw.trim();
if (trimmed === "" || trimmed.length > MAX_BRAND_LENGTH) {
return { value: null, error: "品牌格式无效" };
}
return { value: trimmed, error: null };
}
/** 校验可选用料清单({code, count, name?}[],≤256 行);非法返回错误信息。 */
function validateMaterials(raw: unknown): { value: MaterialLine[] | null; error: string | null } {
if (raw === undefined || raw === null) return { value: null, error: null };
if (!Array.isArray(raw) || raw.length > MAX_MATERIALS) {
return { value: null, error: "用料清单格式无效" };
}
const lines: MaterialLine[] = [];
for (const item of raw) {
if (typeof item !== "object" || item === null) {
return { value: null, error: "用料清单格式无效" };
}
const rec = item as Record<string, unknown>;
if (
typeof rec.code !== "string" ||
rec.code.trim() === "" ||
rec.code.length > MAX_MATERIAL_CODE_LENGTH
) {
return { value: null, error: "用料清单格式无效" };
}
if (typeof rec.count !== "number" || !Number.isInteger(rec.count) || rec.count < 1) {
return { value: null, error: "用料清单格式无效" };
}
const line: MaterialLine = { code: rec.code.trim(), count: rec.count };
if (rec.name !== undefined) {
if (
typeof rec.name !== "string" ||
rec.name.trim() === "" ||
rec.name.length > MAX_MATERIAL_NAME_LENGTH
) {
return { value: null, error: "用料清单格式无效" };
}
line.name = rec.name.trim();
}
lines.push(line);
}
return { value: lines, error: null };
}
/** 解析 materials JSON 文本为用料清单;缺省/脏数据返回 null。 */
function parseMaterials(raw: string | null): MaterialLine[] | null {
if (raw === null || raw === "") return null;
try {
const parsed: unknown = JSON.parse(raw);
if (!Array.isArray(parsed)) return null;
return parsed.filter(
(l): l is MaterialLine =>
typeof l === "object" &&
l !== null &&
typeof (l as MaterialLine).code === "string" &&
typeof (l as MaterialLine).count === "number",
);
} catch {
return null;
}
}
/** 详情接口响应结构:基础字段 + spec 规格块(尺寸/品牌/用料,缺省可空)。 */
function toWorkDetail(row: ShowcaseWorkRow): {
id: number;
title: string;
imageUrl: string;
tags: string[];
source: string;
createdAt: string;
spec: {
width: number | null;
height: number | null;
brand: string | null;
materials: MaterialLine[] | null;
};
} {
const base = toShowcaseWork(row);
return {
...base,
spec: {
width: row.width,
height: row.height,
brand: row.brand,
materials: parseMaterials(row.materials),
},
};
}
/** 规范化 lang 参数:zh/zh-CN/zh-TW → zh;en/en-US/en-GB → en;其余 → zh。 */
export function normalizeLang(raw: unknown): "zh" | "en" {
if (typeof raw !== "string") return "zh";
+42 -3
View File
@@ -18,6 +18,17 @@ export interface ShowcaseWorkRow {
tags: string;
source: string;
created_at: string;
width: number | null;
height: number | null;
brand: string | null;
materials: string | null;
}
/** 用料清单单行:MARD 色号 + 数量(name 可选)。 */
export interface MaterialLine {
code: string;
count: number;
name?: string;
}
/** 发布作品的入参(已通过路由层校验)。 */
@@ -26,17 +37,45 @@ export interface InsertWorkInput {
imageData: string;
tags: string[];
source: string;
width?: number | null;
height?: number | null;
brand?: string | null;
materials?: MaterialLine[] | null;
}
/**
* 插入一条作品记录,返回自增主键 id。
* 规格字段可选(T-131):缺省时写入 NULL,详情接口返回可空规格。
*/
export function insertWork(db: Database.Database, input: InsertWorkInput): number {
const info = db
.prepare(
`INSERT INTO showcase_works (title, image_data, tags, source)
VALUES (?, ?, ?, ?)`,
`INSERT INTO showcase_works (title, image_data, tags, source, width, height, brand, materials)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,
)
.run(input.title, input.imageData, JSON.stringify(input.tags), input.source);
.run(
input.title,
input.imageData,
JSON.stringify(input.tags),
input.source,
input.width ?? null,
input.height ?? null,
input.brand ?? null,
input.materials === undefined || input.materials === null
? null
: JSON.stringify(input.materials),
);
return Number(info.lastInsertRowid);
}
/**
* 按 id 查询单条作品记录;不存在返回 undefined(详情接口主查询)。
*/
export function getWorkById(
db: Database.Database,
id: number,
): ShowcaseWorkRow | undefined {
return db.prepare(`SELECT * FROM showcase_works WHERE id = ?`).get(id) as
| ShowcaseWorkRow
| undefined;
}
+192 -2
View File
@@ -1,8 +1,11 @@
import { describe, it, expect } from "vitest";
import request from "supertest";
import type Database from "better-sqlite3";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import Database from "better-sqlite3";
import { createApp } from "../server.js";
import { createTestDatabase } from "../db/index.js";
import { createTestDatabase, initDatabase, closeDatabase } from "../db/index.js";
import { insertWork } from "../showcase/service.js";
/** 合法的 base64 dataURL 图片。 */
@@ -442,3 +445,190 @@ describe("GET /api/showcase/meta 展示页 SEO 元数据(T-101)", () => {
});
});
describe("GET /api/showcase/works/:id 作品详情(T-131)", () => {
/** 详情响应 spec 块的形状。 */
interface SpecShape {
width: number | null;
height: number | null;
brand: string | null;
materials: Array<{ code: string; count: number; name?: string }> | null;
}
it("200 返回详情契约:基础字段 + 缺省可空 spec 规格块", async () => {
const db = createTestDatabase();
const app = createApp(db);
const created = await request(app).post("/api/showcase/works").send(baseBody());
const id = created.body.id as number;
const res = await request(app).get(`/api/showcase/works/${id}`);
expect(res.status).toBe(200);
const body = res.body as {
id: number;
title: string;
imageUrl: string;
tags: string[];
source: string;
createdAt: string;
spec: SpecShape;
};
expect(body.id).toBe(id);
expect(body.title).toBe("我的小猫咪");
expect(body.imageUrl).toBe(VALID_DATA_URL);
expect(body.tags).toEqual(["宠物", "猫"]);
expect(body.source).toBe("chibi");
expect(typeof body.createdAt).toBe("string");
expect(body.spec).toEqual({ width: null, height: null, brand: null, materials: null });
});
it("POST 携带规格字段后,详情原样返回 width/height/brand/materials", async () => {
const db = createTestDatabase();
const app = createApp(db);
const created = await request(app)
.post("/api/showcase/works")
.send(
baseBody({
width: 99,
height: 99,
brand: "MARD",
materials: [
{ code: "A7", name: "橙红", count: 980 },
{ code: "H12", count: 512 },
],
}),
);
const id = created.body.id as number;
const res = await request(app).get(`/api/showcase/works/${id}`);
expect(res.status).toBe(200);
expect((res.body as { spec: SpecShape }).spec).toEqual({
width: 99,
height: 99,
brand: "MARD",
materials: [
{ code: "A7", name: "橙红", count: 980 },
{ code: "H12", count: 512 },
],
});
});
it("列表接口保持 T-100 契约,不泄漏 spec 规格字段", async () => {
const db = createTestDatabase();
const app = createApp(db);
await request(app).post("/api/showcase/works").send(baseBody({ width: 64, height: 64 }));
const res = await request(app).get("/api/showcase/works");
expect(res.status).toBe(200);
const item = (res.body as { items: Array<Record<string, unknown>> }).items[0]!;
expect(item).not.toHaveProperty("spec");
expect(item["width"]).toBeUndefined();
});
it("id 不存在返回 404 作品不存在", async () => {
const app = createApp(createTestDatabase());
const res = await request(app).get("/api/showcase/works/9999");
expect(res.status).toBe(404);
expect(res.body).toEqual({ error: "作品不存在" });
});
it("空库查询任意 id 返回 404", async () => {
const app = createApp(createTestDatabase());
const res = await request(app).get("/api/showcase/works/1");
expect(res.status).toBe(404);
expect(res.body).toEqual({ error: "作品不存在" });
});
it("非法 id 返回 400 作品 ID 无效", async () => {
const app = createApp(createTestDatabase());
const bad = ["abc", "0", "-1", "1.5", "1e3", "12abc", "99999999999999999999"];
for (const id of bad) {
const res = await request(app).get(`/api/showcase/works/${encodeURIComponent(id)}`);
expect(res.status).toBe(400);
expect(res.body).toEqual({ error: "作品 ID 无效" });
}
});
it("POST 规格校验:width/height 非法返回 400 尺寸参数无效", async () => {
const app = createApp(createTestDatabase());
for (const width of [0, -1, 513, 1.5, "99"]) {
const res = await request(app).post("/api/showcase/works").send(baseBody({ width }));
expect(res.status).toBe(400);
expect(res.body).toEqual({ error: "尺寸参数无效" });
}
const res = await request(app)
.post("/api/showcase/works")
.send(baseBody({ height: -2 }));
expect(res.status).toBe(400);
expect(res.body).toEqual({ error: "尺寸参数无效" });
});
it("POST 规格校验:brand / materials 非法返回 400", async () => {
const app = createApp(createTestDatabase());
const badBrand = await request(app)
.post("/api/showcase/works")
.send(baseBody({ brand: 123 }));
expect(badBrand.status).toBe(400);
expect(badBrand.body).toEqual({ error: "品牌格式无效" });
const badMaterials = await request(app)
.post("/api/showcase/works")
.send(baseBody({ materials: "A7" }));
expect(badMaterials.status).toBe(400);
expect(badMaterials.body).toEqual({ error: "用料清单格式无效" });
const emptyCode = await request(app)
.post("/api/showcase/works")
.send(baseBody({ materials: [{ code: "", count: 1 }] }));
expect(emptyCode.status).toBe(400);
expect(emptyCode.body).toEqual({ error: "用料清单格式无效" });
const zeroCount = await request(app)
.post("/api/showcase/works")
.send(baseBody({ materials: [{ code: "A7", count: 0 }] }));
expect(zeroCount.status).toBe(400);
expect(zeroCount.body).toEqual({ error: "用料清单格式无效" });
});
it("迁移:旧结构 showcase_works 表在 initDatabase 时补齐规格列", () => {
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "perler-migrate-"));
const dbPath = path.join(tmpDir, "old.db");
try {
const old = new Database(dbPath);
old.exec(`
CREATE TABLE showcase_works (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
image_data TEXT NOT NULL,
tags TEXT NOT NULL DEFAULT '[]',
source TEXT NOT NULL DEFAULT 'manual',
created_at TEXT NOT NULL DEFAULT (datetime('now'))
);
`);
old.close();
const db = initDatabase({ dbPath });
const cols = (db.prepare("PRAGMA table_info(showcase_works)").all() as Array<{
name: string;
}>).map((c) => c.name);
for (const col of ["width", "height", "brand", "materials"]) {
expect(cols).toContain(col);
}
db.prepare(
"INSERT INTO showcase_works (title, image_data, width, height, brand) VALUES (?, ?, ?, ?, ?)",
).run("迁移作品", VALID_URL, 99, 99, "MARD");
const row = db.prepare("SELECT width, height, brand FROM showcase_works").get() as {
width: number;
height: number;
brand: string;
};
expect(row.width).toBe(99);
expect(row.height).toBe(99);
expect(row.brand).toBe("MARD");
} finally {
closeDatabase();
fs.rmSync(tmpDir, { recursive: true, force: true });
}
});
});
+22
View File
@@ -4,6 +4,11 @@ import ColorChartPage from './ColorChartPage';
import ShowcasePage from './pages/ShowcasePage';
import LibraryPage from './pages/LibraryPage';
import HelpPage from './pages/HelpPage';
import WorkDetailPage from './pages/WorkDetailPage';
import PrivacyPolicyPage from './pages/legal/PrivacyPolicyPage';
import TermsOfServicePage from './pages/legal/TermsOfServicePage';
import AboutPage from './pages/legal/AboutPage';
import ContactPage from './pages/legal/ContactPage';
import Nav from './components/Nav';
import Hero from './components/Hero';
import PassSection, { type Plan } from './components/PassSection';
@@ -322,7 +327,9 @@ function HomePage() {
* - `/color-chart`、`/color-chart/:brand` → 品牌色号表页(T-091/T-092/T-093)
* - `/showcase` → 作品展示页(T-097/T-098)
* - `/library` → 图纸库页(T-108)
* - `/work/:id` → 作品详情页(T-132)
* - `/help` → 帮助中心 FAQ 页(T-106)
* - `/privacy-policy`、`/terms-of-service`、`/about`、`/contact` → 合规内容页(T-126~T-129)
* - 其他路径 → 首页(图片转拼豆)
*/
export default function App() {
@@ -346,8 +353,23 @@ export default function App() {
if (path === '/library' || path.startsWith('/library/')) {
return <LibraryPage />;
}
if (path === '/work' || path.startsWith('/work/')) {
return <WorkDetailPage />;
}
if (path === '/help' || path.startsWith('/help/')) {
return <HelpPage />;
}
if (path === '/privacy-policy' || path.startsWith('/privacy-policy/')) {
return <PrivacyPolicyPage />;
}
if (path === '/terms-of-service' || path.startsWith('/terms-of-service/')) {
return <TermsOfServicePage />;
}
if (path === '/about' || path.startsWith('/about/')) {
return <AboutPage />;
}
if (path === '/contact' || path.startsWith('/contact/')) {
return <ContactPage />;
}
return <HomePage />;
}
+8 -1
View File
@@ -1,7 +1,14 @@
import LangSwitcher from './LangSwitcher';
import { useT } from '../i18n';
export type SubNavActive = 'home' | 'chibi' | 'showcase' | 'library' | 'help';
export type SubNavActive =
| 'home'
| 'chibi'
| 'showcase'
| 'library'
| 'help'
/** 合规内容页(/privacy-policy /terms-of-service /about /contact):不在主导航中高亮。 */
| 'legal';
interface SubNavProps {
active: SubNavActive;
+35 -15
View File
@@ -3,10 +3,11 @@ import { SHOWCASE_TAGS } from '../lib/showcase';
import { useT, type MessageKey } from '../i18n';
/**
* WorkCard — 作品卡片(T-098)
* WorkCard — 作品卡片(T-098 / T-134)
*
* 展示区:缩略图 + 标题 + 标签 + 作者 + 互动数;`source === 'chibi'` 时带「AI 生成」标记。
* 标签按钮可点击筛选(由父组件通过 `onTagClick` 承接)。
* T-134:缩略图 / 标题 / 「查看详情」均链接到作品详情页 `/work/:id`。
*/
export const SHOWCASE_TAG_KEYS: Record<ShowcaseTag, MessageKey> = {
@@ -26,37 +27,51 @@ function formatCount(n: number): string {
interface WorkCardProps {
work: ShowcaseWork;
activeTag: ShowcaseTag | null;
onTagClick: (tag: ShowcaseTag) => void;
/** 不传时标签渲染为不可点击的静态标签(如「相关作品」场景)。 */
onTagClick?: (tag: ShowcaseTag) => void;
}
export default function WorkCard({ work, activeTag, onTagClick }: WorkCardProps) {
const { t } = useT();
const detailHref = `/work/${work.id}`;
return (
<article className="sw-card">
<div className="sw-card-media">
<img className="sw-card-img" src={work.thumb} alt={work.title} loading="lazy" />
<a className="sw-card-media-link" href={detailHref} aria-label={work.title} tabIndex={-1}>
<img className="sw-card-img" src={work.thumb} alt={work.title} loading="lazy" />
</a>
{work.source === 'chibi' && (
<span className="sw-card-badge">{t('showcase.aiBadge')}</span>
)}
</div>
<div className="sw-card-body">
<h3 className="sw-card-title">{work.title}</h3>
<h3 className="sw-card-title">
<a className="sw-card-title-link" href={detailHref}>
{work.title}
</a>
</h3>
<p className="sw-card-author">@{work.author}</p>
<div className="sw-card-tags">
{SHOWCASE_TAGS.filter((tag) => work.tags.includes(tag)).map((tag) => (
<button
key={tag}
type="button"
className={`sw-card-tag${tag === activeTag ? ' is-active' : ''}`}
aria-pressed={tag === activeTag}
onClick={() => onTagClick(tag)}
>
{t(SHOWCASE_TAG_KEYS[tag])}
</button>
))}
{SHOWCASE_TAGS.filter((tag) => work.tags.includes(tag)).map((tag) =>
onTagClick ? (
<button
key={tag}
type="button"
className={`sw-card-tag${tag === activeTag ? ' is-active' : ''}`}
aria-pressed={tag === activeTag}
onClick={() => onTagClick(tag)}
>
{t(SHOWCASE_TAG_KEYS[tag])}
</button>
) : (
<span key={tag} className="sw-card-tag">
{t(SHOWCASE_TAG_KEYS[tag])}
</span>
),
)}
</div>
<div className="sw-card-meta">
@@ -75,6 +90,11 @@ export default function WorkCard({ work, activeTag, onTagClick }: WorkCardProps)
</span>
{work.grid && <span className="sw-card-grid">{work.grid}</span>}
</div>
<a className="sw-card-detail" href={detailHref}>
{t('detail.viewDetail')}
<span aria-hidden="true">→</span>
</a>
</div>
</article>
);
+74
View File
@@ -412,6 +412,13 @@ export const en: Messages = {
'help.aria': 'Frequently asked questions',
'help.back': '← Back to Home',
/* ── Legal pages (T-126~T-129) ── */
'legal.eyebrow': 'Trust & Compliance',
'legal.updated': 'Last updated',
'legal.effective': 'Effective date',
'legal.back': '← Back to home',
'legal.related': 'Related pages',
/* ── ChibiPage publish to showcase (T-102) ── */
'chibi.publish.title': 'Publish to Showcase',
'chibi.publish.desc': 'Share this piece with the community showcase for everyone to see.',
@@ -422,4 +429,71 @@ export const en: Messages = {
'chibi.publish.view': 'View the showcase →',
'chibi.publish.fail': 'Publish failed, please try again later',
'chibi.publish.published': 'Published · {id}',
/* ── WorkDetail page (T-132~T-135) ── */
'detail.breadcrumb.home': 'Home',
'detail.breadcrumb.showcase': 'Showcase',
'detail.summary': 'Download the bead pattern and bill of materials for “{title}”, then follow the making guide.',
'detail.meta.size': 'Size',
'detail.meta.colors': 'Colors',
'detail.meta.beads': 'Beads',
'detail.meta.brand': 'Palette',
'detail.meta.author': 'Author',
'detail.meta.date': 'Date',
'detail.meta.sizeValue': '{width} × {height}',
'detail.meta.beadsValue': '{count} beads',
'detail.meta.colorsValue': '{count} colors',
'detail.meta.unknown': 'Unknown',
'detail.preview.title': 'Pattern Preview',
'detail.preview.alt': '{title} bead pattern preview',
'detail.export.title': 'Make This Pattern',
'detail.export.sub': 'Save this pattern and start making.',
'detail.export.pdf': 'Export PDF (recommended)',
'detail.export.png': 'Export PNG',
'detail.export.pdfSoon': 'PDF export is coming soon — download the preview as PNG for now.',
'detail.materials.title': 'Bill of Materials',
'detail.materials.sub': 'Sorted from high to low usage, so you can prepare beads with ease.',
'detail.materials.empty': 'No materials list yet',
'detail.materials.empty.desc': 'The author has not provided color codes and usage for this piece yet.',
'detail.materials.col.code': 'Code',
'detail.materials.col.name': 'Name',
'detail.materials.col.count': 'Count',
'detail.materials.highUse': 'High use · prepare first',
'detail.materials.lowUse': 'Low use (≤10 beads): {count} colors',
'detail.materials.all': 'All {count} colors',
'detail.stats.beads': 'Total Beads',
'detail.stats.colors': 'Colors Used',
'detail.stats.size': 'Size',
'detail.guide.title': 'Making Guide',
'detail.guide.sub': 'From boards to ironing — complete your piece in 6 steps.',
'detail.guide.1.title': 'Plan boards',
'detail.guide.1.desc': 'Work out how many pegboards you need and which way to arrange them.',
'detail.guide.2.title': 'Prepare materials',
'detail.guide.2.desc': 'Sort colors and counts from the bill of materials; high-use colors first.',
'detail.guide.3.title': 'Place beads',
'detail.guide.3.desc': 'Start from one corner and place beads cell by cell.',
'detail.guide.4.title': 'Check the pattern',
'detail.guide.4.desc': 'Slow down on diagonals and double-check each row as you finish it.',
'detail.guide.5.title': 'Save progress',
'detail.guide.5.desc': 'Pause safely by photographing the current state of your work.',
'detail.guide.6.title': 'Iron evenly',
'detail.guide.6.desc': 'Cover with parchment, iron on medium heat evenly, and cool before lifting.',
'detail.related.title': 'Keep Making',
'detail.related.sub': 'Patterns you may also like',
'detail.faq.title': 'FAQ',
'detail.faq.1.q': 'Can I use beads from another brand?',
'detail.faq.1.a': 'Mixing is not recommended. Brands differ in color codes, material feel and heat-shrink rate, which can cause mismatch or warping.',
'detail.faq.2.q': 'How big is the finished piece?',
'detail.faq.2.a': 'Based on 5mm beads, the finished size is roughly “grid cells × 0.5cm”.',
'detail.faq.3.q': 'Any ironing tips?',
'detail.faq.3.a': 'Use parchment paper, iron on medium heat evenly, avoid overheating one spot, and let it cool completely before lifting.',
'detail.faq.4.q': 'Is the pattern free to download?',
'detail.faq.4.a': 'Yes. The pattern and bill of materials are free to view and download for personal crafting reference.',
'detail.viewDetail': 'View Details',
'detail.loading': 'Loading piece…',
'detail.notFound.title': 'Piece not found',
'detail.notFound.desc': 'This piece may have been removed, or the link is incorrect.',
'detail.error.load': 'Failed to load, please try again later',
'detail.error.retry': 'Retry',
'detail.back.showcase': '← Back to Showcase',
};
+74
View File
@@ -400,6 +400,13 @@ export const zhCN = {
'help.aria': '常见问题',
'help.back': '← 返回主页',
/* ── Legal 合规内容页(T-126~T-129) ── */
'legal.eyebrow': '信任与合规',
'legal.updated': '最后更新',
'legal.effective': '生效日期',
'legal.back': '← 返回主页',
'legal.related': '相关页面',
/* ── ChibiPage 发布到展示(T-102) ── */
'chibi.publish.title': '发布到作品展示',
'chibi.publish.desc': '把这张作品分享到社区作品展示,让更多人看到。',
@@ -410,6 +417,73 @@ export const zhCN = {
'chibi.publish.view': '去作品展示看看 →',
'chibi.publish.fail': '发布失败,请稍后重试',
'chibi.publish.published': '已发布 · {id}',
/* ── WorkDetail 作品详情页(T-132~T-135) ── */
'detail.breadcrumb.home': '首页',
'detail.breadcrumb.showcase': '作品展示',
'detail.summary': '下载「{title}」的拼豆图纸与用料清单,跟着制作指南开始吧。',
'detail.meta.size': '尺寸',
'detail.meta.colors': '用色数',
'detail.meta.beads': '总豆数',
'detail.meta.brand': '色板',
'detail.meta.author': '作者',
'detail.meta.date': '时间',
'detail.meta.sizeValue': '{width} × {height}',
'detail.meta.beadsValue': '{count} 颗',
'detail.meta.colorsValue': '{count} 色',
'detail.meta.unknown': '未知',
'detail.preview.title': '图纸预览',
'detail.preview.alt': '{title} 拼豆图纸预览',
'detail.export.title': '导出图纸',
'detail.export.sub': '保存这张图纸,开始制作。',
'detail.export.pdf': '导出 PDF(推荐)',
'detail.export.png': '导出 PNG',
'detail.export.pdfSoon': 'PDF 导出即将上线,可先用 PNG 下载预览图。',
'detail.materials.title': '用料清单',
'detail.materials.sub': '按用量从高到低整理,备料更省心。',
'detail.materials.empty': '暂无用料清单',
'detail.materials.empty.desc': '发布者暂未提供该作品的色号与用量明细。',
'detail.materials.col.code': '色号',
'detail.materials.col.name': '名称',
'detail.materials.col.count': '数量',
'detail.materials.highUse': '高用量 · 优先准备',
'detail.materials.lowUse': '低用量(≤10 颗)共 {count} 种',
'detail.materials.all': '全部 {count} 色',
'detail.stats.beads': '总豆数',
'detail.stats.colors': '用色数',
'detail.stats.size': '尺寸',
'detail.guide.title': '制作指南',
'detail.guide.sub': '从拼板到熨烫,6 步完成作品。',
'detail.guide.1.title': '规划拼板',
'detail.guide.1.desc': '确认需要的拼板数量与摆放方向。',
'detail.guide.2.title': '准备材料',
'detail.guide.2.desc': '按用料清单分拣色号与数量,高用量颜色优先。',
'detail.guide.3.title': '逐格摆放',
'detail.guide.3.desc': '从一角开始,按图纸逐格放置拼豆。',
'detail.guide.4.title': '检查图案',
'detail.guide.4.desc': '斜线处放慢速度,每行结束核对一次。',
'detail.guide.5.title': '保存进度',
'detail.guide.5.desc': '中途休息时保存进度,拍照记录当前状态。',
'detail.guide.6.title': '均匀熨烫',
'detail.guide.6.desc': '盖上熨烫纸,中温均匀熨烫,冷却后再揭起。',
'detail.related.title': '相关作品',
'detail.related.sub': '你可能也喜欢',
'detail.faq.title': '常见问题',
'detail.faq.1.q': '可以用其他品牌的拼豆吗?',
'detail.faq.1.a': '不建议混用。不同品牌在色号、材质和热缩率上存在差异,混用容易导致颜色不一致或熨烫变形。',
'detail.faq.2.q': '成品尺寸是多大?',
'detail.faq.2.a': '以单颗 5mm 拼豆估算,成品尺寸约为「格数 × 0.5cm」。',
'detail.faq.3.q': '熨烫有什么注意事项?',
'detail.faq.3.a': '垫上熨烫纸,中温均匀熨烫,避免局部过热;完全冷却后再揭起。',
'detail.faq.4.q': '图纸可以免费下载吗?',
'detail.faq.4.a': '可以。图纸与用料清单均可免费查看与下载,仅供个人手作参考。',
'detail.viewDetail': '查看详情',
'detail.loading': '作品加载中…',
'detail.notFound.title': '作品不存在',
'detail.notFound.desc': '该作品可能已被删除,或链接有误。',
'detail.error.load': '加载失败,请稍后重试',
'detail.error.retry': '重试',
'detail.back.showcase': '← 返回作品展示',
} as const;
export type Messages = { [K in keyof typeof zhCN]: string };
+31
View File
@@ -192,3 +192,34 @@ export function publishShowcaseWork(params: PublishWorkParams): Promise<PublishW
body: JSON.stringify(params),
});
}
/** 用料清单单行:色号 + 数量(名称可选)。与后端 MaterialLine 对齐。 */
export interface MaterialLine {
code: string;
count: number;
name?: string;
}
/** 作品详情(T-131 GET /api/showcase/works/:id 响应)。 */
export interface ShowcaseWorkDetail {
id: number;
title: string;
imageUrl: string;
tags: string[];
source: string;
createdAt: string;
spec: {
width: number | null;
height: number | null;
brand: string | null;
materials: MaterialLine[] | null;
};
}
/**
* T-131:GET /api/showcase/works/:id — 作品详情。
* id 非正整数 → 400「作品 ID 无效」;记录不存在 → 404「作品不存在」。
*/
export function getShowcaseWork(id: string | number): Promise<ShowcaseWorkDetail> {
return request<ShowcaseWorkDetail>(`/api/showcase/works/${encodeURIComponent(String(id))}`);
}
+758
View File
@@ -0,0 +1,758 @@
/**
* PERLER LAB — 合规内容页数据(T-126~T-129)
*
* 数据源: docs/COMPLIANCE-COPIES.md(T-130,四页 12/12/6/6 章双语文案)。
* 由前端直接读取渲染:每页 = route + title(zh/en) + chapters[];
* 每章 = title(zh/en) + body[](要点,zh/en 双语)。
* ⚠️ 显著告知项(设备绑定 localStorage / 退款规则)以 `warning: true`
* 标记,前端渲染为警示样式(⚠️ callout),满足「显著告知」合规要求。
*/
/** 单个要点段落:zh/en 双语,可选警示标记。正文内 `**加粗**` 由前端解析渲染。 */
export interface ComplianceParagraph {
zh: string;
en: string;
/** ⚠️ 显著告知项:以警示样式(callout)渲染。 */
warning?: boolean;
}
/** 章节:双语标题 + 要点段落数组。 */
export interface ComplianceChapter {
/** 章节标识,如 'privacy-device-binding'。 */
id: string;
titleZh: string;
titleEn: string;
body: readonly ComplianceParagraph[];
}
/** 合规页面:路由 + 双语标题/元描述 + 章节列表。 */
export interface CompliancePage {
route: string;
titleZh: string;
titleEn: string;
metaZh: string;
metaEn: string;
lastUpdated: string;
effectiveDate: string;
chapters: readonly ComplianceChapter[];
}
/** 全局常量(COMPLIANCE-COPIES.md「全局常量」表)。 */
export const COMPLIANCE_CONSTANTS = {
productZh: '拼豆工坊 PERLER LAB',
productEn: 'PERLER LAB',
productDomain: 'https://perler-lab.com',
supportEmail: 'support@perler-lab.com',
lastUpdated: '2026-08-15',
effectiveDate: '2026-08-15',
} as const;
export const COMPLIANCE_PAGES: readonly CompliancePage[] = [
/* ─────────────────────────── 页面 1/4 · 隐私政策 ─────────────────────────── */
{
route: '/privacy-policy',
titleZh: '隐私政策',
titleEn: 'Privacy Policy',
lastUpdated: '2026-08-15',
effectiveDate: '2026-08-15',
metaZh:
'拼豆工坊 PERLER LAB 隐私政策:图片本地处理不上传、AI 生成数据流、兑换码与权益存储、用户权利与联系方式。',
metaEn:
'PERLER LAB Privacy Policy: local image processing, AI generation data flow, redemption codes and credit storage, your rights, and contact details.',
chapters: [
{
id: 'privacy-overview',
titleZh: '概述',
titleEn: 'Overview',
body: [
{
zh: `欢迎使用拼豆工坊 PERLER LAB(以下称"本服务")。本隐私政策说明我们如何在您使用「图片转拼豆图纸」「AI 拼豆生成(chibi)」「兑换码」等功能时收集、使用、存储与保护您的信息。使用本服务即表示您已阅读并同意本政策。`,
en: `Welcome to PERLER LAB ("the Service"). This Privacy Policy explains how we collect, use, store and protect your information when you use image-to-pattern conversion, AI pattern generation (chibi), redemption codes and other features. By using the Service, you agree to this policy.`,
},
{
zh: `本政策适用于 https://perler-lab.com 及其全部子页面。我们坚持「最小必要」与「本地优先」的隐私设计原则。`,
en: `This policy applies to https://perler-lab.com and all of its subpages. We follow the privacy-by-design principles of data minimization and local-first processing.`,
},
],
},
{
id: 'privacy-local-first',
titleZh: '图片处理:本地优先(普通图纸生成)',
titleEn: 'Image Processing: Local-First (Standard Pattern Generation)',
body: [
{
zh: `普通图纸生成(上传图片 → 采样 → 量化 → 色板匹配 → 预览 → 导出)**全部在您的浏览器本地完成**。您上传的图片、中间计算数据与生成的图纸不会上传到我们的服务器。`,
en: `Standard pattern generation (upload → sample → quantize → palette match → preview → export) runs **entirely in your browser**. Your image, intermediate data and generated pattern are never uploaded to our servers.`,
},
{
zh: `本地处理是本服务的默认路径,也是我们与竞品差异化的核心隐私卖点。`,
en: `Local processing is the default path and a core privacy selling point that differentiates us from competitors.`,
},
{
zh: `导出文件(PNG/PDF 等)由浏览器直接生成并保存到您的设备,服务器不保存任何副本。`,
en: `Export files (PNG/PDF etc.) are generated by your browser and saved to your device; the server keeps no copy.`,
},
],
},
{
id: 'privacy-ai-upload',
titleZh: '图片处理:AI 生成(chibi,服务端上传)',
titleEn: 'Image Processing: AI Generation (chibi, Server-Side Upload)',
body: [
{
zh: `使用 **AI 拼豆生成(chibi)** 功能时,您选择的参考图片会由服务器转发至第三方 AI 模型供应商,用于风格化生成。图片仅在生成过程中被短暂处理,生成完成后即从服务器删除,不用于模型训练,也不会向其他任何第三方披露。`,
en: `When you use **AI pattern generation (chibi)**, your selected reference image is forwarded by our server to a third-party AI model provider for stylized generation. The image is processed only for the duration of generation, then deleted from our servers. It is never used for model training or disclosed to any other third party.`,
},
{
zh: `每次 AI 生成消耗 1 次权益(兑换码),且**仅成功生成才扣费**;失败不扣。`,
en: `Each AI generation consumes 1 credit from your redemption code, and **you are only charged when generation succeeds**; failed attempts cost nothing.`,
},
{
zh: `「本地处理」与「AI 服务端上传」是两条独立的图片处理路径:普通生成不上传,仅 AI 生成功能会上传,请知悉。`,
en: `"Local processing" and "AI server-side upload" are two separate image-processing paths: standard generation never uploads; only the AI generation feature uploads your image. Please be aware of this distinction.`,
},
],
},
{
id: 'privacy-redemption-data',
titleZh: '兑换码与权益数据',
titleEn: 'Redemption Codes and Credit Data',
body: [
{
zh: `您输入的兑换码会发送至服务器进行校验与核销,服务器保存兑换记录、核销流水与权益消费日志,用于防止重复兑换、套利与滥用风控。`,
en: `The redemption code you enter is sent to our server for validation and redemption. We store redemption records, consumption logs and credit-usage logs for anti-fraud, anti-scalping and abuse control.`,
},
{
zh: `兑换码与消费记录属于与您相关的业务数据,我们按最小必要原则保存(见章节 8)。`,
en: `Redemption codes and consumption records are business data related to you; we retain them on a data-minimization basis (see Section 8).`,
},
{
zh: `我们不收集您的姓名、手机号、支付账号等敏感个人信息(当前 MVP 通过兑换码渠道购买,无账号体系)。`,
en: `We do not collect sensitive personal information such as your name, phone number or payment account (the MVP sells through redemption codes and has no account system).`,
},
],
},
{
id: 'privacy-device-binding',
titleZh: '设备绑定与本地存储',
titleEn: 'Device Binding and Local Storage',
body: [
{
warning: true,
zh: `**重要告知**:您的权益次数与已保存的图纸存储在浏览器本地存储(localStorage)中,与当前设备绑定。**更换设备、更换浏览器或清除浏览器缓存可能导致权益记录无法找回**,请务必妥善保存兑换码。`,
en: `**Important notice**: Your credit balance and saved patterns are stored in your browser's localStorage and bound to the current device. **Switching devices or browsers, or clearing your browser cache, may make your credits unrecoverable.** Please keep your redemption code safe.`,
},
{
zh: `本服务当前不提供账号体系,权益不同步云端;在引入账号同步前,本地存储是唯一的权益载体。`,
en: `The Service currently has no account system and credits are not synced to the cloud. Until account sync is introduced, localStorage is the only carrier of your credits.`,
},
],
},
{
id: 'privacy-cookies',
titleZh: 'Cookie 政策',
titleEn: 'Cookie Policy',
body: [
{
zh: `本服务使用 Cookie 与同类本地存储技术以维持基础功能(如语言偏好、图纸草稿、权益状态)与匿名访问统计。`,
en: `We use cookies and similar local storage technologies to support basic features (language preference, pattern drafts, credit status) and anonymous traffic statistics.`,
},
{
zh: `您可通过浏览器设置管理或删除 Cookie;禁用 Cookie 后部分功能可能无法正常使用。`,
en: `You can manage or delete cookies through your browser settings; some features may not work when cookies are disabled.`,
},
{
zh: `本服务无广告投放,不使用第三方广告跟踪 Cookie。`,
en: `The Service runs no advertising and uses no third-party ad-tracking cookies.`,
},
],
},
{
id: 'privacy-third-party',
titleZh: '第三方服务',
titleEn: 'Third-Party Services',
body: [
{
zh: `本服务可能接入以下第三方:① **AI 模型供应商**(chibi 生成,仅转发生成请求,见章节 3);② **分析服务**(如 Google Analytics 或自建埋点,见章节 6);③ **内容分发网络 CDN**(静态资源加速,仅处理基础请求元数据);④ **域名解析与主机服务**。第三方仅在提供服务所必需的范围内处理数据,并受其自身隐私政策约束。`,
en: `The Service may engage the following third parties: ① **AI model providers** (for chibi generation, receiving only generation requests, see Section 3); ② **analytics services** (e.g. Google Analytics or self-hosted tracking, see Section 6); ③ **CDNs** (static asset delivery, processing only basic request metadata); ④ **domain and hosting services**. Third parties process data only as strictly necessary and are bound by their own privacy policies.`,
},
{
zh: `若 AI 模型供应商位于中国大陆境外,涉及的数据出境处理将遵循适用的法律规定;正式商业化前完成合规评估(详见 COMPLIANCE-PAGES §2.2)。`,
en: `If an AI model provider is located outside mainland China, any cross-border data processing will comply with applicable law; a compliance review will be completed before full commercialization (see COMPLIANCE-PAGES §2.2).`,
},
{
zh: `除本政策披露外,我们**不会**向任何第三方出售、出租或交易您的个人信息。`,
en: `Beyond what is disclosed in this policy, we **do not** sell, rent or trade your personal information to any third party.`,
},
],
},
{
id: 'privacy-retention',
titleZh: '数据存储与保留',
titleEn: 'Data Storage and Retention',
body: [
{
zh: `服务器端保存的数据(兑换码库、核销与消费日志、AI 生成记录)按「最小必要」原则保存,保留期限以满足服务运行、安全风控与法律义务所需为限。`,
en: `Server-side data (redemption records, consumption and usage logs, AI generation records) is kept on a data-minimization basis, retained only as long as needed for service operation, security controls and legal obligations.`,
},
{
zh: `普通生成的图片与图纸数据默认只存在于您的浏览器,不进入服务器,无需保留与删除。`,
en: `Images and pattern data from standard generation live only in your browser by default; they never reach our servers, so no retention or deletion is needed.`,
},
{
zh: `您可通过下方联系方式请求删除服务器端与您相关的记录,我们会在 15 个工作日内处理。`,
en: `You may request deletion of server-side records related to you through the contact details below; we respond within 15 working days.`,
},
],
},
{
id: 'privacy-rights',
titleZh: '用户权利',
titleEn: 'Your Rights',
body: [
{
zh: `依据《中华人民共和国个人信息保护法》,您有权对与您相关的个人信息行使**查询、复制、更正、删除**权利,并有权就我们的处理行为提出投诉。`,
en: `Under the Personal Information Protection Law of the PRC, you have the right to **access, copy, rectify and delete** your personal information, and to raise complaints about our processing.`,
},
{
zh: `行使权利请发送邮件至 **support@perler-lab.com**,我们将在 15 个工作日内响应并处理。`,
en: `To exercise these rights, email **support@perler-lab.com**; we respond within 15 working days.`,
},
{
zh: `本地存储的数据(图纸、权益)由您自行管理:清除浏览器数据即可移除,无需联系我们。`,
en: `Local data (patterns, credits) is managed by you directly: clearing your browser data removes it, with no need to contact us.`,
},
],
},
{
id: 'privacy-children',
titleZh: '儿童隐私',
titleEn: "Children's Privacy",
body: [
{
zh: `本服务支持亲子拼豆场景。如您未满 14 周岁,请在监护人陪同下使用,并在征得监护人同意后操作。`,
en: `The Service supports family crafting. If you are under 14, please use the Service with a parent or guardian and only after obtaining their consent.`,
},
{
zh: `我们不会在知情的情况下收集 14 周岁以下儿童的个人信息;如发现误收集,将立即删除相关记录。`,
en: `We do not knowingly collect personal information from children under 14; if we discover such data, we delete it promptly.`,
},
],
},
{
id: 'privacy-security',
titleZh: '数据安全',
titleEn: 'Data Security',
body: [
{
zh: `我们采取合理的技术与管理措施保护信息,包括 HTTPS 加密传输、访问控制、风控限流与日志审计。`,
en: `We apply reasonable technical and administrative safeguards, including HTTPS encryption, access controls, rate limiting and log auditing.`,
},
{
zh: `请注意,任何互联网传输与存储方式都无法保证绝对安全;如发生影响您权益的数据安全事件,我们将依法履行通知义务。`,
en: `Please note that no method of internet transmission or storage is absolutely secure. If a data incident affecting your rights occurs, we will fulfil our notification obligations under law.`,
},
],
},
{
id: 'privacy-changes-contact',
titleZh: '政策变更与联系方式',
titleEn: 'Changes to This Policy & Contact',
body: [
{
zh: `我们可能不时更新本政策,最新版本将发布在本页面并标注生效日期;重大变更将通过站内公告或显著提示通知。`,
en: `We may update this policy from time to time. The latest version will be published on this page with its effective date; material changes will be announced via on-site notice.`,
},
{
zh: `生效日期:**2026-08-15**。`,
en: `Effective date: **August 15, 2026**.`,
},
{
zh: `如对本政策有任何疑问或想行使权利,请通过**联系我们**页或邮件 **support@perler-lab.com** 与我们联系。`,
en: `For any questions about this policy or to exercise your rights, please reach us via the **Contact** page or at **support@perler-lab.com**.`,
},
],
},
],
},
/* ─────────────────────────── 页面 2/4 · 服务条款 ─────────────────────────── */
{
route: '/terms-of-service',
titleZh: '服务条款',
titleEn: 'Terms of Service',
lastUpdated: '2026-08-15',
effectiveDate: '2026-08-15',
metaZh:
'拼豆工坊 PERLER LAB 服务条款:免费/付费权益边界、兑换码规则、用户上传版权责任、知识产权与商用授权、免责与责任限制。',
metaEn:
'PERLER LAB Terms of Service: free and paid feature boundaries, redemption code rules, user upload responsibilities, intellectual property and commercial licensing, disclaimers and liability limits.',
chapters: [
{
id: 'terms-acceptance',
titleZh: '服务描述与接受条款',
titleEn: 'Service Description and Acceptance',
body: [
{
zh: `拼豆工坊 PERLER LAB 是一个在线拼豆图纸生成工具,提供图片转拼豆图纸(免费)与 AI 拼豆生成、高清/多格式导出、无水印、商用授权等增值功能(兑换码付费)。`,
en: `PERLER LAB is an online bead-pattern generator that offers image-to-pattern conversion (free) plus value-added features such as AI generation, HD/multi-format export, watermark-free export and commercial licensing (paid via redemption codes).`,
},
{
zh: `使用本服务即表示您已阅读、理解并同意本条款的全部内容;如不同意,请停止使用本服务。`,
en: `By using the Service, you acknowledge that you have read, understood and agreed to these Terms in full. If you do not agree, please stop using the Service.`,
},
],
},
{
id: 'terms-free-paid-boundary',
titleZh: '免费与付费权益边界',
titleEn: 'Free and Paid Feature Boundaries',
body: [
{
zh: `本服务采用「核心免费、增值付费」模式,免费功能共 12 项(F-01~F-12),覆盖图片上传、参数调整、图纸生成核心、完整预览、备料清单、基础编辑器、基础下载、兑换码兑换、色号表浏览、图纸本地保存、分享 URL、帮助中心。`,
en: `The Service follows a "free core, paid premium" model. There are 12 free features (F-01–F-12) covering upload, parameter adjustment, core pattern generation, full preview, materials list, basic editor, standard download, code redemption, color charts, local save, share links and the help center.`,
},
{
zh: `付费功能共 9 项(P-01~P-09):AI 拼豆生成、高清 PNG 下载、PDF 高清打印导出、无水印导出、SVG/JSON 工程文件导出、高级编辑工具、批量生成/导出、商用授权、AI 结果转正式图纸,均通过兑换码按次消耗。`,
en: `There are 9 paid features (P-01–P-09): AI generation, HD PNG download, HD PDF print export, watermark-free export, SVG/JSON project export, advanced editing tools, batch generation/export, commercial licensing and AI-result-to-pattern conversion, all consumed per-use via redemption codes.`,
},
{
zh: `免费与付费清单以本条款及官网公示为准,我方保留按商业模式迭代调整付费功能范围的权利,调整会以显著方式通知。`,
en: `The free and paid feature lists are governed by these Terms and public announcements. We reserve the right to adjust the scope of paid features as our business model evolves, with material changes announced prominently.`,
},
],
},
{
id: 'terms-redemption-rules',
titleZh: '兑换码规则',
titleEn: 'Redemption Code Rules',
body: [
{
zh: `**兑换方式**:在首页点击「输入兑换码解锁」,输入兑换码后权益自动到账,权益存储于当前设备浏览器(见章节 4)。`,
en: `**Redemption**: click "Redeem code" on the homepage, enter your code, and credits are credited to your account, stored in your current browser (see Section 4).`,
},
{
zh: `**有效期**:兑换码**长期有效**,无有效期限制。`,
en: `**Validity**: redemption codes are **valid indefinitely** with no expiry.`,
},
{
warning: true,
zh: `**退款规则**:虚拟权益**一经使用不支持退款**;未使用或部分未使用的兑换码,可联系客服协商处理。`,
en: `**Refunds**: virtual credits are **non-refundable once used**; unused or partially unused codes may be negotiated with customer service.`,
},
{
zh: `**渠道隔离**:代理码走代理通道、个人码走个人通道,**不可混用**;异常兑换行为将触发风控。`,
en: `**Channel separation**: agent codes use the agent channel and personal codes use the personal channel; they **cannot be mixed**. Abnormal redemption triggers our risk controls.`,
},
{
zh: `兑换码请通过官方渠道购买;通过非官方渠道购码导致的风险由您自行承担。`,
en: `Purchase codes only through official channels; risks from buying codes through unofficial channels are borne by you.`,
},
],
},
{
id: 'terms-device-bound-credits',
titleZh: '设备绑定权益',
titleEn: 'Device-Bound Credits',
body: [
{
warning: true,
zh: `权益保存在当前设备的浏览器本地存储中,**换设备、换浏览器或清除缓存可能无法找回**。请妥善保存兑换码,避免权益丢失。`,
en: `Credits are stored in your current browser's localStorage. **Switching devices/browsers or clearing cache may make them unrecoverable.** Keep your redemption code safe.`,
},
{
zh: `我方不因用户自行清除浏览器数据导致的权益丢失承担责任,但会通过客服为您提供兑换码重绑等力所能及的协助。`,
en: `We are not liable for credit loss caused by you clearing your own browser data, but our support team will do its best to assist, such as re-binding a redemption code.`,
},
],
},
{
id: 'terms-user-responsibility',
titleZh: '用户责任(上传内容版权)',
titleEn: 'User Responsibilities (Copyright of Uploaded Content)',
body: [
{
zh: `您上传图片用于生成图纸时,**保证对图片拥有合法使用权**,不侵犯他人的著作权、商标权、肖像权、隐私权等合法权益。`,
en: `When you upload an image for pattern generation, you **warrant that you have the legal right to use it** and that it does not infringe anyone's copyright, trademark, right of publicity, privacy or other lawful rights.`,
},
{
zh: `您授权本服务在生成所需范围内处理您上传的图片(本地处理或 AI 生成转发,详见隐私政策)。`,
en: `You grant the Service the right to process your uploaded image to the extent needed for generation (locally, or forwarded for AI generation as described in the Privacy Policy).`,
},
{
zh: `禁止上传违法、侵权、色情、暴力、歧视性或违反公序良俗的内容;如发现,我方有权拒绝生成并保留向权利人及监管部门报告的权利。`,
en: `Do not upload unlawful, infringing, obscene, violent, discriminatory or otherwise objectionable content. We may refuse generation and reserve the right to report to rights holders and authorities.`,
},
{
zh: `生成图纸仅供个人手作参考;**商用需购买商用授权(P-08)**,包括代做接单、批量售卖图纸等情形。`,
en: `Generated patterns are for personal crafting reference only; **commercial use (including commissioned work and bulk pattern sales) requires a commercial license (P-08)**.`,
},
],
},
{
id: 'terms-ip',
titleZh: '知识产权',
titleEn: 'Intellectual Property',
body: [
{
zh: `本服务的网站界面、生成算法、色板数据、品牌标识、文档等知识产权归拼豆工坊 PERLER LAB 所有,受相关法律保护。`,
en: `The Service's website design, generation algorithms, palette data, branding and documentation are owned by PERLER LAB and protected by applicable law.`,
},
{
zh: `色板数据来自各拼豆品牌的公开资料,用于工具功能;若涉及第三方权利,均按合理使用或公开数据许可处理。`,
en: `Palette data is sourced from public materials of bead brands for tool functionality; any third-party rights are handled under fair use or open-data licensing.`,
},
{
zh: `由本工具生成的作品图纸,其使用权归生成者本人;个人使用免费,商用须按章节 5 取得授权。`,
en: `Patterns generated with this tool are yours to use; personal use is free, and commercial use requires the license described in Section 5.`,
},
{
zh: `未经我方书面许可,不得复制、分发、反向工程本服务的代码、算法或商业运营方式。`,
en: `Without our written permission, you may not copy, redistribute or reverse-engineer the Service's code, algorithms or business operations.`,
},
],
},
{
id: 'terms-prohibited',
titleZh: '禁止行为',
titleEn: 'Prohibited Conduct',
body: [
{
zh: `您不得从事以下行为:① 滥用、共享、转售兑换码或绕过代理/个人渠道;② 批量抓取、爬取本服务内容或数据;③ 逆向工程、篡改前端代码或伪造核销请求;④ 利用本服务实施欺诈、侵权、违法活动;⑤ 干扰本服务正常运行或攻击服务器。`,
en: `You may not: ① abuse, share, resell redemption codes or bypass agent/personal channels; ② bulk-scrape or crawl Service content or data; ③ reverse-engineer, tamper with front-end code or forge consumption requests; ④ engage in fraud, infringement or unlawful activity; ⑤ disrupt normal operation of, or attack, the Service's servers.`,
},
{
zh: `违反本节将导致权益冻结、兑换码失效或账号级限制,情节严重的将依法处理。`,
en: `Violations may result in credit freezing, code invalidation or service-level restrictions, and legal action in serious cases.`,
},
],
},
{
id: 'terms-disclaimer',
titleZh: '免责声明',
titleEn: 'Disclaimer of Warranties',
body: [
{
zh: `本服务按「现状」和「可用」原则提供,**不对生成图纸的准确性、完整性、适用性作任何保证**;图纸结果受原图质量、参数设置与算法限制影响。`,
en: `The Service is provided "as is" and "as available". **We make no warranties as to the accuracy, completeness or fitness of generated patterns**; results depend on source-image quality, parameter settings and algorithmic limits.`,
},
{
zh: `AI 生成结果仅供参考,可能出现风格偏差、元素缺失等不完美情况;对 AI 结果的最终使用责任由您自行承担。`,
en: `AI generation results are for reference only and may contain style deviations or missing elements; you bear full responsibility for how you use AI output.`,
},
],
},
{
id: 'terms-liability',
titleZh: '责任限制',
titleEn: 'Limitation of Liability',
body: [
{
zh: `在法律允许的范围内,我方不对因使用或无法使用本服务而产生的**间接、偶然、特殊或后果性损失**承担责任(包括但不限于数据丢失、商机损失、权益损失)。`,
en: `To the extent permitted by law, we are not liable for **indirect, incidental, special or consequential damages** arising from your use of or inability to use the Service (including but not limited to data loss, loss of business or loss of credits).`,
},
{
zh: `我方在责任成立时的赔偿总额,不超过您为本服务已实际支付的对价。`,
en: `Our total liability, when established, does not exceed the amount you have actually paid for the Service.`,
},
],
},
{
id: 'terms-changes-termination',
titleZh: '服务变更与终止',
titleEn: 'Changes to and Termination of the Service',
body: [
{
zh: `我们可能不时更新、调整或暂停部分功能以改进服务,并通过站内公告等方式通知。`,
en: `We may update, adjust or suspend features from time to time to improve the Service, with notice given via on-site announcements.`,
},
{
zh: `如您严重违反本条款,我方有权暂停或终止向您提供服务,并保留追究责任的权利;已购买且未使用的权益按章节 3 处理。`,
en: `If you materially breach these Terms, we may suspend or terminate your access and reserve the right to pursue claims; unused credits purchased are handled per Section 3.`,
},
],
},
{
id: 'terms-governing-law',
titleZh: '法律适用与争议解决',
titleEn: 'Governing Law and Dispute Resolution',
body: [
{
zh: `本条款适用中华人民共和国法律(仅为本条款之目的,不含港澳台地区)。`,
en: `These Terms are governed by the laws of the People's Republic of China (for the purpose of these Terms only, excluding Hong Kong, Macao and Taiwan).`,
},
{
zh: `因本服务产生的争议,双方应友好协商解决;协商不成的,提交服务器所在地有管辖权的人民法院诉讼解决。`,
en: `Disputes arising from the Service shall first be resolved through friendly negotiation; if negotiation fails, they shall be submitted to the competent people's court where the servers are located.`,
},
],
},
{
id: 'terms-changes-contact',
titleZh: '变更条款与联系方式',
titleEn: 'Changes to These Terms & Contact',
body: [
{
zh: `我们可能不时更新本条款,最新版本将发布在本页面并标注生效日期;重大变更将通过显著方式通知。`,
en: `We may update these Terms from time to time. The latest version will be published on this page with its effective date; material changes will be communicated prominently.`,
},
{
zh: `生效日期:**2026-08-15**。如有疑问,请通过**联系我们**页或邮件 **support@perler-lab.com** 联系。`,
en: `Effective date: **August 15, 2026**. For questions, contact us via the **Contact** page or **support@perler-lab.com**.`,
},
],
},
],
},
/* ─────────────────────────── 页面 3/4 · 关于我们 ─────────────────────────── */
{
route: '/about',
titleZh: '关于我们',
titleEn: 'About Us',
lastUpdated: '2026-08-15',
effectiveDate: '2026-08-15',
metaZh:
'关于拼豆工坊 PERLER LAB:图片转拼豆图纸 + AI 拼豆生成器,免费核心功能,本地处理隐私优先,算法精度与 AI 能力是差异化优势。',
metaEn:
'About PERLER LAB: image-to-bead-pattern converter and AI pattern generator, free core features, local-first privacy, with algorithmic precision and AI generation as differentiators.',
chapters: [
{
id: 'about-what-we-build',
titleZh: '产品定位',
titleEn: 'What We Build',
body: [
{
zh: `**PERLER LAB 拼豆工坊**是一个在线拼豆图纸生成器:上传一张图片,即可自动生成带色号、颗数与网格编号的拼豆图纸,支持参数反复调整与完整预览。`,
en: `**PERLER LAB** is an online bead-pattern generator: upload an image and automatically get a complete pattern with color codes, bead counts and grid numbers, with unlimited parameter tweaking and full preview.`,
},
{
zh: `除常规图纸生成外,我们还提供 **AI 拼豆生成(chibi)**,把照片转成像素拼豆风格的创作起点,是拼豆工具中少有的 AI 能力。`,
en: `Beyond standard generation, we offer **AI pattern generation (chibi)**, turning photos into pixel-bead-style starting points, an AI capability rarely found in bead tools.`,
},
],
},
{
id: 'about-core-features',
titleZh: '核心特性',
titleEn: 'Core Features',
body: [
{
zh: `免费核心闭环:上传 → 生成 → 预览 → 备料清单 → 基础下载,全程免费、无需注册,且**图片在浏览器本地处理,不上传服务器**。`,
en: `A free core loop: upload → generate → preview → materials list → standard download, all free with no sign-up required, and **images are processed locally in your browser, never uploaded**.`,
},
{
zh: `增值付费项通过兑换码按次解锁:AI 生成、高清/PDF/无水印导出、SVG/JSON 工程文件、高级编辑、批量与商用授权。`,
en: `Value-added features unlock via redemption codes on a per-use basis: AI generation, HD/PDF/watermark-free export, SVG/JSON project files, advanced editing, batch operations and commercial licensing.`,
},
{
zh: `支持 MARD、Artkal-C、Perler、Hama、Nabbi、IKEA 等多品牌色板切换与完整备料统计。`,
en: `Multiple brand palettes (MARD, Artkal-C, Perler, Hama, Nabbi, IKEA) with full materials statistics.`,
},
{
zh: `图纸可本地保存、分享链接,帮助中心覆盖实操教程与 FAQ。`,
en: `Patterns can be saved locally and shared via link; the help center covers tutorials and FAQs.`,
},
],
},
{
id: 'about-team',
titleZh: '我们的团队',
titleEn: 'Our Team',
body: [
{
zh: `PERLER LAB 由一群拼豆爱好者与开发者组成,我们既写算法,也亲手拼豆。`,
en: `PERLER LAB is built by a team of bead crafters and developers. We write algorithms, and we place beads ourselves.`,
},
{
zh: `团队分工覆盖:生成算法与图像处理(采样/量化/色板匹配)、AI 生成与模型接入、前后端工程、色板数据与内容运营。`,
en: `The team spans pattern algorithms and image processing (sampling/quantization/palette matching), AI generation and model integration, front-end/back-end engineering, palette data and content operations.`,
},
{
zh: `我们保持小而精的团队结构,贴近用户反馈快速迭代(详见「联系我们」)。`,
en: `We keep a small, focused team that stays close to user feedback and iterates quickly (see "Contact Us").`,
},
],
},
{
id: 'about-vision',
titleZh: '我们的愿景',
titleEn: 'Our Vision',
body: [
{
zh: `让每个人都能把想留下的画面,变成一颗一颗可以亲手拼出来的豆。`,
en: `Let everyone turn an image they want to keep into beads they can place with their own hands.`,
},
{
zh: `我们相信「工具应免费、透明、好用」:核心能力不设墙,隐私默认受保护,结果随时可导出可分享。`,
en: `We believe tools should be free, transparent and delightful: the core stays open, privacy is protected by default, and results are always exportable and shareable.`,
},
{
zh: `长期方向:从「图纸生成器」走向「拼豆创作社区」,让图纸、教程与创作者互相连接。`,
en: `Long term, we aim to grow from a "pattern generator" into a "bead crafting community" connecting patterns, tutorials and creators.`,
},
],
},
{
id: 'about-differentiators',
titleZh: '我们与竞品的差异',
titleEn: 'What Makes Us Different',
body: [
{
zh: `**算法精度**:采样、量化与色板匹配针对拼豆场景优化,还原度与色彩一致性表现更稳定,备料清单分色精准。`,
en: `**Algorithmic precision**: sampling, quantization and palette matching are optimized for bead crafting, giving stable fidelity and color consistency with accurate per-color materials lists.`,
},
{
zh: `**AI 生成能力**:提供 AI 拼豆生成(chibi),这是许多同类工具没有的增值能力,为创作提供全新起点。`,
en: `**AI generation**: we offer AI pattern generation (chibi), a value-add many similar tools lack, giving creators a whole new starting point.`,
},
{
zh: `**隐私优先**:图片本地处理、无需注册、无广告,信任从第一张图纸开始。`,
en: `**Privacy first**: local image processing, no sign-up, no ads. Trust starts with your first pattern.`,
},
{
zh: `**免费核心闭环**:对齐行业最佳实践,生成、预览、备料、基础下载全免费,付费只针对高清、无水印、AI 等增值项。`,
en: `**A free core loop**: aligned with industry best practice, generation, preview, materials and standard download are all free; payment applies only to HD, watermark-free, AI and similar premium items.`,
},
],
},
{
id: 'about-contact',
titleZh: '联系我们',
titleEn: 'Contact',
body: [
{
zh: `想合作、反馈或需要帮助?欢迎通过**联系我们**页或邮件 **support@perler-lab.com** 与我们联系,我们会在 1~3 个工作日内回复。`,
en: `Want to partner, give feedback or get help? Reach us via the **Contact** page or **support@perler-lab.com**; we reply within 1–3 working days.`,
},
],
},
],
},
/* ─────────────────────────── 页面 4/4 · 联系我们 ─────────────────────────── */
{
route: '/contact',
titleZh: '联系我们',
titleEn: 'Contact Us',
lastUpdated: '2026-08-15',
effectiveDate: '2026-08-15',
metaZh:
'联系拼豆工坊 PERLER LAB:客服邮箱、响应时效、问题分类(功能/兑换码权益/代理合作/侵权投诉)与代理合作入口。',
metaEn:
'Contact PERLER LAB: support email, response time, issue categories (features/credits/agency/copyright) and the partnership entry.',
chapters: [
{
id: 'contact-email',
titleZh: '客服邮箱',
titleEn: 'Email Us',
body: [
{
zh: `客服邮箱:**support@perler-lab.com**`,
en: `Support email: **support@perler-lab.com**`,
},
{
zh: `邮件请附上:问题描述、使用环境(浏览器/设备)、截图或兑换码(如有),可显著加快处理速度。`,
en: `For faster help, include: a description of the issue, your environment (browser/device), screenshots and the redemption code (if relevant).`,
},
{
zh: `兑换码相关邮件请注意隐私:出于安全考虑,请不要在邮件正文直接粘贴完整兑换码。`,
en: `Please be careful with redemption codes: for security, do not paste a full code directly in the email body.`,
},
],
},
{
id: 'contact-response-time',
titleZh: '响应时效',
titleEn: 'Response Time',
body: [
{
zh: `我们承诺在 **1~3 个工作日**内回复您的邮件;紧急问题(如权益异常、侵权投诉)会优先处理。`,
en: `We reply within **1–3 working days**; urgent issues (e.g. credit anomalies, copyright complaints) are prioritized.`,
},
{
zh: `高峰期(如节假日活动)响应可能略有延迟,敬请谅解。`,
en: `During peak periods (holidays, promotions) responses may take slightly longer. Thank you for your patience.`,
},
],
},
{
id: 'contact-categories',
titleZh: '问题分类',
titleEn: 'How Can We Help',
body: [
{
zh: `① **功能问题**:上传/生成/导出/编辑器使用问题 → 建议先查看**帮助中心** FAQ,解决不了再发邮件。`,
en: `① **Feature issues**: upload/generation/export/editor problems → check the **Help Center** FAQ first, then email us if still stuck.`,
},
{
zh: `② **兑换码与权益**:兑换失败、权益扣减异常、退款协商 → 邮件注明兑换码与问题截图。`,
en: `② **Redemption codes & credits**: redemption failure, abnormal deduction, refund requests → include the code and screenshots.`,
},
{
zh: `③ **代理合作**:代理套餐、批量出图、阶梯价咨询 → 见下方「代理合作」。`,
en: `③ **Agency partnership**: agent packages, batch generation, tiered pricing → see "Partnership" below.`,
},
{
zh: `④ **侵权投诉**:认为本服务处理的内容侵犯您的权利(含 DMCA 类投诉)→ 邮件说明权属与具体内容,我们会在核实后 48 小时内处理。`,
en: `④ **Copyright complaints**: if you believe content processed by the Service infringes your rights (including DMCA-style notices) → state your rights and the specific content; we handle verified notices within 48 hours.`,
},
],
},
{
id: 'contact-agency',
titleZh: '代理合作',
titleEn: 'Agency Partnership',
body: [
{
zh: `PERLER LAB 面向拼豆定制商家与个人接单者开放**代理合作**:以批发价购次,按单零售,差价即利润。`,
en: `PERLER LAB welcomes **agency partnerships** for bead-custom shops and freelancers: buy credits at wholesale price, retail per order, and keep the margin.`,
},
{
zh: `代理套餐:入门 ¥139/200 次 · 标准 ¥299/500 次 · 核心 ¥499/1000 次,权益长期有效;批量采购 ≥1000 次可谈阶梯价。`,
en: `Agent packages: Starter ¥139/200 credits · Standard ¥299/500 credits · Core ¥499/1000 credits, valid indefinitely; tiered pricing negotiable for ≥1000 credits.`,
},
{
zh: `申请方式:邮件至 **support@perler-lab.com**,标题注明「代理合作 + 您的微信号/联系方式」,我们会发送报价单与开通指引。`,
en: `To apply, email **support@perler-lab.com** with "Agency partnership + your contact" in the subject; we'll send the price list and onboarding guide.`,
},
],
},
{
id: 'contact-feedback',
titleZh: '反馈渠道',
titleEn: 'Feedback',
body: [
{
zh: `功能建议、Bug 报告、内容合作建议,欢迎随时发邮件或在帮助中心反馈入口提交。`,
en: `Feature suggestions, bug reports and content-collaboration ideas are always welcome via email or the feedback entry in the Help Center.`,
},
{
zh: `你的每一条反馈都会进入我们的迭代清单,优秀建议将获赠权益(体验包兑换码)以表感谢。`,
en: `Every piece of feedback goes into our iteration backlog; valuable suggestions may earn a gift (a starter-pack redemption code) as thanks.`,
},
],
},
{
id: 'contact-help-center',
titleZh: '帮助中心跳转',
titleEn: 'Help Center',
body: [
{
zh: `常见问题请先查阅 **帮助中心**(FAQ 35 条 / 8 类:选豆、配色、打印、熨烫、裱框、兑换码权益、AI 专区、平台使用),大部分问题无需等待人工回复。`,
en: `Please check the **Help Center** first (35 FAQs across 8 categories: bead selection, color matching, printing, ironing, framing, codes & credits, AI zone, platform usage). Most questions can be answered there without waiting for a human.`,
},
{
zh: `帮助中心入口:页面底部导航「帮助」或 /help。`,
en: `The Help Center is available via the "Help" link in the footer or at /help.`,
},
],
},
],
},
];
/** 按路由查找合规页面(四页数据均来自 COMPLIANCE-COPIES.md,必存在)。 */
export function findCompliancePage(route: string): CompliancePage | undefined {
return COMPLIANCE_PAGES.find((page) => page.route === route);
}
+142
View File
@@ -0,0 +1,142 @@
import { useEffect } from 'react';
import type { ReactNode } from 'react';
import './pages.css';
import SubNav from '../components/SubNav';
import { useT } from '../i18n';
import { COMPLIANCE_PAGES } from '../lib/compliance-data';
import type { ComplianceChapter, CompliancePage } from '../lib/compliance-data';
/**
* LegalPage — 合规内容页通用组件(T-126~T-129 四页共用)
*
* 数据源: src/lib/compliance-data.ts(由 docs/COMPLIANCE-COPIES.md 转写,
* 四页 12/12/6/6 章双语)。页面标题/章节/正文均按当前语言
* (zh-CN/en)读取数据的双语字段;正文中 `**加粗**` 标记解析为 <strong>,
* `warning` 段落以 ⚠️ 警示框突出渲染(满足「显著告知」合规要求)。
*/
/** 把 COMPLIANCE-COPIES.md 正文的 `**加粗**` 标记渲染为 <strong>。 */
function renderRich(text: string): ReactNode {
const parts = text.split('**');
return parts.map((part, i) => (i % 2 === 1 ? <strong key={i}>{part}</strong> : part));
}
/** 日期展示:zh 用 ISO(2026-08-15),en 用长格式(August 15, 2026)。 */
function formatDate(iso: string, isZh: boolean): string {
if (isZh) return iso;
return new Intl.DateTimeFormat('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric',
}).format(new Date(`${iso}T00:00:00`));
}
/** 单个章节:编号徽标 + 标题 + 正文段落(⚠️ 段落以警示框渲染)。 */
function LegalChapter({ chapter, index }: { chapter: ComplianceChapter; index: number }) {
const { locale } = useT();
const isZh = locale === 'zh-CN';
const title = isZh ? chapter.titleZh : chapter.titleEn;
return (
<section className="legal-chapter">
<h2 className="legal-chapter-title">
<span className="legal-chapter-num" aria-hidden="true">
{index}
</span>
<span>{title}</span>
</h2>
{chapter.body.map((para, i) =>
para.warning ? (
<div key={i} className="legal-warn" role="note">
<span className="legal-warn-mark" aria-hidden="true">
⚠️
</span>
<p className="legal-warn-text">{renderRich(isZh ? para.zh : para.en)}</p>
</div>
) : (
<p key={i} className="legal-para">
{renderRich(isZh ? para.zh : para.en)}
</p>
),
)}
</section>
);
}
/** 页内底部相关页面跳转(当前页不列出)。 */
function LegalRelated({ current, isZh }: { current: string; isZh: boolean }) {
const { t } = useT();
const others = COMPLIANCE_PAGES.filter((page) => page.route !== current);
return (
<nav className="legal-related" aria-label={t('legal.related')}>
<span className="legal-related-label">{t('legal.related')}</span>
{others.map((page) => (
<a key={page.route} className="legal-related-link" href={page.route}>
{isZh ? page.titleZh : page.titleEn}
</a>
))}
</nav>
);
}
export interface LegalPageProps {
/** 要渲染的合规页面数据(来自 src/lib/compliance-data.ts)。 */
page: CompliancePage;
}
/**
* 通用合规内容页外壳:SubNav + 标题区(标题/元描述/更新与生效日期)
* + 章节列表 + 相关页面 + Footer(与 HelpPage 同构的 pl-page 结构)。
*/
export default function LegalPage({ page }: LegalPageProps) {
const { t, locale } = useT();
const isZh = locale === 'zh-CN';
const title = isZh ? page.titleZh : page.titleEn;
useEffect(() => {
document.title = `${title} · PERLER LAB`;
}, [title]);
return (
<div className="pl-page">
<SubNav active="legal" />
<main className="pl-main">
<header className="pl-hero">
<span className="pl-eyebrow">{t('legal.eyebrow')}</span>
<h1 className="pl-h1">{title}</h1>
<p className="pl-sub">{isZh ? page.metaZh : page.metaEn}</p>
<p className="legal-meta">
<span>
{t('legal.updated')}
{isZh ? ':' : ': '}
{formatDate(page.lastUpdated, isZh)}
</span>
<span>
{t('legal.effective')}
{isZh ? ':' : ': '}
{formatDate(page.effectiveDate, isZh)}
</span>
</p>
</header>
<div className="legal-doc">
{page.chapters.map((chapter, index) => (
<LegalChapter key={chapter.id} chapter={chapter} index={index + 1} />
))}
</div>
<LegalRelated current={page.route} isZh={isZh} />
</main>
<footer className="pl-footer">
<div className="pl-footer-inner">
<span className="pl-footer-text">{t('footer.slogan')}</span>
<a className="pl-footer-link" href="/">
{t('legal.back')}
</a>
</div>
</footer>
</div>
);
}
+10 -5
View File
@@ -38,12 +38,17 @@ export default function LibraryPage() {
<div className="lib-list">
{works.map((work) => {
const tags = SHOWCASE_TAGS.filter((tag) => work.tags.includes(tag));
const detailHref = `/work/${work.id}`;
return (
<article key={work.id} className="lib-row">
<img className="lib-thumb" src={work.thumb} alt={work.title} loading="lazy" />
<a className="lib-thumb-link" href={detailHref} aria-label={work.title} tabIndex={-1}>
<img className="lib-thumb" src={work.thumb} alt={work.title} loading="lazy" />
</a>
<div className="lib-info">
<h3 className="lib-title">
{work.title}
<a className="lib-title-link" href={detailHref}>
{work.title}
</a>
{work.source === 'chibi' && (
<span className="lib-badge">{t('showcase.aiBadge')}</span>
)}
@@ -64,9 +69,9 @@ export default function LibraryPage() {
)}
</div>
<div className="lib-actions">
<button type="button" className="lib-btn lib-btn--outline">
{t('library.preview')}
</button>
<a className="lib-btn lib-btn--outline" href={detailHref}>
{t('detail.viewDetail')}
</a>
<button type="button" className="lib-btn lib-btn--primary">
{t('library.download')}
</button>
+584
View File
@@ -0,0 +1,584 @@
/**
* PERLER LAB — 作品详情页 (/work/:id) [T-132 / T-133 / T-135]
*
* 页面结构(对齐竞品 §T-117 详情页):
* 面包屑 → 标题+摘要 → 元信息条(尺寸/用色数/总豆数/色板/作者/时间)
* → 预览区 → 导出区(PDF 占位 + PNG 下载)→ 用料清单(统计卡 + 分档表格)
* → 6 步制作指南 → 常见问题 → 相关作品。
*
* 数据来源(T-131 接口 + 种子数据兜底):
* - id 为数字 → GET /api/showcase/works/:id(spec 规格块优先);
* - id 为种子 id(如 sw_001)或接口 404 → 回退到 SEED_WORKS。
* - 两者均无 → 404 态。
*
* SEO(T-135):作品加载后渲染
* <script type="application/ld+json">(@graph:CreativeWork + BreadcrumbList + FAQPage),
* 并同步 document.title / meta description。
*/
import { useEffect, useMemo, useState } from 'react';
import './pages.css';
import SubNav from '../components/SubNav';
import WorkCard, { SHOWCASE_TAG_KEYS } from '../components/WorkCard';
import { getShowcaseWork, type MaterialLine, type ShowcaseWorkDetail } from '../lib/api';
import { SEED_WORKS, type ShowcaseTag, type ShowcaseWork } from '../lib/showcase';
import { useT, type Locale, type MessageKey, type TFunction } from '../i18n';
/** 详情页统一的展示视图:种子数据(社交字段)与接口 spec(规格字段)合并。 */
interface WorkDetailView {
id: string;
title: string;
image: string;
tags: string[];
source: string;
author: string;
createdAt: string;
likes: number;
views: number;
width: number | null;
height: number | null;
brand: string | null;
materials: MaterialLine[] | null;
}
type DetailState =
| { status: 'loading' }
| { status: 'notFound' }
| { status: 'error' }
| { status: 'ready'; work: WorkDetailView };
/** 制作指南 6 步(竞品 Boards→Materials→Place→Check→Export→Iron)。 */
const GUIDE_KEYS: ReadonlyArray<{ title: MessageKey; desc: MessageKey }> = [
{ title: 'detail.guide.1.title', desc: 'detail.guide.1.desc' },
{ title: 'detail.guide.2.title', desc: 'detail.guide.2.desc' },
{ title: 'detail.guide.3.title', desc: 'detail.guide.3.desc' },
{ title: 'detail.guide.4.title', desc: 'detail.guide.4.desc' },
{ title: 'detail.guide.5.title', desc: 'detail.guide.5.desc' },
{ title: 'detail.guide.6.title', desc: 'detail.guide.6.desc' },
] as const;
/** 详情页 FAQ(同时注入 FAQPage JSON-LD)。 */
const FAQ_KEYS: ReadonlyArray<{ q: MessageKey; a: MessageKey }> = [
{ q: 'detail.faq.1.q', a: 'detail.faq.1.a' },
{ q: 'detail.faq.2.q', a: 'detail.faq.2.a' },
{ q: 'detail.faq.3.q', a: 'detail.faq.3.a' },
{ q: 'detail.faq.4.q', a: 'detail.faq.4.a' },
] as const;
/** 从 pathname 提取 /work/:id 的 id;路径不匹配返回 null。 */
function workIdFromPath(pathname: string): string | null {
const parts = pathname.split('/').filter(Boolean);
if (parts.length < 2 || parts[0] !== 'work') return null;
const id = parts[1];
return id !== undefined && id.length > 0 ? id : null;
}
/** 解析 '64×64' / '64x64' / '64*64' 格式的规格字符串。 */
function parseGridSize(grid: string | undefined): { width: number | null; height: number | null } {
if (grid === undefined || grid === '') return { width: null, height: null };
const m = /^(\d+)\s*[×xX*]\s*(\d+)$/.exec(grid.trim());
if (m === null) return { width: null, height: null };
return { width: Number(m[1]), height: Number(m[2]) };
}
/** 种子作品 → 展示视图(无接口规格字段时兜底)。 */
function fromSeed(seed: ShowcaseWork): WorkDetailView {
const { width, height } = parseGridSize(seed.grid);
return {
id: seed.id,
title: seed.title,
image: seed.thumb,
tags: seed.tags,
source: seed.source,
author: seed.author,
createdAt: '',
likes: seed.likes,
views: seed.views,
width,
height,
brand: null,
materials: null,
};
}
/** 接口详情 → 展示视图(seed 存在时优先保留其社交字段,spec 优先接口)。 */
function mergeSeedAndApi(seed: ShowcaseWork | undefined, api: ShowcaseWorkDetail): WorkDetailView {
const base = seed !== undefined ? fromSeed(seed) : null;
return {
id: base?.id ?? String(api.id),
title: api.title,
image: api.imageUrl,
tags: api.tags,
source: api.source,
author: base?.author ?? '',
createdAt: api.createdAt !== '' ? api.createdAt : (base?.createdAt ?? ''),
likes: base?.likes ?? 0,
views: base?.views ?? 0,
width: api.spec.width ?? base?.width ?? null,
height: api.spec.height ?? base?.height ?? null,
brand: api.spec.brand ?? base?.brand ?? null,
materials: api.spec.materials ?? base?.materials ?? null,
};
}
/** 标签文案:内部 key 走 i18n,未知标签直接展示原文。 */
function tagLabel(key: string, t: TFunction): string {
const labelKey = SHOWCASE_TAG_KEYS[key as ShowcaseTag];
return labelKey !== undefined ? t(labelKey) : key;
}
/** 日期格式化为 locale 短日期;空值/非法返回原文。 */
function formatDate(iso: string, locale: Locale): string {
if (iso === '') return '';
const d = new Date(iso);
if (Number.isNaN(d.getTime())) return iso;
return d.toLocaleDateString(locale === 'zh-CN' ? 'zh-CN' : 'en-US', {
year: 'numeric',
month: 'short',
day: 'numeric',
});
}
/** 构造 @graph 结构化数据(CreativeWork + BreadcrumbList + FAQPage)。 */
function buildWorkJsonLd(work: WorkDetailView, locale: Locale, t: TFunction): Record<string, unknown> {
const origin = window.location.origin;
const url = `${origin}/work/${work.id}`;
const creativeWork: Record<string, unknown> = {
'@type': 'CreativeWork',
name: work.title,
description: t('detail.summary', { title: work.title }),
isAccessibleForFree: true,
image: work.image,
thumbnailUrl: work.image,
keywords: work.tags.join(', '),
url,
inLanguage: locale,
dateCreated: work.createdAt !== '' ? work.createdAt : undefined,
author: work.author !== '' ? { '@type': 'Person', name: work.author } : undefined,
};
if (work.width !== null && work.height !== null) {
creativeWork['width'] = { '@type': 'QuantitativeValue', value: work.width, unitText: 'beads' };
creativeWork['height'] = { '@type': 'QuantitativeValue', value: work.height, unitText: 'beads' };
}
const materials = work.materials;
if (materials !== null && materials.length > 0) {
creativeWork['material'] = materials.map((m) => m.code).join(', ');
}
return {
'@context': 'https://schema.org',
'@graph': [
creativeWork,
{
'@type': 'BreadcrumbList',
itemListElement: [
{ '@type': 'ListItem', position: 1, name: t('detail.breadcrumb.home'), item: `${origin}/` },
{
'@type': 'ListItem',
position: 2,
name: t('detail.breadcrumb.showcase'),
item: `${origin}/showcase`,
},
{ '@type': 'ListItem', position: 3, name: work.title, item: url },
],
},
{
'@type': 'FAQPage',
mainEntity: FAQ_KEYS.map((keys) => ({
'@type': 'Question',
name: t(keys.q),
acceptedAnswer: { '@type': 'Answer', text: t(keys.a) },
})),
},
],
};
}
/** 写入/更新 document head 的 meta 标签。 */
function setHeadMeta(attr: 'name' | 'property', key: string, value: string): void {
let el = document.head.querySelector<HTMLMetaElement>(`meta[${attr}="${key}"]`);
if (el === null) {
el = document.createElement('meta');
el.setAttribute(attr, key);
document.head.appendChild(el);
}
el.setAttribute('content', value);
}
export default function WorkDetailPage() {
const { t, locale } = useT();
const [state, setState] = useState<DetailState>({ status: 'loading' });
const [attempt, setAttempt] = useState(0);
const [showPdfNote, setShowPdfNote] = useState(false);
// 数据加载:数字 id 走 T-131 接口,种子 id / 接口失败回退 SEED_WORKS。
useEffect(() => {
let cancelled = false;
setState({ status: 'loading' });
const id = workIdFromPath(window.location.pathname);
if (id === null) {
setState({ status: 'notFound' });
return;
}
const seed = SEED_WORKS.find((w) => w.id === id);
const apply = (work: WorkDetailView) => {
if (!cancelled) setState({ status: 'ready', work });
};
if (/^[1-9]\d*$/.test(id)) {
getShowcaseWork(id).then(
(api) => apply(mergeSeedAndApi(seed, api)),
(err: unknown) => {
if (cancelled) return;
const message = err instanceof Error ? err.message : '';
if (seed !== undefined) {
apply(fromSeed(seed));
} else if (message.includes('不存在')) {
setState({ status: 'notFound' });
} else {
setState({ status: 'error' });
}
},
);
} else if (seed !== undefined) {
apply(fromSeed(seed));
} else {
setState({ status: 'notFound' });
}
return () => {
cancelled = true;
};
}, [attempt]);
// T-135:作品就绪后同步 head(title/description/og),并随状态重置 PDF 提示。
useEffect(() => {
if (state.status !== 'ready') return;
const work = state.work;
const summary = t('detail.summary', { title: work.title });
// 延后到 I18nProvider 的 title 副作用之后写入,保证详情页标题生效。
const timer = window.setTimeout(() => {
document.title = `${work.title} | ${t('app.title')}`;
}, 0);
setHeadMeta('name', 'description', summary);
setHeadMeta('property', 'og:title', `${work.title} | ${t('app.title')}`);
setHeadMeta('property', 'og:description', summary);
if (work.image.startsWith('http')) {
setHeadMeta('property', 'og:image', work.image);
}
return () => window.clearTimeout(timer);
}, [state, t]);
const work = state.status === 'ready' ? state.work : null;
const relatedWorks = useMemo(
() => (work !== null ? SEED_WORKS.filter((w) => w.id !== work.id).slice(0, 4) : []),
[work],
);
// 统计卡:总豆数(用料清单合计优先,其次宽×高)/ 用色数 / 尺寸。
const stats = useMemo(() => {
if (work === null) return null;
const totalBeads =
work.materials !== null && work.materials.length > 0
? work.materials.reduce((sum, m) => sum + m.count, 0)
: work.width !== null && work.height !== null
? work.width * work.height
: null;
return {
totalBeads,
colorCount: work.materials !== null ? work.materials.length : null,
size: work.width !== null && work.height !== null ? `${work.width} × ${work.height}` : null,
};
}, [work]);
// 用料清单分档:高用量(>10 颗)前置,低用量折叠。
const materialGroups = useMemo(() => {
if (work === null || work.materials === null || work.materials.length === 0) return null;
const sorted = [...work.materials].sort((a, b) => b.count - a.count);
return {
high: sorted.filter((m) => m.count > 10),
low: sorted.filter((m) => m.count <= 10),
};
}, [work]);
const formatCount = (n: number | null): string =>
n !== null ? n.toLocaleString(locale === 'zh-CN' ? 'zh-CN' : 'en-US') : '—';
const jsonLd = useMemo(
() => (work !== null ? buildWorkJsonLd(work, locale, t) : null),
[work, locale, t],
);
return (
<div className="pl-page">
<SubNav active="showcase" />
<main className="pl-main">
{state.status === 'loading' && (
<div className="wd-status" role="status">
<span className="wd-status-spinner" aria-hidden="true" />
{t('detail.loading')}
</div>
)}
{(state.status === 'notFound' || state.status === 'error') && (
<div className="wd-status wd-status--error" role="alert">
<b>{state.status === 'notFound' ? t('detail.notFound.title') : t('detail.error.load')}</b>
<p>{state.status === 'notFound' ? t('detail.notFound.desc') : ''}</p>
{state.status === 'error' && (
<button
type="button"
className="wd-btn wd-btn--primary"
onClick={() => setAttempt((n) => n + 1)}
>
{t('detail.error.retry')}
</button>
)}
<a className="wd-back" href="/showcase">
{t('detail.back.showcase')}
</a>
</div>
)}
{work !== null && (
<>
{/* 面包屑 */}
<nav className="wd-breadcrumb" aria-label="Breadcrumb">
<a href="/">{t('detail.breadcrumb.home')}</a>
<span className="wd-breadcrumb-sep" aria-hidden="true">
/
</span>
<a href="/showcase">{t('detail.breadcrumb.showcase')}</a>
<span className="wd-breadcrumb-sep" aria-hidden="true">
/
</span>
<span className="wd-breadcrumb-current">{work.title}</span>
</nav>
{/* 标题 + 摘要 + 标签 */}
<header className="wd-header">
<h1 className="pl-h1">{work.title}</h1>
<p className="wd-summary">{t('detail.summary', { title: work.title })}</p>
{work.tags.length > 0 && (
<div className="wd-tags">
{work.tags.map((tag) => (
<span key={tag} className="wd-tag">
{tagLabel(tag, t)}
</span>
))}
</div>
)}
</header>
{/* 元信息条 */}
<div className="wd-meta">
<span className="wd-meta-item">
<b>{t('detail.meta.size')}</b>
{stats?.size ?? '—'}
</span>
<span className="wd-meta-item">
<b>{t('detail.meta.colors')}</b>
{stats?.colorCount !== null ? formatCount(stats?.colorCount ?? null) : '—'}
</span>
<span className="wd-meta-item">
<b>{t('detail.meta.beads')}</b>
{stats?.totalBeads !== null ? formatCount(stats?.totalBeads ?? null) : '—'}
</span>
<span className="wd-meta-item">
<b>{t('detail.meta.brand')}</b>
{work.brand ?? '—'}
</span>
<span className="wd-meta-item">
<b>{t('detail.meta.author')}</b>
{work.author !== '' ? `@${work.author}` : '—'}
</span>
<span className="wd-meta-item">
<b>{t('detail.meta.date')}</b>
{work.createdAt !== '' ? formatDate(work.createdAt, locale) : '—'}
</span>
</div>
{/* 预览区 */}
<section className="wd-section" aria-label={t('detail.preview.title')}>
<h2 className="wd-section-title">{t('detail.preview.title')}</h2>
<div className="wd-preview">
<img
className="wd-preview-img"
src={work.image}
alt={t('detail.preview.alt', { title: work.title })}
/>
</div>
</section>
{/* 导出区(T-133:PDF 占位 + PNG 下载入口) */}
<section className="wd-section" aria-label={t('detail.export.title')}>
<h2 className="wd-section-title">{t('detail.export.title')}</h2>
<p className="wd-section-sub">{t('detail.export.sub')}</p>
<div className="wd-export-actions">
<button
type="button"
className="wd-btn wd-btn--primary"
onClick={() => setShowPdfNote(true)}
>
{t('detail.export.pdf')}
</button>
<a className="wd-btn wd-btn--secondary" href={work.image} download={`${work.title}.png`}>
{t('detail.export.png')}
</a>
</div>
{showPdfNote && (
<p className="wd-export-note" role="status">
{t('detail.export.pdfSoon')}
</p>
)}
</section>
{/* 用料清单(T-133:统计卡 + 分档表格 / 空态) */}
<section className="wd-section" aria-label={t('detail.materials.title')}>
<h2 className="wd-section-title">{t('detail.materials.title')}</h2>
<p className="wd-section-sub">{t('detail.materials.sub')}</p>
{stats !== null && (
<div className="wd-stats">
<div className="wd-stat-card">
<span className="wd-stat-value">{formatCount(stats.totalBeads)}</span>
<span className="wd-stat-label">{t('detail.stats.beads')}</span>
</div>
<div className="wd-stat-card">
<span className="wd-stat-value">{formatCount(stats.colorCount)}</span>
<span className="wd-stat-label">{t('detail.stats.colors')}</span>
</div>
<div className="wd-stat-card">
<span className="wd-stat-value">{stats.size ?? '—'}</span>
<span className="wd-stat-label">{t('detail.stats.size')}</span>
</div>
</div>
)}
{materialGroups === null ? (
<div className="wd-empty">
<b>{t('detail.materials.empty')}</b>
<span>{t('detail.materials.empty.desc')}</span>
</div>
) : (
<div className="wd-material">
{materialGroups.high.length > 0 && (
<>
<h3 className="wd-material-group">{t('detail.materials.highUse')}</h3>
<table className="wd-table">
<thead>
<tr>
<th>{t('detail.materials.col.code')}</th>
<th>{t('detail.materials.col.name')}</th>
<th className="wd-table-num">{t('detail.materials.col.count')}</th>
</tr>
</thead>
<tbody>
{materialGroups.high.map((m) => (
<tr key={m.code}>
<td className="wd-table-code">{m.code}</td>
<td>{m.name ?? '—'}</td>
<td className="wd-table-num">{m.count.toLocaleString()}</td>
</tr>
))}
</tbody>
</table>
</>
)}
{materialGroups.low.length > 0 && (
<details className="wd-material-low">
<summary>
{t('detail.materials.lowUse', { count: materialGroups.low.length })}
</summary>
<table className="wd-table">
<thead>
<tr>
<th>{t('detail.materials.col.code')}</th>
<th>{t('detail.materials.col.name')}</th>
<th className="wd-table-num">{t('detail.materials.col.count')}</th>
</tr>
</thead>
<tbody>
{materialGroups.low.map((m) => (
<tr key={m.code}>
<td className="wd-table-code">{m.code}</td>
<td>{m.name ?? '—'}</td>
<td className="wd-table-num">{m.count.toLocaleString()}</td>
</tr>
))}
</tbody>
</table>
</details>
)}
</div>
)}
</section>
{/* 制作指南 6 步 */}
<section className="wd-section" aria-label={t('detail.guide.title')}>
<h2 className="wd-section-title">{t('detail.guide.title')}</h2>
<p className="wd-section-sub">{t('detail.guide.sub')}</p>
<ol className="wd-guide">
{GUIDE_KEYS.map((keys, index) => (
<li key={keys.title} className="wd-guide-step">
<span className="wd-guide-num">{index + 1}</span>
<div>
<h3 className="wd-guide-title">{t(keys.title)}</h3>
<p className="wd-guide-desc">{t(keys.desc)}</p>
</div>
</li>
))}
</ol>
</section>
{/* 常见问题(对应 FAQPage JSON-LD) */}
<section className="wd-section" aria-label={t('detail.faq.title')}>
<h2 className="wd-section-title">{t('detail.faq.title')}</h2>
<div className="wd-faq">
{FAQ_KEYS.map((keys) => (
<details key={keys.q} className="wd-faq-item">
<summary>{t(keys.q)}</summary>
<p className="wd-faq-a">{t(keys.a)}</p>
</details>
))}
</div>
</section>
{/* 相关作品 */}
{relatedWorks.length > 0 && (
<section className="wd-section" aria-label={t('detail.related.title')}>
<h2 className="wd-section-title">{t('detail.related.title')}</h2>
<p className="wd-section-sub">{t('detail.related.sub')}</p>
<div className="sw-grid">
{relatedWorks.map((related) => (
<WorkCard key={related.id} work={related} activeTag={null} />
))}
</div>
</section>
)}
</>
)}
</main>
<footer className="pl-footer">
<div className="pl-footer-inner">
<span className="pl-footer-text">{t('footer.slogan')}</span>
<span className="pl-footer-text">{t('footer.note')}</span>
</div>
</footer>
{/* T-135:CreativeWork + BreadcrumbList + FAQPage 结构化数据 */}
{jsonLd !== null && (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
)}
</div>
);
}
+9
View File
@@ -0,0 +1,9 @@
import LegalPage from '../LegalPage';
import { findCompliancePage } from '../../lib/compliance-data';
const PAGE = findCompliancePage('/about')!;
/** T-128:关于我们 (/about)。文案源 docs/COMPLIANCE-COPIES.md 页面 3/4(6 章)。 */
export default function AboutPage() {
return <LegalPage page={PAGE} />;
}
@@ -0,0 +1,9 @@
import LegalPage from '../LegalPage';
import { findCompliancePage } from '../../lib/compliance-data';
const PAGE = findCompliancePage('/contact')!;
/** T-129:联系我们 (/contact)。文案源 docs/COMPLIANCE-COPIES.md 页面 4/4(6 章)。 */
export default function ContactPage() {
return <LegalPage page={PAGE} />;
}
@@ -0,0 +1,9 @@
import LegalPage from '../LegalPage';
import { findCompliancePage } from '../../lib/compliance-data';
const PAGE = findCompliancePage('/privacy-policy')!;
/** T-126:隐私政策 (/privacy-policy)。文案源 docs/COMPLIANCE-COPIES.md 页面 1/4(12 章)。 */
export default function PrivacyPolicyPage() {
return <LegalPage page={PAGE} />;
}
@@ -0,0 +1,9 @@
import LegalPage from '../LegalPage';
import { findCompliancePage } from '../../lib/compliance-data';
const PAGE = findCompliancePage('/terms-of-service')!;
/** T-127:服务条款 (/terms-of-service)。文案源 docs/COMPLIANCE-COPIES.md 页面 2/4(12 章)。 */
export default function TermsOfServicePage() {
return <LegalPage page={PAGE} />;
}
+684
View File
@@ -735,6 +735,657 @@
line-height: 1.7;
}
/* ═══════════════════════ Legal:合规内容页(T-126~T-129) ═══════════════════════ */
.legal-meta {
display: flex;
flex-wrap: wrap;
gap: var(--space-4);
margin-top: var(--space-3);
font-size: var(--text-sm);
color: var(--text-tertiary);
}
.legal-doc {
display: flex;
flex-direction: column;
gap: var(--space-3);
max-width: 860px;
}
.legal-chapter {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
padding: var(--space-4) var(--space-5);
}
.legal-chapter-title {
display: flex;
align-items: center;
gap: var(--space-3);
margin: 0 0 var(--space-3);
font-size: var(--text-lg);
font-weight: 700;
line-height: 1.4;
}
.legal-chapter-num {
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
min-width: 28px;
height: 28px;
border-radius: var(--radius-sm);
background: var(--accent-soft);
color: var(--accent-hover);
font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
font-size: var(--text-xs);
font-weight: 700;
}
.legal-para {
margin: 0 0 var(--space-3);
color: var(--text-secondary);
font-size: var(--text-md);
line-height: 1.8;
}
.legal-para:last-child {
margin-bottom: 0;
}
.legal-para strong,
.legal-warn-text strong {
color: var(--text-primary);
font-weight: 700;
}
.legal-warn {
display: flex;
align-items: flex-start;
gap: var(--space-3);
margin: 0 0 var(--space-3);
padding: var(--space-3) var(--space-4);
background: var(--accent-soft);
border: 1px solid var(--accent);
border-radius: var(--radius-md);
}
.legal-warn:last-child {
margin-bottom: 0;
}
.legal-warn-mark {
flex-shrink: 0;
font-size: var(--text-lg);
line-height: 1.6;
}
.legal-warn-text {
margin: 0;
color: var(--text-primary);
font-size: var(--text-md);
line-height: 1.8;
}
.legal-related {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-2);
margin-top: var(--space-6);
padding-top: var(--space-4);
border-top: 1px solid var(--border);
}
.legal-related-label {
margin-right: var(--space-2);
font-size: var(--text-xs);
font-weight: 700;
letter-spacing: .12em;
color: var(--text-tertiary);
white-space: nowrap;
}
.legal-related-link {
display: inline-flex;
align-items: center;
min-height: var(--touch-min-sm);
padding: 0 var(--space-4);
border-radius: var(--radius-full);
background: var(--bg-card);
border: 1px solid var(--border-strong);
color: var(--text-secondary);
font-size: var(--text-sm);
font-weight: 500;
transition: border-color .15s ease, color .15s ease;
}
.legal-related-link:hover {
border-color: var(--accent);
color: var(--text-primary);
}
/* ═══════════════════════ WorkCard:详情页链接(T-134) ═══════════════════════ */
.sw-card-media-link,
.sw-card-title-link {
display: block;
}
.sw-card-media-link {
position: absolute;
inset: 0;
}
.sw-card-title-link:hover {
color: var(--accent-hover);
}
.sw-card-detail {
display: inline-flex;
align-items: center;
gap: var(--space-1);
margin-top: var(--space-2);
font-size: var(--text-sm);
font-weight: 600;
color: var(--accent-hover);
transition: color .15s ease;
}
.sw-card-detail:hover {
color: var(--text-primary);
}
.lib-thumb-link {
display: block;
flex-shrink: 0;
border-radius: var(--radius-md);
line-height: 0;
}
.lib-thumb-link:hover .lib-thumb {
border-color: var(--accent);
}
.lib-title-link:hover {
color: var(--accent-hover);
}
/* ═══════════════════════ WorkDetail 作品详情页(T-132~T-135) ═══════════════════════ */
.wd-breadcrumb {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-1);
padding: var(--space-5) 0 var(--space-3);
font-size: var(--text-sm);
color: var(--text-tertiary);
}
.wd-breadcrumb a:hover {
color: var(--accent-hover);
}
.wd-breadcrumb-sep {
color: var(--border-strong);
}
.wd-breadcrumb-current {
color: var(--text-secondary);
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 320px;
}
.wd-header {
padding: 0 0 var(--space-4);
}
.wd-summary {
font-size: 14px;
color: var(--text-secondary);
max-width: 640px;
margin: 0;
}
.wd-tags {
display: flex;
flex-wrap: wrap;
gap: var(--space-1);
margin-top: var(--space-3);
}
.wd-tag {
font-size: var(--text-xs);
color: var(--text-secondary);
background: var(--bg-subtle);
border: 1px solid var(--border);
border-radius: var(--radius-full);
padding: 2px 10px;
}
.wd-meta {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-2) var(--space-4);
padding: var(--space-3) var(--space-4);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
}
.wd-meta-item {
display: inline-flex;
align-items: center;
gap: var(--space-2);
font-size: var(--text-sm);
color: var(--text-secondary);
}
.wd-meta-item b {
font-weight: 500;
color: var(--text-tertiary);
}
.wd-section {
margin-top: var(--space-6);
}
.wd-section-title {
font-size: var(--text-xl);
font-weight: 700;
line-height: 1.3;
margin: 0 0 var(--space-1);
}
.wd-section-sub {
font-size: var(--text-sm);
color: var(--text-secondary);
margin: 0 0 var(--space-3);
}
/* ── 预览区 ── */
.wd-preview {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
padding: var(--space-4);
display: flex;
justify-content: center;
overflow: hidden;
}
.wd-preview-img {
max-width: 100%;
max-height: 560px;
border-radius: var(--radius-md);
display: block;
object-fit: contain;
}
/* ── 导出区 ── */
.wd-export-actions {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-3);
}
.wd-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-2);
min-height: var(--touch-min);
padding: 0 var(--space-5);
border-radius: var(--radius-md);
font-size: var(--text-md);
font-weight: 700;
transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.wd-btn--primary {
background: var(--accent);
color: var(--text-on-dark);
}
.wd-btn--primary:hover {
background: var(--accent-hover);
}
.wd-btn--secondary {
background: var(--bg-card);
border: 1px solid var(--border-strong);
color: var(--text-secondary);
font-weight: 500;
}
.wd-btn--secondary:hover {
border-color: var(--accent);
color: var(--text-primary);
}
.wd-export-note {
margin: var(--space-3) 0 0;
font-size: var(--text-sm);
color: var(--info);
background: var(--accent-soft);
border-radius: var(--radius-sm);
padding: var(--space-2) var(--space-3);
}
/* ── 统计卡 ── */
.wd-stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--space-3);
margin-bottom: var(--space-4);
}
.wd-stat-card {
display: flex;
flex-direction: column;
gap: var(--space-1);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
padding: var(--space-4);
}
.wd-stat-value {
font-size: 24px;
font-weight: 700;
line-height: 1.2;
color: var(--text-primary);
}
.wd-stat-label {
font-size: var(--text-xs);
color: var(--text-tertiary);
letter-spacing: .04em;
}
/* ── 用料清单表格 ── */
.wd-material {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
overflow: hidden;
}
.wd-material-group {
font-size: var(--text-sm);
font-weight: 700;
color: var(--success);
padding: var(--space-3) var(--space-4);
border-bottom: 1px solid var(--border);
background: var(--bg-subtle);
}
.wd-table {
width: 100%;
border-collapse: collapse;
font-size: var(--text-md);
}
.wd-table th {
text-align: left;
font-size: var(--text-xs);
font-weight: 600;
text-transform: uppercase;
letter-spacing: .06em;
color: var(--text-tertiary);
padding: var(--space-2) var(--space-4);
border-bottom: 1px solid var(--border);
background: var(--bg-hover);
}
.wd-table td {
padding: var(--space-2) var(--space-4);
border-bottom: 1px solid var(--border);
color: var(--text-secondary);
}
.wd-table tr:last-child td {
border-bottom: none;
}
.wd-table-code {
font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
font-weight: 600;
color: var(--text-primary);
}
.wd-table-num {
text-align: right;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.wd-material-low {
border-top: 1px solid var(--border);
}
.wd-material-low summary {
display: flex;
align-items: center;
gap: var(--space-2);
min-height: var(--touch-min-sm);
padding: var(--space-3) var(--space-4);
font-size: var(--text-sm);
font-weight: 600;
color: var(--text-secondary);
cursor: pointer;
list-style: none;
transition: background .15s ease, color .15s ease;
}
.wd-material-low summary:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.wd-material-low summary::-webkit-details-marker {
display: none;
}
.wd-material-low summary::before {
content: '▸';
flex-shrink: 0;
color: var(--text-tertiary);
transition: transform .15s ease;
}
.wd-material-low[open] summary::before {
transform: rotate(90deg);
}
.wd-empty {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-1);
text-align: center;
padding: var(--space-6) var(--space-4);
background: var(--bg-card);
border: 1px dashed var(--border-dashed);
border-radius: var(--radius-lg);
color: var(--text-tertiary);
font-size: var(--text-sm);
}
.wd-empty b {
font-size: var(--text-lg);
color: var(--text-primary);
}
/* ── 制作指南 ── */
.wd-guide {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--space-3);
list-style: none;
padding: 0;
}
.wd-guide-step {
display: flex;
gap: var(--space-3);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
padding: var(--space-4);
}
.wd-guide-num {
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: var(--radius-full);
background: var(--accent);
color: var(--text-on-dark);
font-size: var(--text-md);
font-weight: 700;
line-height: 1;
}
.wd-guide-title {
font-size: var(--text-md);
font-weight: 700;
margin: 0 0 var(--space-1);
}
.wd-guide-desc {
font-size: var(--text-sm);
color: var(--text-secondary);
line-height: 1.6;
margin: 0;
}
/* ── 常见问题 ── */
.wd-faq {
display: flex;
flex-direction: column;
gap: var(--space-2);
}
.wd-faq-item {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
overflow: hidden;
}
.wd-faq-item summary {
display: flex;
align-items: baseline;
gap: var(--space-2);
min-height: var(--touch-min-sm);
padding: var(--space-3) var(--space-4);
font-size: var(--text-md);
font-weight: 600;
color: var(--text-primary);
cursor: pointer;
list-style: none;
transition: background .15s ease;
}
.wd-faq-item summary:hover {
background: var(--bg-hover);
}
.wd-faq-item summary::-webkit-details-marker {
display: none;
}
.wd-faq-item summary::before {
content: '▸';
flex-shrink: 0;
color: var(--text-tertiary);
transition: transform .15s ease;
}
.wd-faq-item[open] summary::before {
transform: rotate(90deg);
}
.wd-faq-a {
padding: 0 var(--space-4) var(--space-3) calc(var(--space-4) + 24px);
color: var(--text-secondary);
font-size: var(--text-sm);
line-height: 1.7;
margin: 0;
}
/* ── 加载 / 错误 / 404 状态 ── */
.wd-status {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-3);
text-align: center;
padding: var(--space-6) var(--space-4);
color: var(--text-tertiary);
font-size: var(--text-sm);
}
.wd-status b {
font-size: var(--text-lg);
color: var(--text-primary);
}
.wd-status p {
margin: 0;
}
.wd-status-spinner {
width: 28px;
height: 28px;
border-radius: 50%;
border: 3px solid var(--border);
border-top-color: var(--accent);
animation: wd-spin .8s linear infinite;
}
@keyframes wd-spin {
to {
transform: rotate(360deg);
}
}
.wd-back {
font-size: var(--text-sm);
color: var(--text-secondary);
}
.wd-back:hover {
color: var(--accent-hover);
}
/* ═══════════════════════ Footer ═══════════════════════ */
.pl-footer {
@@ -773,6 +1424,10 @@
.sw-grid {
grid-template-columns: repeat(3, 1fr);
}
.wd-guide {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 767px) {
@@ -822,6 +1477,35 @@
justify-content: flex-end;
}
.wd-breadcrumb {
padding-top: var(--space-4);
}
.wd-meta {
gap: var(--space-2) var(--space-3);
padding: var(--space-3);
}
.wd-stats {
grid-template-columns: 1fr;
gap: var(--space-2);
}
.wd-stat-card {
flex-direction: row;
align-items: baseline;
justify-content: space-between;
padding: var(--space-3);
}
.wd-guide {
grid-template-columns: 1fr;
}
.wd-preview {
padding: var(--space-2);
}
.pl-footer-inner {
padding: var(--space-4) 16px;
flex-direction: column;
+139 -127
View File
@@ -26,140 +26,20 @@ h1{font-size:20px;margin:0 0 4px}h2{font-size:13px;font-weight:400;color:#66645d
</style></head><body>
<span class="live"><i></i>每 5 秒自动刷新</span>
<h1>PERLER LAB 任务看板</h1>
<h2>生成时间 2026-08-15T06:39:39.013Z · 任务总数 <b>136</b> · 未关闭 Bug <b>0</b></h2>
<div class="board"><div class="col"><h3>待处理 <span class="cnt">0</span></h3></div><div class="col"><h3>开发中 <span class="cnt">11</span></h3><div class="card in_progress">
<div class="card-head"><b>T-126</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:隐私政策页面组件与路由</div>
<div class="card-meta">👤 Frontend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:08</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-127</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:服务条款页面组件与路由</div>
<div class="card-meta">👤 Frontend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-128</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:关于我们页面组件与路由</div>
<div class="card-meta">👤 Frontend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-129</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:联系我们页面组件与路由</div>
<div class="card-meta">👤 Frontend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-130</b><span class="tag prio-medium">中</span></div>
<div class="card-title">产品:四页合规文案内容编写</div>
<div class="card-meta">👤 PM-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-131</b><span class="tag prio-medium">中</span></div>
<div class="card-title">后端:作品详情查询接口</div>
<div class="card-meta">👤 Backend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:27</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-132</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:作品详情页组件与路由</div>
<div class="card-meta">👤 UI-Designer-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:49</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-133</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:详情页导出与用料清单区</div>
<div class="card-meta">👤 UI-Designer-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:49</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-134</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:Showcase与图纸库到详情页链接</div>
<div class="card-meta">👤 UI-Designer-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:49</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-135</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:详情页 CreativeWork JSON-LD 注入</div>
<div class="card-meta">👤 UI-Designer-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:49</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
</div><div class="card in_progress">
<div class="card-head"><b>T-136</b><span class="tag prio-medium">中</span></div>
<div class="card-title">工程化:V1.1 验收成果批量入库推送</div>
<h2>生成时间 2026-08-15T07:12:46.986Z · 任务总数 <b>137</b> · 未关闭 Bug <b>0</b></h2>
<div class="board"><div class="col"><h3>待处理 <span class="cnt">0</span></h3></div><div class="col"><h3>开发中 <span class="cnt">1</span></h3><div class="card in_progress">
<div class="card-head"><b>T-137</b><span class="tag prio-medium">中</span></div>
<div class="card-title">工程化:V1.2 P0 批次成果入库推送</div>
<div class="card-meta">👤 GitOps-Engineer</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:50</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
<div class="card-meta">🕐 创建 2026-08-15 15:12:46</div>
<div class="card-meta">✋ 认领 2026-08-15 15:12:46</div>
</div></div><div class="col"><h3>待验收 <span class="cnt">0</span></h3></div><div class="col"><h3>验收通过 <span class="cnt">106</span></h3><div class="card approved">
</div></div><div class="col"><h3>待验收 <span class="cnt">0</span></h3></div><div class="col"><h3>验收通过 <span class="cnt">117</span></h3><div class="card approved">
<div class="card-head"><b>T-001</b><span class="tag prio-high">高</span></div>
<div class="card-title">P1 架构设计:技术栈选型 + API 契约 + 数据模型</div>
<div class="card-desc">确定前后端技术栈,设计 5 个 API 契约(redeem/orders/consume/chibi-generate),兑换码/订单/权益数据模型</div>
@@ -1383,6 +1263,138 @@ h1{font-size:20px;margin:0 0 4px}h2{font-size:13px;font-weight:400;color:#66645d
<div class="card-note approved">通过:MOBILE-ECOSYSTEM.md 20.5KB 竞品生态分析+我方方案(零新路由)+交互规范+优先级P0/P1</div>
</div><div class="card approved">
<div class="card-head"><b>T-126</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:隐私政策页面组件与路由</div>
<div class="card-meta">👤 Frontend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:08</div>
<div class="card-meta">📤 提交 2026-08-15 15:00:19</div>
<div class="card-meta">🧪 测试 2026-08-15 15:06:18</div>
<div class="card-note approved">QA验收: compliance-data.ts(47KB四页双语)+LegalPage.tsx共享组件+PrivacyPolicyPage.tsx, /privacy-policy路由已注册, 12章含localStorage/设备绑定警示/AI上传章节, zh+en双语, legal.* i18n键双侧一致, typecheck 0错误+test 195全绿</div>
</div><div class="card approved">
<div class="card-head"><b>T-127</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:服务条款页面组件与路由</div>
<div class="card-meta">👤 Frontend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
<div class="card-meta">📤 提交 2026-08-15 15:00:28</div>
<div class="card-meta">🧪 测试 2026-08-15 15:06:27</div>
<div class="card-note approved">QA验收: TermsOfServicePage.tsx复用LegalPage, /terms-of-service路由已注册, 12章含兑换码规则(F-01~12/P-01~09边界)/版权terms-ip/免责terms-disclaimer章节, 退款规则+设备绑定警示框, zh+en双语, typecheck 0错误+test 195全绿</div>
</div><div class="card approved">
<div class="card-head"><b>T-128</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:关于我们页面组件与路由</div>
<div class="card-meta">👤 Frontend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
<div class="card-meta">📤 提交 2026-08-15 15:00:43</div>
<div class="card-meta">🧪 测试 2026-08-15 15:06:39</div>
<div class="card-note approved">QA验收: AboutPage.tsx复用LegalPage, /about路由已注册, 6章含产品定位about-what-we-build/核心特性/团队about-team/愿景about-vision/差异/联系, meta描述作副标题, zh+en双语, typecheck 0错误+test 195全绿</div>
</div><div class="card approved">
<div class="card-head"><b>T-129</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:联系我们页面组件与路由</div>
<div class="card-meta">👤 Frontend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
<div class="card-meta">📤 提交 2026-08-15 15:01:01</div>
<div class="card-meta">🧪 测试 2026-08-15 15:06:47</div>
<div class="card-note approved">QA验收: ContactPage.tsx复用LegalPage, /contact路由已注册, 6章含客服邮箱contact-email/响应时效contact-response-time/问题分类/代理合作contact-agency/反馈/帮助中心跳转, 四页页内交叉互链, zh+en双语, typecheck 0错误+test 195全绿</div>
</div><div class="card approved">
<div class="card-head"><b>T-130</b><span class="tag prio-medium">中</span></div>
<div class="card-title">产品:四页合规文案内容编写</div>
<div class="card-meta">👤 PM-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:26</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
<div class="card-meta">📤 提交 2026-08-15 14:44:19</div>
<div class="card-meta">🧪 测试 2026-08-15 15:09:51</div>
<div class="card-note approved">QA验证通过:COMPLIANCE-COPIES.md 39356B&gt;15KB;四页双语(zh+en)齐全;章节结构12/12/6/6(隐私政策12/服务条款12/关于我们6/联系我们6);前端 compliance-data.ts 四页章节 id/titleZh 与文档一致(抽查隐私政策章节/关于我们'产品定位'/联系我们'客服邮箱'等关键标题)。</div>
</div><div class="card approved">
<div class="card-head"><b>T-131</b><span class="tag prio-medium">中</span></div>
<div class="card-title">后端:作品详情查询接口</div>
<div class="card-meta">👤 Backend-Dev-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:27</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:09</div>
<div class="card-meta">📤 提交 2026-08-15 14:46:38</div>
<div class="card-meta">🧪 测试 2026-08-15 15:09:59</div>
<div class="card-note approved">QA验证通过:npm test 165/165全绿;npx tsc --noEmit 0错误;routes.ts 含 GET /api/showcase/works/:id(400作品ID无效/404作品不存在+showcase.test.ts 38用例含详情404断言);schema.ts showcase_works 含 width/height/brand/materials 四列(可空)。</div>
</div><div class="card approved">
<div class="card-head"><b>T-132</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:作品详情页组件与路由</div>
<div class="card-meta">👤 UI-Designer-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:49</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
<div class="card-meta">📤 提交 2026-08-15 15:01:37</div>
<div class="card-meta">🧪 测试 2026-08-15 15:06:59</div>
<div class="card-note approved">QA验收: WorkDetailPage.tsx(22KB), App.tsx注册/work/:id, 数据获取getShowcaseWork(数字id走T-131接口,种子/404回退SEED_WORKS), loading/404/error重试态齐全, 面包屑+标题+摘要+元信息(尺寸/用色数/总豆数/色板/作者/时间)+预览区, i18n detail.* zh/en各74键, typecheck 0错误+vite build通过</div>
</div><div class="card approved">
<div class="card-head"><b>T-133</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:详情页导出与用料清单区</div>
<div class="card-meta">👤 UI-Designer-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:49</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
<div class="card-meta">📤 提交 2026-08-15 15:01:52</div>
<div class="card-meta">🧪 测试 2026-08-15 15:07:08</div>
<div class="card-note approved">QA验收: 导出区PDF占位(即将上线提示)+PNG anchor下载, 用料清单3统计卡(总豆数=材料合计/无材料回退宽x高, 用色数=材料行数, 尺寸=widthxheight), 分档表格(高用量&gt;10前置/低用量details折叠), materials空态卡片, 样式复用pages.css令牌, typecheck 0错误</div>
</div><div class="card approved">
<div class="card-head"><b>T-134</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:Showcase与图纸库到详情页链接</div>
<div class="card-meta">👤 UI-Designer-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:49</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
<div class="card-meta">📤 提交 2026-08-15 15:02:07</div>
<div class="card-meta">🧪 测试 2026-08-15 15:07:17</div>
<div class="card-note approved">QA验收: WorkCard.tsx缩略图/标题/底部查看详情均链接/work/:id(3处href), onTagClick改可选静态span无死按钮, LibraryPage缩略图+标题链接+操作区查看详情outline按钮, ShowcasePage复用WorkCard零改动, typecheck 0错误</div>
</div><div class="card approved">
<div class="card-head"><b>T-135</b><span class="tag prio-medium">中</span></div>
<div class="card-title">前端:详情页 CreativeWork JSON-LD 注入</div>
<div class="card-meta">👤 UI-Designer-Agent</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:49</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
<div class="card-meta">📤 提交 2026-08-15 15:02:21</div>
<div class="card-meta">🧪 测试 2026-08-15 15:07:26</div>
<div class="card-note approved">QA验收: script type=application/ld+json @graph三件套-CreativeWork(name/description/image/thumbnailUrl/dateCreated/material色号列表/width+height QuantitativeValue unitText=beads)+BreadcrumbList(3 position)+FAQPage(mainEntity 4问), 同步document.title/meta description/og三件套(setTimeout规避I18n副作用), SPA组件渲染无新依赖, typecheck 0错误</div>
</div><div class="card approved">
<div class="card-head"><b>T-136</b><span class="tag prio-medium">中</span></div>
<div class="card-title">工程化:V1.1 验收成果批量入库推送</div>
<div class="card-meta">👤 GitOps-Engineer</div>
<div class="card-meta">🕐 创建 2026-08-15 14:38:50</div>
<div class="card-meta">✋ 认领 2026-08-15 14:39:38</div>
<div class="card-meta">📤 提交 2026-08-15 14:41:23</div>
<div class="card-meta">🧪 测试 2026-08-15 15:10:09</div>
<div class="card-note approved">QA验证通过:git log -1=f53f0a2;ls-remote origin master=f53f0a2b2546d==HEAD一致;status --short 无敏感文件(.omo/、taskboard/tasks.json、*.db、*.log、*.pem、credentials.md 均被 .gitignore 覆盖,未提交项均为T-126~135合法工作产物)。</div>
</div><div class="card approved">
<div class="card-head"><b>T-016</b><span class="tag prio-low">低</span></div>
<div class="card-title">P13 爬虫监控:竞品版本变更检测脚本</div>
+17 -16
View File
@@ -1,13 +1,13 @@
# PERLER LAB 任务看板
> 生成时间: 2026-08-15T06:39:39.011Z · 任务总数: **136** · 未关闭 Bug: **0**
> 生成时间: 2026-08-15T07:12:46.985Z · 任务总数: **137** · 未关闭 Bug: **0**
| 状态 | 数量 |
|---|---|
| 待处理 | 0 |
| 开发中 | 11 |
| 开发中 | 1 |
| 待验收 | 0 |
| 验收通过 | 106 |
| 验收通过 | 117 |
| 不合格 | 0 |
| 已关闭 | 19 |
@@ -17,27 +17,17 @@
_空_
## 📋 开发中 (11)
## 📋 开发中 (1)
| ID | 优先级 | 标题 | 实施 | 创建时间 | 认领/提交/测试 | 备注 |
|---|---|---|---|---|---|---|
| **T-126** | 中 | 前端:隐私政策页面组件与路由 | Frontend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-127** | 中 | 前端:服务条款页面组件与路由 | Frontend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-128** | 中 | 前端:关于我们页面组件与路由 | Frontend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-129** | 中 | 前端:联系我们页面组件与路由 | Frontend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-130** | 中 | 产品:四页合规文案内容编写 | PM-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-131** | 中 | 后端:作品详情查询接口 | Backend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-132** | 中 | 前端:作品详情页组件与路由 | UI-Designer-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-133** | 中 | 前端:详情页导出与用料清单区 | UI-Designer-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-134** | 中 | 前端:Showcase与图纸库到详情页链接 | UI-Designer-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-135** | 中 | 前端:详情页 CreativeWork JSON-LD 注入 | UI-Designer-Agent | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-136** | 中 | 工程化:V1.1 验收成果批量入库推送 | GitOps-Engineer | 08-15T14:38 | 认领 08-15T14:39 | |
| **T-137** | 中 | 工程化:V1.2 P0 批次成果入库推送 | GitOps-Engineer | 08-15T15:12 | 认领 08-15T15:12 | |
## 📋 待验收 (0)
_空_
## 📋 验收通过 (106)
## 📋 验收通过 (117)
| ID | 优先级 | 标题 | 实施 | 创建时间 | 认领/提交/测试 | 备注 |
|---|---|---|---|---|---|---|
@@ -143,6 +133,17 @@ _空_
| **T-123** | 中 | 产品:合规页面清单文档 | PM-Agent | 08-14T12:08 | 认领 08-14T12:09<br>提交 08-14T12:14<br>测试 08-14T12:25 | 通过:COMPLIANCE-PAGES.md 12.7KB CP-01~05清单(URL/优先级/法律风险)+竞品4路由 |
| **T-124** | 中 | 架构:缺口落地优先级评估文档 | Oracle-Architect-Agent | 08-14T12:08 | 认领 08-14T12:09<br>提交 08-14T12:14<br>测试 08-14T12:25 | 通过:GAP-PRIORITY.md 16.3KB 12缺口逐项评估+P0x2/P1x4/P2x1+落地依赖+12/12 |
| **T-125** | 中 | UI:移动端生态入口设计参考 | UI-Designer-Agent | 08-14T12:08 | 认领 08-14T12:09<br>提交 08-14T12:12<br>测试 08-14T12:25 | 通过:MOBILE-ECOSYSTEM.md 20.5KB 竞品生态分析+我方方案(零新路由)+交互规范+优先级P0/P |
| **T-126** | 中 | 前端:隐私政策页面组件与路由 | Frontend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T15:00<br>测试 08-15T15:06 | QA验收: compliance-data.ts(47KB四页双语)+LegalPage.tsx共享组件+Privacy |
| **T-127** | 中 | 前端:服务条款页面组件与路由 | Frontend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T15:00<br>测试 08-15T15:06 | QA验收: TermsOfServicePage.tsx复用LegalPage, /terms-of-service路由 |
| **T-128** | 中 | 前端:关于我们页面组件与路由 | Frontend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T15:00<br>测试 08-15T15:06 | QA验收: AboutPage.tsx复用LegalPage, /about路由已注册, 6章含产品定位about-wh |
| **T-129** | 中 | 前端:联系我们页面组件与路由 | Frontend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T15:01<br>测试 08-15T15:06 | QA验收: ContactPage.tsx复用LegalPage, /contact路由已注册, 6章含客服邮箱cont |
| **T-130** | 中 | 产品:四页合规文案内容编写 | PM-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T14:44<br>测试 08-15T15:09 | QA验证通过:COMPLIANCE-COPIES.md 39356B>15KB;四页双语(zh+en)齐全;章节结构12 |
| **T-131** | 中 | 后端:作品详情查询接口 | Backend-Dev-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T14:46<br>测试 08-15T15:09 | QA验证通过:npm test 165/165全绿;npx tsc --noEmit 0错误;routes.ts 含 G |
| **T-132** | 中 | 前端:作品详情页组件与路由 | UI-Designer-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T15:01<br>测试 08-15T15:06 | QA验收: WorkDetailPage.tsx(22KB), App.tsx注册/work/:id, 数据获取getS |
| **T-133** | 中 | 前端:详情页导出与用料清单区 | UI-Designer-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T15:01<br>测试 08-15T15:07 | QA验收: 导出区PDF占位(即将上线提示)+PNG anchor下载, 用料清单3统计卡(总豆数=材料合计/无材料回退 |
| **T-134** | 中 | 前端:Showcase与图纸库到详情页链接 | UI-Designer-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T15:02<br>测试 08-15T15:07 | QA验收: WorkCard.tsx缩略图/标题/底部查看详情均链接/work/:id(3处href), onTagCl |
| **T-135** | 中 | 前端:详情页 CreativeWork JSON-LD 注入 | UI-Designer-Agent | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T15:02<br>测试 08-15T15:07 | QA验收: script type=application/ld+json @graph三件套-CreativeWork |
| **T-136** | 中 | 工程化:V1.1 验收成果批量入库推送 | GitOps-Engineer | 08-15T14:38 | 认领 08-15T14:39<br>提交 08-15T14:41<br>测试 08-15T15:10 | QA验证通过:git log -1=f53f0a2;ls-remote origin master=f53f0a2b25 |
| **T-016** | 低 | P13 爬虫监控:竞品版本变更检测脚本 | Spider-Agent | 08-13T17:38 | 认领 08-13T17:39<br>提交 08-13T17:54<br>测试 08-13T18:59 | QA实测:指纹记录+无变更+零依赖,PASS | 监控脚本验收通过 |
| **T-017** | 低 | P14 素材库:示例图/演示图案资源整理 | Spider-Agent | 08-13T17:38 | 认领 08-13T17:39<br>提交 08-13T17:54<br>测试 08-13T18:59 | QA实测:demo-cat gridSize=32/palette=8/grid=1024,10张对比图齐全,PASS |
| **T-033** | 低 | 运营:代理合作话术与流程 | PM-Agent | 08-13T18:05 | 认领 08-13T19:34<br>提交 08-13T21:04<br>测试 08-13T21:18 | QA实测:AGENT.md话术/流程/FAQ10条/价目表确认 |