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!){ if(baseInfo.liveMatchmaker != null && baseInfo.liveMatchmaker!.enable!){
information.matchmakerFlag = true; information.matchmakerFlag = true;
information.matchmakerType = baseInfo.liveMatchmaker!.type; information.matchmakerType = baseInfo.liveMatchmaker!.type;
information.code = baseInfo.liveMatchmaker!.code;
} else { } else {
information.matchmakerFlag = false; information.matchmakerFlag = false;
} }

4
lib/model/mine/user_base_data.dart

@ -1,6 +1,7 @@
class LiveMatchmaker { class LiveMatchmaker {
final String? userId; final String? userId;
final String? remark; final String? remark;
final String? code;
final String? id; final String? id;
final bool? enable; final bool? enable;
final int? type; final int? type;
@ -8,6 +9,7 @@ class LiveMatchmaker {
LiveMatchmaker({ LiveMatchmaker({
this.userId, this.userId,
this.remark, this.remark,
this.code,
this.id, this.id,
this.enable, this.enable,
this.type, this.type,
@ -17,6 +19,7 @@ class LiveMatchmaker {
return LiveMatchmaker( return LiveMatchmaker(
userId: json['userId'] as String?, userId: json['userId'] as String?,
remark: json['remark'] as String?, remark: json['remark'] as String?,
code: json['code'] as String?,
id: json['id'] as String?, id: json['id'] as String?,
enable: json['enable'] as bool?, enable: json['enable'] as bool?,
type: json['type'] as int?, type: json['type'] as int?,
@ -27,6 +30,7 @@ class LiveMatchmaker {
return { return {
'userId': userId, 'userId': userId,
'remark': remark, 'remark': remark,
'code': code,
'id': id, 'id': id,
'enable': enable, 'enable': enable,
'type': type, 'type': type,

4
lib/model/mine/user_data.dart

@ -7,6 +7,7 @@ class UserData {
String? name; String? name;
String? profilePhoto; String? profilePhoto;
String? identityCard; String? identityCard;
String? code;
int? genderCode; int? genderCode;
Map? auditProfilePhoto; Map? auditProfilePhoto;
bool? hasUploadProfilePhoto; bool? hasUploadProfilePhoto;
@ -76,6 +77,7 @@ class UserData {
this.name, this.name,
this.profilePhoto, this.profilePhoto,
this.identityCard, this.identityCard,
this.code,
this.genderCode, this.genderCode,
this.auditProfilePhoto, this.auditProfilePhoto,
this.genderValue, this.genderValue,
@ -148,6 +150,7 @@ class UserData {
name: json['name'], name: json['name'],
profilePhoto: json['profilePhoto'], profilePhoto: json['profilePhoto'],
identityCard: json['identityCard'], identityCard: json['identityCard'],
code: json['code'],
genderCode: json['genderCode'] ?? 0, genderCode: json['genderCode'] ?? 0,
hasUploadProfilePhoto: json['hasUploadProfilePhoto'] ?? false, hasUploadProfilePhoto: json['hasUploadProfilePhoto'] ?? false,
auditProfilePhoto: json['auditProfilePhoto'] ?? null, auditProfilePhoto: json['auditProfilePhoto'] ?? null,
@ -217,6 +220,7 @@ class UserData {
'name': name, 'name': name,
'profilePhoto': profilePhoto, 'profilePhoto': profilePhoto,
'identityCard': identityCard, 'identityCard': identityCard,
'code': code,
'genderCode': genderCode, 'genderCode': genderCode,
'hasUploadProfilePhoto': hasUploadProfilePhoto, 'hasUploadProfilePhoto': hasUploadProfilePhoto,
'auditProfilePhoto': auditProfilePhoto, '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), color: const Color.fromRGBO(51, 51, 51, 1),
fontWeight: FontWeight.w500 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