Commit 29a05826 by tanghuan

修正绑定appleUserId逻辑

1 parent 24c85438
...@@ -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未绑定,则进行绑定
......
...@@ -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": userid, "bxeUserId": bxeUserId,
"type": "apple", "type": "apple",
}, },
); );
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!