From e37e566d80c120d2a1fc3671a8585b5a02decf6f Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Thu, 4 Dec 2025 16:13:19 +0800 Subject: [PATCH] no message --- lib/controller/mine/auth_controller.dart | 4 +--- lib/controller/mine/user_controller.dart | 1 - lib/model/mine/user_data.dart | 13 ++++++++++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/controller/mine/auth_controller.dart b/lib/controller/mine/auth_controller.dart index f5b95f5..9dfdcda 100644 --- a/lib/controller/mine/auth_controller.dart +++ b/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), diff --git a/lib/controller/mine/user_controller.dart b/lib/controller/mine/user_controller.dart index 2b89f2c..52efd57 100644 --- a/lib/controller/mine/user_controller.dart +++ b/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)) { //跳转到完善信息 diff --git a/lib/model/mine/user_data.dart b/lib/model/mine/user_data.dart index cb52c99..3a0651c 100644 --- a/lib/model/mine/user_data.dart +++ b/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; + } } \ No newline at end of file