fix
This commit is contained in:
@@ -192,6 +192,9 @@
|
||||
|
||||
// NSDictionary *weixinInfoDic = [GiGaUserDefault getWeiXinAccessToenDic];
|
||||
NSString *wechatCode = [GiGaUserDefault getWeiXinCode];
|
||||
if (wechatCode==nil) {
|
||||
wechatCode = @"";
|
||||
}
|
||||
NSDictionary *params = nil;
|
||||
params = @{
|
||||
@"mobile":self.acountTextField.text,
|
||||
@@ -313,44 +316,43 @@
|
||||
if ([responseDict[@"code"] integerValue] == 0) {
|
||||
[self userloginSussecess:responseDict];
|
||||
|
||||
}else if([responseDict[@"code"] integerValue] == 500){
|
||||
//登录流程待定
|
||||
//[self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
|
||||
[self jxt_showAlertWithTitle:@"温馨提示" message:responseDict[@"msg"] appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"知道了");
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
}];
|
||||
|
||||
}else{
|
||||
|
||||
[self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
[self.view makeToast:@"用户信息提交异常"];
|
||||
GILog(@"上传微信用户信息error:\n%@",error.localizedDescription);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
//请求用户数据
|
||||
-(void)userloginSussecess:(NSDictionary *)resDic{
|
||||
|
||||
//token 登陆标志
|
||||
[GiGaUserDefault saveToken:resDic[@"token"]];
|
||||
//埋点
|
||||
[MobClick endEvent:MobClick_UserLogin];
|
||||
GIGA_WIndowTost(@"登录成功!");
|
||||
//请求用户数据
|
||||
|
||||
weakify(self);
|
||||
[[GiGaUserManager shareUser] synsisUserInfo:^(GiGaUser *user) {
|
||||
|
||||
GILog(@"user.userId:%@",user.userId);
|
||||
|
||||
//埋点
|
||||
[MobClick endEvent:MobClick_UserLogin];
|
||||
GIGA_WIndowTost(@"登录成功!");
|
||||
NC_POST_NAME_OBJECT(kUserLoginSuccessNoti, nil);
|
||||
[weakSelf dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
} userErrorMsgBlock:^(NSDictionary *errorCodemsg) {
|
||||
|
||||
if (errorCodemsg) {
|
||||
NSString *msg = errorCodemsg[@"msg"];
|
||||
if (msg) {
|
||||
GIGA_ShowToast(msg);
|
||||
}
|
||||
}
|
||||
}];
|
||||
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}
|
||||
|
||||
//接收注册成功通知
|
||||
|
||||
Reference in New Issue
Block a user