feat(api): 完善家谱系统API客户端契约

- 实现家谱管理相关方法,包括创建、详情、概览、我的家谱和选项查询
- 添加家谱加入申请功能,支持申请、审核、取消和待审核列表操作
- 集成通知详情获取方法和通知ID安全验证机制
- 完善功德记录、谱文、相册、视频、祭祀活动的完整CRUD操作契约
- 实现家谱成员管理功能,包含成员列表、更新、移除和转让所有者操作
- 优化路径ID验证逻辑,拒绝不安全的数值ID并提供明确错误提示
- 更新测试用例以验证所有新增API方法的路径和请求体白名单机制
This commit is contained in:
fizzleaf
2026-07-29 16:57:27 +08:00
parent 59a72fb22b
commit fb1743aa2a
74 changed files with 13166 additions and 1320 deletions
+46 -30
View File
@@ -1,4 +1,4 @@
<!doctype html>
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
@@ -11,22 +11,22 @@
<body class="page-profile-module">
<header class="site-header">
<div class="container nav">
<a class="brand magnetic" href="profile.html"
><img class="brand-logo" src="public/images/logo.png" alt="我们的家谱,代代相传" /></a
>
<a class="brand magnetic" href="profile.html">
<img class="brand-logo" src="public/images/logo.png" alt="我们的家谱,代代相传" />
</a>
<nav class="nav-links">
<a href="profile.html">首页</a
><a href="profile-families.html">数字家谱</a
><a href="plaza.html">家谱广场</a
><a href="profile-content.html">家族文化</a
><a href="surname.html">姓氏百科</a><a href="app.html">应用下载</a
><a href="help.html">帮助中心</a><a href="about.html">关于我们</a>
<a href="profile.html">首页</a>
<a href="profile-families.html">数字家谱</a>
<a href="plaza.html">家谱广场</a>
<a href="profile-content.html">家族文化</a>
<a href="surname.html">姓氏百科</a>
<a href="app.html">应用下载</a>
<a href="help.html">帮助中心</a>
<a href="about.html">关于我们</a>
</nav>
<div class="nav-actions">
<a class="active" href="profile.html">个人中心</a
><a class="btn primary magnetic" href="profile-create-family.html"
>创建家谱</a
>
<a class="active" href="profile.html">个人中心</a>
<a class="btn primary magnetic" href="profile-create-family.html">创建家谱</a>
</div>
</div>
</header>
@@ -37,9 +37,7 @@
<div class="module-title-row">
<div>
<h1>消息中心</h1>
<p>
查看当前账号的消息通知,并同步未读数量。
</p>
<p>查看当前账号的通知详情,并管理未读状态。</p>
</div>
<a class="btn ghost magnetic" href="profile.html">返回个人中心</a>
</div>
@@ -48,34 +46,52 @@
<section class="section">
<div class="container module-layout">
<aside class="module-nav">
<a href="profile-families.html">我的家谱</a
><a class="active" href="profile-messages.html">消息中心</a
><a href="profile-family-admin.html">家族管理</a
><a href="profile-content.html">内容发布</a
><a href="profile-data.html">个人资料</a
><a href="profile-services.html">帮助与服务</a>
<a href="profile-families.html">我的家谱</a>
<a class="active" href="profile-messages.html">消息中心</a>
<a href="profile-family-admin.html">家族管理</a>
<a href="profile-content.html">内容发布</a>
<a href="profile-data.html">个人资料</a>
<a href="profile-services.html">帮助与服务</a>
</aside>
<div class="module-main">
<section class="module-panel">
<h2>通知列表</h2>
<div class="module-title-row">
<div>
<h2>通知列表</h2>
<p class="module-note">未读数量:<b data-notification-unread-count>0</b></p>
</div>
<label class="editor-field">
<span>阅读状态</span>
<select data-notification-filter>
<option value="">全部通知</option>
<option value="0">仅未读</option>
<option value="1">仅已读</option>
</select>
</label>
</div>
<p class="api-empty" data-notification-status>正在加载消息…</p>
<p class="module-note">未读数量:<b data-notification-unread-count>0</b></p>
<div class="module-list" data-notification-list>
<div class="module-list" data-notification-list aria-live="polite">
<div class="api-empty">正在加载消息…</div>
</div>
</section>
<section class="module-panel">
<h2>系统通知</h2>
<h2>通知详情</h2>
<div data-notification-detail aria-live="polite">
<div class="api-empty">请选择一条通知查看详情</div>
</div>
</section>
<section class="module-panel">
<h2>阅读管理</h2>
<div class="module-grid two">
<button class="module-card module-action-card" type="button" data-notification-read-all>
<span class="icon"></span>
<h3>全部标记已读</h3>
<p>使用当前 PC 的全部已读接口</p>
<p>将当前账号所有未读通知标记为已读</p>
</button>
<button class="module-card module-action-card" type="button" data-notification-refresh>
<span class="icon"></span>
<h3>刷新消息</h3>
<p>重新读取通知列表与未读数量。</p>
<p>重新读取通知列表、详情与未读数量。</p>
</button>
</div>
</section>
@@ -86,7 +102,7 @@
<script src="public/js/jquery360.js"></script>
<script src="public/layui/layui.js"></script>
<script src="public/js/lay-config.js"></script>
<script src="public/js/profile-common.js"></script>
<script src="public/js/profile-common.js?v=20260725-entry"></script>
<script src="config.js"></script>
<script src="utils/StorageUtil.js"></script>
<script src="utils/axios.js"></script>