From 9dc43c2dadbadb64819ad8bf8668279a55cb532a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Mon, 2 Feb 2026 19:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/controller/mine/user_controller.dart | 1 + lib/model/mine/user_base_data.dart | 4 ++++ lib/model/mine/user_data.dart | 4 ++++ lib/pages/mine/mine_page.dart | 10 +++++++++- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/controller/mine/user_controller.dart b/lib/controller/mine/user_controller.dart index 66430ca..786a1c5 100644 --- a/lib/controller/mine/user_controller.dart +++ b/lib/controller/mine/user_controller.dart @@ -126,6 +126,7 @@ class UserController extends GetxController { if(baseInfo.liveMatchmaker != null && baseInfo.liveMatchmaker!.enable!){ information.matchmakerFlag = true; information.matchmakerType = baseInfo.liveMatchmaker!.type; + information.code = baseInfo.liveMatchmaker!.code; } else { information.matchmakerFlag = false; } diff --git a/lib/model/mine/user_base_data.dart b/lib/model/mine/user_base_data.dart index febedcf..ccf2071 100644 --- a/lib/model/mine/user_base_data.dart +++ b/lib/model/mine/user_base_data.dart @@ -1,6 +1,7 @@ class LiveMatchmaker { final String? userId; final String? remark; + final String? code; final String? id; final bool? enable; final int? type; @@ -8,6 +9,7 @@ class LiveMatchmaker { LiveMatchmaker({ this.userId, this.remark, + this.code, this.id, this.enable, this.type, @@ -17,6 +19,7 @@ class LiveMatchmaker { return LiveMatchmaker( userId: json['userId'] as String?, remark: json['remark'] as String?, + code: json['code'] as String?, id: json['id'] as String?, enable: json['enable'] as bool?, type: json['type'] as int?, @@ -27,6 +30,7 @@ class LiveMatchmaker { return { 'userId': userId, 'remark': remark, + 'code': code, 'id': id, 'enable': enable, 'type': type, diff --git a/lib/model/mine/user_data.dart b/lib/model/mine/user_data.dart index ec6e2cc..87e5984 100644 --- a/lib/model/mine/user_data.dart +++ b/lib/model/mine/user_data.dart @@ -7,6 +7,7 @@ class UserData { String? name; String? profilePhoto; String? identityCard; + String? code; int? genderCode; Map? auditProfilePhoto; bool? hasUploadProfilePhoto; @@ -76,6 +77,7 @@ class UserData { this.name, this.profilePhoto, this.identityCard, + this.code, this.genderCode, this.auditProfilePhoto, this.genderValue, @@ -148,6 +150,7 @@ class UserData { name: json['name'], profilePhoto: json['profilePhoto'], identityCard: json['identityCard'], + code: json['code'], genderCode: json['genderCode'] ?? 0, hasUploadProfilePhoto: json['hasUploadProfilePhoto'] ?? false, auditProfilePhoto: json['auditProfilePhoto'] ?? null, @@ -217,6 +220,7 @@ class UserData { 'name': name, 'profilePhoto': profilePhoto, 'identityCard': identityCard, + 'code': code, 'genderCode': genderCode, 'hasUploadProfilePhoto': hasUploadProfilePhoto, 'auditProfilePhoto': auditProfilePhoto, diff --git a/lib/pages/mine/mine_page.dart b/lib/pages/mine/mine_page.dart index 01ed132..971b3b2 100644 --- a/lib/pages/mine/mine_page.dart +++ b/lib/pages/mine/mine_page.dart @@ -200,7 +200,15 @@ class _MinePageState extends State with AutomaticKeepAliveClientMixin{ color: const Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500 ), - ) + ), + if(controller.userData.value?.matchmakerFlag ?? false) Text( + "邀请码:${controller.userData.value?.code ?? ""}", + style: TextStyle( + fontSize: 10.w, + color: const Color.fromRGBO(144, 144, 144, 1), + fontWeight: FontWeight.w500 + ), + ), ], ) ],