Kaynağa Gözat

的是否福利节点上了飞机餐

曾 伟 5 yıl önce
ebeveyn
işleme
92b8a85638
46 değiştirilmiş dosya ile 1568 ekleme ve 438 silme
  1. BIN
      image.xcassets/my/BG1122.imageset/BG1122@3x.png
  2. 21 0
      image.xcassets/my/BG1122.imageset/Contents.json
  3. 30 12
      shiku_im.xcodeproj/project.pbxproj
  4. 1 1
      shiku_im/3rd/BMChineseStringSort/BMChineseSort.m
  5. 4 1
      shiku_im/AppDelegate.mm
  6. 5 18
      shiku_im/ClassesNew/MainClass/XMGNavigationViewController.m
  7. 12 26
      shiku_im/ClassesNew/MainClass/XMGOpenGLNavVc.m
  8. 17 0
      shiku_im/ClassesNew/MainClass/XMGTabBarVc.h
  9. 93 0
      shiku_im/ClassesNew/MainClass/XMGTabBarVc.m
  10. 20 7
      shiku_im/ClassesNew/classes/homeVc/CYWebAddPointVC.m
  11. 23 4
      shiku_im/ClassesNew/classes/homeVc/JXCsHomeVc.m
  12. 17 0
      shiku_im/ClassesNew/classes/homeVc/JXNodeView.h
  13. 84 0
      shiku_im/ClassesNew/classes/homeVc/JXNodeView.m
  14. 3 3
      shiku_im/ClassesNew/classes/homeVc/UIScrollView+JXUITouch.h
  15. 93 0
      shiku_im/ClassesNew/classes/homeVc/JXOnShakeView.m
  16. 0 41
      shiku_im/ClassesNew/classes/homeVc/UIScrollView+JXUITouch.m
  17. 6 1
      shiku_im/ClassesNew/classes/loginmVc/JXMainLoginVc.m
  18. 2 0
      shiku_im/ClassesNew/classes/messageVc/JXGroupViewController.m
  19. 0 0
      shiku_im/ClassesNew/classes/messageVc/JXHomeScrollView.h
  20. 12 13
      shiku_im/ClassesNew/classes/homeVc/JXHomeScrollView.m
  21. 73 0
      shiku_im/ClassesNew/classes/messageVc/JXMsgViewController.h
  22. 175 135
      shiku_im/ClassesNew/classes/messageVc/JXMsgViewController.m
  23. 19 0
      shiku_im/ClassesNew/classes/messageVc/JXShadeShowView.h
  24. 182 0
      shiku_im/ClassesNew/classes/messageVc/JXShadeShowView.m
  25. 72 10
      shiku_im/ClassesNew/classes/myVc/Vc/JXMyBaseInFovc.m
  26. 30 1
      shiku_im/ClassesNew/classes/myVc/Vc/JXShareMVc.m
  27. 2 8
      shiku_im/ClassesNew/classes/myVc/Vc/JXShareMVc.xib
  28. 12 4
      shiku_im/ClassesNew/classes/myVc/Vc/JXXMGMyVc.m
  29. 10 3
      shiku_im/cell/ChatCell/JXBaseChatCell.m
  30. 3 0
      shiku_im/control/JXSelectImageView.h
  31. 20 1
      shiku_im/control/JXSelectImageView.m
  32. 2 2
      shiku_im/controller/ADView/DYAdAlertView/DYAdAlertView.m
  33. 1 1
      shiku_im/controller/JXChatViewC.mm
  34. 48 0
      shiku_im/controller/JXChatViewController.h
  35. 247 85
      shiku_im/controller/JXChatViewController.mm
  36. 3 3
      shiku_im/controller/JXRelayVC.m
  37. 10 0
      shiku_im/controller/JXRoomMemberVC.h
  38. 120 35
      shiku_im/controller/JXRoomMemberVC.m
  39. 4 0
      shiku_im/model/JXFriendObject.m
  40. 15 0
      shiku_im/model/JXMessageObject.m
  41. 17 12
      shiku_im/model/JXXMPP.m
  42. 4 1
      shiku_im/network/JXServer.h
  43. 32 2
      shiku_im/network/JXServer.m
  44. 10 6
      shiku_im/network/versionManage.m
  45. 1 1
      shiku_im/person/PSRegisterBaseVC.m
  46. 13 1
      shiku_im/shiku_im-Info.plist

BIN
image.xcassets/my/BG1122.imageset/BG1122@3x.png


+ 21 - 0
image.xcassets/my/BG1122.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "BG1122@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 30 - 12
shiku_im.xcodeproj/project.pbxproj

@@ -450,8 +450,11 @@
 		4C50530D24A525B100E839FA /* JXGoldMangerVc.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C50530C24A525B100E839FA /* JXGoldMangerVc.m */; };
 		4C5E8EF424AD88F900CB54C0 /* JXTableMsgChatVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5E8EF324AD88F800CB54C0 /* JXTableMsgChatVC.m */; };
 		4C5E8EF724ADB3F800CB54C0 /* JXQuestionnnnVc.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5E8EF624ADB3F800CB54C0 /* JXQuestionnnnVc.m */; };
-		4C61CFE624B5D3EF0000A2CB /* UIScrollView+JXUITouch.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61CFE524B5D3EF0000A2CB /* UIScrollView+JXUITouch.m */; };
-		4C61CFED24B5D4BF0000A2CB /* JXHomeScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61CFEC24B5D4BF0000A2CB /* JXHomeScrollView.m */; };
+		4C61CFFA24B717210000A2CB /* JXOnShakeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61CFF924B717210000A2CB /* JXOnShakeView.m */; };
+		4C61D05D24B9BE830000A2CB /* XMGTabBarVc.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61D05C24B9BE830000A2CB /* XMGTabBarVc.m */; };
+		4C61D06C24B9D9C90000A2CB /* JXHomeScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61D06B24B9D9C80000A2CB /* JXHomeScrollView.m */; };
+		4C61D06F24B9EE710000A2CB /* JXShadeShowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61D06E24B9EE710000A2CB /* JXShadeShowView.m */; };
+		4C61D09724BA06270000A2CB /* JXNodeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61D09624BA06270000A2CB /* JXNodeView.m */; };
 		4C8C2DA624AAE9D500E7ECAB /* YPTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C8C2D9C24AAE9D200E7ECAB /* YPTabBar.m */; };
 		4C8C2DA724AAE9D500E7ECAB /* YPTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C8C2DA224AAE9D300E7ECAB /* YPTabBarController.m */; };
 		4C8C2DA824AAE9D500E7ECAB /* YPTabItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C8C2DA424AAE9D400E7ECAB /* YPTabItem.m */; };
@@ -2604,10 +2607,16 @@
 		4C5E8EF324AD88F800CB54C0 /* JXTableMsgChatVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JXTableMsgChatVC.m; sourceTree = "<group>"; };
 		4C5E8EF524ADB3F800CB54C0 /* JXQuestionnnnVc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JXQuestionnnnVc.h; sourceTree = "<group>"; };
 		4C5E8EF624ADB3F800CB54C0 /* JXQuestionnnnVc.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JXQuestionnnnVc.m; sourceTree = "<group>"; };
-		4C61CFE424B5D3EF0000A2CB /* UIScrollView+JXUITouch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+JXUITouch.h"; sourceTree = "<group>"; };
-		4C61CFE524B5D3EF0000A2CB /* UIScrollView+JXUITouch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+JXUITouch.m"; sourceTree = "<group>"; };
-		4C61CFEB24B5D4BF0000A2CB /* JXHomeScrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JXHomeScrollView.h; sourceTree = "<group>"; };
-		4C61CFEC24B5D4BF0000A2CB /* JXHomeScrollView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JXHomeScrollView.m; sourceTree = "<group>"; };
+		4C61CFF824B717210000A2CB /* JXOnShakeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JXOnShakeView.h; sourceTree = "<group>"; };
+		4C61CFF924B717210000A2CB /* JXOnShakeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JXOnShakeView.m; sourceTree = "<group>"; };
+		4C61D05B24B9BE830000A2CB /* XMGTabBarVc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XMGTabBarVc.h; sourceTree = "<group>"; };
+		4C61D05C24B9BE830000A2CB /* XMGTabBarVc.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XMGTabBarVc.m; sourceTree = "<group>"; };
+		4C61D06A24B9D9C80000A2CB /* JXHomeScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JXHomeScrollView.h; sourceTree = "<group>"; };
+		4C61D06B24B9D9C80000A2CB /* JXHomeScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JXHomeScrollView.m; sourceTree = "<group>"; };
+		4C61D06D24B9EE710000A2CB /* JXShadeShowView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JXShadeShowView.h; sourceTree = "<group>"; };
+		4C61D06E24B9EE710000A2CB /* JXShadeShowView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JXShadeShowView.m; sourceTree = "<group>"; };
+		4C61D09524BA06270000A2CB /* JXNodeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JXNodeView.h; sourceTree = "<group>"; };
+		4C61D09624BA06270000A2CB /* JXNodeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JXNodeView.m; sourceTree = "<group>"; };
 		4C8C2D9C24AAE9D200E7ECAB /* YPTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YPTabBar.m; sourceTree = "<group>"; };
 		4C8C2DA124AAE9D200E7ECAB /* YPTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YPTabBar.h; sourceTree = "<group>"; };
 		4C8C2DA224AAE9D300E7ECAB /* YPTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YPTabBarController.m; sourceTree = "<group>"; };
@@ -6934,6 +6943,8 @@
 				9D30110224925AF700488477 /* JXShowMainView.h */,
 				9D30110324925AF700488477 /* JXShowMainView.m */,
 				9D30110524925B3200488477 /* JXShowMainView.xib */,
+				4C61D05B24B9BE830000A2CB /* XMGTabBarVc.h */,
+				4C61D05C24B9BE830000A2CB /* XMGTabBarVc.m */,
 			);
 			path = MainClass;
 			sourceTree = "<group>";
@@ -6959,16 +6970,16 @@
 				9D52CB71245A832B00009803 /* JXMessageTableVc.m */,
 				9D4C2DC92469589A00A6A4F8 /* JXCsHomeVc.h */,
 				9D4C2DC82469589A00A6A4F8 /* JXCsHomeVc.m */,
-				4C61CFE424B5D3EF0000A2CB /* UIScrollView+JXUITouch.h */,
-				4C61CFE524B5D3EF0000A2CB /* UIScrollView+JXUITouch.m */,
-				4C61CFEB24B5D4BF0000A2CB /* JXHomeScrollView.h */,
-				4C61CFEC24B5D4BF0000A2CB /* JXHomeScrollView.m */,
 				B18B72A22418BA2D00FA2BCE /* CYWebAddPointVC.h */,
 				B18B72A32418BA2D00FA2BCE /* CYWebAddPointVC.m */,
 				B1C883C724A66835000BC2B4 /* CYWebViewProgressView.h */,
 				B1C883CC24A66835000BC2B4 /* CYWebViewProgressView.m */,
 				9DA9C5CD246C13B500A62C56 /* XMGTitleButton.h */,
 				9DA9C5CC246C13B500A62C56 /* XMGTitleButton.m */,
+				4C61CFF824B717210000A2CB /* JXOnShakeView.h */,
+				4C61CFF924B717210000A2CB /* JXOnShakeView.m */,
+				4C61D09524BA06270000A2CB /* JXNodeView.h */,
+				4C61D09624BA06270000A2CB /* JXNodeView.m */,
 			);
 			path = homeVc;
 			sourceTree = "<group>";
@@ -6990,6 +7001,10 @@
 				CC6E164A19794906006ADA8A /* JXMainViewController.m */,
 				CC6E164B19794906006ADA8A /* JXMsgViewController.h */,
 				CC6E164C19794906006ADA8A /* JXMsgViewController.m */,
+				4C61D06D24B9EE710000A2CB /* JXShadeShowView.h */,
+				4C61D06E24B9EE710000A2CB /* JXShadeShowView.m */,
+				4C61D06A24B9D9C80000A2CB /* JXHomeScrollView.h */,
+				4C61D06B24B9D9C80000A2CB /* JXHomeScrollView.m */,
 				9D1C52B12491581400B1030D /* JXMsgCellView.h */,
 				9D1C52B22491581400B1030D /* JXMsgCellView.m */,
 				9D1C52B42491583E00B1030D /* JXMsgCellView.xib */,
@@ -10505,6 +10520,7 @@
 				63DD4F5121314DB800DC45F8 /* RITLFileDownloader.m in Sources */,
 				0F8672F1228D5E8100FBDC25 /* JXSkPayVC.m in Sources */,
 				B132136924334A8500E5BED0 /* SDImageCache.m in Sources */,
+				4C61D09724BA06270000A2CB /* JXNodeView.m in Sources */,
 				B12B381C2442CEA1007DDD47 /* JLMyBonusModel.m in Sources */,
 				0FA2D6B51FB05CCD00D51BB9 /* GPUImageZoomBlurFilter.m in Sources */,
 				0FA2D58D1FB05CCC00D51BB9 /* GPUImageBoxBlurFilter.m in Sources */,
@@ -10524,6 +10540,7 @@
 				0F1169EC22B8E3A00030EFBA /* JXTalkCell.m in Sources */,
 				63F4E44521C0AE7800C61204 /* KKImageEditorTheme.m in Sources */,
 				B1DE1791241F51E00081AE8A /* MJPropertyKey.m in Sources */,
+				4C61D05D24B9BE830000A2CB /* XMGTabBarVc.m in Sources */,
 				CCFD208919592D1D00B98494 /* freeverb.c in Sources */,
 				63C624A91EC008FD00CE3216 /* UIView+ScreenShot.m in Sources */,
 				9D517533246EA5C100F96091 /* JXMyTopView.m in Sources */,
@@ -10734,6 +10751,7 @@
 				B132136124334A8500E5BED0 /* SDWebImageManager.m in Sources */,
 				4CA5BF4D24A34E61001003F6 /* JXGoldShowView.m in Sources */,
 				63DD4F2D21314DB800DC45F8 /* MASViewConstraint.m in Sources */,
+				4C61D06C24B9D9C90000A2CB /* JXHomeScrollView.m in Sources */,
 				63F4E44321C0AE7800C61204 /* KKTextView.m in Sources */,
 				0FA2D6A71FB05CCD00D51BB9 /* GPUImageUnsharpMaskFilter.m in Sources */,
 				0FA2D5E91FB05CCC00D51BB9 /* GPUImageHazeFilter.m in Sources */,
@@ -11128,7 +11146,6 @@
 				CC6E168719794906006ADA8A /* JXRoomPool.m in Sources */,
 				63DD4F4F21314DB800DC45F8 /* LLSegmentBar.m in Sources */,
 				0FA2D5B11FB05CCC00D51BB9 /* GPUImageCrosshatchFilter.m in Sources */,
-				4C61CFE624B5D3EF0000A2CB /* UIScrollView+JXUITouch.m in Sources */,
 				8819A02923220BD70081FA49 /* JXSearchRecordCell.m in Sources */,
 				B1DE175E241F4F620081AE8A /* JLSingleFaceViewController.m in Sources */,
 				0FA2D6591FB05CCD00D51BB9 /* GPUImageRGBClosingFilter.m in Sources */,
@@ -11258,7 +11275,6 @@
 				9D52CC38245AB51B00009803 /* JXGiftViewController.m in Sources */,
 				9D6DD7F52488D55A00BE033D /* JXVipDetailBottomView.m in Sources */,
 				CCC88BA51E4C526F00180080 /* SBJsonTokeniser.m in Sources */,
-				4C61CFED24B5D4BF0000A2CB /* JXHomeScrollView.m in Sources */,
 				0FA2D5D91FB05CCC00D51BB9 /* GPUImageGaussianBlurFilter.m in Sources */,
 				0FA2D57D1FB05CCC00D51BB9 /* GPUImage3x3TextureSamplingFilter.m in Sources */,
 				63E76FAF229D37B900C269BE /* JXReplyAideKeyManageVC.m in Sources */,
@@ -11400,6 +11416,7 @@
 				63DD4F4821314DB800DC45F8 /* RITLSearchView.m in Sources */,
 				0FA2D66F1FB05CCD00D51BB9 /* GPUImageSingleComponentGaussianBlurFilter.m in Sources */,
 				CC8FCA6A1E4B01CE0058686C /* JXredPacketDetailVC.m in Sources */,
+				4C61D06F24B9EE710000A2CB /* JXShadeShowView.m in Sources */,
 				0F6D75661FDA404D003CD7A2 /* JXSetChatBackgroundVC.m in Sources */,
 				63DD4F4E21314DB800DC45F8 /* LLSegmentBarConfig.m in Sources */,
 				0FA2D6891FB05CCD00D51BB9 /* GPUImageTextureInput.m in Sources */,
@@ -11503,6 +11520,7 @@
 				638A6F2C1FA3372F00D6D17C /* JXMyMoneyViewController.m in Sources */,
 				CC6E169F19794B5A006ADA8A /* QBImagePickerAssetCell.m in Sources */,
 				63AFEAA221CA6C050022A1CB /* JXLikeListViewController.m in Sources */,
