refactor: improve date handling and timezone consistency

- Add timezone support to database module (+08:00)
- Extract date formatting utilities to shared modules
- Standardize timezone handling across frontend and backend
- Improve date formatting consistency in UI components
- Refactor crawler page.goto options for better readability
This commit is contained in:
dmy
2026-01-15 16:17:41 +08:00
parent eba5c7e5c5
commit 5edebd9d55
20 changed files with 219 additions and 57 deletions

View File

@@ -81,6 +81,7 @@ import api from '../utils/api'
import { ElMessage } from 'element-plus'
import { Refresh, Paperclip } from '@element-plus/icons-vue'
import PinnedProject from './PinnedProject.vue'
import { formatDate } from '../utils/date.util'
interface Props {
todayBids: any[]
@@ -160,11 +161,6 @@ watch(dateRange, () => {
}
})
const formatDate = (dateString: string) => {
if (!dateString) return '-'
return new Date(dateString).toLocaleDateString()
}
// 过滤 Today's Bids只显示包含所选关键字的项目并且在日期范围内
const filteredTodayBids = computed(() => {
let result = props.todayBids