From cce6b0e1c7bb71ebd88183eee8b318e5ba1d9367 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Tue, 12 Dec 2023 09:45:40 +0800 Subject: [PATCH] =?UTF-8?q?app-=E6=88=91=E7=9A=84-=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=97=B6=EF=BC=8C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=AF=B7=E6=B1=82=E5=A4=B1=E8=B4=A5=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=8F=90=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mine/user_info_page.dart | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/mine/user_info_page.dart b/lib/mine/user_info_page.dart index 669ba568..9909161f 100644 --- a/lib/mine/user_info_page.dart +++ b/lib/mine/user_info_page.dart @@ -44,13 +44,13 @@ class _UserInfoPage extends State { SharedPreferences.getInstance().then((value) => { print(value.getString('user')), user = UserInfo.fromJson(jsonDecode(value.getString('user'))), - mobile = user.phone, - modifyInfo["nickname"] = user.nickname, - modifyInfo["signature"] = user.signature, - modifyInfo["birth"] = user.birth, - modifyInfo["headimg"] = user.headimg, - modifyInfo["sex"] = user.sex, - age = AppUtils.getAgeByString(user.birth), + mobile = user?.phone ?? "", + modifyInfo["nickname"] = user?.nickname ??"", + modifyInfo["signature"] = user?.signature ?? "", + modifyInfo["birth"] = user?.birth ?? "", + modifyInfo["headimg"] = user?.headimg ?? "", + modifyInfo["sex"] = user?.sex ?? "", + age = AppUtils.getAgeByString(user ?.birth ?? ""), refresh(), apiService = ApiService(Dio(), context: context, token: value.getString('token')), @@ -478,6 +478,8 @@ class _UserInfoPage extends State { setState(() { SmartDialog.showToast("用户信息修改成功", alignment: Alignment.center); }); + }else{ + SmartDialog.showToast("用户信息修改失败 " + info.msg, alignment: Alignment.center); } }