Commit 53a9490d by tanghuan

修正绑定appleUserId逻辑

1 parent 29a05826
......@@ -142,8 +142,19 @@ class LoginMainCubit extends Cubit<LoginMainState> {
}
Future<void> wechatAuthForApple() async {
emit(state.copyWith(showNeedWechatForApple: false));
wechatAuth();
emit(state.copyWith(showNeedWechatForApple: false, loginType: 2));
var authResult = await _fluwx.authBy(
which: NormalAuth(scope: 'snsapi_userinfo', state: 'wechat_sdk_test'),
);
if (!authResult) {
Fluttertoast.showToast(msg: '微信授权处理失败', backgroundColor: Colors.red);
return;
}
// 控制显示加载框
emit(state.copyWith(loading: true));
}
Future<void> wechatAuth() async {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!