fix: 修复3个高优先级Bug + 5个中低优先级问题
BUG-01: recurring /sync next_date 更新逻辑错误(应用循环后的 next) BUG-02: bills onReachBottom loading 缺 .value BUG-03: group store switchToPersonal 缺少 await (3处) OPT-04: notification requireNotificationEditAuth 加 try-catch OPT-05: category 迁移源分类条件改为 is_custom=1 AND user_id=? OPT-06: user 旧头像删除加 try-catch + 日志 CODE-02: format.ts 跨年日期显示年份 CODE-05: notification isValidUrl 去掉相对路径允许
This commit is contained in:
@@ -242,7 +242,7 @@ async function onDelete(item: any) {
|
||||
|
||||
// 触底加载更多
|
||||
onReachBottom(() => {
|
||||
if (noMore.value || loading) return
|
||||
if (noMore.value || loading.value) return
|
||||
page.value++
|
||||
loadTx(false)
|
||||
})
|
||||
|
||||
@@ -55,7 +55,7 @@ export const useGroupStore = defineStore('group', () => {
|
||||
if (currentGroupId.value !== null) {
|
||||
const stillValid = groups.value.some(g => g.id === currentGroupId.value)
|
||||
if (!stillValid) {
|
||||
switchToPersonal()
|
||||
await switchToPersonal()
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
@@ -83,7 +83,7 @@ export const useGroupStore = defineStore('group', () => {
|
||||
async function leaveGroup(groupId: number) {
|
||||
await api.leaveGroup(groupId)
|
||||
if (currentGroupId.value === groupId) {
|
||||
switchToPersonal()
|
||||
await switchToPersonal()
|
||||
}
|
||||
await fetchGroups()
|
||||
}
|
||||
@@ -92,7 +92,7 @@ export const useGroupStore = defineStore('group', () => {
|
||||
async function deleteGroup(groupId: number) {
|
||||
await api.deleteGroup(groupId)
|
||||
if (currentGroupId.value === groupId) {
|
||||
switchToPersonal()
|
||||
await switchToPersonal()
|
||||
}
|
||||
await fetchGroups()
|
||||
}
|
||||
|
||||
@@ -36,7 +36,11 @@ export function formatDate(date: string | Date): string {
|
||||
if (diff === 1) return '昨天'
|
||||
if (diff === 2) return '前天'
|
||||
|
||||
return `${d.getMonth() + 1}月${d.getDate()}日`
|
||||
// 跨年显示年份
|
||||
const isCurrentYear = d.getFullYear() === now.getFullYear()
|
||||
return isCurrentYear
|
||||
? `${d.getMonth() + 1}月${d.getDate()}日`
|
||||
: `${d.getFullYear()}年${d.getMonth() + 1}月${d.getDate()}日`
|
||||
}
|
||||
|
||||
export function formatMonth(date: string): string {
|
||||
|
||||
Reference in New Issue
Block a user