+				4C61CFFA24B717210000A2CB /* JXOnShakeView.m in Sources */,
 				B1405ECC24A6248700A1E579 /* NSMutableString+AvoidCrash.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 1 - 1
shiku_im/3rd/BMChineseStringSort/BMChineseSort.m

@@ -158,7 +158,7 @@ dispatch_semaphore_t semaphore;
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
         //将数据 转换为 BMChineseSortModel
         NSMutableArray *sortModelArray = [NSMutableArray arrayWithCapacity:0];
-        [objectArray enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+            [objectArray enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
             BMChineseSortModel *model = [self getModelWithObj:obj key:key];
             if (model) {
                 //对 数组的插入操作 上锁

+ 4 - 1
shiku_im/AppDelegate.mm

@@ -134,7 +134,7 @@ static  BMKMapManager* _baiduMapManager;
 #if TAR_IM
 #ifdef Meeting_Version
     jxMeeting = [[JXMeetingObject alloc] init];
-    [self startVoIPPush];
+    //[self startVoIPPush];
 #endif
 #endif
     
@@ -1273,6 +1273,9 @@ static  BMKMapManager* _baiduMapManager;
 }
 
 -(void)endCall{
+//    [jxMeeting stopMeeting];
+//    [jxMeeting clearMemory];
+//    return;
     if (_uuid) {
         NSLog(@"callkit - endcall");
 //        self.isShowCall = NO;

+ 5 - 18
shiku_im/ClassesNew/MainClass/XMGNavigationViewController.m

@@ -8,7 +8,7 @@
 
 #import "XMGNavigationViewController.h"
 
-@interface XMGNavigationViewController ()
+@interface XMGNavigationViewController () 
 
 @end
 
@@ -24,16 +24,10 @@
     [bar setTitleTextAttributes:@{NSFontAttributeName : [UIFont boldSystemFontOfSize:20]}];
     
 }
-- (void)viewDidLoad{
-    [super viewDidLoad];
-    
-    self.interactivePopGestureRecognizer.delegate= (id)self;
-}
+ 
 - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
 {
-    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
-                 self.interactivePopGestureRecognizer.enabled = NO;
-      }
+  
     if (self.childViewControllers.count) {
         viewController.hidesBottomBarWhenPushed = YES;
       
@@ -60,13 +54,6 @@
 }
  
 
-- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
-    if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
-        navigationController.interactivePopGestureRecognizer.enabled = YES;
-    }
-    
-    if (navigationController.viewControllers.count == 1) {
-        navigationController.interactivePopGestureRecognizer.enabled = NO;
-    }
-}
+ 
+ 
 @end

+ 12 - 26
shiku_im/ClassesNew/MainClass/XMGOpenGLNavVc.m

@@ -8,7 +8,7 @@
 
 #import "XMGOpenGLNavVc.h"
 
-@interface XMGOpenGLNavVc ()<UINavigationControllerDelegate>
+@interface XMGOpenGLNavVc ()
 
 @end
 
@@ -34,15 +34,15 @@
     
     
 }
-/*
--(void)viewDidLoad{
-    [super viewDidLoad];
-    
-    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
-                           self.interactivePopGestureRecognizer.enabled = NO;
-                }
-}
- */
+
+//-(void)viewDidLoad{
+//    [super viewDidLoad];
+//     
+//    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
+//                           self.interactivePopGestureRecognizer.enabled = NO;
+//                }
+//}
+
 - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
     {
        
@@ -80,20 +80,6 @@
     [self popViewControllerAnimated:YES];
 }
 
-
-- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
-    if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
-        navigationController.interactivePopGestureRecognizer.enabled = YES;
-    }
-    
-    if (navigationController.viewControllers.count == 1) {
-        navigationController.interactivePopGestureRecognizer.enabled = NO;
-    }
-}
-
-//- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
-//{
-//    // 手势何时有效 : 当导航控制器的子控制器个数 > 1就有效
-//    return self.childViewControllers.count > 1;
-//}
+ 
+ 
 @end

+ 17 - 0
shiku_im/ClassesNew/MainClass/XMGTabBarVc.h

@@ -0,0 +1,17 @@
+//
+//  XMGTabBarVc.h
+//  shiku_im
+//
+//  Created by os on 2020/7/11.
+//  Copyright © 2020 Reese. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface XMGTabBarVc : UITableViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 93 - 0
shiku_im/ClassesNew/MainClass/XMGTabBarVc.m

@@ -0,0 +1,93 @@
+//
+//  XMGTabBarVc.m
+//  shiku_im
+//
+//  Created by os on 2020/7/11.
+//  Copyright © 2020 Reese. All rights reserved.
+//
+
+#import "XMGTabBarVc.h"
+
+@interface XMGTabBarVc ()
+
+@end
+
+@implementation XMGTabBarVc
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    // Uncomment the following line to preserve selection between presentations.
+    // self.clearsSelectionOnViewWillAppear = NO;
+    
+    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
+    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
+}
+
+#pragma mark - Table view data source
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+#warning Incomplete implementation, return the number of sections
+    return 0;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+#warning Incomplete implementation, return the number of rows
+    return 0;
+}
+
+/*
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
+    
+    // Configure the cell...
+    
+    return cell;
+}
+*/
+
+/*
+// Override to support conditional editing of the table view.
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+    // Return NO if you do not want the specified item to be editable.
+    return YES;
+}
+*/
+
+/*
+// Override to support editing the table view.
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (editingStyle == UITableViewCellEditingStyleDelete) {
+        // Delete the row from the data source
+        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
+    } else if (editingStyle == UITableViewCellEditingStyleInsert) {
+        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
+    }   
+}
+*/
+
+/*
+// Override to support rearranging the table view.
+- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
+}
+*/
+
+/*
+// Override to support conditional rearranging of the table view.
+- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
+    // Return NO if you do not want the item to be re-orderable.
+    return YES;
+}
+*/
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 20 - 7
shiku_im/ClassesNew/classes/homeVc/CYWebAddPointVC.m

@@ -11,10 +11,11 @@
 #import "UIView+LK.h"
 #import "JXShowMainView.h"
 #import "CYWebViewProgressView.h"
+#import "JXNodeView.h"
 
 @interface CYWebAddPointVC ()<WKUIDelegate,WKNavigationDelegate,JXRoomObjectDelegate>
 @property (nonatomic,strong)WKWebView *wkWebView;
-   
+@property (nonatomic,weak)  JXNodeView *show;
 @end
 
 @implementation CYWebAddPointVC
@@ -58,6 +59,8 @@
     [g_notify addObserver:self selector:@selector(rightButtonClick) name:KGoRefreshWebPageNotification object:nil];
     [g_notify addObserver:self selector:@selector(leftButtonClick) name:KGoHomeWebPageNotification object:nil];
        //以下代码适配大小
+      
+    
     NSString *jScript = @"var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width'); document.getElementsByTagName('head')[0].appendChild(meta);";
     
     WKUserScript *wkUScript = [[WKUserScript alloc] initWithSource:jScript injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
@@ -128,13 +131,23 @@
     return hide_error;
 }
  
-
+//刷新
 - (void)rightButtonClick {
-    dispatch_async(dispatch_get_main_queue(), ^{
-
-        [self.wkWebView reload];
-        
-    });
+     
+     JXNodeView *show=[[JXNodeView alloc]init];
+    show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.7];
+      show.frame=[UIScreen mainScreen].bounds;
+      [[UIApplication sharedApplication].keyWindow addSubview:show];
+    __weak typeof(show) weakSelf=show;
+    
+      show.blockNode = ^(NSDictionary * _Nonnull dict) {
+          [g_notify postNotificationName:@"changeNodeTitleNotifaction" object:dict[@"name"]];
+          [self.wkWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:dict[@"url"]]]];
+          
+          [self.wkWebView reload];
+          
+          [weakSelf removeFromSuperview];
+      };
 }
 
 - (void)leftButtonClick {

+ 23 - 4
shiku_im/ClassesNew/classes/homeVc/JXCsHomeVc.m

@@ -12,7 +12,6 @@
 #import "XMGMainViewController.h"
 #import "JXShowMainView.h"
 #import "YPTabBarController.h"
-#import "JXHomeScrollView.h"
 
 @interface JXCsHomeVc ()<UIScrollViewDelegate>
 
@@ -75,6 +74,8 @@
     
    // [self.topButton addTarget:self action:@selector(topBtnClick) forControlEvents:UIControlEventTouchUpInside];
     [g_notify addObserver:self selector:@selector(showAD) name:kLaunchAdShowFinishNotifaction object:nil];
+    [g_notify addObserver:self selector:@selector(changeNodeTitle:) name:@"changeNodeTitleNotifaction" object:nil];
+    
 
 //    self.contentView.delaysContentTouches=NO;
 //    self.contentView.canCancelContentTouches=NO;
@@ -92,7 +93,7 @@
  
 - (void)setupContentView
 {
-    JXHomeScrollView *contentView = [[JXHomeScrollView alloc] init];
+    UIScrollView *contentView = [[UIScrollView alloc] init];
     contentView.backgroundColor = kRGBColor(250, 250, 250);
     contentView.frame = CGRectMake(0, JX_SCREEN_TOP, self.view.bounds.size.width, self.view.bounds.size.height-JX_SCREEN_TOP);
     contentView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
@@ -205,19 +206,26 @@
     backView.backgroundColor = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
     backView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
     backView.frame = CGRectMake(0, 0, self.view.frame.size.width, JX_SCREEN_TOP);
+    backView.userInteractionEnabled=YES;
     [self.view addSubview:backView];
     
     UIButton *homeButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
-    homeButton.frame =CGRectMake(10, JX_STATUSBAR_H+5, 20, 20);
+    homeButton.frame =CGRectMake(10, JX_STATUSBAR_H, 30, 30);
     [homeButton setImage:[UIImage imageNamed:@"home_home"] forState:(UIControlStateNormal)];
     [backView addSubview:homeButton];
     [homeButton addTarget:self action:@selector(goHomeWebPage) forControlEvents:(UIControlEventTouchUpInside)];
     _homeButton = homeButton;
     
     UIButton *refreshButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
-    refreshButton.frame =CGRectMake(JX_SCREEN_WIDTH-20-10, JX_STATUSBAR_H+5, 20, 20);
+    refreshButton.frame =CGRectMake(JX_SCREEN_WIDTH-100, JX_STATUSBAR_H, 90, 30);
     [refreshButton setImage:[UIImage imageNamed:@"home_refresh"] forState:(UIControlStateNormal)];
+    [refreshButton setTitleColor:[UIColor blueColor] forState:(UIControlStateNormal)];
+    refreshButton.contentMode=UIViewContentModeScaleAspectFit;
+    [refreshButton setTitle:@" 节点1 " forState:(UIControlStateNormal)];
     [backView addSubview:refreshButton];
+    //[refreshButton setTitleEdgeInsets:UIEdgeInsetsMake(0, 60, 0, 0)];
+    //[refreshButton setImageEdgeInsets:UIEdgeInsetsMake(0, 50, 0, 0)];
+    //[refreshButton setTitleEdgeInsets:UIEdgeInsetsMake(0, 0,0,60)];
     [refreshButton addTarget:self action:@selector(goRefreshWebPage) forControlEvents:(UIControlEventTouchUpInside)];
     _refreshButton = refreshButton;
     
@@ -269,6 +277,17 @@
     
 }
 
+- (void)changeNodeTitle:(NSNotification *)note{
+    
+    NSString  *nodeStr=note.object;
+
+     _refreshButton.frame =CGRectMake(JX_SCREEN_WIDTH-100, JX_STATUSBAR_H, 90, 30);
+    [_refreshButton setImage:[UIImage imageNamed:@"home_refresh"] forState:(UIControlStateNormal)];
+    _refreshButton.contentMode=UIViewContentModeScaleAspectFit;
+    [_refreshButton setTitle:[NSString stringWithFormat:@" %@ ",nodeStr] forState:(UIControlStateNormal)];
+    
+}
+
 - (XMGTitleButton *)setupTitleButton:(NSString *)title
 {
     XMGTitleButton *button = [XMGTitleButton buttonWithType:UIButtonTypeCustom];

+ 17 - 0
shiku_im/ClassesNew/classes/homeVc/JXNodeView.h

@@ -0,0 +1,17 @@
+//
+//  JXNodeView.h
+//  shiku_im
+//
+//  Created by os on 2020/7/11.
+//  Copyright © 2020 Reese. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+typedef void(^NodeRefushUrlBlcok)(NSDictionary *dictStr);
+@interface JXNodeView : UIView
+@property (nonatomic,copy) NodeRefushUrlBlcok blockNode;
+@end
+
+NS_ASSUME_NONNULL_END

+ 84 - 0
shiku_im/ClassesNew/classes/homeVc/JXNodeView.m

@@ -0,0 +1,84 @@
+//
+//  JXNodeView.m
+//  shiku_im
+//
+//  Created by os on 2020/7/11.
+//  Copyright © 2020 Reese. All rights reserved.
+//
+
+#import "JXNodeView.h"
+
+@interface JXNodeView()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic,weak) UITableView *tableView;
+@property (nonatomic,strong) NSMutableArray *dataArr;
+@end
+@implementation JXNodeView
+ 
+
+-(instancetype)initWithFrame:(CGRect)frame{
+    if (self=[super initWithFrame:frame]) {
+        _dataArr=[NSMutableArray arrayWithCapacity:0];
+        UIView *backView=[[UIView alloc]init];
+        backView.backgroundColor=[UIColor whiteColor];
+        [self addSubview:backView];
+        [backView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.mas_equalTo(JX_SCREEN_TOP+10);
+            make.right.mas_equalTo(-44);
+            make.width.mas_equalTo(100);
+            make.height.mas_equalTo(160);
+        }];
+        
+
+       NSArray *urlArray=[[NSUserDefaults standardUserDefaults] objectForKey:@"www_Array"];
+
+      [_dataArr addObjectsFromArray:urlArray];
+    
+        
+        
+        UITableView *tableView=[[UITableView alloc]init];
+        tableView.backgroundColor=[UIColor colorWithWhite:1.0 alpha:1.0];
+        tableView.delegate=self;
+        tableView.dataSource=self;
+        [backView addSubview:tableView];
+        [tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.mas_equalTo(0);
+            make.right.mas_equalTo(0);
+            make.left.mas_equalTo(0);
+            make.bottom.mas_equalTo(0);
+        }];
+        
+    }
+    
+    return self;
+}
+
+-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    
+    return _dataArr.count;
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    static NSString *ID = @"JXnxxMyCell";
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
+    
+    if (!cell) {
+        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
+        cell.selectionStyle=UITableViewCellSelectionStyleNone;
+    }
+    NSDictionary *nodeDict=_dataArr[indexPath.row];
+    cell.textLabel.text=nodeDict[@"name"];
+    return cell;
+}
+-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    return 39;
+}
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    NSDictionary *nodeDict=_dataArr[indexPath.row];
+    
+    if (_blockNode) {
+        _blockNode(nodeDict);
+    }
+}
+@end

+ 3 - 3
shiku_im/ClassesNew/classes/homeVc/UIScrollView+JXUITouch.h

@@ -1,8 +1,8 @@
 //
-//  UIScrollView+JXUITouch.h
+//  JXOnShakeView.h
 //  shiku_im
 //
-//  Created by os on 2020/7/8.
+//  Created by os on 2020/7/9.
 //  Copyright © 2020 Reese. All rights reserved.
 //
 
@@ -10,7 +10,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface UIScrollView (JXUITouch)
+@interface JXOnShakeView : UIView
 
 @end
 

+ 93 - 0
shiku_im/ClassesNew/classes/homeVc/JXOnShakeView.m

