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 {
|
export interface StickmanRankingDTO {
|
||||||
id: string // 授权ID,用于前端唯一标识
|
id: string // 授权ID,用于前端唯一标识
|
||||||
userId: string
|
userId: string
|
||||||
|
accountSequence: string // 用户账户序列号,用于查看详情
|
||||||
authorizationId: string
|
authorizationId: string
|
||||||
roleType: RoleType
|
roleType: RoleType
|
||||||
regionCode: string
|
regionCode: string
|
||||||
|
|
|
||||||
|
|
@ -717,6 +717,7 @@ export class AuthorizationApplicationService {
|
||||||
rankings.push({
|
rankings.push({
|
||||||
id: assessment.authorizationId.value,
|
id: assessment.authorizationId.value,
|
||||||
userId: assessment.userId.value,
|
userId: assessment.userId.value,
|
||||||
|
accountSequence: assessment.userId.accountSequence,
|
||||||
authorizationId: assessment.authorizationId.value,
|
authorizationId: assessment.authorizationId.value,
|
||||||
roleType: assessment.roleType,
|
roleType: assessment.roleType,
|
||||||
regionCode: assessment.regionCode.value,
|
regionCode: assessment.regionCode.value,
|
||||||
|
|
|
||||||
|
|
@ -574,9 +574,32 @@ class _StickmanRaceWidgetState extends State<StickmanRaceWidget>
|
||||||
void _showUserProfile(StickmanRankingData data) {
|
void _showUserProfile(StickmanRankingData data) {
|
||||||
if (data.accountSequence == null || data.accountSequence!.isEmpty) {
|
if (data.accountSequence == null || data.accountSequence!.isEmpty) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
const SnackBar(
|
SnackBar(
|
||||||
content: Text('暂无该用户的详细信息'),
|
content: const Row(
|
||||||
duration: Duration(seconds: 2),
|
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;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue