|
|
|
@ -27,13 +27,16 @@ class AuthController extends GetxController { |
|
|
|
try { |
|
|
|
isLoading.value = true; |
|
|
|
late bool realAuth = false; |
|
|
|
if(GlobalData().userData?.realAuth != null){ |
|
|
|
realAuth = GlobalData().userData!.realAuth!; |
|
|
|
if (GlobalData().userData != null) { |
|
|
|
final information = GlobalData().userData!; |
|
|
|
if(information.identityCard != null){ |
|
|
|
realAuth = true; |
|
|
|
} |
|
|
|
} |
|
|
|
dataList.assignAll([ |
|
|
|
AuthCard( title: '手机绑定', desc: '防止账号丢失', index: 1, authed: true), |
|
|
|
AuthCard( title: '真实头像', desc: '提高交友成功率', index: 2, authed: false), |
|
|
|
AuthCard( title: '实名认证', desc: '提高交友成功率', index: 3, authed: false), |
|
|
|
AuthCard( title: '实名认证', desc: '提高交友成功率', index: 3, authed: realAuth), |
|
|
|
]); |
|
|
|
// 调用登录接口 |
|
|
|
// final response = await _userApi.login({}); |
|
|
|
@ -106,7 +109,7 @@ class AuthController extends GetxController { |
|
|
|
final response = await _userApi.saveCertificationAudit(param); |
|
|
|
// 处理响应 |
|
|
|
if (response.data.isSuccess) { |
|
|
|
GlobalData().userData?.realAuth = true; |
|
|
|
GlobalData().userData!.identityCard = idcard.value; |
|
|
|
SmartDialog.showToast('认证成功'); |
|
|
|
Get.back(result: 3); |
|
|
|
} else { |
|
|
|
|