@@ -0,0 +1,93 @@
+//
+//  JXOnShakeView.m
+//  shiku_im
+//
+//  Created by os on 2020/7/9.
+//  Copyright © 2020 Reese. All rights reserved.
+//
+
+#import "JXOnShakeView.h"
+ 
+@interface JXOnShakeView()<UITextViewDelegate>
+@property (nonatomic,weak)UILabel *timeStr;
+
+@property (nonatomic,weak) JXOnShakeView *show;
+@end
+@implementation JXOnShakeView
+
+ 
+-(instancetype)initWithFrame:(CGRect)frame{
+    
+    if (self=[super initWithFrame:frame]) {
+        
+        UIView *backView=[[UIView alloc]init];
+        backView.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.3];
+        [self addSubview:backView];
+        [backView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.mas_equalTo(0);
+            make.left.and.right.mas_equalTo(0);
+            make.bottom.mas_equalTo(0);
+        }];
+        
+        UIImageView *whiteShowView=[[UIImageView alloc]init];
+        whiteShowView.image=[UIImage imageNamed:@"zyjMoneyB"];
+        whiteShowView.userInteractionEnabled=YES;
+        [backView addSubview:whiteShowView];
+        [whiteShowView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.centerX.mas_equalTo(backView.mas_centerX);
+            make.centerY.mas_equalTo(backView.mas_centerY);
+            //make.left.mas_equalTo(20);
+            //make.right.mas_equalTo(-20);
+        }];
+        
+        //fenshaTitle_jinguanjia  fenshaTitle
+        UIImageView *titleIMG=[[UIImageView alloc]init];
+        titleIMG.image=[UIImage imageNamed:@"fenshaTitle_jinguanjia"];
+        titleIMG.userInteractionEnabled=YES;
+        [whiteShowView addSubview:titleIMG];
+        [titleIMG mas_makeConstraints:^(MASConstraintMaker *make) {
+            //make.top.mas_equalTo(whiteShowView.mas_top).mas_offset(15);
+            make.bottom.mas_equalTo(-47);
+            make.centerX.mas_equalTo(whiteShowView.mas_centerX);
+        }];
+        
+            
+        UIButton *tongYiBtn=[[UIButton alloc]init];
+        tongYiBtn.titleLabel.font=[UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
+        [tongYiBtn setImage:[UIImage imageNamed:@"zyjShare"] forState:UIControlStateNormal];
+        tongYiBtn.layer.cornerRadius=6;
+        tongYiBtn.layer.masksToBounds=YES;
+        [whiteShowView addSubview:tongYiBtn];
+        [tongYiBtn addTarget:self action:@selector(tongyiBtn:) forControlEvents:UIControlEventTouchUpInside];
+        [tongYiBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.bottom.mas_equalTo(-3);
+            make.centerX.mas_equalTo(whiteShowView.mas_centerX);
+        }];
+        
+        
+    }
+    
+    return self;
+}
+
+
++(void)showView{
+    JXOnShakeView *show=[[JXOnShakeView alloc]init];
+    show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.7];
+    show.frame=[UIScreen mainScreen].bounds;
+    [[UIApplication sharedApplication].keyWindow addSubview:show];
+   
+    
+}
+ 
+-(void)dissmisView{
+ 
+    [self removeFromSuperview];
+    
+}
+- (void)tongyiBtn:(UIButton *)sender{
+    
+    [g_notify postNotificationName:@"comeBack" object:nil];
+    [self removeFromSuperview];
+}
+@end

+ 0 - 41
shiku_im/ClassesNew/classes/homeVc/UIScrollView+JXUITouch.m

@@ -1,41 +0,0 @@
-//
-//  UIScrollView+JXUITouch.m
-//  shiku_im
-//
-//  Created by os on 2020/7/8.
-//  Copyright © 2020 Reese. All rights reserved.
-//
-
-#import "UIScrollView+JXUITouch.h"
-
-@implementation UIScrollView (JXUITouch)
- 
-
-- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
-
-    [[self nextResponder] touchesBegan:touches withEvent:event];
-
-    //[super touchesBegan:touches withEvent:event];
-
-}
-
- 
-
--(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
-
-    [[self nextResponder] touchesMoved:touches withEvent:event];
-
-    //[super touchesMoved:touches withEvent:event];
-
-}
-
- 
-
-- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
-
-    [[self nextResponder] touchesEnded:touches withEvent:event];
-
-    //[super touchesEnded:touches withEvent:event];
-
-}
-@end

+ 6 - 1
shiku_im/ClassesNew/classes/loginmVc/JXMainLoginVc.m

@@ -769,8 +769,13 @@
        //更新本地好友
      if ([aDownload.action isEqualToString:act_Getconfigconcatdomainnow]) {
 
-             NSString *memberAcc= dict[@"url"];
+         NSDictionary *dictMM=[array1 firstObject];
+         NSString *memberAcc= dictMM[@"url"];
              
+
+         [[NSUserDefaults standardUserDefaults] setObject:array1 forKey:@"www_Array"];
+         [[NSUserDefaults standardUserDefaults] synchronize];
+         
              [[NSUserDefaults standardUserDefaults] setObject:memberAcc forKey:@"www_url"];
              [[NSUserDefaults standardUserDefaults] synchronize];
          

+ 2 - 0
shiku_im/ClassesNew/classes/messageVc/JXGroupViewController.m

@@ -844,6 +844,8 @@
         [g_navigation pushViewController:vc animated:YES];
     }
     if( [aDownload.action isEqualToString:act_roomMemberSet] ){
+        
+        
     }
 }
 

shiku_im/ClassesNew/classes/homeVc/JXHomeScrollView.h → shiku_im/ClassesNew/classes/messageVc/JXHomeScrollView.h


+ 12 - 13
shiku_im/ClassesNew/classes/homeVc/JXHomeScrollView.m

@@ -6,8 +6,7 @@
 //  Copyright © 2020 Reese. All rights reserved.
 //
 
-#import "JXHomeScrollView.h"
-#import "UIScrollView+JXUITouch.h"
+#import "JXHomeScrollView.h" 
 
 
 @implementation JXHomeScrollView
@@ -33,15 +32,15 @@
     
 }
 
-- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view
-{
-    NSLog(@"用户点击了scroll上的视图%@,是否开始滚动scroll",view);
-    //返回yes 是不滚动 scroll 返回no 是滚动scroll
-    return YES;
-}
-- (BOOL)touchesShouldCancelInContentView:(UIView *)view
-{
-    NSLog(@"用户点击的视图 %@",view);
-    return NO;
-}
+//- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view
+//{
+//    NSLog(@"用户点击了scroll上的视图%@,是否开始滚动scroll",view);
+//    //返回yes 是不滚动 scroll 返回no 是滚动scroll
+//    return YES;
+//}
+//- (BOOL)touchesShouldCancelInContentView:(UIView *)view
+//{
+//    NSLog(@"用户点击的视图 %@",view);
+//    return NO;
+//}
 @end

+ 73 - 0
shiku_im/ClassesNew/classes/messageVc/JXMsgViewController.h

@@ -44,3 +44,76 @@
 @property (nonatomic,strong)  AVAudioPlayer  *player;
 @end
  
+/*
+   if( [aDownload.action isEqualToString:act_getGroupOneType] ){
+       _indexNums++;
+       [_tempGoundArr addObject:dict];
+       
+       if (_reciveNewMessage2222==100) {
+
+            _dataArrOneOne=_tempGoundArr;
+
+           [[NSUserDefaults standardUserDefaults] setObject:_indexGoundArr forKey:@"groundType"];
+            [[NSUserDefaults standardUserDefaults] synchronize];
+           
+           [_table reloadData];
+       }else{
+           
+           if (_indexNums==_array.count) {
+               _indexGoundArr=_tempGoundArr;
+               
+               [[NSUserDefaults standardUserDefaults] setObject:_indexGoundArr forKey:@"groundType"];
+               [[NSUserDefaults standardUserDefaults] synchronize];
+               
+               [_table reloadData];
+               return;
+           }else{
+               [_indexGoundArr removeAllObjects];
+           }
+       }
+
+       
+        //[_tempGoundArr removeAllObjects];
+       
+      
+         
+         JXCell* cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:_reciveScrollViewIndex inSection:0]];
+         
+         if (dict[@"data"]==nil) {
+
+              cell.chujiIMG.image=[UIImage imageNamed:dict[@"typeName"]];
+         }else{
+
+            // cell.chujiIMG.image=[UIImage imageNamed:@""];
+         }
+       [_array enumerateObjectsUsingBlock:^(JXMsgAndUserObject  *_Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+
+           JXCell* cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:idx inSection:1]];
+           
+           if (dict[@"data"]==nil) {
+
+                cell.chujiIMG.image=[UIImage imageNamed:@""];
+           }else{
+               
+               if ([dict[@"data"][@"typeName"] isEqualToString:@"普通群"]) {
+                   cell.chujiIMG.image=[UIImage imageNamed:@"msgChuji"];
+               }if ([dict[@"data"][@"typeName"] isEqualToString:@"msgzhongji"]) {
+                   cell.chujiIMG.image=[UIImage imageNamed:@"msgChuji"];
+                    
+               }if ([dict[@"data"][@"typeName"] isEqualToString:@"高级群"]) {
+                   cell.chujiIMG.image=[UIImage imageNamed:@"msgGaoji"];
+                    
+               }if ([dict[@"data"][@"typeName"] isEqualToString:@"特级群"]) {
+                   cell.chujiIMG.image=[UIImage imageNamed:@"msgTeji"];
+                    
+               }
+               
+           }
+           if ([obj.message.fromUserId isEqualToString:@""]) {
+                
+           }
+           
+       }];
+          
+   }
+   */

+ 175 - 135
shiku_im/ClassesNew/classes/messageVc/JXMsgViewController.m

@@ -66,6 +66,8 @@
 #import "chatListModel.h"
 #import "YPTabBarController.h"
 
+#import "JXShadeShowView.h"
+
 @interface JXMsgViewController ()<UIAlertViewDelegate, UITextFieldDelegate,JXSelectMenuViewDelegate,UITextViewDelegate,JXRoomObjectDelegate,UIViewControllerPreviewingDelegate>
  @property (nonatomic,weak) JXMsgCellView *cellView;
 @property (nonatomic, strong) UITextField *seekTextField;
@@ -201,7 +203,7 @@
              _table.frame=CGRectMake(0, 70, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-70);
         }else if (JX_SCREEN_WIDTH>=414 && JX_SCREEN_HEIGHT<812){
 
-            _table.frame=CGRectMake(0, 70, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_BOTTOM-10);
+            _table.frame=CGRectMake(0, 70, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_BOTTOM-20);
             
         }else{
 
@@ -262,6 +264,12 @@
     
     [_array removeAllObjects];
 }
