2026.6.8 个人信息bug修改

master
xufei 2026-06-08 10:18:43 +08:00
parent 3269868f83
commit 44727015e9
2 changed files with 66 additions and 18 deletions

View File

@ -110,11 +110,11 @@ class _UnitServiceListPageState extends State<UnitServiceListPage> {
// //
void _goToDetail(Map<String, dynamic> item) async { void _goToDetail(Map<String, dynamic> item) async {
await pushPage( // await pushPage(
UnitJoinDetailPage(firmId: item['id'],), // UnitJoinDetailPage(firmId: item['id'],),
context, // context,
); // );
_fetchData(); // _fetchData();
} }

View File

@ -252,7 +252,7 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
_birthText = idInfo.birth ?? ''; _birthText = idInfo.birth ?? '';
} }
if (idPhotos.length < 2 && !_isChange) { if (_idCardImgList.length < 2 && _isChange) {
ToastUtil.showNormal(context, '请上传2张身份证照片'); ToastUtil.showNormal(context, '请上传2张身份证照片');
return; return;
} }
@ -547,33 +547,81 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
onTap: () {}, onTap: () {},
), ),
const Divider(), const Divider(),
if (_isEdit || _idCardImgList.isNotEmpty) if (!_isEdit&&_idCardImgList.isNotEmpty)//_isEdit||_idCardImgList.isNotEmpty
RepairedPhotoSection( RepairedPhotoSection(
title: '身份证照片', title: '身份证照片',
isRequired: _isEdit, isRequired: false,
maxCount: 2, maxCount: 2,
initialMediaPaths: _idCardImgList initialMediaPaths: _idCardImgList
.map( .map(
(item) => ApiService.baseImgPath + item, (item) => ApiService.baseImgPath + item,
) )
.toList(), .toList(),
isEdit: _isEdit, isEdit: false,
horizontalPadding: _isEdit ? 12 : 0, horizontalPadding: false ? 12 : 0,
inlineImageWidth: 60, inlineImageWidth: 60,
onChanged: (files) { onChanged: (files) {
idPhotos = files.map((file) => file.path).toList(); // idPhotos = files.map((file) => file.path).toList();
}, },
onMediaRemovedForIndex: (index) async { onMediaRemovedForIndex: (index) async {
final deleFile = _idCardImgList[index]; // final deleFile = _idCardImgList[index];
final deleId = _idCartImgIds[index]; // final deleId = _idCartImgIds[index];
if (deleFile.contains(UploadFileType.idCardPhoto.path)) { // if (deleFile.contains(UploadFileType.idCardPhoto.path)) {
_idCardImgList.removeAt(index); // _idCardImgList.removeAt(index);
_idCartImgIds.removeAt(index); // _idCartImgIds.removeAt(index);
_idCardImgRemoveList.add(deleId); // _idCardImgRemoveList.add(deleId);
} // }
}, },
onAiIdentify: () {}, onAiIdentify: () {},
), ),
if (_isEdit )
RepairedPhotoSection(
title: '身份证照片',
isRequired: true,
maxCount: 2,
followInitialUpdates:true,
initialMediaPaths: _idCardImgList
.map(
(item) => ApiService.baseImgPath + item,
)
.toList(),
isEdit: true,
horizontalPadding: true ? 12 : 0,
inlineImageWidth: 60,
onChanged: (files) {
// idPhotos = files.map((file) => file.path).toList();
},
onMediaAdded: (value) {
setState(() {
idPhotos.add(value);
_idCardImgList.add(value);
});
},
onMediaRemovedForIndex: (index) async {
final deleFile = _idCardImgList[index];
try{
final deleId = _idCartImgIds[index];
if (deleFile.contains(UploadFileType.idCardPhoto.path)) {
setState(() {
_idCardImgList.removeAt(index);
_idCartImgIds.removeAt(index);
_idCardImgRemoveList.add(deleId);
});
}
}catch(e){
setState(() {
_idCardImgList.removeAt(index);
//
idPhotos.removeWhere((path) => path == deleFile);
});
debugPrint('$e');
}
},
onAiIdentify: () {},
),
if (_isEdit) if (_isEdit)
ItemListWidget.itemContainer( ItemListWidget.itemContainer(
const Text( const Text(