Browse Source

no message

ios
ZHR007 3 months ago
parent
commit
e37e566d80
3 changed files with 13 additions and 5 deletions
  1. 4
      lib/controller/mine/auth_controller.dart
  2. 1
      lib/controller/mine/user_controller.dart
  3. 13
      lib/model/mine/user_data.dart

4
lib/controller/mine/auth_controller.dart

@ -36,9 +36,7 @@ class AuthController extends GetxController {
if(information.identityCard != null){
realAuth = true;
}
if(information.profilePhoto != null){
checkPhoto = true;
}
checkPhoto = information.isPhotoAudited();
}
dataList.assignAll([
AuthCard( title: '手机绑定', desc: '防止账号丢失', index: 1, authed: true, defaultIcon: Assets.imagesPhoneChecked, activeIcon: Assets.imagesPhoneChecked, width: 28,height: 40),

1
lib/controller/mine/user_controller.dart

@ -116,7 +116,6 @@ class UserController extends GetxController {
information.realName = baseInfo.realName;
information.phone = baseInfo.phone;
GlobalData().userData = information;
// await storage.write('userId', GlobalData().userId);
if (_checkInformation(information)) {
//

13
lib/model/mine/user_data.dart

@ -9,6 +9,7 @@ class UserData {
String? identityCard;
int? genderCode;
Map? auditProfilePhoto;
bool? hasUploadProfilePhoto;
final String? genderValue;
final String? homeCountryCode;
final String? homeCountry;
@ -133,7 +134,8 @@ class UserData {
this.realName,
this.matchmakerFlag,
this.photoList,
this.matchmakerType
this.matchmakerType,
this.hasUploadProfilePhoto
});
// JSON映射创建实例
@ -145,6 +147,7 @@ class UserData {
profilePhoto: json['profilePhoto'],
identityCard: json['identityCard'],
genderCode: json['genderCode'] ?? 0,
hasUploadProfilePhoto: json['hasUploadProfilePhoto'] ?? false,
auditProfilePhoto: json['auditProfilePhoto'] ?? null,
genderValue: json['genderValue'] ?? '',
homeCountryCode: json['homeCountryCode'],
@ -212,6 +215,7 @@ class UserData {
'profilePhoto': profilePhoto,
'identityCard': identityCard,
'genderCode': genderCode,
'hasUploadProfilePhoto': hasUploadProfilePhoto,
'auditProfilePhoto': auditProfilePhoto,
'genderValue': genderValue,
'homeCountryCode': homeCountryCode,
@ -274,4 +278,11 @@ class UserData {
String toString() {
return 'UserData(id: $id, nickName: $nickName, genderCode: $genderCode, auditProfilePhoto: $auditProfilePhoto, genderValue: $genderValue, birthYear: $birthYear, photoList: $photoList)';
}
bool isPhotoAudited(){
if(hasUploadProfilePhoto! && profilePhoto != null){
return hasUploadProfilePhoto! && profilePhoto!.isNotEmpty;
}
return false;
}
}
Loading…
Cancel
Save