|
|
@@ -18,8 +18,9 @@ cfc/
|
|
|
│ ├── config/ # JWT / 多数据源 / DatabaseInitializer
|
|
|
│ └── common/ # Result<T>, JwtUtil
|
|
|
├── cfc-frontend/ # uni-app 微信小程序 (Vue 2, Options API)
|
|
|
-│ ├── pages/ # 页面 (index/, body/, mind/, action/, profile/, teacher/, games/, assessment/, shop/, ...)
|
|
|
-│ ├── pages.json # TabBar (首页/身体/心智/行动/我的) + 分包注册
|
|
|
+│ ├── pages/ # 页面 (index/, family/, body/, mind/, action/, profile/, teacher/, games/, assessment/, shop/, ...)
|
|
|
+│ ├── components/ # 可复用组件 (RelationshipPicker, ContactCard, FamilyRelationGraph, ...)
|
|
|
+│ ├── pages.json # TabBar (行/身/智/心/富) + 分包注册
|
|
|
│ ├── config.js # 环境自适应 baseUrl (develop/trial/release)
|
|
|
│ └── store/ # Vuex 双角色状态
|
|
|
├── cfc-web/ # Vue 2 + Element UI 管理端
|
|
|
@@ -44,6 +45,30 @@ cfc/
|
|
|
| Danshop | `localhost:8888` | 独立 Spring Boot 商城子系统 |
|
|
|
| 数据迁移 | `curl -X POST http://localhost:9082/api/migration/run` | sfms → zxyj |
|
|
|
|
|
|
+## RELATIONSHIP MANAGEMENT
|
|
|
+
|
|
|
+| 实体 | 表 | 说明 |
|
|
|
+|------|----|------|
|
|
|
+| `RelationshipType` | `relationship_types` | 关系类型字典(typeKey/typeName/capabilityRole/sortOrder/enabled) |
|
|
|
+| `FamilyMember` | `family_members` | 家庭成员(relationshipType FK → typeKey, capabilityRole, showToFamily) |
|
|
|
+| `Contact` | `contacts` | 社会联系人(relationshipType → family/friend/partner/colleague/other, intimacyLevel) |
|
|
|
+| `GuideFamilyRelation` | `guide_family_relations` | 规划师-家庭绑定(relationType, status) |
|
|
|
+
|
|
|
+| 前端组件 | 用途 |
|
|
|
+|----------|------|
|
|
|
+| `RelationshipPicker.vue` | 关系类型选择器(自动加载 API,v-model 双向绑定) |
|
|
|
+| `FamilyRelationGraph.vue` | 家庭关系图(Canvas 绘制,信任度=颜色,沟通=线宽) |
|
|
|
+| `ContactCard.vue` | 联系人卡片 |
|
|
|
+| `ContactImport.vue` | 手机通讯录导入 |
|
|
|
+
|
|
|
+| API 端点 | 控制器 | 用途 |
|
|
|
+|----------|--------|------|
|
|
|
+| `/api/family/member/*` | `FamilyMembersController` | 添加/列表/切换/踢出/更新成员 |
|
|
|
+| `/api/family/member/relationship-types` | `FamilyMembersController` | 获取已启用的关系类型 |
|
|
|
+| `/api/admin/relationship-type/*` | `RelationshipTypeAdminController` | 管理端关系类型 CRUD |
|
|
|
+| `/api/bind/*` | `BindController` | 家长-规划师绑定 |
|
|
|
+| `/api/guide/bind/*` | `BindInviteController` | 规划师绑定邀请 |
|
|
|
+
|
|
|
## CONVENTIONS
|
|
|
|
|
|
- **接口:** 统一 `@PostMapping`,禁止 `@GetMapping/@PutMapping/@DeleteMapping`
|
|
|
@@ -77,6 +102,9 @@ cfc/
|
|
|
- 家庭关系图重设计
|
|
|
- 成长记录重构
|
|
|
- Dify AI 对话集成
|
|
|
+- 家庭成员关系编辑(前端:RelationshipPicker + family-members 编辑弹窗)
|
|
|
+- 关系类型 CRUD 管理(Web管理端 RelationshipTypes.vue)
|
|
|
+- 联系人管理(ContactCard, ContactImport, contact-detail)
|
|
|
|
|
|
## COMMANDS
|
|
|
|