重庆迈尖科技有限公司
2018-08-13 e5336a0cbb884c5fc30755b5b73f77647121050a
no message
3个文件已修改
167 ■■■■■ 已修改文件
MIduo.xcodeproj/xcuserdata/mj.xcuserdatad/xcschemes/MIduo.xcscheme 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo.xcworkspace/xcuserdata/mj.xcuserdatad/UserInterfaceState.xcuserstate 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/动态/DynamicViewController.m 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo.xcodeproj/xcuserdata/mj.xcuserdatad/xcschemes/MIduo.xcscheme
@@ -23,7 +23,7 @@
      </BuildActionEntries>
   </BuildAction>
   <TestAction
      buildConfiguration = "Release"
      buildConfiguration = "Debug"
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      shouldUseLaunchSchemeArgsEnv = "YES">
MIduo.xcworkspace/xcuserdata/mj.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
MIduo/½çÃæ/¶¯Ì¬/DynamicViewController.m
@@ -89,7 +89,7 @@
#pragma mark - ç½‘络状态发生变化通知方法
-(void)NetWorkStatesChange:(NSNotification *)sender{
    int networkState = [[sender object] intValue];
    switch (networkState) {
        case -1:
@@ -114,21 +114,24 @@
            
        case 0:
            //没有网络
            self.anomalyView.hidden = YES;
            self.noNetworkViews.hidden = NO;
            if (self.dataSource.count == 0) {
                self.anomalyView.hidden = YES;
                self.noNetworkViews.hidden = NO;
            }
            
            break;
            
        case 1: {
            //3G或者4G,反正用的是流量
            
            if (self.dataSource.count == 0 || !self.dataSource) {
                
                [self getRecommendActivity];
            }
             self.anomalyView.hidden = YES;
              self.noNetworkViews.hidden = YES;
            self.anomalyView.hidden = YES;
            self.noNetworkViews.hidden = YES;
            
        }
            break;
@@ -136,14 +139,14 @@
        case 2: {
            //WIFI网络
            
            if (self.dataSource.count == 0 || !self.dataSource) {
                
                [self getRecommendActivity];
            }
             self.anomalyView.hidden = YES;
             self.noNetworkViews.hidden = YES;
            self.anomalyView.hidden = YES;
            self.noNetworkViews.hidden = YES;
            
        }
            break;
@@ -344,30 +347,36 @@
            return;
        }
    }
    [SVProgressHUD show];
    [self activityAddShareCountWithID:dic[@"id"]];
    NSMutableArray *picArray = @[].mutableCopy;
    
    if ([dic[@"type"]integerValue] == 1) {
    if ([dic[@"type"] integerValue] == 1) {
        [self shareGoods:dic[@"id"]];
        return;
    }else{
    } 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;
        }
    }
    NSString *shareString =[NSString stringWithFormat:@"%@",dic[@"title"]];
    NSString *shareString = [NSString stringWithFormat:@"%@",dic[@"title"]];
    UIPasteboard*pasteboard = [UIPasteboard generalPasteboard];
    pasteboard.string=shareString;
    pasteboard.string = shareString;
    [self wxShareWithArray:picArray];
}
@@ -376,61 +385,77 @@
 
 @param activityId åˆ†äº«é¡¹çš„ID
 */
- (void)shareGoods:(NSString *)activityId{
- (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);
        if ([object[@"code"]integerValue] == 0) {
            [SVProgressHUD show];
            NSDictionary *dic = object[@"data"];
            NSString *shareString =[NSString stringWithFormat:@"%@",dic[@"shareTitle"]];
            UIPasteboard*pasteboard = [UIPasteboard generalPasteboard];
            pasteboard.string=shareString;
            NSMutableArray *array = @[].mutableCopy;
            NSArray *arr = dic[@"shareImgs"];
            self.flag = 0;
            for (NSInteger index = 0; index < arr.count; index++) {
                [[SDWebImageManager sharedManager]loadImageWithURL:[NSURL URLWithString:arr[index]]
                                                           options:0
                                                          progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
                                                          } completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
                                                              dispatch_async(dispatch_get_main_queue(), ^{
                                                                  if (image && finished) {
                                                                      self.flag ++;
                                                                      [array addObject:image];
                                                                      if (self.flag == arr.count ) {
                                                                          [self wxShareWithArray:array];
                                                                      }
                                                                  }
                                                              });
                                                          }];
            }
        }else{
            [SVProgressHUD setContainerView:[UIApplication sharedApplication].delegate.window];
            [SVProgressHUD showErrorWithStatus:object[@"msg"]];
        }
    } fail:^(id object) {
        [SVProgressHUD dismiss];
    }];
    [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"activity/shareGoods"]
                 param:dictionary
       isMainOrDynamic:YES success:^(NSDictionary *object) {
           if ([object[@"code"]integerValue] == 0) {
               NSDictionary *dic = object[@"data"];
               NSString *shareString =[NSString stringWithFormat:@"%@",dic[@"shareTitle"]];
               UIPasteboard*pasteboard = [UIPasteboard generalPasteboard];
               pasteboard.string=shareString;
               NSMutableArray *array = @[].mutableCopy;
               NSArray *arr = dic[@"shareImgs"];
               self.flag = 0;
               for (NSInteger index = 0; index < arr.count; index++) {
                   [[SDWebImageManager sharedManager]loadImageWithURL:[NSURL URLWithString:arr[index]]
                                                              options:0
                                                             progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
                                                             } completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
                                                                 dispatch_async(dispatch_get_main_queue(), ^{
                                                                     if (image && finished) {
                                                                         self.flag ++;
                                                                         [array addObject:image];
                                                                         if (self.flag == arr.count ) {
                                                                             [self wxShareWithArray:array];
                                                                         }
                                                                     }
                                                                 });
                                                             }];
               }
           } 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:@"网络连接异常,请检测网络设置"];
           }
       }];
}
/**
@@ -491,6 +516,14 @@
        
    } fail:^(id object) {
        
        if (((NSError *)object).code == -1009) {
            [CustomProgressHUD showNormal:@"网络未连接,请检测网络设置"];
        } else {
            [CustomProgressHUD showNormal:@"网络连接异常,请检测网络设置"];
        }
    }];
}