feat(auth): 添加用户权限获取接口并完善JWT令牌角色信息

- 在JWT令牌中添加用户角色信息
- 新增get_my_permissions接口用于获取当前用户权限码列表
- 重构认证回调逻辑,增加错误日志记录
- 更新用户信息获取接口使用Authorization头验证
```
This commit is contained in:
2026-04-06 00:40:08 +08:00
parent dfa8fa62a8
commit f1f8518985
71 changed files with 9402 additions and 191 deletions
+92
View File
@@ -68,6 +68,9 @@ html, body, #app {
font-family: var(--font-sans);
font-size: 14px;
-webkit-font-smoothing: antialiased;
/* iOS standalone 模式下禁止长按弹出菜单、文字选中 */
-webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent;
}
/* ── Element Plus 深色覆盖 ── */
@@ -730,3 +733,92 @@ html {
transition-duration: 0.2s;
transition-timing-function: ease;
}
/* ============================================================
移动端全局适配
============================================================ */
/* 防止 iOS 双击缩放 */
html {
touch-action: manipulation;
}
/* 移动端 Element Plus 对话框全屏适配 */
@media (max-width: 767px) {
/* overlay 容器整体下移,避开固定顶栏(52px)并留出安全间距 */
.el-overlay-dialog {
padding-top: 60px !important;
padding-bottom: 72px !important; /* 底部导航 64px + 8px 间距 */
box-sizing: border-box !important;
}
.el-dialog {
width: calc(100vw - 24px) !important;
max-width: 100% !important;
margin: 0 auto !important;
border-radius: var(--radius-lg) !important;
/* 最大高度 = 视口 - 顶栏 - 底导航 - 上下间距 */
max-height: calc(100vh - 60px - 72px) !important;
display: flex !important;
flex-direction: column !important;
}
.el-dialog__body {
padding: 16px !important;
flex: 1 !important;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch;
/* 不再写死 max-height,由父容器控制 */
max-height: none !important;
}
.el-dialog__footer {
padding: 12px 16px !important;
flex-shrink: 0 !important;
}
/* 表格在移动端允许横向滚动 */
.el-table {
overflow-x: auto !important;
}
/* 分页在移动端居中 */
.el-pagination {
justify-content: center !important;
flex-wrap: wrap !important;
}
/* 按钮最小触摸区域 */
.el-button {
min-height: 36px !important;
}
/* 输入框高度 */
.el-input__wrapper {
min-height: 36px !important;
}
/* 消息提示位置 */
.el-message {
min-width: 240px !important;
max-width: calc(100vw - 32px) !important;
}
}
/* ── iOS 主屏幕 standalone 模式:弹窗和消息额外下移刘海高度 ── */
/* --sat 由 main.js 在 standalone 模式下动态写入,Safari 中不存在默认为 0 */
@media (display-mode: standalone) and (max-width: 767px) {
.el-overlay-dialog {
padding-top: calc(60px + var(--sat, 0px)) !important;
padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
}
.el-dialog {
max-height: calc(100vh - 60px - 72px - var(--sat, 0px) - env(safe-area-inset-bottom)) !important;
}
/* 消息提示下移 */
.el-message-list {
top: calc(20px + var(--sat, 0px)) !important;
}
}