Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
appframe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit b0ebbacd
authored
2026-01-23 17:27:57 +0800
by
tanghuan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
账号与安全中提示绑定孩子信息
1 parent
6cfc527e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletions
lib/bloc/setting/account_cubit.dart
lib/ui/pages/setting/account_page.dart
lib/bloc/setting/account_cubit.dart
View file @
b0ebbac
...
@@ -12,9 +12,13 @@ class AccountState extends Equatable {
...
@@ -12,9 +12,13 @@ class AccountState extends Equatable {
final
String
nickname
;
final
String
nickname
;
final
String
imgIcon
;
final
String
imgIcon
;
// 孩子信息
final
String
className
;
final
String
className
;
final
String
stuName
;
final
String
stuName
;
// 是否绑定孩子
final
bool
bindStu
;
const
AccountState
({
const
AccountState
({
this
.
loaded
=
false
,
this
.
loaded
=
false
,
this
.
name
=
''
,
this
.
name
=
''
,
...
@@ -23,7 +27,7 @@ class AccountState extends Equatable {
...
@@ -23,7 +27,7 @@ class AccountState extends Equatable {
this
.
imgIcon
=
''
,
this
.
imgIcon
=
''
,
this
.
className
=
''
,
this
.
className
=
''
,
this
.
stuName
=
''
,
this
.
stuName
=
''
,
this
.
bindStu
=
true
,
});
});
AccountState
copyWith
({
AccountState
copyWith
({
...
@@ -34,6 +38,7 @@ class AccountState extends Equatable {
...
@@ -34,6 +38,7 @@ class AccountState extends Equatable {
String
?
imgIcon
,
String
?
imgIcon
,
String
?
className
,
String
?
className
,
String
?
stuName
,
String
?
stuName
,
bool
?
bindStu
,
})
{
})
{
return
AccountState
(
return
AccountState
(
loaded:
loaded
??
this
.
loaded
,
loaded:
loaded
??
this
.
loaded
,
...
@@ -43,6 +48,7 @@ class AccountState extends Equatable {
...
@@ -43,6 +48,7 @@ class AccountState extends Equatable {
imgIcon:
imgIcon
??
this
.
imgIcon
,
imgIcon:
imgIcon
??
this
.
imgIcon
,
className:
className
??
this
.
className
,
className:
className
??
this
.
className
,
stuName:
stuName
??
this
.
stuName
,
stuName:
stuName
??
this
.
stuName
,
bindStu:
bindStu
??
this
.
bindStu
,
);
);
}
}
...
@@ -55,6 +61,7 @@ class AccountState extends Equatable {
...
@@ -55,6 +61,7 @@ class AccountState extends Equatable {
imgIcon
,
imgIcon
,
className
,
className
,
stuName
,
stuName
,
bindStu
,
];
];
}
}
...
@@ -76,6 +83,7 @@ class AccountCubit extends Cubit<AccountState> {
...
@@ -76,6 +83,7 @@ class AccountCubit extends Cubit<AccountState> {
var
code
=
result
[
'code'
];
var
code
=
result
[
'code'
];
var
data
=
result
[
'data'
];
var
data
=
result
[
'data'
];
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
emit
(
state
.
copyWith
(
loaded:
true
,
bindStu:
false
));
return
;
return
;
}
}
...
...
lib/ui/pages/setting/account_page.dart
View file @
b0ebbac
...
@@ -57,6 +57,7 @@ class AccountPage extends StatelessWidget {
...
@@ -57,6 +57,7 @@ class AccountPage extends StatelessWidget {
),
),
),
),
body:
state
.
loaded
body:
state
.
loaded
?
(
state
.
bindStu
?
Column
(
?
Column
(
children:
[
children:
[
// 用户头像和昵称部分
// 用户头像和昵称部分
...
@@ -209,6 +210,17 @@ class AccountPage extends StatelessWidget {
...
@@ -209,6 +210,17 @@ class AccountPage extends StatelessWidget {
),
),
],
],
)
)
:
Container
(
alignment:
Alignment
(
0
,
-
0.6
),
child:
Text
(
'暂未关联孩子信息
\n\n
请在首页操作绑定孩子信息'
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
16.0
,
color:
Colors
.
grey
,
),
),
))
:
const
Center
(
:
const
Center
(
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment