| | |
| | | |
| | | case 0: |
| | | //没æç½ç» |
| | | if (self.dataSource.count == 0) { |
| | | |
| | | self.anomalyView.hidden = YES; |
| | | self.noNetworkViews.hidden = NO; |
| | | } |
| | | |
| | | break; |
| | | |
| | |
| | | return; |
| | | } |
| | | } |
| | | [SVProgressHUD show]; |
| | | |
| | | [self activityAddShareCountWithID:dic[@"id"]]; |
| | | NSMutableArray *picArray = @[].mutableCopy; |
| | | |
| | | if ([dic[@"type"]integerValue] == 1) { |
| | | |
| | | [self shareGoods:dic[@"id"]]; |
| | | return; |
| | | |
| | | }else{ |
| | | |
| | | if ([dic[@"type"]integerValue] == 3) { |
| | | |
| | | NSArray *arr = dic[@"imageList"]; |
| | | |
| | | if (arr.count > 0) { |
| | | NSData * data = [NSData dataWithContentsOfURL:[NSURL URLWithString:arr[0]]]; |
| | | UIImage *image = [UIImage imageWithData:data]; |
| | | [picArray addObject:image]; |
| | | } |
| | | }else |
| | | { |
| | | |
| | | } else { |
| | | |
| | | [self activityinviteImgWirh:dic[@"id"]]; |
| | | return; |
| | | } |
| | |
| | | @param activityId å享项çID |
| | | */ |
| | | - (void)shareGoods:(NSString *)activityId{ |
| | | |
| | | [SVProgressHUD setContainerView:[UIApplication sharedApplication].delegate.window]; |
| | | [SVProgressHUD show]; |
| | | |
| | | NSMutableDictionary *dic = @{}.mutableCopy; |
| | | [dic setValue:[[NSUserDefaults standardUserDefaults] objectForKey:@"userId"] forKey:@"uid"]; |
| | | [dic setValue:activityId forKey:@"activityId"]; |
| | | NSDictionary *dictionary = [SJNetwork CommonDictionarywithDic:dic]; |
| | | [YTHsharedManger startManger].isMainOrDynamic = YES; |
| | | |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"activity/shareGoods"] param:dictionary isMainOrDynamic:YES success:^(NSDictionary *object) { |
| | | // NSLog(@"%@",object); |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"activity/shareGoods"] |
| | | param:dictionary |
| | | isMainOrDynamic:YES success:^(NSDictionary *object) { |
| | | |
| | | if ([object[@"code"]integerValue] == 0) { |
| | | [SVProgressHUD show]; |
| | | |
| | | |
| | | NSDictionary *dic = object[@"data"]; |
| | | NSString *shareString =[NSString stringWithFormat:@"%@",dic[@"shareTitle"]]; |
| | |
| | | } |
| | | |
| | | }else{ |
| | | [SVProgressHUD dismiss]; |
| | | [SVProgressHUD setContainerView:[UIApplication sharedApplication].delegate.window]; |
| | | [SVProgressHUD showErrorWithStatus:object[@"msg"]]; |
| | | } |
| | | |
| | | } fail:^(id object) { |
| | | [SVProgressHUD dismiss]; |
| | | |
| | | if (((NSError *)object).code == -1009) { |
| | | |
| | | [CustomProgressHUD showNormal:@"ç½ç»æªè¿æ¥ï¼è¯·æ£æµç½ç»è®¾ç½®"]; |
| | | |
| | | } else { |
| | | |
| | | [CustomProgressHUD showNormal:@"ç½ç»è¿æ¥å¼å¸¸ï¼è¯·æ£æµç½ç»è®¾ç½®"]; |
| | | } |
| | | }]; |
| | | } |
| | | |
| | |
| | | |
| | | } fail:^(id object) { |
| | | |
| | | if (((NSError *)object).code == -1009) { |
| | | |
| | | [CustomProgressHUD showNormal:@"ç½ç»æªè¿æ¥ï¼è¯·æ£æµç½ç»è®¾ç½®"]; |
| | | |
| | | } else { |
| | | |
| | | [CustomProgressHUD showNormal:@"ç½ç»è¿æ¥å¼å¸¸ï¼è¯·æ£æµç½ç»è®¾ç½®"]; |
| | | } |
| | | }]; |
| | | } |
| | | |