feat: 本次提交更新内容如下

场景获客列表搞定
This commit is contained in:
笔记本里的永平
2025-07-07 17:08:27 +08:00
parent 6543da9167
commit 5ff15472f5
352 changed files with 24040 additions and 18575 deletions

View File

@@ -0,0 +1,33 @@
/**
* 格式化日期为 YYYY-MM-DD HH:MM:SS 格式
* @param date 日期对象或时间戳
* @returns 格式化后的日期字符串
*/
export function formatDate(date: Date | number | string): string {
const d = new Date(date)
const year = d.getFullYear()
const month = String(d.getMonth() + 1).padStart(2, "0")
const day = String(d.getDate()).padStart(2, "0")
const hours = String(d.getHours()).padStart(2, "0")
const minutes = String(d.getMinutes()).padStart(2, "0")
const seconds = String(d.getSeconds()).padStart(2, "0")
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
}
/**
* 格式化日期为 YYYY-MM-DD 格式
* @param date 日期对象或时间戳
* @returns 格式化后的日期字符串
*/
export function formatDateShort(date: Date | number | string): string {
const d = new Date(date)
const year = d.getFullYear()
const month = String(d.getMonth() + 1).padStart(2, "0")
const day = String(d.getDate()).padStart(2, "0")
return `${year}-${month}-${day}`
}