历史流量记录改版

This commit is contained in:
wbzhan
2019-09-11 10:51:36 +08:00
parent b871a24c4e
commit 672e8cf92f
11 changed files with 199 additions and 142 deletions
@@ -270,26 +270,23 @@
btn.backgroundColor = RGB(0, 184, 239);
if ([result isEqualToString:@"100"]) {
// 登录成功
NSDictionary*DataDic=dict[@"data"];
NSString*phoneNumber=self.loginPhoneNumberTextField.text;
NSString*password=self.loginPasswordTextField.text;
[[IfishUserDataUnity shareDataInstance] userloginValidationSuccsess:DataDic phoneNumber:phoneNumber passward:password];
//登陆成功之后,验证当前页面devicetoken是否上送成功,如果还未上送,则重新上送devicetoken
if (![[NSUserDefaults standardUserDefaults] boolForKey:is_Bind_DeviceToken]) {
UserModel *model=[[UserModel alloc] initWithDict:[DataDic objectForKey:@"userInfo"]];
NSDictionary *params = @{@"deviceId":[FuncUserDefault strForKey:kDeviceToken],
//重新登陆成功之后,上送deviceToken到服务器
UserModel *model=[[UserModel alloc] initWithDict:[DataDic objectForKey:@"userInfo"]];
NSDictionary *params = @{@"deviceId":[FuncUserDefault strForKey:kDeviceToken],
@"userId":model.userId,
@"phoneType":@"iOS"
};
[AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:Push_BindDevice_Url params:params success:^(id response) {
[AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:Push_BindDevice_Url params:params success:^(id response) {
//绑定成功
[FuncUserDefault setBool:YES key:is_Bind_DeviceToken];//已经上送了本机的devicetoken
} failure:^(NSError *err) {
}];
}
}];
}else if ([result isEqualToString:@"101"]){
[weakSelf.view makeToast:@"登录失败"];