fix: 修复火柴人排名点击查看用户详情功能
- 后端DTO添加accountSequence字段 - 后端服务返回accountSequence - 前端映射accountSequence到StickmanRankingData - 优化错误提示样式与页面风格一致 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f73e477041
commit
6745721399
|
|
@ -23,6 +23,7 @@ export interface AuthorizationDTO {
|
|||
export interface StickmanRankingDTO {
|
||||
id: string // 授权ID,用于前端唯一标识
|
||||
userId: string
|
||||
accountSequence: string // 用户账户序列号,用于查看详情
|
||||
authorizationId: string
|
||||
roleType: RoleType
|
||||
regionCode: string
|
||||
|
|
|
|||
|
|
@ -717,6 +717,7 @@ export class AuthorizationApplicationService {
|
|||
rankings.push({
|
||||
id: assessment.authorizationId.value,
|
||||
userId: assessment.userId.value,
|
||||
accountSequence: assessment.userId.accountSequence,
|
||||
authorizationId: assessment.authorizationId.value,
|
||||
roleType: assessment.roleType,
|
||||
regionCode: assessment.regionCode.value,
|
||||
|
|
|
|||
|
|
@ -574,9 +574,32 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
|||
void _showUserProfile(StickmanRankingData data) {
|
||||
if (data.accountSequence == null || data.accountSequence!.isEmpty) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('暂无该用户的详细信息'),
|
||||
duration: Duration(seconds: 2),
|
||||
SnackBar(
|
||||
content: const Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.info_outline,
|
||||
color: Colors.white,
|
||||
size: 18,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Text(
|
||||
'暂无该用户的详细信息',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 14,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
backgroundColor: const Color(0xFF8B5A2B),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
margin: const EdgeInsets.all(16),
|
||||
duration: const Duration(seconds: 2),
|
||||
),
|
||||
);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue