From 573095325f2562f24577f33f0272ee7fc639c905 Mon Sep 17 00:00:00 2001 From: jackyu66git Date: Mon, 13 Jul 2026 12:59:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=84=88=E5=BF=83?= =?UTF-8?q?=E8=A7=A3=E7=A0=81=E6=95=B4=E5=90=88=E9=A1=B5=E9=9D=A2=20+=20?= =?UTF-8?q?=E5=85=AC=E5=85=B1=E4=BB=A3=E7=A0=81=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 common.js: 从 shuzi.html/yangsheng.html 提取共享引擎(数字三角计算、八字五行、体质判别等纯函数+数据字典) - 新增 jiema.html: 愈心解码统一入口,整合数字性格+五行体质+今日锦囊,含付费墙(模拟支付)、分享卡片、契合度测算 - shuzi.html: 引用 common.js,删重复代码,新增返回链接+URL参数预填 - yangsheng.html: 引用 common.js,删重复代码,新增返回链接+URL参数预填 - yuxingu.html: Hero下方新增愈心解码入口卡片(含生日输入+生成按钮) - index.html: 新增愈心解码导航卡片 - CLAUDE.md: 补充项目文档和架构说明 Co-Authored-By: Claude --- CLAUDE.md | 37 ++++-- common.js | 323 +++++++++++++++++++++++++++++++++++++++++++++++ index.html | 5 + jiema.html | 336 +++++++++++++++++++++++++++++++++++++++++++++++++ shuzi.html | 90 +++---------- yangsheng.html | 230 +++------------------------------ yuxingu.html | 32 +++++ 7 files changed, 758 insertions(+), 295 deletions(-) create mode 100644 common.js create mode 100644 jiema.html diff --git a/CLAUDE.md b/CLAUDE.md index 868428a..516cfaa 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project overview -愈心谷 (YuXinGu) — a digital mental health platform. The codebase is a collection of standalone, mobile-first HTML pages with no build step, no framework, and no JavaScript dependencies. +愈心谷 (YuXinGu) — a digital mental health platform. The codebase is a collection of standalone, mobile-first HTML pages with no build step, no framework, no package.json, and no JavaScript dependencies. + +The product vision is detailed in `立项文档.md` (Chinese): combine digital psychology (numerology-based personality analysis) with TCM constitution theory (中医体质) to create a "test → report → subscribe → consult" funnel. Target audience is Chinese-speaking; all UI text is Chinese (zh-CN). ## Running the app @@ -12,11 +14,13 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co python3 server.py [port] # default port 8001 ``` -The server serves all static files from the project root and exposes two JSON API endpoints: +The server serves static files from the project root and exposes two JSON API endpoints: - `GET /load` — returns mindmap data from `mindmap_data.json` - `POST /save` — persists mindmap data to `mindmap_data.json` (validates JSON before writing) +There are no tests, no linters, and no build pipeline. To verify changes, run the server and open the relevant HTML file in a browser. + ## File map | File | Purpose | @@ -27,8 +31,16 @@ The server serves all static files from the project root and exposes two JSON AP | `mindmap.html` | Canvas-based mind-map editor with multi-map management | | `yangsheng.html` | AI Eastern wellness — bazi/wuxing constitution analysis, weekly/daily reports | | `manual.html` | Static "life manual" poster with pyramid triangle charts rendered via inline SVG | -| `yuxingu_v1.html` | Earlier iteration of the main page | +| `yuxingu_v1.html` | Earlier iteration of the main page (kept for reference, not linked from index) | | `server.py` | Minimal HTTP server (Python stdlib, no dependencies) | +| `立项文档.md` | Product requirements doc — market analysis, business model, pricing, MVP scope | + +### Unrelated files + +These files are not part of the 愈心谷 app — they belong to a separate crypto trading visualization project that happens to share the repo: + +- `link_regime_chart.html` — LINK token HMM regime K-line chart +- `l2_LINK_*.json` (3 files) — market data and signals for the above ## Architecture notes @@ -36,8 +48,17 @@ The server serves all static files from the project root and exposes two JSON AP - **Mobile-first design** with `max-width: 430px–500px` containers, `user-scalable=no`, and `env(safe-area-inset-bottom)` for notched phones. - **CSS custom properties** define the brand palette: `--pri: #E54D42` (primary red), with per-page accent colors (gold, blue, green, orange). - **Emoji are deliberately avoided** in the main UI — icons use CSS shapes, Unicode text symbols (△, ☯, ◈), or inline SVG. -- **`mindmap.html`** uses a `` for rendering with hand-rolled hit-testing, drag-to-pan, and inline text editing. It persists maps to both `localStorage` (client-side key `yuxingu_maps`) and the server via `/save` / `/load`. -- **`shuzi.html`** contains a full numerology engine in embedded JS — digit reduction, triangle calculation, joint codes, missing-number detection — plus tabbed panels for 梅花易数, 小六壬, 大六壬, 奇门遁甲, 星座, and 五行八卦 (content rendered dynamically). -- **`yangsheng.html`** computes bazi (八字), five elements (五行), organ-meridian mapping, and wuyun-liuqi (五运六气) from a birth date. The weekly/daily panels use the current date to generate time-appropriate health advice. -- The server is a thin wrapper around `http.server.SimpleHTTPRequestHandler`. It disables caching for HTML/JSON responses and adds the `/save` + `/load` routes. No database, no auth. -- Target audience is Chinese-speaking; all UI text is Chinese (zh-CN). +- **Google Analytics** (`G-LVVXH3TL04`) is embedded in every HTML page via a ` + + + diff --git a/shuzi.html b/shuzi.html index 187d3ba..7c702fa 100644 --- a/shuzi.html +++ b/shuzi.html @@ -85,6 +85,9 @@ +
+ ← 返回愈心解码 +

愈心谷数字解构

@@ -156,39 +159,8 @@
+ diff --git a/yangsheng.html b/yangsheng.html index 325b0a5..5f26d9e 100644 --- a/yangsheng.html +++ b/yangsheng.html @@ -141,6 +141,9 @@ body{ +
+ ← 返回愈心解码 +
@@ -187,220 +190,8 @@ body{
+ diff --git a/yuxingu.html b/yuxingu.html index c319b71..a817e47 100644 --- a/yuxingu.html +++ b/yuxingu.html @@ -161,6 +161,38 @@ body{
+ +
+
+
🔮 愈心解码
+
输入生日,解锁你的身心密码
+
+ + + + + + + +
+
+
+ + +