fix 首页

This commit is contained in:
lianxiang
2018-09-13 23:42:18 +08:00
parent 7d0027f58d
commit fada68d22d
62 changed files with 860 additions and 158 deletions
+13 -19
View File
@@ -78,7 +78,6 @@
-(void)textFieldUI{
UIView *acountView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
UIImageView *acountViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15,9, 12, 22)];
acountViewIcon.image = [UIImage imageNamed:@"ic_number"];
@@ -283,25 +282,19 @@
NSString *url = [NSString stringWithFormat:@"%@sys/v1/wechatlogin",[GiGaServerConfig getMainUrl]];
[GiGaNetManager requestMethod:RequestPostMethod Url:url params:weiXinUserinfo responseBlock:^(NSDictionary *responseDict, NSDictionary *responseHeaderFields, NSError *error) {
[self.view hideToastActivity];
if (!error) {
if ([responseDict[@"code"] integerValue] == 0) {
//[self userloginSussecess:responseDict];
[self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
[self jxt_showAlertWithTitle:@"温馨提示" message:@"请先绑定或注册手机号" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionCancelTitle(@"知道了");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
}];
[self userloginSussecess:responseDict];
}else if([responseDict[@"code"] integerValue] == 500){
//登录流程待定
// [self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
// [self jxt_showAlertWithTitle:@"温馨提示" message:@"请绑定手机号" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
//
// } actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
//
// }];
[self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter];
[self jxt_showAlertWithTitle:@"温馨提示" message:@"请绑定手机号" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
}];
}else{
@@ -313,17 +306,18 @@
GILog(@"上传微信用户信息error:\n%@",error.localizedDescription);
}
}];
}
-(void)userloginSussecess:(NSDictionary *)resDic{
//token
//token 登陆标志
[GiGaUserDefault saveToken:resDic[@"token"]];
//埋点
[MobClick endEvent:MobClick_UserLogin];
//暂定123 登陆标志
[GiGaUserDefault saveUserId:@"123"];
// //暂定123 登陆标志
// [GiGaUserDefault saveUserId:@"123"];
GIGA_WIndowTost(@"登录成功!");
[self dismissViewControllerAnimated:YES completion:nil];