+- (void)viewWillDisappear:(BOOL)animated{
+    [super viewWillDisappear:animated];
+    
+    [self.navigationController setNavigationBarHidden:NO animated:NO];
+    
+}
 
 - (void)viewDidLoad
 {
@@ -272,9 +280,12 @@
     [self navGuese];
     [g_notify addObserver:self selector:@selector(onQuitRoom:) name:kQuitRoomNotifaction object:nil];//退出了房间
     [self getServerData];
-    //self.tableView.contentInset=UIEdgeInsetsMake(64, 0, 0, 0);
-   
-   
+   // self.tableView.contentInset=UIEdgeInsetsMake(64, 0, 20, 0);
+   [g_server listAttention:10000 userId:MY_USER_ID toView:self];
+
+   [g_server listHisRoom:_page pageSize:1000 toView:self];
+    
+    
     _dataArr=[NSMutableArray array];
     
     NSArray *titleIMGs=@[@{@"jx_img":@"FriendsNew",@"name":@"新的朋友"},
@@ -285,16 +296,18 @@
     _dataArr=[JXTMessageModel mj_objectArrayWithKeyValuesArray:titleIMGs];
 }
 
-- (void)viewWillDisappear:(BOOL)animated{
-    [super viewWillDisappear:animated];
-    
-    [self.navigationController setNavigationBarHidden:NO animated:NO];
-}
+ 
 
 - (void)viewDidAppear:(BOOL)animated{
     [super viewDidAppear:animated];
    
     [self getTotalNewMsgCount];
+     
+//    NSMutableArray* p = [[JXMessageObject sharedInstance] fetchRecentChat];
+//    
+//    [_array addObjectsFromArray:p];
+//    [_table reloadData];
+    
 //    [UIView animateWithDuration:0.4 animations:^{
 //        self.view.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);
 //    }];_reciveNewMessage
@@ -336,7 +349,9 @@
 
 - (void)friendPassNotif:(NSNotification *)notif {
     JXFriendObject *user = notif.object;
-    [g_server getUser:user.userId toView:self];
+    
+    
+  //  [g_server getUser:user.userId toView:self];
 }
 
 
@@ -814,6 +829,13 @@
 }
 
 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
+    
+    if (alertView.tag==22222) {
+         
+        
+        
+        return;
+    }
     if (buttonIndex == 1) {
         
         if (alertView.tag == 2457) {
@@ -870,7 +892,7 @@
 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
 {
     NSMutableArray *temArr=[NSMutableArray array];;
-
+ 
     [_array enumerateObjectsUsingBlock:^(JXMsgAndUserObject  *_Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
         JXMessageObject *userx=obj.message;
         if ([userx.fromUserId isEqualToString:@"10000"] || [userx.fromUserId isEqualToString:@"10100"] || [userx.fromUserId isEqualToString:@"10000006"]||[userx.fromUserId isEqualToString:@"10000009"]) {
@@ -920,7 +942,7 @@
     cell.selected=YES;
     cell.tag=indexPath.row;
     UILongPressGestureRecognizer * longPressGesture =[[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(cellLongPress:)];
-    longPressGesture.minimumPressDuration=1.0;//设置长按 时间
+    longPressGesture.minimumPressDuration=0.5;//设置长按 时间
     [cell addGestureRecognizer:longPressGesture];
  
     NSMutableArray *array;
@@ -1104,13 +1126,13 @@
 {
     
     // 判断是否为加好友或者删除好友
-    
+      JXFriendObject * friend = (JXFriendObject*) notifacation.object;
     
     //self.countTipL.hidden=NO;
     JXMessageObject *msg = notifacation.object;
     NSNumber *bodyType = msg.type;
     
-    if (bodyType.intValue == kRoomRemind_DelMember || bodyType.intValue == kRoomRemind_AddMember ) {
+    if (bodyType.intValue == kRoomRemind_DelMember || bodyType.intValue == kRoomRemind_AddMember) { //|| bodyType.intValue == 1 
         [self getFriend];
     }
     
@@ -1307,8 +1329,14 @@
                animation.repeatCount = 2;
                animation.fillMode = kCAFillModeForwards;
                AudioServicesPlaySystemSound(1521);
-             
-               
+
+//                 JXShadeShowView *show=[[JXShadeShowView alloc]init];
+//                 show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.8];
+//                 show.frame=[UIScreen mainScreen].bounds;
+//                show.messageObject=msg;
+//                 [[UIApplication sharedApplication].keyWindow addSubview:show];
+//                show.cancelSoundBlock = ^(JXMessageObject *messageObject) {  };
+                
            }else{
                
                
@@ -1362,7 +1390,7 @@
     task.endMsgId = dict[@"endMsgId"];
     [task insert];
 }
-
+//添加朋友发送的消息
 -(void)newMsgSend:(NSNotification *)notifacation
 {
     JXMessageObject *msg = notifacation.object;
@@ -1383,24 +1411,13 @@
 -(void)newRequest:(NSNotification *)notifacation
 {
      //[g_server listAttention:0 userId:MY_USER_ID toView:self];
-    //JXFriendObject * friend = (JXFriendObject*) notifacation.object;
-    
-    NSArray *friends = [[JXFriendObject sharedInstance] fetchAllFriendsFromLocal];
-    
-    
+    JXFriendObject * friend = (JXFriendObject*) notifacation.object;
      
-    __block int a=0;
-    [friends enumerateObjectsUsingBlock:^(JXFriendObject  *_Nonnull friend, NSUInteger idx, BOOL * _Nonnull stop) {
-        
-        if ([friend.msgsNew intValue]==1) {
-            a++;
-        }
-        
-    }];
-    
-     [self showNewMsgCount:a];
-
-    self.countTipL.hidden=NO;
+    if (friend.status.intValue==2) {
+         
+        [self getFriend];
+    }
+   
 }
 #pragma --------------------新来的消息Badge计算---------------
 -(void)doRefresh:(JXMessageObject*)msg showNumber:(BOOL)showNumber{
@@ -1529,17 +1546,18 @@
     }
 
 
-  _reciveNewMessage2222=100;
-  JXMessageObject *msgUse=oldobj.message;
-  long time = (long)[[NSDate date] timeIntervalSince1970];
-  time = (time *1000 + g_server.timeDifference);
-  NSString *salt = [NSString stringWithFormat:@"%ld", time];
-//  [g_server Useract_getGroupOneType:salt jid:msgUse.fromUserId andToView:self];
+//  _reciveNewMessage2222=100;
+//  JXMessageObject *msgUse=oldobj.message;
+//  long time = (long)[[NSDate date] timeIntervalSince1970];
+//  time = (time *1000 + g_server.timeDifference);
+//  NSString *salt = [NSString stringWithFormat:@"%ld", time];
+////  [g_server Useract_getGroupOneType:salt jid:msgUse.fromUserId andToView:self];
     
       
     
     
 }
+ 
 //加载数据
 -(void)getServerData
 {
@@ -1635,12 +1653,12 @@
      self.tableView.scrollEnabled=YES;
      [self.navigationController setNavigationBarHidden:YES animated:NO];
      [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
-
+[self.navigationController viewWillAppear:animated];
      [g_notify postNotificationName:@"tabbarFrame" object:nil userInfo:@{@"title":@"1"}];
      
-     NSMutableArray* p = [[JXMessageObject sharedInstance] fetchRecentChat];
-     _array=p;
-     [_table reloadData];
+//     NSMutableArray* p = [[JXMessageObject sharedInstance] fetchRecentChat];
+//     _array=p;
+//     [_table reloadData];
  }
 #pragma mark --- <didselectRowAtIndexPath 代理>
 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
@@ -1671,6 +1689,13 @@
         self.msgTotal -= [cell.bage intValue];
     }
      
+    if ([p.user.groupStatus intValue]==2||[p.user.groupStatus intValue]==1) {
+     UIAlertView *alert=[[UIAlertView alloc]initWithTitle:nil message:@"尊敬的用户:您因长时间未上线被判断为不活跃玩家,系统暂时将您移出群聊。请您联系您的上级代理再次进群,给您带来的不便请您谅解!谢谢!" delegate:self cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil];
+     alert.tag=2222;
+     [alert show];
+        
+        return;
+    }
     
     [UIApplication sharedApplication].applicationIconBadgeNumber = [UIApplication sharedApplication].applicationIconBadgeNumber - [p.user.msgsNew intValue];
 //    [g_server userChangeMsgNum:[UIApplication sharedApplication].applicationIconBadgeNumber toView:self];
@@ -1864,7 +1889,7 @@
                 [p.message deleteAll];
                 p =nil;
                 
-        [_array removeObjectAtIndex:_indexPathRecord.row];
+        [_array removeObjectAtIndex:cell.tag];
                 _refreshCount++;
                 [_table reloadData];
                 [self getTotalNewMsgCount];
@@ -1938,25 +1963,35 @@
         
        syncTimeLen = syncTimeLen * 24 * 3600 * 1000;
 //        syncTimeLen = [[NSDate date] timeIntervalSince1970] * 1000.0 - m;
-        
+        // 同步 永久 syncTime == 0
+
         if ([g_myself.chatSyncTimeLen longLongValue] == 0 || [g_myself.chatSyncTimeLen longLongValue] == -1) {
             syncTimeLen = 0;
+            
+            
+            
         }
         
 //        [g_default setBool:YES forKey:kISFirstGetLastChatList];
         
     }else {
-        syncTimeLen = g_server.lastOfflineTime * 1000.0;
+      syncTimeLen = g_server.lastOfflineTime * 1000.0;
+
+      // syncTimeLen =604800000;
+        NSLog(@"最后一次离线时间:%f",g_server.lastOfflineTime);
     }
-    
-//    if ([g_myself.chatSyncTimeLen longLongValue] == -2) {
-//
-////        [g_xmpp.roomPool createAll];
-//
-//    }else {
+    // 不同步 batchJoinMucChat();
+
+    if ([g_myself.chatSyncTimeLen longLongValue] == -2) { 
+ 
+        [g_xmpp.roomPool createAll];
+ 
+    }else {
+        
+      
         [g_server getLastChatListStartTime:[NSNumber numberWithLong:syncTimeLen] toView:self];
 
-//    }
+    }
     
 }
 
@@ -2411,7 +2446,7 @@
 - (void)chatViewDisappear:(NSNotification *)notif{
 //    [_table reloadData];
 //    [self getTotalNewMsgCount];
-    [self getServerData];
+   // [self getServerData];
 }
 
 -(void)logoutNotifi:(NSNotification *)notif{
@@ -2455,7 +2490,7 @@
         [[NSUserDefaults standardUserDefaults] setObject:gradeIndexcc forKey:@"gradeIndexcc"];
         [[NSUserDefaults standardUserDefaults] synchronize];
         
-        //NSString *membershipAccount = [[NSUserDefaults standardUserDefaults] objectForKey:@"membershipAccount_ID"];
+         NSString *membershipAccount = [[NSUserDefaults standardUserDefaults] objectForKey:@"membershipAccount_ID"];
          self.titleLb.text = [NSString stringWithFormat:@"我的即信号:%@",memberAcc];
     }
     
@@ -2468,6 +2503,13 @@
             pv.dbFriends = (long)[_array count] - 1;
             pv.dataArray = array1;
             pv = [pv init];
+           
+
+            //访问DB获取好友消息列表
+          //  NSMutableArray* p = [[JXMessageObject sharedInstance] fetchRecentChat];
+            
+            
+            
     //        [g_window addSubview:pv.view];
             [self getServerData];
         }
@@ -2476,7 +2518,7 @@
     if([aDownload.action isEqualToString:act_roomList]){
         
     }
-     
+     /*
     if( [aDownload.action isEqualToString:act_getGroupOneType] ){
         _indexNums++;
         [_tempGoundArr addObject:dict];
@@ -2485,8 +2527,8 @@
 
              _dataArrOneOne=_tempGoundArr;
 
-//            [[NSUserDefaults standardUserDefaults] setObject:_indexGoundArr forKey:@"groundType"];
-//            [[NSUserDefaults standardUserDefaults] synchronize];
+            [[NSUserDefaults standardUserDefaults] setObject:_indexGoundArr forKey:@"groundType"];
+             [[NSUserDefaults standardUserDefaults] synchronize];
             
             [_table reloadData];
         }else{
@@ -2507,8 +2549,7 @@
         
          //[_tempGoundArr removeAllObjects];
         
-        
-         /*
+       
           
           JXCell* cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:_reciveScrollViewIndex inSection:0]];
           
@@ -2547,9 +2588,9 @@
             }
             
         }];
-            */
+           
     }
-    
+    */
     if( [aDownload.action isEqualToString:act_roomAdd] ){
             
         _chatRoom = [[JXXMPP sharedInstance].roomPool createRoom:_room.roomJid title:_room.name];
@@ -2714,78 +2755,78 @@
     
     if([aDownload.action isEqualToString:act_roomListHis]){
             
+        
+        //            [[JXXMPP sharedInstance].roomPool joinRoom:tempDict[@"jid"] title:tempDict[@"name"] lastDate:nil isNew:NO];
+        /*-------------------*/
+        for (int i = 0; i < [array1 count]; i++) {
+            NSDictionary *dict=array1[i];
             
-    //            [[JXXMPP sharedInstance].roomPool joinRoom:tempDict[@"jid"] title:tempDict[@"name"] lastDate:nil isNew:NO];
-                /*-------------------*/
-                for (int i = 0; i < [array1 count]; i++) {
-                            NSDictionary *dict=array1[i];
-                            
-                            JXUserObject* user = [[JXUserObject alloc]init];
-                            user.userNickname = [dict objectForKey:@"name"];
-                            user.userId = [dict objectForKey:@"jid"];
-                            user.userDescription = [dict objectForKey:@"desc"];
-                            user.roomId = [dict objectForKey:@"id"];
-                            user.showRead = [dict objectForKey:@"showRead"];
-                            user.showMember = [dict objectForKey:@"showMember"];
-                            user.allowSendCard = [dict objectForKey:@"allowSendCard"];
-                            user.chatRecordTimeOut = [NSString stringWithFormat:@"%@", [dict objectForKey:@"chatRecordTimeOut"]];
-                            user.offlineNoPushMsg = [(NSDictionary *)[dict objectForKey:@"member"] objectForKey:@"offlineNoPushMsg"];
-                            user.talkTime = [dict objectForKey:@"talkTime"];
-                            user.allowInviteFriend = [dict objectForKey:@"allowInviteFriend"];
-                            user.allowUploadFile = [dict objectForKey:@"allowUploadFile"];
-                            user.allowConference = [dict objectForKey:@"allowConference"];
-                            user.allowSpeakCourse = [dict objectForKey:@"allowSpeakCourse"];
-                            user.category = [dict objectForKey:@"category"];
-                            user.createUserId = [dict objectForKey:@"userId"];
-                            user.timeCreate = [NSDate dateWithTimeIntervalSince1970:[[dict objectForKey:@"createTime"] longLongValue]];
-                            user.isNeedVerify = [dict objectForKey:@"isNeedVerify"];
-                              
-                            if([[dict allKeys] containsObject:@"groupType"])
-
-                            {
-                                NSDictionary *dictby=[dict objectForKey:@"groupType"];
-
-                                user.groupType = [dictby objectForKey:@"typeName"];
-
-                            }else{
-                                user.groupType = @"";
-                 
-
-                            }
-                 
-                            NSDictionary *member = [dict objectForKey:@"member"];
-                #ifdef IS_MsgEncrypt
-                            if ([member objectForKey:@"chatKeyGroup"]) {
-                                
-                                user.chatKeyGroup = [g_msgUtil encryptRoomMsgKey:user.roomId randomKey:[member objectForKey:@"chatKeyGroup"]];
-                            }
-                #endif
-                            
-                            if ([aDownload.action isEqualToString:act_roomListHis]) {
-                                if(user && [user.groupStatus intValue] == 0){
-                                    
-                                   [[JXXMPP sharedInstance].roomPool joinRoom:user.userId title:user.userNickname lastDate:nil isNew:YES];
-                                }
-
-                                if (![user haveTheUser]){
-                                    [user insertRoom];
-
-                                }else {
-                                  [user updateUserNickname];
-    //                              [user update];
-                                    // 只更新groupType
-                                  [user updateGroupType];
-                                  [user updateRoomId];
-                                }
-                            }
-                            
-    //                        [tempArray addObject:user];
-                        }
-                /*-------------------*/
+            JXUserObject* user = [[JXUserObject alloc]init];
+            user.userNickname = [dict objectForKey:@"name"];
+            user.userId = [dict objectForKey:@"jid"];
+            user.userDescription = [dict objectForKey:@"desc"];
+            user.roomId = [dict objectForKey:@"id"];
+            user.showRead = [dict objectForKey:@"showRead"];
+            user.showMember = [dict objectForKey:@"showMember"];
+            user.allowSendCard = [dict objectForKey:@"allowSendCard"];
+            user.chatRecordTimeOut = [NSString stringWithFormat:@"%@", [dict objectForKey:@"chatRecordTimeOut"]];
+            user.offlineNoPushMsg = [(NSDictionary *)[dict objectForKey:@"member"] objectForKey:@"offlineNoPushMsg"];
+            user.talkTime = [dict objectForKey:@"talkTime"];
+            user.allowInviteFriend = [dict objectForKey:@"allowInviteFriend"];
+            user.allowUploadFile = [dict objectForKey:@"allowUploadFile"];
+            user.allowConference = [dict objectForKey:@"allowConference"];
+            user.allowSpeakCourse = [dict objectForKey:@"allowSpeakCourse"];
+            user.category = [dict objectForKey:@"category"];
+            user.createUserId = [dict objectForKey:@"userId"];
+            user.timeCreate = [NSDate dateWithTimeIntervalSince1970:[[dict objectForKey:@"createTime"] longLongValue]];
+            user.isNeedVerify = [dict objectForKey:@"isNeedVerify"];
+            
+            if([[dict allKeys] containsObject:@"groupType"])
+                
+            {
+                NSDictionary *dictby=[dict objectForKey:@"groupType"];
+                
+                user.groupType = [dictby objectForKey:@"typeName"];
+                
+            }else{
+                user.groupType = @"";
+                
                 
+            }
             
-            [_table reloadData];
+            NSDictionary *member = [dict objectForKey:@"member"];
+#ifdef IS_MsgEncrypt
+            if ([member objectForKey:@"chatKeyGroup"]) {
+                
+                user.chatKeyGroup = [g_msgUtil encryptRoomMsgKey:user.roomId randomKey:[member objectForKey:@"chatKeyGroup"]];
+            }
+#endif
+            
+            if ([aDownload.action isEqualToString:act_roomListHis]) {
+                if(user && [user.groupStatus intValue] == 0){
+                    
+                    [[JXXMPP sharedInstance].roomPool joinRoom:user.userId title:user.userNickname lastDate:nil isNew:YES];
+                }
+                
+                if (![user haveTheUser]){
+                    [user insertRoom];
+                    
+                }else {
+                    [user updateUserNickname];
+                    //                              [user update];
+                    // 只更新groupType
+                    [user updateGroupType];
+                    [user updateRoomId];
+                }
+            }
+            
+            //                        [tempArray addObject:user];
         }
+        /*-------------------*/
+        
+        
+        [_table reloadData];
+    }
 
     if ([aDownload.action isEqualToString:act_tigaseGetLastChatList]) {
         [self.header endRefreshing];
@@ -2872,7 +2913,7 @@
            self.customerArr = array1;
         
       
-        
+        return;
            CGRect backFrame = self.backView.frame;
            backFrame.size.height = backFrame.size.height + 64* self.customerArr.count;
            self.backView.frame = backFrame;
@@ -3105,7 +3146,7 @@
         
 //        [self getAllChatList];
         
-        if([p.toUserId isEqualToString:MY_USER_ID] || IS_OTHER_DEVICE(p.toUserId)){
+       if([p.toUserId isEqualToString:MY_USER_ID] || IS_OTHER_DEVICE(p.toUserId)){
             if(![g_xmpp.roomPool getRoom:p.objectId]){
                 JXUserObject* user = [[JXUserObject alloc]init];
                 user.userNickname = p.content;
@@ -3490,8 +3531,7 @@
     }
     _isLoadingData = YES;
     [self getServerData];
-    _isLoadingData = NO;
-    _reciveNewMessage2222=100;
+    _isLoadingData = NO; 
 }
 
 -(void)showNewCount{//显示IM数量

+ 19 - 0
shiku_im/ClassesNew/classes/messageVc/JXShadeShowView.h

@@ -0,0 +1,19 @@
+//
+//  JXShadeShowView.h
+//  shiku_im
+//
+//  Created by os on 2020/7/11.
+//  Copyright © 2020 Reese. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+ 
+typedef void(^CancelSoundBlock)(JXMessageObject *messageObject);
+
+@interface JXShadeShowView : UIView
+@property (nonatomic,strong) JXMessageObject *messageObject;
+
+@property (nonatomic,copy) CancelSoundBlock cancelSoundBlock;
++(void)showView;
+@end
+ 

+ 182 - 0
shiku_im/ClassesNew/classes/messageVc/JXShadeShowView.m

@@ -0,0 +1,182 @@
+//
+//  JXShadeShowView.m
+//  shiku_im
+//
+//  Created by os on 2020/7/11.
+//  Copyright © 2020 Reese. All rights reserved.
+//
+
+#import "JXShadeShowView.h"
+#import "SimpleAudioPlayer.h"
+ 
+
+@interface JXShadeShowView()<UIAlertViewDelegate>
+@property (nonatomic,weak) UIButton *knowBtn;
+@property (nonatomic,weak)  UIImageView *imageV;
+
+@property (nonatomic,weak) UILabel *useName;
+@property (nonatomic,weak) UILabel *subTitle;
+@end
+@implementation JXShadeShowView
+
+-(instancetype)initWithFrame:(CGRect)frame{
+    
+    if (self=[super initWithFrame:frame]) {
+
+       // self.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.9];
+        UIImageView *backView=[[UIImageView alloc]init];
+        backView.backgroundColor=[UIColor whiteColor];
+        backView.layer.cornerRadius=60;
+        backView.layer.masksToBounds=YES;
+        [self addSubview:backView];
+        self.imageV=backView;
+        [backView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.centerX.mas_equalTo(self.mas_centerX);
+            make.top.mas_equalTo(JX_SCREEN_TOP+10);
+            make.height.mas_equalTo(120);
+            make.width.mas_equalTo(120);
+            
+        }];
+        
+      
+        
+        UILabel *titleLabel=[[UILabel alloc]init];
+        titleLabel.text=@"用户名";
+        titleLabel.textAlignment=NSTextAlignmentCenter;
+        titleLabel.font=[UIFont systemFontOfSize:20 weight:UIFontWeightMedium];
+        titleLabel.textColor=[UIColor whiteColor];
+        [self addSubview:titleLabel];
+        self.useName=titleLabel;
+        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.mas_equalTo(backView.mas_bottom).mas_offset(30);
+            make.centerX.mas_equalTo(backView.mas_centerX);
+            
+        }];
+        
+        
+        UILabel *subTitle=[[UILabel alloc]init];
+        subTitle.text=@"消息哪日";
+        subTitle.textAlignment=NSTextAlignmentCenter;
+        subTitle.font=[UIFont systemFontOfSize:20 weight:UIFontWeightRegular];
+        subTitle.numberOfLines=0;
+        subTitle.textColor=[UIColor whiteColor];
+        [self addSubview:subTitle];
+        self.subTitle=subTitle;
+        [subTitle mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.centerX.mas_equalTo(titleLabel.mas_centerX);
+            make.top.mas_equalTo(titleLabel.mas_bottom).mas_equalTo(20);
+            make.left.mas_equalTo(30);
+            make.right.mas_equalTo(-30);
+            
+        }];
+        
+        
+        UIButton *knowBtn=[[UIButton alloc]init];
+        knowBtn.titleLabel.font=[UIFont systemFontOfSize:16 weight:UIFontWeightRegular];
+        [knowBtn setTitle:@"忽略" forState:UIControlStateNormal];
+        [self addSubview:knowBtn];
+        self.knowBtn=knowBtn;
+        [knowBtn addTarget:self action:@selector(closeBtnclick) forControlEvents:UIControlEventTouchUpInside];
+        [knowBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(100);
+            make.bottom.mas_equalTo(-JX_SCREEN_TOP);
+            
+        }];
+ 
+        
+        UIButton *reciveBtn=[[UIButton alloc]init];
+        reciveBtn.titleLabel.font=[UIFont systemFontOfSize:16 weight:UIFontWeightRegular];
+        [reciveBtn setTitle:@"接受" forState:UIControlStateNormal];
+        reciveBtn.layer.masksToBounds=YES;
+        [self addSubview:reciveBtn];
+        [reciveBtn addTarget:self action:@selector(knowBtnclick) forControlEvents:UIControlEventTouchUpInside];
+        [reciveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.right.mas_equalTo(-100);
+            make.bottom.mas_equalTo(-JX_SCREEN_TOP);
+            
+        }];
+        
+  
+    }
+    
+    return self;
+}
+
+ 
+- (void)setMessageObject:(JXMessageObject *)messageObject{
+    _messageObject=messageObject;
+
+    JXUserObject *userF = [[JXUserObject sharedInstance] getUserById:messageObject.fromUserId];
+    [g_server delHeadImage:userF.userId];
+   // dispatch_async(dispatch_get_main_queue(), ^{
+     
+        [g_server getHeadImageLarge:userF.userId userName:userF.userNickname imageView:_imageV];
+        
+    //});
+    // 更新用户信息
+    self.useName.text=userF.userNickname;
+    self.subTitle.text=messageObject.content;
+    
+}
+- (void)closeBtnclick{
+    
+    if (_cancelSoundBlock) {
+        _cancelSoundBlock(_messageObject);
+    }
+    
+    [SimpleAudioPlayer stopAllPlayers];
+    
+    [self removeFromSuperview];
+}
+                      
+- (void)knowBtnclick{
+   
+    
+    [self removeFromSuperview];
+}
+
+
+-(void)setStrURL:(NSString *)strURL{
+
+    self.subTitle.text=[NSString stringWithFormat:@"请添加微信号:%@,联系视频客服!",strURL];
+    
+}
+
+- (void)thirdBtnAction {
+    __block NSInteger second = 5;
+    //(1)
+    dispatch_queue_t quene = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
+    //(2)
+    dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, quene);
+    //(3)
+    dispatch_source_set_timer(timer, DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC, 0 * NSEC_PER_SEC);
+    //(4)
+    dispatch_source_set_event_handler(timer, ^{
+        dispatch_async(dispatch_get_main_queue(), ^{
+            if (second == 0) {
+                //self.tongYiBtn.userInteractionEnabled = YES;
+                //[self.tongYiBtn setTitle:[NSString stringWithFormat:@"5秒自动关闭"] forState:UIControlStateNormal];
+               // second = 10;
+                //(6)
+                dispatch_cancel(timer);
+                [self removeFromSuperview];
+            } else {
+                //self.tongYiBtn.userInteractionEnabled = NO;
+                //[self.tongYiBtn setTitle:[NSString stringWithFormat:@"(%ld)秒自动关闭",(long)second] forState:UIControlStateNormal];
+                second--;
+            }
+        });
+    });
+    //(5)
+    dispatch_resume(timer);
+}
+ 
+ +(void)showView{
+     JXShadeShowView *show=[[JXShadeShowView alloc]init];
+     show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.98];
+     show.frame=[UIScreen mainScreen].bounds;
+     [[UIApplication sharedApplication].keyWindow addSubview:show];
+    
+     
+ }
+@end

+ 72 - 10
shiku_im/ClassesNew/classes/myVc/Vc/JXMyBaseInFovc.m

@@ -17,7 +17,7 @@
 #import "STAlertView.h"
 #import "selectProvinceVC.h"
 
-@interface JXMyBaseInFovc ()<RITLPhotosViewControllerDelegate,UINavigationControllerDelegate, UIImagePickerControllerDelegate,JXActionSheetVCDelegate,JXCameraVCDelegate>
+@interface JXMyBaseInFovc ()<RITLPhotosViewControllerDelegate,UINavigationControllerDelegate, UIImagePickerControllerDelegate,JXActionSheetVCDelegate,JXCameraVCDelegate,UITextFieldDelegate>
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *topViewH;
 @property (weak, nonatomic) IBOutlet UIView *updateheadIMG;
 
@@ -111,8 +111,9 @@
 {
     //_image = [ImageResize image:[info objectForKey:@"UIImagePickerControllerEditedImage"] fillSize:CGSizeMake(640, 640)];
 
-  self.IconIMG.image = [info objectForKey:@"UIImagePickerControllerEditedImage"];
-    
+  UIImage  *imgV = [info objectForKey:@"UIImagePickerControllerEditedImage"];
+    self.IconIMG.image=imgV;
+    [g_server uploadHeadImage:g_server.myself.userId image:imgV toView:self];
     [picker dismissViewControllerAnimated:YES completion:nil];
  
 }
@@ -150,7 +151,12 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view from its nib.
-    self.topViewH.constant=JX_SCREEN_HEIGHT>=812?88:64;
+    UILabel *tipLabel = [[UILabel  alloc]initWithFrame:CGRectMake(0, JX_SCREEN_HEIGHT>=812?88:64, JX_SCREEN_WIDTH, 30)];
+    tipLabel.text=@"请使用中文昵称";
+    tipLabel.textAlignment=NSTextAlignmentCenter;
+    tipLabel.font=[UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
+    [self.view addSubview:tipLabel];
+    self.topViewH.constant=JX_SCREEN_HEIGHT>=812?88+30:64+30;
     [self defineNavBar:@"个人信息" andRinghtBtnImg:@""];
     self.IconIMG.layer.cornerRadius=22;
     self.IconIMG.layer.masksToBounds=YES;
@@ -161,15 +167,17 @@
     _selectSexView.frame=[UIScreen mainScreen].bounds;
     [[UIApplication sharedApplication].keyWindow addSubview:_selectSexView];
     _selectSexView.hidden=YES;
+    _nickName.delegate=self;
+    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textFiledEditChanged:)name:UITextFieldTextDidChangeNotification object:_nickName];
     
     __weak typeof(self) weakSelf=self;
     _selectSexView.selectBtnBlock = ^(UIButton *sender) {
         weakSelf.selectSexView.hidden=YES;
         weakSelf.sexInt=sender.tag;
         if (sender.tag == 0) {// 女
-        _sexL.text = @"男";
+            weakSelf.sexL.text = @"男";
         }else {// 男
-         _sexL.text = @"女";
+            weakSelf.sexL.text = @"女";
         }
         
     };
