GLD_NetManager.m
957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// GLD_NetManager.m
// YX_BaseProject
//
// Created by yiyangkeji on 2018/3/26.
// Copyright © 2018年 com.yxvzb. All rights reserved.
//
#import "GLD_NetManager.h"
@interface GLD_NetManager ()
@property (nonatomic, strong)GLD_NetworkAPIManager *net_manager;
@end
@implementation GLD_NetManager
+ (GLD_NetManager *)shareNetmanager{
static GLD_NetManager *netManager;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
netManager = [GLD_NetManager new];
netManager.net_manager = [GLD_NetworkAPIManager new];
});
return netManager;
}
+ (void)home_netGet:(NSString *)str complete:(completionHandleBlock)block{
GLD_APIConfiguration *config = [[GLD_APIConfiguration alloc]init];
config.urlPath = @"app/main/getLivingCategory";
config.requestParameters = @{@"":@""};
[[GLD_NetManager shareNetmanager].net_manager dispatchDataTaskWith:config andCompletionHandler:block];
}
@end