| | |
| | | |
| | | |
| | | #import "YTHNetInterface.h" |
| | | |
| | | #define Version [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] //build号 |
| | | #define Package @"com.yeshi.buwanshequ.ios" //相当于包名 |
| | | //定义超时时间 |
| | | #define time 20.0f |
| | | |
| | |
| | | |
| | | [self mangerPostWithURL:url WithMutableDictionary:dic withBlock:block]; |
| | | } |
| | | |
| | | #pragma mark 图文社 |
| | | - (void)postFoundGraphicSocietyRequestDataWith:(NSMutableDictionary *)dic withBlock:(YthNetWorkBlock)block{ |
| | | NSString *url = [NSString stringWithFormat:@"%@/news",domainHTTP]; |
| | |
| | | }]; |
| | | } |
| | | |
| | | - (void)getFoundGuessLike:(NSMutableDictionary *)dic WithBlock:(YthNetWorkBlock)block{ |
| | | NSString *sign; |
| | | sign = [NSString stringWithFormat:@"%@%@%@",@"guessLike",[[UIDevice currentDevice].identifierForVendor UUIDString],@"1"]; |
| | | |
| | | [dic setObject:[NSString md5:sign] forKey:@"Sign"]; |
| | | [dic setObject:@"ios" forKey:@"Platform"]; |
| | | [dic setObject:Version forKey:@"Version"]; |
| | | [dic setObject:Package forKey:@"Package"]; |
| | | [dic setObject:@"1" forKey:@"System"]; |
| | | [dic setObject:[[UIDevice currentDevice].identifierForVendor UUIDString] forKey:@"Device"]; |
| | | [self postFoundHomeRequestDataWith:dic withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | NSDictionary *data = (NSDictionary *)result; |
| | | block(TRUE , data , nil); |
| | | }else{ |
| | | block(FALSE , nil , error); |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | #pragma mark 获得 发现 的应用汇 |
| | | -(void)getFoundHomeApp:(NSString *)uid WithSystem:(NSString *)system WithBlock:(YthNetWorkBlock)block{ |
| | | |