feat: 全面公告系统 + 全系统 Bug 修复

全面公告系统:
- notifications 表新增置顶/强提醒/定时发布/过期/配图/链接字段
- 后端增强:7 个接口(列表/置顶/未读数/已读/发布/编辑/删除)
- 首页强提醒公告弹窗
- 通知中心:置顶标记、配图展示、链接跳转、管理员操作
- 管理员发布表单:标题+内容+链接+配图+置顶+强提醒+定时+过期

Bug 修复:
- 401 重试队列竞态导致请求永久挂起
- 多分类筛选条件被静默丢弃
- 网络错误导致群组选择丢失
- Numpad 输入 '.' 显示异常
- transaction store 错误时清空数据
- 首页/预算页 Promise.all 部分失败阻塞关键数据
- CSS prefers-reduced-motion 类名不匹配
- 通知 read-all 遗漏群组通知
- auth.ts 错误日志缺少 stack trace
- stats 页面 v-for key 使用 index
- add 页面重复调用 fetchCategories
This commit is contained in:
wangxiaogang
2026-06-06 22:02:28 +08:00
parent 83571de723
commit a35689cdda
20 changed files with 1058 additions and 202 deletions

View File

@@ -69,13 +69,18 @@ export function request<T = any>(options: RequestOptions): Promise<T> {
if (!isRedirectingToLogin) {
isRedirectingToLogin = true
const retries = [...pendingRetries]
pendingRetries = []
reLogin()
.then(() => retries.forEach(r => request(r.options).then(r.resolve).catch(r.reject)))
.then(() => {
// 处理快照时已入队的 + reLogin 期间新入队的请求
const retries = [...pendingRetries]
pendingRetries = []
retries.forEach(r => request(r.options).then(r.resolve).catch(r.reject))
})
.catch(() => {
uni.showToast({ title: '登录失败,请刷新页面', icon: 'none' })
const retries = [...pendingRetries]
pendingRetries = []
retries.forEach(r => r.reject({ code: 40100, message: '未登录' }))
})
.finally(() => { isRedirectingToLogin = false })