# 用户使用流程图 — 圈子与联系人 > **端口说明**: 📱 小程序 | 🖥 管理后台 | 📋 规划师端 | ⚙️ 系统自动 ```mermaid flowchart TD %% ============ 颜色定义 ============ classDef actor fill:#e1f5fe,stroke:#0288d1,stroke-width:2px classDef action fill:#fff3e0,stroke:#f57c00,stroke-width:1px classDef system fill:#e8f5e9,stroke:#388e3c,stroke-width:1px classDef decision fill:#fce4ec,stroke:#d32f2f,stroke-width:1px classDef role fill:#f3e5f5,stroke:#7b1fa2,stroke-width:1px classDef endpoint fill:#f5f5f5,stroke:#616161,stroke-width:1px classDef portMiniApp fill:#e3f2fd,stroke:#1565c0,stroke-width:1px,stroke-dasharray:3 2 classDef portAdmin fill:#fce4ec,stroke:#c62828,stroke-width:1px,stroke-dasharray:3 2 classDef portGuide fill:#fff8e1,stroke:#f57f17,stroke-width:1px,stroke-dasharray:3 2 classDef portSystem fill:#f3e5f5,stroke:#6a1b9a,stroke-width:1px,stroke-dasharray:3 2 subgraph 圈子管理 A1(("👤 用户")):::portMiniApp --> A2[📱 获取我的圈子 /my-circles]:::portMiniApp A2 --> A3[📱 发现圈子 /discover]:::portMiniApp A3 --> A4[📱 加入圈子 /join]:::portMiniApp A4 --> A5[📱 退出圈子 /leave]:::portMiniApp A5 --> A6[📱 创建圈子 /create]:::portMiniApp end subgraph 健康圈子 A6 --> B1[📱 获取健康圈子列表 /health/circle/list]:::portMiniApp B1 --> B2[📱 创建健康圈子 /health/circle/create]:::portMiniApp B2 --> B3[📱 加入 /health/circle/join]:::portMiniApp B3 --> B4[📱 退出 /health/circle/leave]:::portMiniApp B4 --> B5[📱 排行榜 /health/circle/ranking]:::portMiniApp end subgraph 圈子挑战 B5 --> C1[📱 挑战列表 /health/circle/challenge/list]:::portMiniApp C1 --> C2[📱 挑战历史 /health/circle/challenge/history]:::portMiniApp end subgraph 家庭挑战 C2 --> D1[📱 家庭挑战列表 /health/challenge/list]:::portMiniApp D1 --> D2[📱 挑战历史 /health/challenge/history]:::portMiniApp D2 --> D3[📱 挑战进度 /health/challenge/progress]:::portMiniApp end subgraph 联系人 A1 --> E1[📱 获取联系人列表 /contact/list]:::portMiniApp E1 --> E2[📱 创建联系人 /contact/create]:::portMiniApp E2 --> E3[📱 更新联系人 /contact/update]:::portMiniApp E3 --> E4[📱 删除联系人 /contact/delete]:::portMiniApp E4 --> E5[📱 获取详情 /contact/detail]:::portMiniApp E5 --> E6[📱 导入手机联系人 /contact/import-phone]:::portMiniApp E6 --> E7[📱 记录互动 /contact/interaction]:::portMiniApp E7 --> E8[📱 邀请到家庭 /contact/invite-to-family]:::portMiniApp end subgraph 联系人匹配 E8 --> F1[📱 发送匹配请求 /contact/match/send]:::portMiniApp F1 --> F2[📱 接受匹配 /contact/match/accept]:::portMiniApp F2 --> F3[📱 拒绝匹配 /contact/match/reject]:::portMiniApp F3 --> F4[📱 收到的请求 /contact/match/received]:::portMiniApp F4 --> F5[📱 发出的请求 /contact/match/sent]:::portMiniApp F5 --> F6[📱 已匹配 /contact/match/matched]:::portMiniApp end R1(("👤 用户")):::actor R2(("🤝 社交系统")):::system A1 -.- R1 E1 -.- R2 ``` ## 端点明细 | 端点 | 说明 | 端口 | |------|------|------| | `/api/circle/my-circles` | 我的圈子 | 📱小程序 | | `/api/circle/discover` | 发现圈子 | 📱小程序 | | `/api/circle/join` | 加入圈子 | 📱小程序 | | `/api/circle/leave` | 退出圈子 | 📱小程序 | | `/api/circle/create` | 创建圈子 | 📱小程序 | | `/api/health/circle/list` | 健康圈子列表 | 📱小程序 | | `/api/health/circle/create` | 创建健康圈子 | 📱小程序 | | `/api/health/circle/join` | 加入健康圈子 | 📱小程序 | | `/api/health/circle/leave` | 退出健康圈子 | 📱小程序 | | `/api/health/circle/ranking` | 健康圈子排行 | 📱小程序 | | `/api/health/circle/challenge/list` | 挑战列表 | 📱小程序 | | `/api/health/circle/challenge/history` | 挑战历史 | 📱小程序 | | `/api/health/challenge/list` | 家庭挑战列表 | 📱小程序 | | `/api/health/challenge/history` | 家庭挑战历史 | 📱小程序 | | `/api/health/challenge/progress` | 挑战进度 | 📱小程序 | | `/api/health/family/ranking` | 家庭健康排行 | 📱小程序 | | `/api/contact/list` | 联系人列表 | 📱小程序 | | `/api/contact/create` | 创建联系人 | 📱小程序 | | `/api/contact/update` | 更新联系人 | 📱小程序 | | `/api/contact/delete` | 删除联系人 | 📱小程序 | | `/api/contact/detail` | 联系人详情 | 📱小程序 | | `/api/contact/import-phone` | 导入手机联系人 | 📱小程序 | | `/api/contact/interaction` | 记录互动 | 📱小程序 | | `/api/contact/invite-to-family` | 邀请到家庭 | 📱小程序 | | `/api/contact/match/send` | 发送匹配 | 📱小程序 | | `/api/contact/match/accept` | 接受匹配 | 📱小程序 | | `/api/contact/match/reject` | 拒绝匹配 | 📱小程序 | | `/api/contact/match/matched` | 已匹配 | 📱小程序 |