Commit ba7c7ec6 by Administrator

Merge branch 'feature-2601-sign-in-with-apple' of http://120.24.213.56/ethan/app…

…frame into feature-2601-sign-in-with-apple
2 parents 1e865800 29a05826
......@@ -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未绑定,则进行绑定
......
......@@ -75,8 +75,11 @@ class Constant {
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
static const String bxeBaseUrl = EnvConfig.env == 'dev' ? 'https://dev.banxiaoer.net' : 'https://bxr.banxiaoer.com';
static const String iotAppBaseUrl =
EnvConfig.env == 'dev' ? 'https://iotapp-dev.banxiaoer.com/iotapp' : 'https://iotapp.banxiaoer.com/iotapp';
// static const String iotAppBaseUrl =
// EnvConfig.env == 'dev' ? 'https://iotapp-dev.banxiaoer.com/iotapp' : 'https://iotapp.banxiaoer.com/iotapp';
static const String iotAppBaseUrl ='http://192.168.2.124:8080/iotapp';
/// 微信登录相关
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -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!