功能:新增消息中心后台快捷侧边导航

This commit is contained in:
xiaowang
2026-03-23 17:48:04 +08:00
parent 8a5f03af1b
commit c0f07707e1
4 changed files with 151 additions and 9 deletions
@@ -119,6 +119,13 @@
- 外部模板 ID 继续保留为可选字段
- 后台页面提示调整为“第三方平台模板标识”,不再局限于 Spug
### 13. 管理页快捷导航
- 在 MessageHub 管理页左侧新增快捷导航侧边栏
- 可一键跳转到来源系统、通道、测试发送、模板等主要板块
- 桌面端侧边栏使用吸顶布局,滚动长页面时仍可快速定位
- 平板和手机端会自动切换为单列或横向滑动导航,避免占用过多内容区
## 数据库 SQL
本轮新增 SQL 文件:
@@ -24,9 +24,25 @@
</div>
</header>
<main class="section-stack">
<div class="page-layout">
<aside class="quick-nav-panel">
<div class="quick-nav-sticky">
<p class="quick-nav-eyebrow">快速导航</p>
<nav class="quick-nav" aria-label="页面快捷导航">
<a href="#source-system-list">来源系统列表</a>
<a href="#source-system-form">来源系统表单</a>
<a href="#channel-list">通道列表</a>
<a href="#channel-form">通道配置</a>
<a href="#test-send">测试发送</a>
<a href="#template-list">模板列表</a>
<a href="#template-form">模板表单</a>
</nav>
</div>
</aside>
<main class="section-stack">
<section class="section-grid">
<section class="panel">
<section id="source-system-list" class="panel anchor-panel">
<div class="panel-header">
<div>
<h2>来源系统列表</h2>
@@ -54,7 +70,7 @@
</div>
</section>
<section class="panel">
<section id="source-system-form" class="panel anchor-panel">
<div class="panel-header">
<div>
<h2 id="sourceFormTitle">新增来源系统</h2>
@@ -98,7 +114,7 @@
</section>
<section class="section-grid">
<section class="panel">
<section id="channel-list" class="panel anchor-panel">
<div class="panel-header">
<div>
<h2>通道列表</h2>
@@ -125,7 +141,7 @@
</section>
<aside class="side-stack">
<section class="panel">
<section id="channel-form" class="panel anchor-panel">
<div class="panel-header">
<div>
<h2 id="formTitle">新增通道</h2>
@@ -171,7 +187,7 @@
</form>
</section>
<section class="panel">
<section id="test-send" class="panel anchor-panel">
<div class="panel-header">
<div>
<h2>测试发送</h2>
@@ -219,7 +235,7 @@
</section>
<section class="section-grid">
<section class="panel">
<section id="template-list" class="panel anchor-panel">
<div class="panel-header">
<div>
<h2>短信模板配置</h2>
@@ -250,7 +266,7 @@
</div>
</section>
<section class="panel">
<section id="template-form" class="panel anchor-panel">
<div class="panel-header">
<div>
<h2 id="templateFormTitle">新增短信模板</h2>
@@ -303,6 +319,7 @@
</section>
</section>
</main>
</div>
</div>
<div id="toast" class="toast" hidden></div>
@@ -14,6 +14,10 @@
--shadow: 0 20px 50px rgba(71, 49, 15, 0.12);
}
html {
scroll-behavior: smooth;
}
* {
box-sizing: border-box;
}
@@ -42,6 +46,58 @@ code {
padding: 24px 0 40px;
}
.page-layout {
display: grid;
grid-template-columns: 220px minmax(0, 1fr);
gap: 24px;
align-items: start;
margin-top: 24px;
}
.quick-nav-panel {
position: relative;
}
.quick-nav-sticky {
position: sticky;
top: 24px;
border: 1px solid rgba(114, 83, 38, 0.15);
border-radius: 24px;
padding: 18px;
background: linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(245, 233, 212, 0.9));
box-shadow: var(--shadow);
}
.quick-nav-eyebrow {
margin: 0 0 12px;
font-size: 12px;
letter-spacing: 0.16em;
text-transform: uppercase;
color: var(--accent);
}
.quick-nav {
display: grid;
gap: 10px;
}
.quick-nav a {
display: block;
padding: 10px 12px;
border-radius: 14px;
color: var(--text);
text-decoration: none;
background: rgba(255, 255, 255, 0.66);
border: 1px solid rgba(114, 83, 38, 0.12);
transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.quick-nav a:hover {
transform: translateX(2px);
background: rgba(255, 249, 240, 0.96);
border-color: rgba(184, 91, 47, 0.24);
}
.hero {
display: flex;
justify-content: space-between;
@@ -83,7 +139,10 @@ code {
.section-stack {
display: grid;
gap: 24px;
margin-top: 24px;
}
.anchor-panel {
scroll-margin-top: 24px;
}
.section-grid {
@@ -368,6 +427,18 @@ textarea {
}
@media (max-width: 1180px) {
.page-layout {
grid-template-columns: 1fr;
}
.quick-nav-sticky {
position: static;
}
.quick-nav {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.section-grid {
grid-template-columns: 1fr;
}
@@ -384,12 +455,29 @@ textarea {
padding-top: 12px;
}
.page-layout {
gap: 16px;
margin-top: 16px;
}
.quick-nav-sticky,
.hero,
.panel {
padding: 20px;
border-radius: 20px;
}
.quick-nav {
display: flex;
overflow-x: auto;
padding-bottom: 4px;
}
.quick-nav a {
flex: 0 0 auto;
white-space: nowrap;
}
th,
td {
padding: 12px 8px;
@@ -0,0 +1,30 @@
# 2026-03-23 MessageHub 管理页快捷导航
## 本次目标
为 MessageHub 管理页面补一个左侧快捷导航,解决页面板块较多、滚动查找成本高的问题。
## 主要改动
- 在管理页主内容左侧新增快捷导航侧边栏
- 为来源系统列表、来源系统表单、通道列表、通道配置、测试发送、模板列表、模板表单补充锚点
- 侧边栏支持平滑滚动跳转
- 桌面端使用吸顶布局,滚动页面时侧边栏保持可用
- 窄屏场景自动切换为单列布局,手机端导航改为横向可滑动标签
## 涉及文件
- [index.html](/E:/code/xiaowang/MessageHub/src/main/resources/static/messagehub-admin/index.html)
- [styles.css](/E:/code/xiaowang/MessageHub/src/main/resources/static/messagehub-admin/styles.css)
- [CHANGELOG_2026-03-23.md](/E:/code/xiaowang/MessageHub/src/main/resources/CHANGELOG_2026-03-23.md)
## 验证情况
- 核对页面结构,确认快捷导航链接与各业务板块锚点一一对应
- 核对响应式样式,确认桌面端、平板端、手机端都有对应布局
- 本次无 SQL 变更
## 说明
- 这次只处理 MessageHub 管理页的导航可达性,不改动现有接口和业务逻辑
- 已按 `docs/base.md` 要求补充变更记录,后续会单独提交 git