新增车辆表及OTA权限与逻辑优化

新增车辆任务与报警表,完善实体与DbContext配置。细化OTA权限校验,增强回传会话IP安全。优化OTA上传与设置面板,调度器支持重启恢复。报警采集逻辑支持历史分段。
This commit is contained in:
2026-07-27 15:12:14 +08:00
parent bc3e9c5172
commit 1f72488a8d
20 changed files with 2392 additions and 53 deletions
@@ -13,6 +13,10 @@ const http: AxiosInstance = axios.create({
})
http.interceptors.request.use((config: InternalAxiosRequestConfig) => {
// FormData 必须由浏览器自动带 multipart boundary;清掉默认 application/json。
if (typeof FormData !== 'undefined' && config.data instanceof FormData) {
config.headers.delete('Content-Type')
}
// 双轨:优先用 localStorage 里的 token(过渡期 fallback),Cookie 会自动带;
// 后端首先看 Authorization: Bearer,没有再看 Cookie,两路任一通过即可。
const token = localStorage.getItem('simple.auth.token')