微信登陆,bug修改
This commit is contained in:
@@ -378,20 +378,42 @@ methodType url : (NSString *)url
|
||||
longitude:(double)longitude
|
||||
latitude:(double)latitude
|
||||
success:(void (^)(id))success
|
||||
failure:(void (^)(NSError *))failure
|
||||
failure:(void (^)(NSError *))failure expara:(NSDictionary *)dic
|
||||
{
|
||||
NSDictionary*para=@{@"version":@"1.0",
|
||||
@"phoneNumber":phoneNumber,
|
||||
@"userPassword":userPassword,
|
||||
@"loginType":phoneType,
|
||||
@"address":address,
|
||||
@"longitude":[NSString stringWithFormat:@"%f",longitude],
|
||||
@"latitude":[NSString stringWithFormat:@"%f",latitude]
|
||||
};
|
||||
NSDictionary*para=@{};
|
||||
NSString*url;
|
||||
RequestMethodType type=RequestMethodTypePost;
|
||||
if (dic[@"code"])//微信登登陆授权
|
||||
{
|
||||
para=@{@"code":dic[@"code"]
|
||||
};
|
||||
url=kUserWechatLoginValidation;
|
||||
//type=RequestMethodTypeGet;
|
||||
}
|
||||
else if (dic[@"unionId"])//微信unionId登陆
|
||||
{
|
||||
para=@{@"unionId":dic[@"unionId"]
|
||||
};
|
||||
url=kUserWechatValidation;
|
||||
}
|
||||
else
|
||||
{
|
||||
para=@{@"version":@"1.0",
|
||||
@"phoneNumber":phoneNumber,
|
||||
@"userPassword":userPassword,
|
||||
@"loginType":phoneType,
|
||||
@"address":address,
|
||||
@"longitude":[NSString stringWithFormat:@"%f",longitude],
|
||||
@"latitude":[NSString stringWithFormat:@"%f",latitude]
|
||||
};
|
||||
url=kUserLoginValidation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//kUserSafeLogin
|
||||
[AFHttpTool requestWihtMethod:RequestMethodTypePost
|
||||
url:kUserLoginValidation
|
||||
[AFHttpTool requestWihtMethod:type
|
||||
url:url
|
||||
params:para
|
||||
success:success
|
||||
failure:failure];
|
||||
|
||||
Reference in New Issue
Block a user