@@ -208,6 +216,58 @@
     [g_server getUser:self.userId toView:self];
  
 }
+
+
+//=====================================start ============
+- (BOOL)textFieldShouldReturn:(UITextField *)textField{
+    [textField resignFirstResponder];
+    
+    //过滤非汉字字符
+    textField.text = [self filterCharactor:textField.text withRegex:@"[^\u4e00-\u9fa5]"];
+    
+    if (textField.text.length >= 24) {
+        textField.text = [textField.text substringToIndex:24];
+        
+    }
+    return NO;
+}
+ 
+- (void)textFiledEditChanged:(id)notification{
+    
+    UITextRange *selectedRange = _nickName.markedTextRange;
+    UITextPosition *position = [_nickName positionFromPosition:selectedRange.start offset:0];
+    
+    if (!position) { //// 没有高亮选择的字
+        //过滤非汉字字符
+        _nickName.text = [self filterCharactor:_nickName.text withRegex:@"[^\u4e00-\u9fa5]"];
+        
+        if (_nickName.text.length >= 24) {
+            _nickName.text = [_nickName.text substringToIndex:24];
+        }
+    }else { //有高亮文字
+        //do nothing
+    }
+}
+ 
+//根据正则,过滤特殊字符
+- (NSString *)filterCharactor:(NSString *)string withRegex:(NSString *)regexStr{
+    NSString *searchText = string;
+    NSError *error = NULL;
+    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:regexStr options:NSRegularExpressionCaseInsensitive error:&error];
+    NSString *result = [regex stringByReplacingMatchesInString:searchText options:NSMatchingReportCompletion range:NSMakeRange(0, searchText.length) withTemplate:@""];
+    return result;
+}
+
+//=====================================end=============
+//- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
+//    if(textField == _birthday){
+//
+//        return NO;
+//    }else{
+//
+//        return YES;
+//    }
+//}
 /**地区选择*/
 - (void)addressViewClick{
 
@@ -251,7 +311,7 @@
 /**完成 */
 - (void)compleBtnClick{
     JXUserObject *user=[[JXUserObject alloc]init]; 
-    user.userNickname = _nickName.text;
+    user.userNickname = _nickName.text.length>0?_nickName.text:self.user.userNickname;
     user.sex = [NSNumber numberWithBool:_sexInt];
      
     user.cityId= @(_cityStr);;
@@ -259,12 +319,12 @@
     user.areaId= @(_areaStr);;
     user.countryId=@(1);
     
-    [g_server delHeadImage:self.user.userId];
+   // [g_server delHeadImage:self.user.userId];
   //URL v /user/update?sex=1&nickname=t%E5%91%83%E5%91%83%E5%91%83&language=zh&access_token=c4892f40d8c54e7887b59bf1a6c97190&salt=1594274614096&secret=vq9AvT%2BoEkmQnVlh2g0p2A%3D%3D HTTP/1.1
     
-   [g_server getHeadImageLarge:self.user.userId userName:self.user.userNickname imageView:_IconIMG];
+   //[g_server getHeadImageLarge:self.user.userId userName:self.user.userNickname imageView:_IconIMG];
     // 更新用户信息
-    [user updateUserNickname];
+    //[user updateUserNickname];
     
     [g_server updateUser:user toView:self];
     
@@ -284,6 +344,8 @@
         _recordUrlIcon=dict[@"data"][@"TUrl"];
         
     }if( [aDownload.action isEqualToString:act_UserUpdate] ){
+        
+        [g_notify postNotificationName:@"updateUserHeadIMG" object:nil];
         [g_navigation dismissViewController:self animated:NO];
         
     }

+ 30 - 1
shiku_im/ClassesNew/classes/myVc/Vc/JXShareMVc.m

@@ -53,9 +53,15 @@
            
            
        }
- 
     
     
+ 
+    
+    UISwipeGestureRecognizer *recognizer2 = [[UISwipeGestureRecognizer alloc]
+                                              initWithTarget:self
+                                              action:@selector(foundSwipe2:)];
+     recognizer2.direction =UISwipeGestureRecognizerDirectionDown;
+     [_topIMGView addGestureRecognizer:recognizer2];
     [SVProgressHUD show];
     [g_server getAppResource:@"6" ToView:self];
      long time = (long)[[NSDate date] timeIntervalSince1970];
@@ -64,8 +70,31 @@
       
     [g_server getact_getinviteget:salt andUserId:g_server.myself.userId andToView:self];
     
+ 
+ 
+}
+- (void)foundSwipe:(UISwipeGestureRecognizer *)sender {
+    
+    CGRect bounds=_shareIMG.bounds;
+    bounds.origin.y=110;
+    
+    _shareIMG.bounds=bounds;
+    
 }
 
