Commit 29a05826 by tanghuan

修正绑定appleUserId逻辑

1 parent 24c85438
......@@ -136,10 +136,8 @@ class LoginMainCubit extends Cubit<LoginMainState> {
if (binding == 1) {
_handleLoginSuccess(data);
} else {
// 设置 appleUserIdentifier 状态
emit(state.copyWith(appleUserIdentifier: data['appleUid']!));
// 通知用户需要授权微信认证
emit(state.copyWith(showNeedWechatForApple: true));
// 设置 appleUserIdentifier 状态,通知用户需要授权微信认证
emit(state.copyWith(appleUserIdentifier: data['appleUid']!, showNeedWechatForApple: true));
}
}
......@@ -265,6 +263,7 @@ class LoginMainCubit extends Cubit<LoginMainState> {
sharedPreferences.setInt('auth_userType', userType);
sharedPreferences.setString('auth_stuId', stuId);
debugPrint('loginType: ${state.loginType} appleUid: ${state.appleUserIdentifier}');
// 针对 Apple 登录
if (state.loginType == 2 && state.appleUserIdentifier.isNotEmpty) {
// appleUserIdentifier未绑定,则进行绑定
......
......@@ -69,7 +69,7 @@ class UserAuthRepository {
'/api/v1/comm/user/newbinding',
{
"userId": userid,
"bxeUserId": userid,
"bxeUserId": bxeUserId,
"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!