AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
[manager POST:URL parameters:dict progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
//设置国标编码
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
//将返回的数据转为国标码
NSString *string = [[NSString alloc] initWithBytes:[responseObject bytes] length:[responseObject length] encoding:enc];
//将转化后的字符串转化为NSData
NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
//将转化后的NSData转化为JSON
id obj = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
UIAlertView *a = [[UIAlertView alloc] initWithTitle:@"提示" message:obj[@"MSG_INF"] delegate:nil cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
[a show];
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSLog(@"2222%@",error);
}];