2026.5.28 个人信息bug修改

master
xufei 2026-05-28 14:49:50 +08:00
parent d558bd0553
commit c64cac4e43
3 changed files with 15 additions and 4 deletions

View File

@ -111,7 +111,7 @@ class _UnitJoinDetailPageState extends State<UnitJoinDetailPage> {
@override
Widget build(BuildContext context) {
bool isShow = _isEdit;
if (!_isEdit && FormUtils.hasValue(pd, 'userAvatarUrl')) {
if (!_isEdit) {// && FormUtils.hasValue(pd, 'userAvatarUrl')
isShow = true;
}
return Scaffold(
@ -125,6 +125,7 @@ class _UnitJoinDetailPageState extends State<UnitJoinDetailPage> {
isShow ? ListView(
children: [
RepairedPhotoSection(
key: ValueKey(pd['userAvatarUrl']),
title: '照片',
inlineSingle: true,
isRequired: _isEdit,

View File

@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:qhd_prevention/constants/app_enums.dart';
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
import 'package:qhd_prevention/customWidget/custom_button.dart';
import 'package:qhd_prevention/customWidget/toast_util.dart';

View File

@ -96,7 +96,10 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
);
if (res['success']) {
final data = res['data'];
setState(() {
pd = data;
});
_genderText = data['sex'] ?? '';
_birthText = data['birthday'] ?? '';
@ -115,6 +118,9 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
}
});
if ('${pd['userAvatarUrl']}'.isEmpty) {
// setState(() {
// pd['userAvatarUrl'] = widget.headImage;
// });
await FileApi.getImagePathWithType(
eqForeignKey,
'',
@ -122,7 +128,9 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
).then((result) {
if (result['success']) {
List files = result['data'] ?? [];
setState(() {
pd['userAvatarUrl'] = files.map((item) => item['filePath'].toString()).toList().first;
});
}
});
}
@ -359,7 +367,7 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
@override
Widget build(BuildContext context) {
bool isShow = _isEdit;
if (!_isEdit && FormUtils.hasValue(pd, 'userAvatarUrl')) {
if (!_isEdit ) {//&& FormUtils.hasValue(pd, 'userAvatarUrl')
isShow = true;
}
String token = SessionService.instance.token ?? '';
@ -406,6 +414,7 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
? ListView(
children: [
RepairedPhotoSection(
key: ValueKey(pd['userAvatarUrl']),
title: '人脸照片',
inlineSingle: true,
isRequired: _isEdit,