调用接口时,字典参数为空的话,易造成崩溃。
切记少用以下这种方式
NSDictionary *params=@{@"user_id":[UserInfo uid],@"token":[UserInfo token],@"cloud_sn":self.cloud_sn};
参数多的话用以下方式写好,不会造成崩溃。
NSDictionary *userDict = [NSDictionary dictionaryWithObjectsAndKeys:[UserInfo uid],@"user_id",[UserInfo token],@"token",_travelID,@"travel_id",_context,@"context",_travelAddress,@"post_address",_postLongitude,@"post_longitude",_postLatitude,@"post_latitude",_postLabel,@"post_label",_images,@"images", nil];