首页列表

This commit is contained in:
pengxiaolong
2025-05-22 16:21:07 +08:00
parent af10ed06db
commit 6ca66f45d4
33 changed files with 483 additions and 377 deletions

12
components/formatDate.js Normal file
View File

@@ -0,0 +1,12 @@
function formatDate(timestamp) {
const date = new Date(timestamp * 1000); // 秒级转毫秒级
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hour = String(date.getHours()).padStart(2, '0');
const minute = String(date.getMinutes()).padStart(2, '0');
const second = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
}
export default formatDate;