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 29a05826
authored
2026-01-20 09:02:57 +0800
by
tanghuan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修正绑定appleUserId逻辑
1 parent
24c85438
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
lib/bloc/login_main_cubit.dart
lib/data/repositories/user_auth_repository.dart
lib/bloc/login_main_cubit.dart
View file @
29a0582
...
@@ -136,10 +136,8 @@ class LoginMainCubit extends Cubit<LoginMainState> {
...
@@ -136,10 +136,8 @@ class LoginMainCubit extends Cubit<LoginMainState> {
if
(
binding
==
1
)
{
if
(
binding
==
1
)
{
_handleLoginSuccess
(
data
);
_handleLoginSuccess
(
data
);
}
else
{
}
else
{
// 设置 appleUserIdentifier 状态
// 设置 appleUserIdentifier 状态,通知用户需要授权微信认证
emit
(
state
.
copyWith
(
appleUserIdentifier:
data
[
'appleUid'
]!));
emit
(
state
.
copyWith
(
appleUserIdentifier:
data
[
'appleUid'
]!,
showNeedWechatForApple:
true
));
// 通知用户需要授权微信认证
emit
(
state
.
copyWith
(
showNeedWechatForApple:
true
));
}
}
}
}
...
@@ -265,6 +263,7 @@ class LoginMainCubit extends Cubit<LoginMainState> {
...
@@ -265,6 +263,7 @@ class LoginMainCubit extends Cubit<LoginMainState> {
sharedPreferences
.
setInt
(
'auth_userType'
,
userType
);
sharedPreferences
.
setInt
(
'auth_userType'
,
userType
);
sharedPreferences
.
setString
(
'auth_stuId'
,
stuId
);
sharedPreferences
.
setString
(
'auth_stuId'
,
stuId
);
debugPrint
(
'loginType:
${state.loginType}
appleUid:
${state.appleUserIdentifier}
'
);
// 针对 Apple 登录
// 针对 Apple 登录
if
(
state
.
loginType
==
2
&&
state
.
appleUserIdentifier
.
isNotEmpty
)
{
if
(
state
.
loginType
==
2
&&
state
.
appleUserIdentifier
.
isNotEmpty
)
{
// appleUserIdentifier未绑定,则进行绑定
// appleUserIdentifier未绑定,则进行绑定
...
...
lib/data/repositories/user_auth_repository.dart
View file @
29a0582
...
@@ -69,7 +69,7 @@ class UserAuthRepository {
...
@@ -69,7 +69,7 @@ class UserAuthRepository {
'/api/v1/comm/user/newbinding'
,
'/api/v1/comm/user/newbinding'
,
{
{
"userId"
:
userid
,
"userId"
:
userid
,
"bxeUserId"
:
useri
d
,
"bxeUserId"
:
bxeUserI
d
,
"type"
:
"apple"
,
"type"
:
"apple"
,
},
},
);
);
...
...
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