for (int a=0; aformData)
{
//請(qǐng)求的URL是有長(zhǎng)度的限制的,所以將軌跡的json串,通過(guò)AFNetWorking POST請(qǐng)求的形式來(lái)進(jìn)行發(fā)送;
//這里是json串的二進(jìn)制,后面必須對(duì)應(yīng)的是服務(wù)器上面對(duì)應(yīng)的字段,否則傳不上去
[formData appendPartWithFormData:_data name:@"data"];
} success:^(AFHTTPRequestOperation *operation, id responseObject)
{
if (responseObject)
{
//等數(shù)據(jù)加載完成之后,去主界面更改風(fēng)火輪的狀態(tài)
[[NSNotificationCenter defaultCenter] postNotificationName:@"isHiddenHUD" object:nil userInfo:nil];
NSLog(@"上傳狀態(tài)--%@",responseObject[@"message"]);
[IanAlert alertSuccess:responseObject[@"message"] length:2];
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error)
{
//等數(shù)據(jù)加載完成之后,去主界面更改風(fēng)火輪的狀態(tài)
[[NSNotificationCenter defaultCenter] postNotificationName:@"isHiddenHUD" object:nil userInfo:nil];
[IanAlert alertError:[NSString stringWithFormat:@"%@",error] length:2];
NSLog(@"error--%@",error);
}];
}
}