|
|
|
@ -37,10 +37,11 @@ class EditInfoController extends GetxController { |
|
|
|
// 选择日期 |
|
|
|
void selectBirthday(String selectedDate) { |
|
|
|
birthday.value = selectedDate; |
|
|
|
saveData(); |
|
|
|
// 打印选择的日期 |
|
|
|
print('选择的出生日期: $selectedDate'); |
|
|
|
// 显示选择结果 |
|
|
|
SmartDialog.showToast('出生日期已选择'); |
|
|
|
// SmartDialog.showToast('出生日期已选择'); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -115,7 +116,7 @@ class EditInfoController extends GetxController { |
|
|
|
|
|
|
|
_userApi = Get.find<UserApi>(); |
|
|
|
|
|
|
|
|
|
|
|
getEducationList(); |
|
|
|
getIncomeList(); |
|
|
|
getMaritalList(); |
|
|
|
getPropertyList(); |
|
|
|
@ -283,6 +284,8 @@ class EditInfoController extends GetxController { |
|
|
|
homeLocation.value = "${userData.value?.hometownProvinceName}-${userData.value?.hometownCityName}"; |
|
|
|
homeLocationValue.value = [userData.value?.hometownProvinceCode, userData.value?.hometownCityCode]; |
|
|
|
} |
|
|
|
|
|
|
|
birthday.value = userData.value?.birthDate ?? ""; |
|
|
|
} |
|
|
|
|
|
|
|
goPreview() async { |
|
|
|
@ -576,7 +579,7 @@ class EditInfoController extends GetxController { |
|
|
|
|
|
|
|
try { |
|
|
|
final payload = { |
|
|
|
'birthDate': userData.value?.birthDate ?? "", |
|
|
|
'birthDate': birthday.value, |
|
|
|
'birthYear': userData.value?.birthYear ?? "", |
|
|
|
'provinceCode': locationValue.length >= 3 ? locationValue[0] : "", |
|
|
|
'provinceName': location.value != "" ? location.value.split("-")[0] : "", |
|
|
|
@ -584,7 +587,7 @@ class EditInfoController extends GetxController { |
|
|
|
'cityName': location.value != "" ? location.value.split("-")[1] : "", |
|
|
|
'districtCode': locationValue.length >= 3 ? locationValue[2] : "", |
|
|
|
'districtName': location.value != "" ? location.value.split("-")[2] : "", |
|
|
|
"educationCode": educationList[educationSelect.value].value, |
|
|
|
"educationCode": educationSelect.value != -1 ? educationList[educationSelect.value].value : "", |
|
|
|
"height": heightSelect.value != -1 ? heightList[heightSelect.value] : "", |
|
|
|
'hometownProvinceCode': homeLocationValue.length >= 2 ? homeLocationValue[0] : "", |
|
|
|
'hometownProvinceName': homeLocation.value != "" ? homeLocation.value.split("-")[0] : "", |
|
|
|
|