+- (void)foundSwipe2:(UISwipeGestureRecognizer *)sender {
+    
+        //设置识别滑动方向
+        sender.direction =UISwipeGestureRecognizerDirectionDown;
+        //Swipe手势识别器关联到View
+        [self.view addGestureRecognizer:sender];
+     
+    CGRect bounds=self.view.bounds;
+    bounds.origin.y=0;
+    
+   _shareIMG.bounds=bounds;
+    
+}
 
 #pragma mark ---  请求成功
 -(void) didServerResultSucces:(JXConnection*)aDownload dict:(NSDictionary*)dict array:(NSArray*)array1{

+ 2 - 8
shiku_im/ClassesNew/classes/myVc/Vc/JXShareMVc.xib

@@ -21,7 +21,7 @@
             <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <imageView clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BG" translatesAutoresizingMaskIntoConstraints="NO" id="R6n-dJ-Owv">
+                <imageView clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BG1122" translatesAutoresizingMaskIntoConstraints="NO" id="R6n-dJ-Owv">
                     <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                 </imageView>
                 <imageView clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="分享赚钱title" translatesAutoresizingMaskIntoConstraints="NO" id="98Z-iR-1Wm">
@@ -53,9 +53,6 @@
                         <constraint firstAttribute="height" constant="60" id="pS9-5r-2zI"/>
                     </constraints>
                 </imageView>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="图元素" translatesAutoresizingMaskIntoConstraints="NO" id="23K-Oe-zRq">
-                    <rect key="frame" x="27" y="381.5" width="360" height="438.5"/>
-                </imageView>
             </subviews>
             <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
             <constraints>
@@ -71,20 +68,17 @@
                 <constraint firstAttribute="bottom" secondItem="R6n-dJ-Owv" secondAttribute="bottom" id="ibZ-vM-5Zp"/>
                 <constraint firstItem="R6n-dJ-Owv" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="lbX-K2-VmF"/>
                 <constraint firstItem="98Z-iR-1Wm" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="8" id="nfU-3w-Wyr"/>
-                <constraint firstItem="23K-Oe-zRq" firstAttribute="centerX" secondItem="R6n-dJ-Owv" secondAttribute="centerX" id="sJS-ma-Mdv"/>
                 <constraint firstItem="Kgw-DA-jo6" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="40" id="uV3-yh-oum"/>
-                <constraint firstItem="W2R-Fi-dy0" firstAttribute="top" secondItem="23K-Oe-zRq" secondAttribute="bottom" constant="1" id="xYQ-bN-xwU"/>
                 <constraint firstItem="R6n-dJ-Owv" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="xjd-2y-3RJ"/>
             </constraints>
             <point key="canvasLocation" x="137.68115942028987" y="102.45535714285714"/>
         </view>
     </objects>
     <resources>
-        <image name="BG" width="360" height="640"/>
+        <image name="BG1122" width="360" height="640"/>
         <image name="anniu" width="113" height="27"/>
         <image name="navigationButtonReturn" width="15" height="21"/>
         <image name="分享框" width="293.5" height="40"/>
         <image name="分享赚钱title" width="325.5" height="375.5"/>
-        <image name="图元素" width="360" height="438.5"/>
     </resources>
 </document>

+ 12 - 4
shiku_im/ClassesNew/classes/myVc/Vc/JXXMGMyVc.m

@@ -66,8 +66,17 @@
  - (void)viewWillAppear:(BOOL)animated {
      [super viewWillAppear:animated];
       [self.navigationController setNavigationBarHidden:YES];
+     
+     [g_notify addObserver:self selector:@selector(updateUser) name:@"updateUserHeadIMG" object:nil];
+   
  }
 
+//更新用户
+- (void)updateUser{
+      [g_server getUser:g_server.myself.userId toView:self];
+    
+    
+}
 - (JXMyMoneyViewController *)extracted {
     JXMyMoneyViewController *vc=[JXMyMoneyViewController new];
     return vc;
@@ -289,7 +298,7 @@
       show.hidden=YES;//
     [show.nextBtn addTarget:self action:@selector(addBtnClick) forControlEvents:UIControlEventTouchUpInside];
      
-   
+    [g_server getUser:g_server.myself.userId toView:self
     
 //     JXShareShowView *show=[JXShareShowView XIBJXShareShowView];
 //     show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.1];
@@ -298,9 +307,8 @@
 //     self.show=show;
 //     show.hidden=YES;
 //    [show.konwBtn addTarget:self action:@selector(addBtnClick) forControlEvents:UIControlEventTouchUpInside];
- 
+  ];
     
-    [g_server getUser:g_server.myself.userId toView:self];
 }
  
 //复制微信号
@@ -436,7 +444,7 @@
         NSString *createTimeL = dict[@"createTime"];
         
         NSDate *datenow = [NSDate date];
-       NSString *timeSp = [NSString stringWithFormat:@"%ld", (long)([datenow timeIntervalSince1970])];
+        NSString *timeSp = [NSString stringWithFormat:@"%ld", (long)([datenow timeIntervalSince1970])];
         NSInteger currentDay=([timeSp intValue]- [createTimeL intValue])/3600/24;
          
         self.bangve.jiarujixinL.text = [NSString stringWithFormat:@"加入即信第%zd天",currentDay];

+ 10 - 3
shiku_im/cell/ChatCell/JXBaseChatCell.m

@@ -108,7 +108,14 @@ static double g_timeSend=0;
     
     if (bubbleManager == nil) {
         if ([data.role intValue] != 1 && [data.role intValue] != 2) {
-            self.nicknameLabel.text = [NSString stringWithFormat:@"%@",data.lordRemarkName.length > 0  ? data.lordRemarkName : allUser.remarkName.length > 0  ? allUser.remarkName : data.userNickName.length > 0  ? data.userNickName : self.msg.fromUserName];
+            
+            
+//            if ([_msg.fromUserName isEqualToString:data.userNickName]) {
+//                self.nicknameLabel.text = [NSString stringWithFormat:@"%@",data.lordRemarkName.length > 0  ? data.lordRemarkName : allUser.remarkName.length > 0  ? allUser.remarkName : data.userNickName.length > 0  ? data.userNickName : self.msg.fromUserName];
+//            }else{
+                self.nicknameLabel.text = [NSString stringWithFormat:@"%@",_msg.fromUserName];
+//            }
+            
         }else {
             NSString *roleName = [data.role intValue] == 1 ? @"群主":@"管理员";
             self.nicknameLabel.text = [NSString stringWithFormat:@"%@-%@",roleName,allUser.remarkName.length > 0  ? allUser.remarkName : data.userNickName.length > 0  ? data.userNickName : self.msg.fromUserName];
@@ -116,7 +123,7 @@ static double g_timeSend=0;
             NSString *nameStr=[NSString stringWithFormat:@"%@-%@",roleName,allUser.remarkName.length > 0  ? allUser.remarkName : data.userNickName.length > 0  ? data.userNickName : self.msg.fromUserName];
             
             
-            self.nicknameLabel.text =nameStr;
+            self.nicknameLabel.text =_msg.fromUserName;
 
         }
         
@@ -174,7 +181,7 @@ static double g_timeSend=0;
 //                   [noteStr addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:range1];
                    // 为label添加Attributed
                    if (allUser.userId.length==0) {
-
+                    //  _msg;
                        self.nicknameLabel.text=[NSString stringWithFormat:@"%@",data.userNickName];
                    }else{
 

+ 3 - 0
shiku_im/control/JXSelectImageView.h

@@ -32,6 +32,9 @@
 @property(assign) SEL onAddressBook;
 @property(assign) SEL onGroupHelper;
 
+
+
+@property (nonatomic, strong) memberData *data;
 @property (nonatomic, strong) UIScrollView *scrollView;
 @property (nonatomic, assign) BOOL isGroup;
 @property (nonatomic, assign) BOOL isGroupMessages;

+ 20 - 1
shiku_im/control/JXSelectImageView.m

@@ -137,7 +137,24 @@
 //          button.frame = CGRectMake(X, Y, SELECTIMAGE_WIDTH, h);
 //         }
         
-        if (!self.isGroup || self.isGroup) {
+        if (self.isGroup) {
+             
+            //Localized(@"JX_Shake")
+ // 戳一戳
+            if ([_data.role intValue]==1||[_data.role intValue]==2) {
+                 
+                n = (n + 1) >= 4 ? 0 : n + 1;
+                m += 1;
+                X = m >8 ? SELECTIMAGE_WIDTH *n + (n+1)*inset+JX_SCREEN_WIDTH : SELECTIMAGE_WIDTH *n + (n+1)*inset;
+                Y = m > 4 && m <=8 ? h+margeY*2 : margeY;
+                button = [self createButtonWithImage:@"im_tool_shake_normal" highlight:@"im_tool_shake_press" target:delegate selector:self.onShake title:@"抖TA"];
+                
+                button.frame = CGRectMake(X, Y, SELECTIMAGE_WIDTH, h);
+                              
+            }
+        }else{
+            
+            
             // 戳一戳
             n = (n + 1) >= 4 ? 0 : n + 1;
             m += 1;
@@ -146,7 +163,9 @@
             button = [self createButtonWithImage:@"im_tool_shake_normal" highlight:@"im_tool_shake_press" target:delegate selector:self.onShake title:@"抖TA"];
             
             //Localized(@"JX_Shake")
+            
             button.frame = CGRectMake(X, Y, SELECTIMAGE_WIDTH, h);
+                     
         }
 //        // 文件
 //        n = (n + 1) >= 4 ? 0 : n + 1;

+ 2 - 2
shiku_im/controller/ADView/DYAdAlertView/DYAdAlertView.m

@@ -532,7 +532,7 @@
                   // cancelBtn.frame = CGRectMake(ScreenWidth/2-22, ScreenHeight-80, 44, 44);
                    [cancelBtn setImage:[UIImage imageNamed:@"close"] forState:UIControlStateNormal];
                    [cancelBtn addTarget:self action:@selector(removeSelfFromSuperview) forControlEvents:UIControlEventTouchUpInside];
-                   [self addSubview:cancelBtn];
+//                   [self addSubview:cancelBtn];
                }
            }
            
@@ -561,7 +561,7 @@
         // 正常显示取消按钮
         
         cancelBtn       = [UIButton buttonWithType:UIButtonTypeCustom];
-        cancelBtn.frame = CGRectMake(ScreenWidth-100, JX_SCREEN_HEIGHT/6, 44, 44);
+//        cancelBtn.frame = CGRectMake(ScreenWidth-100, JX_SCREEN_HEIGHT/6, 44, 44);
         [cancelBtn setImage:[UIImage imageNamed:@"close"] forState:UIControlStateNormal];
         [cancelBtn addTarget:self action:@selector(removeSelfFromSuperview) forControlEvents:UIControlEventTouchUpInside];
         

+ 1 - 1
shiku_im/controller/JXChatViewC.mm

@@ -471,7 +471,7 @@
 
              self.title = [NSString stringWithFormat:@"%@ 临时会话 (%@) ",userName, str];
         }else{
-            
+             self.title = [NSString stringWithFormat:@"%@ (%@) ",userName, str];
         }
     }else {
          if (_useInfoTempChat==11) {

+ 48 - 0
shiku_im/controller/JXChatViewController.h

@@ -111,6 +111,10 @@ typedef void(^PerBlockBtn)(memberData *personData);
 
 @property (nonatomic, strong) NSNumber *groupStatus;
 
+@property (nonatomic, copy) NSString *recordFromUserName;
+
+@property (nonatomic, copy) NSString *recordFromUseId;
+
 @property (nonatomic, assign) BOOL isCYMSGgroupANDFriendy;
 @property (nonatomic, strong) NSMutableArray *userNamesWithGroup;
 @property (nonatomic, strong) NSMutableArray *userNmaesWithFriend;
@@ -133,6 +137,8 @@ typedef void(^PerBlockBtn)(memberData *personData);
 
 @property (nonatomic, assign) int useInfoTempChat;
 
+@property (nonatomic, assign) int lotterInt;
+
 @property (nonatomic, assign) int enterFirst;
  @property (nonatomic, copy) NSString *customerPush;
 
@@ -146,3 +152,45 @@ typedef void(^PerBlockBtn)(memberData *personData);
 
 -(void)showBack:(memberData*)msguser;
 @end
+
+/**
+ 
+
+   BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
+       
+    BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
+    
+    if (isOpen==1 && isOpen2==1) {
+        _noticeView2.hidden = YES;
+        _noticeViewScrollView.hidden = YES;
+ 
+    }else if (isOpen==1 && isOpen2==0) {
+        
+       // _table.contentInset = UIEdgeInsetsMake(38, 0, 0, 0);
+        _noticeViewScrollView.hidden = NO;
+        _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
+        _noticeView2.hidden = YES;_table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
+    }else if (isOpen==0 && isOpen2==1){
+
+        if ( _biaotishifoBC==1111) {
+
+            _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
+              //  self.showTopView.xiaLineView.hidden=NO;
+             _noticeView2.hidden = NO;
+            self.showTopView.xiaLineView.hidden=NO;
+        }else{
+
+            _noticeView2.hidden = YES;
+        }
+        
+        _noticeViewScrollView.hidden = YES;
+    }else if (isOpen==0 && isOpen2==0) {
+        _noticeViewScrollView.hidden = NO;
+
+        self.showTopView.xiaLineView.hidden=YES;
+         _noticeView2.hidden = NO;
+         _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
+        _table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);
+    }
+     
+ */

+ 247 - 85
shiku_im/controller/JXChatViewController.mm

@@ -601,6 +601,9 @@
 - (void)refreshChatLogNotif:(NSNotification *)notif {
     self.isGetServerMsg = NO;
     [_array removeAllObjects];
+    
+     [g_server roomGetRoom:self.roomId toView:self];
+    
     [self refresh:nil];
     [self.tableView reloadData];
 }
@@ -865,6 +868,7 @@
     [_floating setContent:[UIImage imageNamed:@"sidaiDD"] contentType:MISFloatingBallContentTypeImage];
     _floating.edgePolicy = MISFloatingBallEdgePolicyLeftRight;
     [_floating show];
+    _floating.hidden=YES;
     __weak __typeof(self)weakSelf = self;
     _floating.clickHandler = ^(MISFloatingBall * _Nonnull floatingBall) {
         //[g_server getAppResource:@"5" ToView:weakSelf];
@@ -1137,7 +1141,7 @@
 -(void)refresh:(JXMessageObject*)msg
 {
     _isRefreshing = YES;
-    if (self.courseId.length > 0) {
+    if (_courseId.length > 0) {
         NSMutableArray *arr = [NSMutableArray array];
         for (NSDictionary *dict in self.courseArray) {
             [arr addObject:dict[@"message"]];
@@ -1253,7 +1257,7 @@
 //                     }];
 //                     NSNumber *time = [sortedArray lastObject];
 //                     starTime =  [time longValue];
-                      
+                      // [g_server tigaseMucMsgsWithRoomId:s StartTime:604800000 EndTime:endTime PageIndex:0 PageSize:PAGECOUNT toView:self];
             if([_roomJid length]>0){
                           [g_server tigaseMucMsgsWithRoomId:s StartTime:starTime EndTime:endTime PageIndex:0 PageSize:PAGECOUNT toView:self];
             }
@@ -1274,10 +1278,27 @@
                 
                 JXSynTask *task = _taskList.firstObject;
                 if (self.roomJid.length > 0 && task) {
-                    
-                    p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:task.endTime];
+                      //获取某联系人所有聊天记录
+                   
+
+                    NSString *messageLenth=[g_default objectForKey:@"messageHistory"];
+                    if (messageLenth.length>0) {
+                        
+                         p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:task.endTime];
+                                         
+                    }else{
+
+                        p = [[JXMessageObject sharedInstance] fetchAllMessageListWithUser:s];
+                        
+                        
+                        [g_default setObject:@"messageHistory" forKey:@"messageHistory"];
+                        [g_default synchronize];
+                    }
                     
                     
+                    NSLog(@"task.endTime  %@",task.endTime);
+                  //获取某联系人聊天记录
+                    //-(NSMutableArray*)fetchAllMessageListWithUser:(NSString *)userId;
                 }else {
                     NSString* myUserId = MY_USER_ID;
                     double createTime = 0;
@@ -1288,7 +1309,22 @@
                             createTime = mdata.createTime;
                         }
                     }
-                    p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:createTime]];
+                    
+                    NSString *messageLenth=[g_default objectForKey:@"messageHistory"];
+                    if (messageLenth.length>0) {
+                        
+                         p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:createTime]];
+                                         
+                    }else{
+
+                        p = [[JXMessageObject sharedInstance] fetchAllMessageListWithUser:s];
+                        
+                        
+                        [g_default setObject:@"messageHistory" forKey:@"messageHistory"];
+                        [g_default synchronize];
+                    }
+                    
+                   
                 }
                 if (_array.count <= 0 &&(!p || p.count <= 0) && (!self.roomJid || self.roomJid.length <= 0)) {
                     self.isGetServerMsg = YES;
@@ -1298,6 +1334,7 @@
 
                 bPull = (p && p.count > 0);
             }else {
+                ////获取某联系人所有聊天记录
                 p = [[JXMessageObject sharedInstance] fetchAllMessageListWithUser:s];
                 [_array removeAllObjects];
                 bPull = NO;
@@ -1305,9 +1342,9 @@
             
         }
         
-        for (JXMessageObject *msg in p) {
-            allHeight += [msg.chatMsgHeight floatValue];
-        }
+//        for (JXMessageObject *msg in p) {
+//            allHeight += [msg.chatMsgHeight floatValue];
+//        }
         
         self.isGetServerMsg = !bPull;
         
@@ -1359,15 +1396,15 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
         [_pool removeAllObjects];
         _refreshCount++;
         
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
             //刷新完成
             if (self.scrollLine > 0) {
-                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                     
                     [_table reloadData];
-                    [self scrollToCurrentLine];
+                   // [self scrollToCurrentLine];
                     _isRefreshing = NO;
-                });
+//                });
             }else {
                 if(msg || _page == 0){
                     [_table reloadData];
@@ -1379,11 +1416,11 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
                 }
                 else{
                     if([_array count]>0){
-                        [_table gotoLastRow:NO];
+                       // [_table gotoLastRow:NO];
                         [_table reloadData];
                         //  [_table gotoRow: (int)(_array.count - firstNum + 2)];
                         //  [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:(int)(_array.count - firstNum) inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
-                        _table.contentOffset = CGPointMake(0, allHeight);
+                       // _table.contentOffset = CGPointMake(0, allHeight);
                         
                     }
                 }
@@ -1392,10 +1429,12 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
                 _isRefreshing = NO;
             }
             
-        });
+//        });
         
     }else {
-        _isRefreshing = NO;//[_table gotoLastRow:NO];
+        _isRefreshing = NO;//
+         
+        //[_table gotoLastRow:NO];
     }
     
 }
@@ -1412,6 +1451,25 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
 - (void) customView {
     [self createHeadAndFoot];
     self.tableFooter.clipsToBounds = YES;
+    
+    if ([_groupStatus intValue]==1) {
+      
+        
+         UIAlertView *uialertShow = [[UIAlertView alloc] initWithTitle:Localized(@"JX_OutOfTheGroup1") message:nil delegate:self cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil];
+         uialertShow.tag=20000000;
+                    [uialertShow show];
+        
+        return;
+    }else if ([self.groupStatus intValue]==2){
+           
+         
+        UIAlertView *uialertShow = [[UIAlertView alloc] initWithTitle:Localized(@"JX_DissolutionGroup1") message:nil delegate:self cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil];
+          uialertShow.tag=30000000;
+         [uialertShow show];
+        
+        return;
+    }
+    
     // 设置聊天背景图片
 //    self.backGroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT - JX_SCREEN_BOTTOM)];
 //    self.backGroundImageView.contentMode = UIViewContentModeScaleAspectFill;
@@ -1465,7 +1523,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
         _moreView =[JXSelectImageView alloc];
         _moreView.isDevice = [self.chatPerson.userId rangeOfString:MY_USER_ID].location != NSNotFound;
         _moreView.delegate = self;
-        _moreView.isGroupMessages = self.isGroupMessages;
+        _moreView.data=data;
+        _moreView.isGroupMessages = _isGroupMessages;
         _moreView.isGroup = _roomJid.length > 0;
         _moreView.isWin = [data.role intValue] == 1;
         _moreView.onImage  = @selector(pickPhoto);
@@ -1506,7 +1565,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
     
     UIButton* btn;
     UIButton *btn1;
-    if(self.roomJid){
+    if(_roomJid){
         btn1 = [[UIButton alloc] initWithFrame:CGRectMake(JX_SCREEN_WIDTH-18-BTN_RANG_UP*2, JX_SCREEN_TOP -18-BTN_RANG_UP*2, 18+BTN_RANG_UP*2, 18+BTN_RANG_UP*2)];
         [btn1 addTarget:self action:@selector(onMember) forControlEvents:UIControlEventTouchUpInside];
         [self.tableHeader addSubview:btn1];
@@ -1976,7 +2035,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
     
      
     // [g_notify addObserver:self selector:@selector(deleRoom) name:@"act_roomMemberDeljieshan" object:nil];
-//     [g_notify addObserver:self selector:@selector(deleRoom) name:@"deleRoom" object:nil];
+//     [g_notify :self selector:@selector(deleRoom) name:@"deleRoom" object:nil];
 
 //    [g_notify postNotificationName:kUpdateUserNotifaction object:nil];
 //    [self.navigationController popViewControllerAnimated:YES];
@@ -1993,51 +2052,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
 //
 //         [self refresh:nil];
 //    });
-    
-      BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
-          
-       BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
-       
-       if (isOpen==1 && isOpen2==1) {
-           _noticeView2.hidden = YES;
-           _noticeViewScrollView.hidden = YES;
-    
-       }else if (isOpen==1 && isOpen2==0) {
-           
-          // _table.contentInset = UIEdgeInsetsMake(38, 0, 0, 0);
-           _noticeViewScrollView.hidden = NO;
-           _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
-           _noticeView2.hidden = YES;_table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
-       }else if (isOpen==0 && isOpen2==1){
-
-           if ( _biaotishifoBC==1111) {
-
-               _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
-                 //  self.showTopView.xiaLineView.hidden=NO;
-                _noticeView2.hidden = NO;
-               self.showTopView.xiaLineView.hidden=NO;
-           }else{
-
-               _noticeView2.hidden = YES;
-           }
-           
-           _noticeViewScrollView.hidden = YES;
-       }else if (isOpen==0 && isOpen2==0) {
-           _noticeViewScrollView.hidden = NO;
-
-           self.showTopView.xiaLineView.hidden=YES;
-            _noticeView2.hidden = NO;
-            _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
-           _table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);
-       }
-    
-//    [g_notify removeObserver:self];
-
-    if ([_roomJid length]<=0) {
-        
-
-        _table.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
-    }
+     
+  
     [self.navigationController setNavigationBarHidden:NO];
     
 }
@@ -2046,6 +2062,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
   
     [super viewDidDisappear:animated];
       _strURLGoback=@"";
+    [_container dismiss];
     if (_enterFirst==100) {
     
     _noticeView2=nil;
@@ -2154,6 +2171,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
      
      _noticeViewScrollView.backgroundColor=kRGBColor(246, 246, 246);
      [self.view addSubview:_noticeViewScrollView];
+    _noticeViewScrollView.hidden=YES;
 
      UIView *lineView1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, JX_SCREEN_WIDTH, 1)];
      lineView1.backgroundColor=[UIColor whiteColor];
