fix: 全站时间统一为北京时间(Asia/Shanghai)

新增 src/utils/datetime.ts 共享 formatBjTime 工具,
13 个页面(11后台+2前台) 的 toLocaleString/formatDate
改为显式北京时间。Dashboard.tsx 保留图表标签的
formatDate(split) 不受影响。
This commit is contained in:
QihuAI Design committed 2026-07-16 12:39:35 +08:00
1 parent 82afe14a23
commit b3866f770c
12 files changed
+34 -19

No files matched your search

+2 -1
View File
@@ -3,6 +3,7 @@ import { adminAPI } from '@/api';
import { mockUsers, mockMembershipPlans } from '@/mock/data';
import type { User, RegisterSettings } from '@/types';
import './Users.css';
import { formatBjTime } from '@/utils/datetime';
// ===== SVG Icons =====
const IconSearch = () => (
@@ -141,7 +142,7 @@ const UserDetailModal: React.FC<UserDetailModalProps> = ({ user, onClose }) => {
</div>
<div className="user-detail-item">
<span className="detail-label">注册时间</span>
<span className="detail-value">{new Date(user.createdAt).toLocaleString('zh-CN')}</span>
<span className="detail-value">{formatBjTime(user.createdAt)}</span>
</div>
</div>
</div>