Skip to content

Commit

Permalink
Change the strcuture of code to fetch input json file
Browse files Browse the repository at this point in the history
  • Loading branch information
yihong1120 committed Jan 23, 2024
1 parent dce9c57 commit 121ec1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/screens/accounts/account_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class AccountPageState extends State<AccountPage> {

if (userInfo != null) {
setState(() {
_username = userInfo['username'] ?? 'N/A'; // 根据你的API调整字段名
_email = userInfo['email'] ?? 'N/A'; // 根据你的API调整字段名
_username = userInfo['user']['username'] ?? 'N/A'; // 根据你的API调整字段名
_email = userInfo['user']['email'] ?? 'N/A'; // 根据你的API调整字段名
});
} else {
// 处理userInfo为空的情况,例如通过显示错误消息
Expand Down

0 comments on commit 121ec1c

Please sign in to comment.