@@ -2323,7 +2341,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
     _noticeView2 = [[UIView alloc] initWithFrame:CGRectMake(0, JX_SCREEN_TOP-(JX_SCREEN_HEIGHT>=812?44:20), JX_SCREEN_WIDTH, 38)];
     _noticeView2.backgroundColor = [UIColor whiteColor];
     [self.view addSubview:_noticeView2];
-    
+     
     
     JXtopShowVIew *showTopView=[JXtopShowVIew xibJXtopShowVIew];
     showTopView.frame= _noticeView2.bounds;
@@ -2361,8 +2379,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
     
     if (selectItem) {
         //_table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);
-        _noticeView2.hidden = NO;
-        _noticeViewScrollView.hidden = YES;
+//        _noticeView2.hidden = NO;
+//        _noticeViewScrollView.hidden = YES;
         NSArray *temp = [selectItem componentsSeparatedByString:@"-"];
         //NSString *first = temp.firstObject;
         NSString *last = temp.lastObject;
@@ -2373,8 +2391,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
         [showTopView.caizongBtn setTitle:[NSString stringWithFormat:@"%@:",titleName] forState:(UIControlStateNormal)];
     }else {
 
-        _noticeViewScrollView.hidden = NO;
-        _noticeView2.hidden = YES;
+//        _noticeViewScrollView.hidden = NO;
+//        _noticeView2.hidden = YES;
        
         [showTopView.caizongBtn setTitle:@"开奖结果" forState:(UIControlStateNormal)];
     }
@@ -2422,9 +2440,9 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
     
     
     if (allGroupAnnouncement == nil) {
-        _noticeView2.hidden = YES;
+//        _noticeView2.hidden = YES;
     }else {
-        _noticeView2.hidden = NO;
+//        _noticeView2.hidden = NO;
     }
     
     
@@ -2520,9 +2538,14 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
 
 // 跳转到新消息
 - (void)jumpNewMsgBtnAction {
-    NSIndexPath* indexPat = [NSIndexPath indexPathForRow:0 inSection:0];
-    [self.tableView scrollToRowAtIndexPath:indexPat atScrollPosition:UITableViewScrollPositionBottom animated:YES];
-    _jumpNewMsgBtn.hidden = YES;
+    try {
+         NSIndexPath* indexPat = [NSIndexPath indexPathForRow:0 inSection:0];
+            [self.tableView scrollToRowAtIndexPath:indexPat atScrollPosition:UITableViewScrollPositionBottom animated:YES];
+            _jumpNewMsgBtn.hidden = YES;
+    } catch (NSException *error) {
+         
+    }
+   
 }
 
 - (void)screenShotViewAction:(UITapGestureRecognizer *)tap {
@@ -3178,12 +3201,14 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
     self.isSelectMore = NO;
     [self actionQuit];
 }
-
+//退出群聊
 - (void)delFriend:(NSNotification *)notif {
     JXUserObject* user = (JXUserObject *)notif.object;
 
     if ([chatPerson.userId isEqualToString:user.userId]) {
-        [self actionQuit];
+        //[self actionQuit];
+        
+        [self.navigationController popViewControllerAnimated:YES];
     }
 }
 
