2026.6.8 个人信息bug修改
parent
3269868f83
commit
44727015e9
|
|
@ -110,11 +110,11 @@ class _UnitServiceListPageState extends State<UnitServiceListPage> {
|
|||
|
||||
//查看
|
||||
void _goToDetail(Map<String, dynamic> item) async {
|
||||
await pushPage(
|
||||
UnitJoinDetailPage(firmId: item['id'],),
|
||||
context,
|
||||
);
|
||||
_fetchData();
|
||||
// await pushPage(
|
||||
// UnitJoinDetailPage(firmId: item['id'],),
|
||||
// context,
|
||||
// );
|
||||
// _fetchData();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
|||
_birthText = idInfo.birth ?? '';
|
||||
}
|
||||
|
||||
if (idPhotos.length < 2 && !_isChange) {
|
||||
if (_idCardImgList.length < 2 && _isChange) {
|
||||
ToastUtil.showNormal(context, '请上传2张身份证照片');
|
||||
return;
|
||||
}
|
||||
|
|
@ -547,33 +547,81 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
|||
onTap: () {},
|
||||
),
|
||||
const Divider(),
|
||||
if (_isEdit || _idCardImgList.isNotEmpty)
|
||||
if (!_isEdit&&_idCardImgList.isNotEmpty)//_isEdit||_idCardImgList.isNotEmpty
|
||||
RepairedPhotoSection(
|
||||
title: '身份证照片',
|
||||
isRequired: _isEdit,
|
||||
isRequired: false,
|
||||
maxCount: 2,
|
||||
initialMediaPaths: _idCardImgList
|
||||
.map(
|
||||
(item) => ApiService.baseImgPath + item,
|
||||
)
|
||||
.toList(),
|
||||
isEdit: _isEdit,
|
||||
horizontalPadding: _isEdit ? 12 : 0,
|
||||
isEdit: false,
|
||||
horizontalPadding: false ? 12 : 0,
|
||||
inlineImageWidth: 60,
|
||||
onChanged: (files) {
|
||||
idPhotos = files.map((file) => file.path).toList();
|
||||
// idPhotos = files.map((file) => file.path).toList();
|
||||
},
|
||||
onMediaRemovedForIndex: (index) async {
|
||||
final deleFile = _idCardImgList[index];
|
||||
final deleId = _idCartImgIds[index];
|
||||
if (deleFile.contains(UploadFileType.idCardPhoto.path)) {
|
||||
_idCardImgList.removeAt(index);
|
||||
_idCartImgIds.removeAt(index);
|
||||
_idCardImgRemoveList.add(deleId);
|
||||
}
|
||||
// final deleFile = _idCardImgList[index];
|
||||
// final deleId = _idCartImgIds[index];
|
||||
// if (deleFile.contains(UploadFileType.idCardPhoto.path)) {
|
||||
// _idCardImgList.removeAt(index);
|
||||
// _idCartImgIds.removeAt(index);
|
||||
// _idCardImgRemoveList.add(deleId);
|
||||
// }
|
||||
},
|
||||
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)
|
||||
ItemListWidget.itemContainer(
|
||||
const Text(
|
||||
|
|
|
|||
Loading…
Reference in New Issue