2026.5.28 个人信息bug修改
parent
d558bd0553
commit
c64cac4e43
|
|
@ -111,7 +111,7 @@ class _UnitJoinDetailPageState extends State<UnitJoinDetailPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
bool isShow = _isEdit;
|
bool isShow = _isEdit;
|
||||||
if (!_isEdit && FormUtils.hasValue(pd, 'userAvatarUrl')) {
|
if (!_isEdit) {// && FormUtils.hasValue(pd, 'userAvatarUrl')
|
||||||
isShow = true;
|
isShow = true;
|
||||||
}
|
}
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
@ -125,6 +125,7 @@ class _UnitJoinDetailPageState extends State<UnitJoinDetailPage> {
|
||||||
isShow ? ListView(
|
isShow ? ListView(
|
||||||
children: [
|
children: [
|
||||||
RepairedPhotoSection(
|
RepairedPhotoSection(
|
||||||
|
key: ValueKey(pd['userAvatarUrl']),
|
||||||
title: '照片',
|
title: '照片',
|
||||||
inlineSingle: true,
|
inlineSingle: true,
|
||||||
isRequired: _isEdit,
|
isRequired: _isEdit,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.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_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,10 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
);
|
);
|
||||||
if (res['success']) {
|
if (res['success']) {
|
||||||
final data = res['data'];
|
final data = res['data'];
|
||||||
pd = data;
|
|
||||||
|
setState(() {
|
||||||
|
pd = data;
|
||||||
|
});
|
||||||
|
|
||||||
_genderText = data['sex'] ?? '';
|
_genderText = data['sex'] ?? '';
|
||||||
_birthText = data['birthday'] ?? '';
|
_birthText = data['birthday'] ?? '';
|
||||||
|
|
@ -115,6 +118,9 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ('${pd['userAvatarUrl']}'.isEmpty) {
|
if ('${pd['userAvatarUrl']}'.isEmpty) {
|
||||||
|
// setState(() {
|
||||||
|
// pd['userAvatarUrl'] = widget.headImage;
|
||||||
|
// });
|
||||||
await FileApi.getImagePathWithType(
|
await FileApi.getImagePathWithType(
|
||||||
eqForeignKey,
|
eqForeignKey,
|
||||||
'',
|
'',
|
||||||
|
|
@ -122,7 +128,9 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
).then((result) {
|
).then((result) {
|
||||||
if (result['success']) {
|
if (result['success']) {
|
||||||
List files = result['data'] ?? [];
|
List files = result['data'] ?? [];
|
||||||
pd['userAvatarUrl'] = files.map((item) => item['filePath'].toString()).toList().first;
|
setState(() {
|
||||||
|
pd['userAvatarUrl'] = files.map((item) => item['filePath'].toString()).toList().first;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -359,7 +367,7 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
bool isShow = _isEdit;
|
bool isShow = _isEdit;
|
||||||
if (!_isEdit && FormUtils.hasValue(pd, 'userAvatarUrl')) {
|
if (!_isEdit ) {//&& FormUtils.hasValue(pd, 'userAvatarUrl')
|
||||||
isShow = true;
|
isShow = true;
|
||||||
}
|
}
|
||||||
String token = SessionService.instance.token ?? '';
|
String token = SessionService.instance.token ?? '';
|
||||||
|
|
@ -406,6 +414,7 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
? ListView(
|
? ListView(
|
||||||
children: [
|
children: [
|
||||||
RepairedPhotoSection(
|
RepairedPhotoSection(
|
||||||
|
key: ValueKey(pd['userAvatarUrl']),
|
||||||
title: '人脸照片',
|
title: '人脸照片',
|
||||||
inlineSingle: true,
|
inlineSingle: true,
|
||||||
isRequired: _isEdit,
|
isRequired: _isEdit,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue