add files

This commit is contained in:
lianxiang
2018-09-14 18:04:02 +08:00
parent fada68d22d
commit 9bba78987b
59 changed files with 974 additions and 116 deletions
@@ -18,6 +18,8 @@
#import "GiGaUser.h"
#import "GiGaServerConfig.h"
#import "GIGAMBHUDHelper.h"
#import "GiGaHelper.h"
#import "GiGaUserManager.h"
@interface GiGaUserLoginVC ()
@property (weak, nonatomic) IBOutlet UIImageView *userImagView;
@@ -154,7 +156,7 @@
#pragma mark 手机号登录
-(void)loginBtnAction:(UIButton *)btn{
if (self.acountTextField.text == nil) {
if (self.acountTextField.text.length == 0) {
GIGA_ShowToast(@"请输入手机号");
return;
}
@@ -163,12 +165,14 @@
return;
}
if (self.passwordTextField.text == nil) {
if (self.passwordTextField.text.length == 0) {
GIGA_ShowToast(@"密码不能为空");
return;
}
if (self.passwordTextField.text.length <= 6) {
GIGA_ShowToast(@"密码长度不能小于六位字符");
BOOL isPass = [GiGaHelper checkPassWord:self.passwordTextField.text];
if (isPass == NO) {
GIGA_ShowToast(@"请输入6-20位数字和字母组成的密码");
return;
}
@@ -312,16 +316,18 @@
//token 登陆标志
[GiGaUserDefault saveToken:resDic[@"token"]];
//埋点
[MobClick endEvent:MobClick_UserLogin];
// //暂定123 登陆标志
// [GiGaUserDefault saveUserId:@"123"];
GIGA_WIndowTost(@"登录成功!");
//请求用户数据
[[GiGaUserManager shareUser] synsisUserInfo:^(GiGaUser *user) {
NSLog(@"%@",user.userId);
}];
NC_POST_NAME_OBJECT(kUserLoginSuccessNoti, nil);
[self dismissViewControllerAnimated:YES completion:nil];
}
//接收注册成功通知
-(void)userRegistSuccsessNoti:(NSNotification *)noti{