diff --git a/lib/model/home/user_info_data.dart b/lib/model/home/user_info_data.dart index 5e22462..78119e2 100644 --- a/lib/model/home/user_info_data.dart +++ b/lib/model/home/user_info_data.dart @@ -5,6 +5,7 @@ class UserInfoData { String? updateTime; Null? event; String? accountId; + String? miUserId; String? userId; String? nickName; String? name; @@ -150,6 +151,7 @@ class UserInfoData { this.accountTypeName, this.nationalityCode, this.nationality, + this.miUserId, this.nativePlaceCode, this.nativePlaceName, this.industryCode, @@ -200,6 +202,7 @@ class UserInfoData { userId = json['userId']; nickName = json['nickName']; name = json['name']; + miUserId = json['miUserId']; profilePhoto = json['profilePhoto']; hasUploadProfilePhoto = json['hasUploadProfilePhoto']; photoDisplay = json['photoDisplay']; @@ -310,6 +313,7 @@ class UserInfoData { data['userId'] = this.userId; data['nickName'] = this.nickName; data['name'] = this.name; + data['miUserId'] = this.miUserId; data['profilePhoto'] = this.profilePhoto; data['hasUploadProfilePhoto'] = this.hasUploadProfilePhoto; data['photoDisplay'] = this.photoDisplay; diff --git a/lib/pages/home/user_information_page.dart b/lib/pages/home/user_information_page.dart index c941479..bfd02d8 100644 --- a/lib/pages/home/user_information_page.dart +++ b/lib/pages/home/user_information_page.dart @@ -462,11 +462,7 @@ class UserInformationPage extends StatelessWidget { // IM系统需要使用userId或accountId,而不是miId // 优先使用userId(这是IM系统的用户ID),如果没有则使用accountId,最后才使用miId - String? targetUserId = (userInfo.userId?.isNotEmpty == true ? userInfo.userId : - (userInfo.accountId?.isNotEmpty == true ? userInfo.accountId : - (userInfo.miId?.isNotEmpty == true ? userInfo.miId : - (userInfo.id?.isNotEmpty == true ? userInfo.id : - (miId.isNotEmpty ? miId : null))))); + String? targetUserId = userInfo.miUserId; if (targetUserId == null || targetUserId.isEmpty) { print('❌ [UserInformationPage] 无法获取用户ID,无法跳转');