feat: v0.8.x 功能更新与数据维护优化

- MAC地址格式统一为小写 xxxx-xxxx-xxxx,支持三种格式输入
- 更换设备MAC时自动清理OLT新发现列表中的冲突ONU记录
- 设备编辑新增场所类型字段(手动输入),区域改为下拉快速填充
- 编辑/更换设备时自动移除new_devices中同MAC的待入库记录
- 新增登录过期自动跳转(401拦截 + 过期提示)
- 新增关于页面(/about),支持Markdown渲染,管理员可在设置中编辑内容
- 新增device_status_history每日自动清理任务(保留30天)
- 更新README.md和about.md
This commit is contained in:
2026-04-24 08:53:28 +08:00
parent d222978ae4
commit eaabebbceb
15 changed files with 616 additions and 243 deletions
+14
View File
@@ -13,4 +13,18 @@ request.interceptors.request.use(config => {
return config
})
request.interceptors.response.use(
res => res,
err => {
if (err.response?.status === 401) {
localStorage.removeItem('token')
// 避免在登录/回调页重复跳转
if (!window.location.pathname.startsWith('/login') && !window.location.pathname.startsWith('/callback')) {
window.location.href = '/login?expired=1'
}
}
return Promise.reject(err)
}
)
export default request