// // QueryFare.m // tongxin // // Created by ArJun on 2018/8/17. // Copyright © 2018年 xTT. All rights reserved. // #import "QueryFare.h" #import #import "MyHttp.h" #import "User.h" @implementation QueryFare + (NSDictionary *)mj_replacedKeyFromPropertyName { return @{@"timestampStr":@"timestamp"}; } //删除话费流量消息的接口 + (void)delectMessageSuccess:(void (^)(id))success failure:(void (^)(void))failure{ NSString *url = [MyHttp getURL:@"getway/inquire/[imei]" objArr:@[cUser.cDevice]]; [self delectTrackWithMessageIds:nil url:url success:^(id responseObject) { success(responseObject); } failure:^{ failure(); }]; } + (void)delectTrackWithMessageIds:(NSArray*)messageIds url:(NSString*)url success:(void (^)(id responseObject))success failure:(void (^)(void))failure{ NSMutableDictionary *parameter = [NSMutableDictionary dictionary]; [xMyHttp URL:url method:@"DELETE" parameters:parameter success:^(NSURLSessionDataTask *task, id responseObject) { if ([responseObject[@"code"] intValue] == HTTP_SUCCESS) { if(success){ success(responseObject); } }else{ if(failure){ failure(); } } } failure:^(NSURLSessionDataTask *task, NSError *error) { if(failure){ failure(); } }]; } @end