@@ -3221,7 +3246,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
 }
 
 - (void)dealloc {
-    
+    [g_default removeObjectForKey:@"messageHistory"];
     [g_notify removeObserver:self];
     [g_notify removeObserver:self name:kCellShowCardNotifaction object:nil];
     [g_notify removeObserver:self name:kCellLocationNotifaction object:nil];
@@ -4916,6 +4941,17 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
     if(msg==nil)
         return;
     
+//    if ([msg.fromUserName isEqualToString:_recordFromUserName]&&[msg.fromUserName isEqualToString:_recordFromUserName]) {
+//         
+//    }else{
+
+//        [g_server roomGetRoom:self.roomId toView:self];
+//    }
+
+//    [g_server getRoomMember:roomId userId:[g_myself.userId intValue] toView:self];
+//
+//    _recordFromUserName=msg.fromUserName;
+//    _recordFromUseId=msg.fromUserId;
     // 更新title 在线状态
     if (!self.roomJid && !self.onlinestate && ![msg.fromUserId isEqualToString:MY_USER_ID]) {
         self.onlinestate = YES;
@@ -5045,6 +5081,11 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
             [self showOneMsg:msg];
     }
     msg = nil;
+    
+    if ([msg.type intValue]==10) {
+        
+        [self.navigationController popViewControllerAnimated:YES];
+    }
 }
 
 -(void)newReceipt:(NSNotification *)notifacation{//新回执
@@ -7769,7 +7810,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
             else
                 s = chatPerson.userId;
             [[JXMessageObject sharedInstance] getHistory:array1 userId:s];
-            
+            //_array;
             if (self.roomJid && _taskList.count > 0) {
                 JXSynTask *task = _taskList.firstObject;
                 if (array1.count < PAGECOUNT) {
@@ -7807,7 +7848,9 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
                 [self setIsShowTime];[_table  reloadData];
               */
                 
-                 [self refresh:nil];
+                [self refresh:nil];
+                
+                
                 
                 
                 NSLog(@"JXSynTask ^刷新");
@@ -7942,11 +7985,21 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
     }
     
     if ([aDownload.action isEqualToString:act_roomGetRoom]) {
-        
+     
         BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
               
              BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
-             
+        _lotterInt=[dict[@"lottery"] intValue];
+        if ([dict[@"lottery"] intValue]==1) {
+            _floating.hidden=NO;
+        }else{
+            _floating.hidden=YES;
+            
+        }
+        
+        
+        
+        
              if ([dict[@"lottery"] intValue]==1) {
               
 
@@ -7960,7 +8013,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
                      _noticeViewScrollView.hidden = NO;
                      
                      _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
-                     _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
+                     _noticeViewScrollView.frame=CGRectMake(0, 44, JX_SCREEN_WIDTH, 37);
                    
                  }else if (isOpen==0 && isOpen2==1){
                      _noticeView2.hidden = NO;
@@ -7969,7 +8022,8 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
                      _noticeViewScrollView.hidden = YES;
                  }else if (isOpen==0 && isOpen2==0) {
                      _noticeViewScrollView.hidden = NO;
-
+                     
+                     _noticeViewScrollView.hidden = NO;
                      self.showTopView.xiaLineView.hidden=YES;
                      _noticeView2.hidden = NO;
                        _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
@@ -8940,19 +8994,30 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
             s = nil;
             break;
         case 1:
+        {
             s = Localized(@"JX_OutOfTheGroup1");
+           
+            
+            
             break;
+        }
         case 2:
+        {
             s = Localized(@"JX_DissolutionGroup1");
+            
+         
             break;
             
+        }
         default:
             break;
     }
     
     if (s.length > 0) {
         [self hideKeyboard:NO];
-        [g_server showMsg:s];
+         [g_server showMsg:s];
+        
+         
     }else {
 //        [_wait start];
         
@@ -8962,6 +9027,94 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
         vc.roomId = roomId;
         vc.room = self.room;
         vc.delegate = self;
+        vc.guanxinCoseBlock = ^(BOOL guanxinCose) {
+
+             BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
+                
+             BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
+            
+            if (_lotterInt==1&&isOpen==0) {
+                if (isOpen2==0) {
+
+                    self.showTopView.xiaLineView.hidden=YES;
+                    _noticeViewScrollView.hidden=NO;
+                }else{
+
+                    self.showTopView.xiaLineView.hidden=NO;
+                    _noticeViewScrollView.hidden=YES;
+                }
+                _noticeView2.hidden = NO;
+                _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
+                
+                  _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
+            }else{
+                
+                _noticeView2.hidden = YES;
+                
+                if (isOpen2==0) {
+                    _noticeViewScrollView.hidden=NO;
+                    _noticeViewScrollView.frame=CGRectMake(0, 0, JX_SCREEN_WIDTH, 37);
+                     
+                    _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
+                }else{
+                    
+                    _noticeViewScrollView.hidden=YES;
+                }
+                                                           
+            }
+                                                           
+            
+            
+            
+            
+
+            
+        };
+        vc.resultBlock = ^(BOOL resultClose) {
+            
+
+            BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
+            BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
+            
+            if (_lotterInt==1&&isOpen==0) {
+ 
+                if (isOpen2==0) {
+
+                    self.showTopView.xiaLineView.hidden=YES;
+                    _noticeViewScrollView.hidden = NO;
+                }else{
+
+                    self.showTopView.xiaLineView.hidden=NO;
+                    _noticeViewScrollView.hidden = YES;
+                }
+                _noticeView2.hidden = NO;
+                _noticeViewScrollView.hidden = NO;
+               _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
+                                  _table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);
+             
+            }else{
+                
+                 _noticeView2.hidden = YES;
+                
+                if (isOpen2==0) {
+                    _noticeViewScrollView.hidden = NO;
+                    _noticeViewScrollView.frame=CGRectMake(0, 44, JX_SCREEN_WIDTH, 37);
+                  
+                    
+                    _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
+                }else{
+                    _noticeViewScrollView.hidden = YES;
+                }
+                
+                
+            }
+            
+        };
+        
+        
+
+        //    [g_notify removeObserver:self];
+        
         vc = [vc init];
         //        [g_window addSubview:vc.view];
         [g_navigation pushViewController:vc animated:YES];
@@ -8994,7 +9147,7 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
         if([p.type intValue] == kRoomRemind_DelMember){
             if([p.toUserId isEqualToString:MY_USER_ID])
                 self.groupStatus = [NSNumber numberWithInt:1];
-//                [self actionQuit];
+//               // [self actionQuit];
             
             NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];
             self.title = [NSString stringWithFormat:@"%@(%ld)", self.chatPerson.userNickname, memberArray.count];
@@ -11453,6 +11606,15 @@ NSMutableArray* temp = [[NSMutableArray alloc]init];
 
 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
     
+    if (alertView.tag==30000000) {
+        [self.navigationController popViewControllerAnimated:YES];
+        
+        return;
+    }if (alertView.tag==30000000) {
+        [self.navigationController popViewControllerAnimated:YES];
+        
+        return;
+    }
     if (alertView.tag == 2457) {
         
         if (buttonIndex == 1) {

+ 3 - 3
shiku_im/controller/JXRelayVC.m

@@ -774,13 +774,13 @@ typedef enum : NSUInteger {
         msg.tempChat=7100;
         
         NSString *coinStr=[NSString stringWithFormat:@"%@",dict[@"coinNum"]];
-        
-        msg.content=[NSString stringWithFormat:@"我刚刚在金管家领取%@元 周礼金,点击查看我的礼金===jixin%@",coinStr,@"JXGoldMangVc"];
+    
+        msg.content=[NSString stringWithFormat:@" 我刚刚参与了“金管家”活动 领取了%@ 元彩金,好爽啊! 你还在等什么?点击查看一同 领取!===jixin%@",coinStr,@"JXGoldMangVc"];
         [tempArr addObject:msg];
         _relayMsgArray = tempArr;
         
         _useObjectP= _useObjectP22;
-        _useObjectP.message.content=[NSString stringWithFormat:@"我刚刚在金管家领取%@元 周礼金,点击查看我的礼金===jixin%@",dict[@"coinNum"],@"JXGoldMangVc"];
+        _useObjectP.message.content=[NSString stringWithFormat:@" 我刚刚参与了“金管家”活动 领取了%@元彩金,好爽啊! 你还在等什么?点击查看一同 领取!===jixin%@",dict[@"coinNum"],@"JXGoldMangVc"];
         
         [self shareMessage:_useObjectP tempUrl:0];
         

+ 10 - 0
shiku_im/controller/JXRoomMemberVC.h

@@ -10,6 +10,10 @@
 @class roomData;
 @class JXRoomObject;
 
+typedef void(^successOpenResultBlock)(BOOL resultClose);
+
+typedef void(^successOpenGuanxinBlock)(BOOL guanxinCose);
+
 @protocol JXRoomMemberVCDelegate <NSObject>
 
 - (void) setNickName:(NSString *)nickName;
@@ -17,6 +21,7 @@
 
 @end
 
+
 @interface JXRoomMemberVC : admobViewController<LXActionSheetDelegate>{
     JXLabel* _desc;
     JXLabel* _userName;
@@ -59,6 +64,11 @@
     UILabel* _roomNum;
 }
 
+
+@property (nonatomic, copy)successOpenResultBlock resultBlock;
+
+@property (nonatomic, copy)successOpenGuanxinBlock guanxinCoseBlock;
+
 @property (nonatomic, assign) NSString *roomId;
 
 @property (nonatomic,strong) JXRoomObject* chatRoom;

+ 120 - 35
shiku_im/controller/JXRoomMemberVC.m

@@ -307,6 +307,9 @@
 {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+     [g_server roomGetRoom:self.roomId toView:self];
+
+    [g_server getRoomMember:_roomId userId:[g_myself.userId intValue] toView:self];
 }
 
 - (void)didReceiveMemoryWarning
@@ -449,14 +452,15 @@
             [self createImages];
             [g_notify postNotificationName:kRefreshChatLogNotif object:nil];
         }
-        
+
+         
         [g_App showAlert:Localized(@"JXAlert_SetOK")];
     }
     if( [aDownload.action isEqualToString:act_roomDel] ){
         [JXUserObject deleteUserAndMsg:room.roomJid];
         chatRoom.delegate = self;
         [g_notify postNotificationName:kUpdateUserNotifaction object:nil];
-        [g_notify postNotificationName:kUpdateUserNotifaction object:nil];
+        //[g_notify postNotificationName:kUpdateUserNotifaction object:nil];
         
          
 //        [self actionQuit];
@@ -464,7 +468,7 @@
     }
     if ([aDownload.action isEqualToString:act_roomMemberList]) {
         [room.members removeAllObjects];
-        
+      
         for (int i = 0; i < [array1 count]; i++) {
             roomData * rData = [[roomData alloc]init];
             [rData getDataFromDict:array1[i]];
@@ -479,6 +483,9 @@
 
     //
     if( [aDownload.action isEqualToString:act_roomMemberDel] ){
+        
+         [g_navigation dismissViewController:self animated:YES];
+        
         memberData* member=nil;
         if(_delete == -1){
             chatRoom.delegate = self;
@@ -499,7 +506,7 @@
         //通知自己界面
         [self onAfterDelMember:member];
         member = nil; //退出群
-        
+       
         //[g_navigation dismissViewController:self animated:YES];
         //[g_notify postNotificationName:@"act_roomMemberDeljieshan" object:nil];
         [g_notify postNotificationName:kUpdateUserNotifaction object:nil];
@@ -569,6 +576,8 @@
         JXUserObject* user = [[JXUserObject alloc]init];
         [user getDataFromDict:dict];
         
+         
+        
         NSDictionary * groupDict = [user toDictionary];
         roomData * roomdata = [[roomData alloc] init];
         [roomdata getDataFromDict:groupDict];
@@ -904,9 +913,10 @@
     NSString *btnTitle = @"群内昵称";//_isAdmin ?@"群内昵称" :@"修改自己";
     
     self.iv = [self createButton:btnTitle drawTop:NO drawBottom:NO must:NO click:@selector(onNickName) ParentView:_memberView];
+    self.iv.tag=1000;
     self.iv.frame = CGRectMake(0, membHeight, JX_SCREEN_WIDTH, HEIGHT);
-    if (!_isAdmin) {
-        _userName = [self createLabel:self.iv default:[room getNickNameInRoom] isClick:YES];
+    if (!_isAdmin) {  [room getNickNameInRoom];
+        _userName = [self createLabel:self.iv default:g_server.myself.userNickname isClick:YES];
     }
     membHeight+=self.iv.frame.size.height;
     membHeight+=INSETS;
@@ -1064,8 +1074,9 @@
     _closeOpenGuanXinSwitch.onTintColor = THEMECOLOR;
     _closeOpenGuanXinSwitch.frame = CGRectMake(JX_SCREEN_WIDTH-INSETS-51, 6, 0, 0);
     _closeOpenGuanXinSwitch.center = CGPointMake(_messageFreeSwitch.center.x, self.iv.frame.size.height/2);
-  
-     if([g_default boolForKey:kGuanXinComePush] == 0){
+    BOOL guanxin = [g_default boolForKey:kGuanXinComePush];
+    
+     if(guanxin == 0){
          
           _closeOpenGuanXinSwitch.on = YES;
       }else{
@@ -1210,31 +1221,79 @@
 - (void)switchCloseGouCaiAction:(UISwitch *)swich{
      
      BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
-    
+   
     if (isOpen==0) {
-         [g_default setBool:1 forKey:kgoucaiComePush];
-            [g_default synchronize];
+        
+       
+        
+        [g_default setBool:1 forKey:kgoucaiComePush];
+        [g_default synchronize];
+        
+        
+        if (_resultBlock) {
+                   
+           _resultBlock(1);
+                   
+        }
+        
     }else{
+       
         [g_default setBool:0 forKey:kgoucaiComePush];
-          [g_default synchronize];
+        [g_default synchronize];
+        
+        if (_resultBlock) {
+                   
+             _resultBlock(0);
+                   
+         }
     }
+        
+        
+    
+     
+    
+}
+
+
+//关闭
+-(void)setResultBlock:(successOpenResultBlock)resultBlock{
+    
+    _resultBlock=resultBlock;
 }
 
 //开启特别关心提示
 - (void)switchCloseGuanxianAction:(UISwitch *)swich{
     
     BOOL isOpen = [g_default boolForKey:kGuanXinComePush];
-       
-       if (isOpen==0) {
-            [g_default setBool:1 forKey:kGuanXinComePush];
-               [g_default synchronize];
-       }else{
-           [g_default setBool:0 forKey:kGuanXinComePush];
-             [g_default synchronize];
-       }
+        
+    if (isOpen==0) {
+     
+        
+        [g_default setBool:1 forKey:kGuanXinComePush];
+        [g_default synchronize];
+        
+            if (_guanxinCoseBlock) {
+               _guanxinCoseBlock(1);
+                 
+             }
+        
+    }else{
+        
+        [g_default setBool:0 forKey:kGuanXinComePush];
+        [g_default synchronize];
+        
+        if (_guanxinCoseBlock) {
+            
+            _guanxinCoseBlock(0);
+            
+        }
+    }
     
 }
-
+-(void)setGuanxinCoseBlock:(successOpenGuanxinBlock)guanxinCoseBlock{
+    
+    _guanxinCoseBlock=guanxinCoseBlock;
+}
 
 - (void)settingRoomIcon {
     JXActionSheetVC *actionVC = [[JXActionSheetVC alloc] initWithImages:@[] names:@[Localized(@"JX_ChoosePhoto"),Localized(@"JX_TakePhoto")]];
@@ -1772,13 +1831,16 @@
 //}
 
 -(void)onDelRoom{
-    [g_server delRoom:room.roomId toView:self];
+    UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"即信" message:@"确认解散当前群" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
+    alert.tag=222;
+    [alert show];
 }
   
 -(void)onQuitRoom{
-    _delete = -1;
-    [JXUserObject deleteUserAndMsg:room.roomJid];
-    [g_server delRoomMember:room.roomId userId:[g_myself.userId intValue] toView:self];
+    UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"即信" message:@"确认退出当前群" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
+       alert.tag=333;
+    
+    [alert show];
 }
 
 //离开房间
@@ -1794,12 +1856,12 @@
 -(void)actionQuit{
     _allowEdit = NO;
     self.room.curCount = self.userSize;
-    [self.view endEditing:YES];
-    if (g_mainVC.msgVc.array.count > 0) {
-        [g_mainVC.msgVc.tableView reloadRow:self.rowIndex section:0];
-    }
-
-    [super actionQuit];
+    //[self.view endEditing:YES];
+//    if (g_mainVC.msgVc.array.count > 0) {
+//        [g_mainVC.msgVc.tableView reloadRow:self.rowIndex section:0];
+//    }
+    [g_navigation dismissViewController:self animated:YES];
+    //[super actionQuit];
 }
 
 -(void)onReceiveRoomRemind:(NSNotification *)notifacation//退出房间
@@ -2004,9 +2066,9 @@
             [JXMyTools showTipView:@"隐身人不能修改群内昵称"];
             return;
         }
-        
+        // g_server.myself.userNickname;//
         JXInputValueVC* vc = [JXInputValueVC alloc];
-        vc.value = [room getNickNameInRoom];
+    vc.value =[room getNickNameInRoom];
         vc.title = Localized(@"JXRoomMemberVC_UpdateNickName");
         vc.delegate  = self;
         vc.didSelect = @selector(onSaveNickName:);
@@ -2059,13 +2121,13 @@
     
     _userName.text = vc.value;
     memberData* p = [room getMember:g_myself.userId];
-    p.userNickName = vc.value;
+     p.userNickName = vc.value;
     
     if ([self.delegate respondsToSelector:@selector(setNickName:)]) {
         [self.delegate setNickName:vc.value];
     }
 
-    [g_server setRoomMember:room.roomId member:p toView:self];
+    [g_server setRoomMember:room.roomId member:p nickName:vc.value toView:self];
     p = nil;
 }
 
@@ -2369,6 +2431,29 @@
 
 
 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
+    
+    if (alertView.tag==222) {
+        if (buttonIndex==1) {
+            
+
+                [g_server delRoom:room.roomId toView:self];
+        }else{
+            
+        }
+        return;
+    }
+    if (alertView.tag==333) {
+        if (buttonIndex==1) {
+            
+            _delete = -1;
+            [JXUserObject deleteUserAndMsg:room.roomJid];
+            [g_server delRoomMember:room.roomId userId:[g_myself.userId intValue] toView:self];
+        }else{
+            
+        }
+        return;
+    }
+    
     if (buttonIndex == 1) {
         // 清除聊天记
         JXMessageObject *msg = [[JXMessageObject alloc] init];

+ 4 - 0
shiku_im/model/JXFriendObject.m

@@ -311,6 +311,10 @@ static JXFriendObject *sharedUser;
         }
             break;
         case XMPP_TYPE_PASS:
+        {
+            
+            NSLog(@"验证通过 %@",user);
+        }
         case XMPP_TYPE_CONTACTFRIEND:
             self.status = [NSNumber numberWithInt:friend_status_friend];
             [self doSaveUser];

+ 15 - 0
shiku_im/model/JXMessageObject.m

@@ -45,6 +45,7 @@
 #import "JXTransferCell.h"
 #import "JXReplyCell.h"
 #import "JXUserPublicKeyObj.h"
+#import "JLGroupActivityModel.h"
 
 @implementation JXMessageObject
 
@@ -2794,8 +2795,22 @@ static JXMessageObject *shared;
         SBJsonParser * resultParser = [[SBJsonParser alloc] init] ;
         NSDictionary *jsonDic = [resultParser objectWithString:jsonMsg];
         
+        
         JXMessageObject *msg = [[JXMessageObject alloc] init];
         [msg fromDictionary:jsonDic];
+        
+        if ([msg.type  isEqual: @2100]) {
+                   NSString *str = jsonDic[@"content"];
+                   JLGroupActivityModel *model = [JLGroupActivityModel mj_objectWithKeyValues:str];
+                   model.roomJid = userId;
+                   if (model.type == 2) {
+                       msg.type = @1;
+                       msg.content = model.content;
+                       msg.toUserId = model.roomJid;
+                   }
+                   
+               }
+        
         msg.timeSend = [NSDate dateWithTimeIntervalSince1970:[[jsonDic objectForKey:kMESSAGE_TIMESEND] doubleValue] / 1000.0];
         msg.messageId = [(NSDictionary *)[jsonDic objectForKey:@"messageHead"] objectForKey:@"messageId"];
 //        if([userId length]>15){

+ 17 - 12
shiku_im/model/JXXMPP.m

@@ -401,16 +401,16 @@ static JXXMPP *sharedManager;
                 NSLog(@"红包 龙:model.type %ld",(long)model.type);
                 [g_notify postNotificationName:kRoomRemind_RoomIsRedMoneyGroupActivityRefresh object:model];
             }else if (model.type == 0){
-                NSDictionary *typeDic=[msg.content mj_keyValues];
+              
                 
-//                if ([[msg.content mj_keyValues] isKindOfClass:[NSDictionary class]]) {
-                     if ([typeDic allKeysForObject:@"type"]) {
-                         
-                         
-                          [g_notify postNotificationName:kRoomGroupActivityRefresh object:model];
-                                     
-                     }
-//                }
+                //if ([[msg.content mj_keyValues] isKindOfClass:[NSDictionary class]]) {
+               if ([msg.content containsString:@"type"]) {
+                    
+                    
+                    [g_notify postNotificationName:kRoomGroupActivityRefresh object:model];
+                    
+               }
+ 
                 
                 
                 NSLog(@"红包 model.type:%d",model.type);
@@ -897,7 +897,7 @@ static JXXMPP *sharedManager;
 -(void)applicationWillTerminate
 {
     UIApplication *app=[UIApplication sharedApplication];
-    UIBackgroundTaskIdentifier taskId;
+    UIBackgroundTaskIdentifier taskId = 0;
     taskId=[app beginBackgroundTaskWithExpirationHandler:^(void){
         [app endBackgroundTask:taskId];
     }];
@@ -1063,7 +1063,12 @@ static JXXMPP *sharedManager;
     
     if (g_xmpp.lastMsgTime > 0.7) {
         NSLog(@"刷新聊天记录:%f",g_xmpp.lastMsgTime);
-        [g_notify postNotificationName:kXMPPAllMsgNotifaction object:nil userInfo:nil];
+        [[NSOperationQueue mainQueue] addOperationWithBlock:^{
+            
+            [g_notify postNotificationName:kXMPPAllMsgNotifaction object:nil userInfo:nil];
+          
+        }];
+        
         if (g_xmpp.msgTimer) {
             dispatch_cancel(g_xmpp.msgTimer);
             g_xmpp.msgTimer = nil;
@@ -1071,7 +1076,7 @@ static JXXMPP *sharedManager;
         }
     }
 }
-
+//新朋友的亲求
 -(void)doReceiveFriendRequest:(JXMessageObject*)msg{
     if(![msg isAddFriendMsg])
         return;

+ 4 - 1
shiku_im/network/JXServer.h

@@ -329,7 +329,7 @@
 #define act_UploadCopyFileServlet @"upload/copyFile" // 拷贝文件
 #define act_copyRoom @"room/copyRoom" // 群组复制
 
-#define act_Getconfigconcatdomainnow @"config/concatdomain/now" // 获取购彩web
+#define act_Getconfigconcatdomainnow @"config/concatdomain/all" // 获取购彩web
  
 
 
@@ -734,7 +734,10 @@
 -(void)listRoomMember:(NSString*)roomId page:(int)page toView:(id)toView;
 -(void)getRoomMember:(NSString*)roomId userId:(long)userId toView:(id)toView;
 -(void)delRoomMember:(NSString*)roomId userId:(long)userId toView:(id)toView;
+
+-(void)setRoomMember:(NSString*)roomId member:(memberData*)member nickName:(NSString*)nickName  toView:(id)toView;
 -(void)setRoomMember:(NSString*)roomId member:(memberData*)member toView:(id)toView;
+
 -(void)addRoomMember:(NSString*)roomId userId:(NSString*)userId nickName:(NSString*)nickName toView:(id)toView;
 -(void)addRoomMember:(NSString*)roomId userArray:(NSArray*)array toView:(id)toView;
 -(void)setDisableSay:(NSString*)roomId member:(memberData*)member toView:(id)toView;

+ 32 - 2
shiku_im/network/JXServer.m

@@ -1045,7 +1045,7 @@
     }
     
     // 登录成功后清除过期聊天记录
-    [[JXUserObject sharedInstance] deleteUserChatRecordTimeOutMsg];
+   // [[JXUserObject sharedInstance] deleteUserChatRecordTimeOutMsg];
     
     
     if ([g_config.showContactsUser intValue] == 1) {
@@ -1647,6 +1647,19 @@
     
     [p go];
 }
+
+ 
+//  获取首页的最近一条的聊天记录列表
+- (void)getLastChatListStartTime22:(NSNumber *)startTime toView:(id)toView {
+    JXConnection* p = [self addTask:act_tigaseGetLastChatList param:nil toView:toView];
+     
+    [p setPostValue:startTime forKey:@"startTime"];
+//    [p setPostValue:[NSString stringWithFormat:@"%f",endTime] forKey:@"endTime"];
+//     [p setPostValue:[NSNumber numberWithLong:endTime] forKey:@"endTime"];
+    [p setPostValue:access_token forKey:@"access_token"];
+    [p go];
+}
+
 //  获取首页的最近一条的聊天记录列表
 - (void)getLastChatListStartTime:(NSNumber *)startTime toView:(id)toView {
     JXConnection* p = [self addTask:act_tigaseGetLastChatList param:nil toView:toView];
@@ -3324,7 +3337,24 @@
     [p go];
 }
 
--(void)setRoomMember:(NSString*)roomId member:(memberData*)member toView:(id)toView{
+-(void)setRoomMember:(NSString*)roomId member:(memberData*)member nickName:(NSString*)nickName  toView:(id)toView{
+    
+    if(!member)
+        return;
+    JXConnection* p = [self addTask:act_roomMemberSet param:nil toView:toView];
+    [p setPostValue:roomId forKey:@"roomId"];
+    [p setPostValue:[NSNumber numberWithLong:member.userId] forKey:@"userId"];
+    //    [p setPostValue:[NSNumber numberWithInt:member.role] forKey:@"role"];
+    //    [p setPostValue:[NSNumber numberWithInt:member.sub] forKey:@"sub"];
+    if (member.lordRemarkName.length > 0) {
+        [p setPostValue:member.lordRemarkName forKey:@"remarkName"];
+    }else {
+        [p setPostValue:nickName forKey:@"nickname"];
+    }
+    [p setPostValue:access_token forKey:@"access_token"];
+    [p go];
+}
+ -(void)setRoomMember:(NSString*)roomId member:(memberData*)member toView:(id)toView{
     if(!member)
         return;
     JXConnection* p = [self addTask:act_roomMemberSet param:nil toView:toView];

+ 10 - 6
shiku_im/network/versionManage.m

@@ -374,13 +374,17 @@
 
         NSMutableArray *array = [[NSMutableArray alloc] initWithContentsOfFile:SERVER_LIST_DATA];
         if (array.firstObject) {
-    //        self.apiUrl = array.firstObject;
-            self.apiUrl = [NSString stringWithFormat:@"http://%@/config", APIURL];  // 新socket
-    //          self.apiUrl = [NSString stringWithFormat:@"http://%@:3001/config", testAPIURL];  // 新socket
+            //self.apiUrl = array.firstObject;
+            // self.apiUrl = [NSString stringWithFormat:@"http://%@:8092/config",APIURL];
+                            
+           self.apiUrl = [NSString stringWithFormat:@"http://%@:8092/config", APIURL];
+   
         }else {
-            // self.apiUrl = [NSString stringWithFormat:@"http://%@:8092/config", APIURL];
-            self.apiUrl = [NSString stringWithFormat:@"http://%@/config", APIURL];  // 新socket
-    //        self.apiUrl = [NSString stringWithFormat:@"http://%@:3001/config", testAPIURL];  // 新socket
+            
+           self.apiUrl = [NSString stringWithFormat:@"http://%@:8092/config", APIURL];
+            // 新socket http://%@:3001/config
+            //self.apiUrl = [NSString stringWithFormat:@"http://%@:8092/config", APIURL];
+   
             
             array = [[NSMutableArray alloc] initWithObjects:self.apiUrl, nil];
             [array writeToFile:SERVER_LIST_DATA atomically:YES];

+ 1 - 1
shiku_im/person/PSRegisterBaseVC.m

@@ -124,7 +124,7 @@
         
         iv = [self createButton:@"昵称" drawTop:NO drawBottom:YES must:YES click:nil];
         iv.frame = CGRectMake(0, h, JX_SCREEN_WIDTH, HEIGHT);
-        _name = [self createTextField:iv default:resume.name hint:@"群聊中显示的昵称"];
+        _name = [self createTextField:iv default:@"" hint:@"请使用中文昵称"];
         h+=iv.frame.size.height;
         _name.delegate=self;
         [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textFiledEditChanged:)name:UITextFieldTextDidChangeNotification object:_name];

+ 13 - 1
shiku_im/shiku_im-Info.plist

@@ -67,7 +67,7 @@
 		<dict/>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>20200709</string>
+	<string>20200712</string>
 	<key>LSApplicationCategoryType</key>
 	<string></string>
 	<key>LSApplicationQueriesSchemes</key>
@@ -88,6 +88,18 @@
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>
 		<true/>
+		<key>NSExceptionDomains</key>
+		<dict>
+			<key>http://qdzcie.com</key>
+			<dict>
+				<key>NSExceptionAllowInsecureHTTPLoads</key>
+				<string>YES</string>
+				<key>NSExceptionRequiresForwardSecrecy</key>
+				<false/>
+				<key>NSIncludesSubdomains:YES</key>
+				<true/>
+			</dict>
+		</dict>
 	</dict>
 	<key>NSCalendarsUsageDescription</key>
 	<string>允许应用程序在您使用该应用程序时访问您的日历吗?</string>