You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
58 lines
1.6 KiB
1 year ago
|
//
|
||
|
// QueryFare.m
|
||
|
// tongxin
|
||
|
//
|
||
|
// Created by ArJun on 2018/8/17.
|
||
|
// Copyright © 2018年 xTT. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "QueryFare.h"
|
||
|
#import <MJExtension.h>
|
||
|
#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
|