feat: 管理面板显示用户编码

This commit is contained in:
龙大 2026-03-22 19:31:45 +08:00
parent 869edc4bac
commit 784ea0b0ea
2 changed files with 2 additions and 1 deletions

View File

@ -95,6 +95,7 @@ def get_users(
"email": u.email, "email": u.email,
"phone": u.phone, "phone": u.phone,
"role": u.role, "role": u.role,
"user_code": u.user_code,
"created_at": u.f99_92_created_at.isoformat() if u.f99_92_created_at else None, "created_at": u.f99_92_created_at.isoformat() if u.f99_92_created_at else None,
"collection_count": count "collection_count": count
}) })

View File

@ -189,7 +189,7 @@ export default function Admin() {
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}> <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}> <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
<div style={{ color: '#fbbf24', fontSize: '16px', fontWeight: 'bold' }}>{user.username}</div> <div style={{ color: '#fbbf24', fontSize: '16px', fontWeight: 'bold' }}>{user.username} <span style={{color:"#fbbf24",marginLeft:8}}>#{user.user_code || "-"}</span></div>
<div style={{ <div style={{
padding: '2px 8px', borderRadius: '4px', padding: '2px 8px', borderRadius: '4px',
background: user.role === 'admin' ? 'rgba(16, 185, 129, 0.2)' : 'rgba(148, 163, 184, 0.2)', background: user.role === 'admin' ? 'rgba(16, 185, 129, 0.2)' : 'rgba(148, 163, 184, 0.2)',