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
+31
View File
@@ -0,0 +1,31 @@
/**
* 封装 ElMessage,在 iOS standalone 模式下自动加上顶栏+刘海偏移
*/
import { ElMessage as _ElMessage } from 'element-plus'
const isStandalone = window.navigator.standalone === true ||
window.matchMedia('(display-mode: standalone)').matches
function getOffset() {
if (!isStandalone) return 20
const sat = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--sat')) || 0
return 52 + sat + 8
}
function message(opts) {
const offset = getOffset()
if (typeof opts === 'string') return _ElMessage({ message: opts, offset })
return _ElMessage({ offset, ...opts })
}
;['success', 'warning', 'info', 'error'].forEach(type => {
message[type] = (opts) => {
const offset = getOffset()
if (typeof opts === 'string') return _ElMessage[type]({ message: opts, offset })
return _ElMessage[type]({ offset, ...opts })
}
})
message.closeAll = _ElMessage.closeAll
export { message as ElMessage }