Browse Source

优化

dev-2.0
王子贤 1 month ago
parent
commit
9dc43c2dad
4 changed files with 18 additions and 1 deletions
  1. 1
      lib/controller/mine/user_controller.dart
  2. 4
      lib/model/mine/user_base_data.dart
  3. 4
      lib/model/mine/user_data.dart
  4. 10
      lib/pages/mine/mine_page.dart

1
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;
}

4
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,

4
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,

10
lib/pages/mine/mine_page.dart

@ -200,7 +200,15 @@ class _MinePageState extends State<MinePage> 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
),
),
],
)
],

Loading…
Cancel
Save