ganzf 5 달 전
부모
커밋
9ef1c903a1
25개의 변경된 파일883개의 추가작업 그리고 662개의 파일을 삭제
  1. 2 66
      ABtong/ABtong/ALLController/call/CallControllers.storyboard
  2. 2 0
      ABtong/ABtong/ALLController/call/CallIndexCell.h
  3. 84 33
      ABtong/ABtong/ALLController/call/CallIndexCell.m
  4. 55 27
      ABtong/ABtong/ALLController/call/CallIndexController.m
  5. 2 2
      ABtong/ABtong/ALLController/call/CalldetailsCell.m
  6. 3 0
      ABtong/ABtong/ALLController/call/PhoneKeybord.h
  7. 24 8
      ABtong/ABtong/ALLController/call/PhoneKeybord.m
  8. 35 35
      ABtong/ABtong/ALLController/call/PhoneKeybord.xib
  9. 2 2
      ABtong/ABtong/ALLController/chatCtr/ChatController.m
  10. 21 0
      ABtong/ABtong/ALLController/chatCtr/ChatListController.m
  11. 10 36
      ABtong/ABtong/ALLController/chatCtr/chetCell/chatpopView.xib
  12. 63 21
      ABtong/ABtong/ALLController/friendCtr/FriendController.m
  13. 26 0
      ABtong/ABtong/ALLController/geren/AppLockPasswordController.m
  14. 41 93
      ABtong/ABtong/ALLController/geren/PersonalInfoController.m
  15. 58 22
      ABtong/ABtong/ALLController/geren/SecurityController.m
  16. 9 46
      ABtong/ABtong/ALLController/geren/SecurityPasswordController.m
  17. 12 3
      ABtong/ABtong/ALLController/geren/UserConterController.m
  18. 7 0
      ABtong/ABtong/ALLController/login/GLoginController.m
  19. 27 3
      ABtong/ABtong/ALLController/login/GserverListController.m
  20. 1 1
      ABtong/ABtong/ALLController/login/ServerIPInputView.h
  21. 54 29
      ABtong/ABtong/ALLController/login/ServerIPInputView.m
  22. 225 209
      ABtong/ABtong/Base.lproj/Main.storyboard
  23. 1 1
      ABtong/ABtong/Common/CommonUI/Util/config.h
  24. 21 23
      ABtong/ABtong/Common/Network/GDBManager.m
  25. 98 2
      ABtong/ABtong/Localizable.xcstrings

+ 2 - 66
ABtong/ABtong/ALLController/call/CallControllers.storyboard

@@ -30,59 +30,8 @@
                                     <action selector="fanhui:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="U6D-cB-HyI"/>
                                 </connections>
                             </button>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="V2l-YQ-2Ai">
-                                <rect key="frame" x="151" y="108" width="86" height="86"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            </imageView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xDb-TS-CDb">
-                                <rect key="frame" x="45" y="197" width="300" height="28"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="20"/>
-                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <button opaque="NO" tag="3" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HMa-Su-XvK">
-                                <rect key="frame" x="285" y="245" width="60" height="60"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                                <color key="tintColor" red="0.1450980392" green="0.1647058824" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
-                                <state key="normal" title="Button"/>
-                                <buttonConfiguration key="configuration" style="filled" image="shipinth">
-                                    <backgroundConfiguration key="background" cornerRadius="30"/>
-                                    <color key="baseBackgroundColor" red="0.1450980392" green="0.1647058824" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
-                                </buttonConfiguration>
-                                <connections>
-                                    <action selector="actBtselect:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="wSs-uD-LXV"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" tag="2" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="L4g-Xu-DrB">
-                                <rect key="frame" x="165" y="245" width="60" height="60"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                                <color key="tintColor" red="0.1450980392" green="0.1647058824" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
-                                <state key="normal" title="Button"/>
-                                <buttonConfiguration key="configuration" style="filled" image="callhuixiao">
-                                    <backgroundConfiguration key="background" cornerRadius="30"/>
-                                    <color key="baseBackgroundColor" red="0.1450980392" green="0.1647058824" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
-                                </buttonConfiguration>
-                                <connections>
-                                    <action selector="actBtselect:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="QCu-Dv-mRQ"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" tag="1" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cAX-aN-TiR">
-                                <rect key="frame" x="45" y="245" width="60" height="60"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                                <color key="tintColor" red="0.14509803921568626" green="0.16470588235294117" blue="0.30196078431372547" alpha="1" colorSpace="calibratedRGB"/>
-                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                <state key="normal" backgroundImage="index"/>
-                                <buttonConfiguration key="configuration" style="filled" image="liaotian">
-                                    <backgroundConfiguration key="background" cornerRadius="30"/>
-                                    <color key="baseBackgroundColor" red="0.1450980392" green="0.1647058824" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
-                                </buttonConfiguration>
-                                <connections>
-                                    <action selector="actBtselect:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="gfn-If-tSb"/>
-                                </connections>
-                            </button>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="2FX-RA-Hb4">
-                                <rect key="frame" x="0.0" y="382" width="393" height="350"/>
+                                <rect key="frame" x="0.0" y="118" width="393" height="614"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                             </tableView>
@@ -120,20 +69,11 @@
                                 <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="通话记录" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gec-hT-StB">
-                                <rect key="frame" x="18" y="344" width="187" height="21"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <nil key="highlightedColor"/>
-                            </label>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     </view>
                     <connections>
-                        <outlet property="avatar" destination="V2l-YQ-2Ai" id="AKB-Ti-JH7"/>
-                        <outlet property="nameLb" destination="xDb-TS-CDb" id="upH-85-XE3"/>
                         <outlet property="tableView" destination="2FX-RA-Hb4" id="gBy-e1-SC3"/>
                     </connections>
                 </viewController>
@@ -145,11 +85,7 @@
     <resources>
         <image name="Cjiahao" width="20" height="20"/>
         <image name="bgset" width="375" height="812"/>
-        <image name="callhuixiao" width="24" height="24"/>
-        <image name="fanhui" width="20" height="20"/>
-        <image name="index" width="32" height="32"/>
-        <image name="liaotian" width="24" height="24"/>
-        <image name="shipinth" width="28" height="20"/>
+        <image name="fanhui" width="10" height="18"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>

+ 2 - 0
ABtong/ABtong/ALLController/call/CallIndexCell.h

@@ -13,6 +13,8 @@
 @interface CallIndexCell : UITableViewCell
 
 - (void)fillWithData:( NSDictionary*)data;
+
+@property (nonatomic,copy) void(^CellActIndex)(NSInteger index);
 @end
 
 #endif /* CallIndexCell_h */

+ 84 - 33
ABtong/ABtong/ALLController/call/CallIndexCell.m

@@ -14,17 +14,16 @@
 @interface CallIndexCell()
 
 @property (strong, nonatomic) UILabel *name;
+@property (strong, nonatomic) UILabel *severName;
 @property (strong, nonatomic) UILabel *time;
 @property (strong, nonatomic) UILabel *countText;
 @property (strong, nonatomic) UIImageView *avatar;
 
 
 
-@property (strong, nonatomic) UIImageView *liaotianBt;
-@property (strong, nonatomic) UIImageView *tonghuaBt;
-@property (strong, nonatomic) UIImageView *shipinBt;
-
-@property (strong, nonatomic) UIImageView *rightAr;
+@property (strong, nonatomic) UIButton *liaotianBt;
+@property (strong, nonatomic) UIButton *tonghuaBt;
+@property (strong, nonatomic) UIButton *shipinBt;
 
 @property (strong, nonatomic) UILabel *lineLb;
 
@@ -55,25 +54,34 @@
     [self.contentView addSubview:_avatar];
     
     
-    _liaotianBt = [UIImageView new];
-    _liaotianBt.contentMode = UIViewContentModeScaleAspectFill;
-    [_liaotianBt setImage:[UIImage imageNamed:@"xiangyou"]];
+    _liaotianBt = [UIButton buttonWithType:UIButtonTypeSystem];
+    [_liaotianBt setBackgroundImage:kImageMake(@"liaotian") forState:UIControlStateNormal];
+    _liaotianBt.layer.cornerRadius = 5;
+    _liaotianBt.tag = 100; // 用于稍后隐藏/显示
+    [_liaotianBt addTarget:self action:@selector(liaotianAct) forControlEvents:UIControlEventTouchUpInside];
     [self.contentView addSubview:_liaotianBt];
     
-    _tonghuaBt = [UIImageView new];
-    _tonghuaBt.contentMode = UIViewContentModeScaleAspectFill;
-    [_tonghuaBt setImage:[UIImage imageNamed:@"xiangyou"]];
+    
+    
+    _tonghuaBt = [UIButton buttonWithType:UIButtonTypeSystem];
+    [_tonghuaBt setBackgroundImage:kImageMake(@"callhui") forState:UIControlStateNormal];
+    _tonghuaBt.layer.cornerRadius = 5;
+    _tonghuaBt.tag = 100; // 用于稍后隐藏/显示
+    [_tonghuaBt addTarget:self action:@selector(yuyinAct) forControlEvents:UIControlEventTouchUpInside];
     [self.contentView addSubview:_tonghuaBt];
     
-    _shipinBt = [UIImageView new];
-    _shipinBt.contentMode = UIViewContentModeScaleAspectFill;
-    [_shipinBt setImage:[UIImage imageNamed:@"xiangyou"]];
+
+    _shipinBt = [UIButton buttonWithType:UIButtonTypeSystem];
+    [_shipinBt setBackgroundImage:kImageMake(@"shipinth") forState:UIControlStateNormal];
+    _shipinBt.layer.cornerRadius = 5;
+    _shipinBt.tag = 100; // 用于稍后隐藏/显示
+    [_shipinBt addTarget:self action:@selector(shipinAct) forControlEvents:UIControlEventTouchUpInside];
     [self.contentView addSubview:_shipinBt];
     
     
     // 名字
     _name = [UILabel new];
-    _name.font = SYSFONT(20);
+    _name.font = SYSBFONT(20);
     _name.textColor = [UIColor whiteColor];
     [self.contentView addSubview:_name];
     
@@ -83,6 +91,13 @@
     _time.textColor = UIColor.whiteColor;
     [self.contentView addSubview:_time];
     
+    
+    // 服务器名称
+    _severName = [UILabel new];
+    _severName.font = SYSBFONT(14);
+    _severName.textColor = UIColor.whiteColor;
+    [self.contentView addSubview:_severName];
+    
     // 时间
     _countText = [UILabel new];
     _countText.font = SYSFONT(16);
@@ -97,7 +112,7 @@
     
     [_avatar mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(self.contentView.mas_left).offset(10);
-        make.top.mas_equalTo(self.contentView.mas_top).offset(10);
+        make.top.mas_equalTo(self.contentView.mas_top).offset(20);
         make.width.mas_equalTo(50);
         make.height.mas_equalTo(50);
     }];
@@ -105,29 +120,29 @@
     
     [_liaotianBt mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.right.equalTo(_tonghuaBt.mas_left).offset(-30);
-        make.top.mas_equalTo(self.contentView.mas_top).offset(10);
-        make.width.mas_equalTo(25);
-        make.height.mas_equalTo(25);
+        make.top.mas_equalTo(self.contentView.mas_top).offset(20);
+        make.width.mas_equalTo(30);
+        make.height.mas_equalTo((30));
     }];
     
     [_tonghuaBt mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.right.equalTo(_shipinBt.mas_left).offset(-30);
-        make.top.mas_equalTo(self.contentView.mas_top).offset(10);
-        make.width.mas_equalTo(25);
-        make.height.mas_equalTo(25);
+        make.top.mas_equalTo(self.contentView.mas_top).offset(20);
+        make.width.mas_equalTo((30));
+        make.height.mas_equalTo((30));
     }];
     
     
     [_shipinBt mas_remakeConstraints:^(MASConstraintMaker *make) {
-        make.right.equalTo(self.contentView.mas_right).offset(-30);
-        make.top.mas_equalTo(self.contentView.mas_top).offset(10);
-        make.width.mas_equalTo(25);
-        make.height.mas_equalTo(25);
+        make.right.equalTo(self.contentView.mas_right).offset(-20);
+        make.top.mas_equalTo(self.contentView.mas_top).offset(20);
+        make.width.mas_equalTo((38));
+        make.height.mas_equalTo(30);
     }];
     
     [_name mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(_avatar.mas_right).offset(8);
-        make.width.mas_equalTo(250);
+        make.right.equalTo(_liaotianBt.mas_left).offset(-6);
         make.top.mas_equalTo(self.contentView.mas_top).offset(12);
     }];
     
@@ -136,9 +151,15 @@
         make.top.mas_equalTo(_name.mas_bottom).offset(6);
     }];
     
+    [_severName mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(_avatar.mas_right).offset(8);
+        make.right.equalTo(self.contentView.mas_right).offset(-20);
+        make.top.mas_equalTo(_time.mas_bottom).offset(6);
+    }];
+    
     [_countText mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(_time.mas_right).offset(4);
-        make.top.mas_equalTo(_name.mas_bottom).offset(6);
+        make.top.mas_equalTo(_severName.mas_bottom).offset(6);
     }];
     
     [_lineLb mas_remakeConstraints:^(MASConstraintMaker *make) {
@@ -162,6 +183,16 @@
     }
     [self.avatar sd_setImageWithURL:[NSURL URLWithString:avatar] placeholderImage:[UIImage imageNamed:@"Avatar"]];
     self.name.text =data[@"fromName"]?:@"";
+    
+    
+    NSDictionary *serverDic = data[@"severName"]?:nil;
+    if(serverDic){
+        self.severName.text =serverDic[@"serverIP"]?:@"";
+    }
+    else{
+        self.severName.text =@"";
+    }
+    
 
     //NSLog(@"lastTime:%@",data[@"lastTime"]);
     NSString *timestr =data[@"timestamp"];
@@ -178,12 +209,10 @@
     NSString *result =data[@"result"];
     NSString *duration = data[@"duration"];
     if(result.intValue == 1){
-        _countText.text = [NSString stringWithFormat:@"通話時長:%@",[self formatTimeWithMilliseconds:duration.intValue]];
-        _countText.textColor = [UIColor whiteColor];
+        self.name.textColor = [UIColor whiteColor];
     }
     else{
-        _countText.text = @"未接通";
-        _countText.textColor = [UIColor redColor];
+        self.name.textColor = [UIColor redColor];
     }
     // tell constraints they need updating
     [self setNeedsUpdateConstraints];
@@ -253,7 +282,6 @@
     return @"";
 }
 
-
 - (NSString *)formatTimeWithMilliseconds:(NSInteger)milliseconds{
     NSInteger seconds = milliseconds / 1000.0;
         
@@ -268,4 +296,27 @@
     }
 }
 
+-(void)yuyinAct{
+    weakSelf(self);
+    if(weakself.CellActIndex){
+        weakself.CellActIndex(1);
+    }
+}
+
+-(void)shipinAct{
+    weakSelf(self);
+    if(weakself.CellActIndex){
+        weakself.CellActIndex(2);
+    }
+}
+
+-(void)liaotianAct{
+    weakSelf(self);
+    if(weakself.CellActIndex){
+        weakself.CellActIndex(0);
+    }
+}
+
+
+
 @end

+ 55 - 27
ABtong/ABtong/ALLController/call/CallIndexController.m

@@ -24,7 +24,7 @@
 
 @property (weak, nonatomic) IBOutlet UILabel *titleLb;
 @property (weak, nonatomic) IBOutlet UILabel *meiyoujlLb;
-@property (weak, nonatomic) IBOutlet UISegmentedControl *segCtroller;
+
 
 @property (weak, nonatomic) IBOutlet UITableView *tableView;
 @property (strong, nonatomic) NSMutableArray *messageArray;
@@ -44,12 +44,7 @@
 
     
     _meiyoujlLb.alpha=0;
-    
-    [_segCtroller addTarget:self action:@selector(segmentChanged:) forControlEvents:UIControlEventValueChanged];
-    [_segCtroller setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]} forState:UIControlStateSelected];
-     
-    // 设置未选中状态的字体颜色
-    [_segCtroller setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]} forState:UIControlStateNormal];
+
     
 //    _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
     _tableView.backgroundColor = UIColor.clearColor;
@@ -83,6 +78,7 @@
     _phoneKb.alpha = 0;
     _phoneKb.delegate=self;
     [self.view bringSubviewToFront:_phoneKb];
+    [_phoneKb initPhoneKeybordView];
     
     CallListStore.shareInstance.delegate = self;
     [CallListStore.shareInstance reloadData:@""];
@@ -92,19 +88,16 @@
 -(void)viewWillAppear:(BOOL)animated{
     [super viewWillAppear:animated];
     CallListStore.shareInstance.delegate = self;
-    if(_segCtroller.selectedSegmentIndex==0){
-        [CallListStore.shareInstance reloadData:@""];
-    }
-    else{
-        [CallListStore.shareInstance reloadData:@"false"];
-    }
+    [CallListStore.shareInstance reloadData:@""];
     _titleLb.text = @"";
-    NSString *sevNmae = [UDManager.shareInstance getSDManager:nkhttphostName];
-    if(sevNmae){
-        if(sevNmae){
-            _titleLb.text = sevNmae;
-        }
+    NSDictionary *actuserInfo = [UDManager.shareInstance getDDManager:nkactuserInfo];
+    NSString *severName = actuserInfo[@"serverIP"]?:@"";
+    if(severName.length==0){
+        severName = actuserInfo[@"serverName"]?:@"";
     }
+    _titleLb.text = severName;
+    
+    NSLog(@"viewWillAppear----:%@",severName);
     
 }
 
@@ -188,12 +181,7 @@
 -(void)ChatsChange:(NSArray *)msgList type:(NSInteger)typpe{
     NSLog(@"msgList:%lu",(unsigned long)msgList.count);
     if(typpe==4){
-        if(_segCtroller.selectedSegmentIndex==0){
-            [CallListStore.shareInstance reloadData:@""];
-        }
-        else{
-            [CallListStore.shareInstance reloadData:@"false"];
-        }
+        [CallListStore.shareInstance reloadData:@""];
         return;
     }
     _messageArray =[msgList copy];
@@ -227,9 +215,21 @@
 //    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
     
     NSDictionary *dic = [self.messageArray objectAtIndex:indexPath.row];
-    
     [cell fillWithData:dic];
-    
+    weakSelf(self);
+    cell.CellActIndex = ^(NSInteger index) {
+        switch (index) {
+            case 0:
+                [weakself gotoChatView:dic];
+                break;
+            case 1:
+                [weakself gototonghuaView:dic];
+                break;
+            case 2:
+                [weakself gotoshipinView:dic];
+                break;
+        }
+    };
     return cell;
 }
 
@@ -237,7 +237,7 @@
 
 
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
-    return 80.0f;
+    return 90.0f;
 }
 
 
@@ -255,6 +255,34 @@
     [self presentViewController :uiNavC animated:YES completion:nil];
 }
 
+-(void)gotoChatView:(NSDictionary *)msg{
+    UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
+    
+    ChatController *chatctr = [board instantiateViewControllerWithIdentifier:@"ChatController"];
+    
+    UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:chatctr];
+    
+    uiNavC.modalPresentationStyle = UIModalPresentationFullScreen;
+    chatctr.chatId = msg[@"chatId"];
+    chatctr.type = 0;
+    ChatListStore.shareInstance.chatId =msg[@"chatId"];;
+    
+    chatctr.titlename = msg[@"fromName"]?:@"";
+    chatctr.avatar = msg[@"fromAvatar"]?:@"";
+
+    [self presentViewController :uiNavC animated:YES completion:nil];
+}
+
+-(void)gototonghuaView:(NSDictionary *)msg{
+    NSString *chatId = msg[@"chatId"];
+    [[AppDelegate sharedInstance] startJSCall:chatId room:@"" isCaller:YES audioOnly:YES];
+}
+
+-(void)gotoshipinView:(NSDictionary *)msg{
+    NSString *chatId = msg[@"chatId"];
+    [[AppDelegate sharedInstance] startJSCall:chatId room:@"" isCaller:YES audioOnly:NO];
+}
+
 
 -(void)gotoLoginView{
     UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];

+ 2 - 2
ABtong/ABtong/ALLController/call/CalldetailsCell.m

@@ -73,8 +73,8 @@
     [_rightAr mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.right.equalTo(self.contentView.mas_right).offset(-30);
         make.top.mas_equalTo(self.contentView.mas_top).offset(20);
-        make.width.mas_equalTo(32);
-        make.height.mas_equalTo(32);
+        make.width.mas_equalTo(20);
+        make.height.mas_equalTo(20);
     }];
     
     [_name mas_remakeConstraints:^(MASConstraintMaker *make) {

+ 3 - 0
ABtong/ABtong/ALLController/call/PhoneKeybord.h

@@ -19,6 +19,9 @@
 
 @property (nonatomic,weak) id <PhoneKeybordDelegate> delegate;
 
+
+-(void)initPhoneKeybordView;
+
 @end
 
 

+ 24 - 8
ABtong/ABtong/ALLController/call/PhoneKeybord.m

@@ -18,6 +18,7 @@
 @property (weak, nonatomic) IBOutlet UILabel *phoneInput;
 
 @property (strong, nonatomic) NSDictionary *showDic;
+@property (weak, nonatomic) IBOutlet UIView *bgView;
 
 @property (weak, nonatomic) IBOutlet UIView *userContentV;
 @property (weak, nonatomic) IBOutlet UIImageView *avatar;
@@ -35,10 +36,17 @@
     if (self) {
         self.backgroundColor = [UIColor whiteColor];
         _userContentV.alpha = 0;
+        
     }
     return self;
 }
 
+-(void)initPhoneKeybordView{
+    UITapGestureRecognizer *tapbotton = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissBotton)];
+    // 将手势添加到主视图上
+    [_bgView addGestureRecognizer:tapbotton];
+}
+
 - (IBAction)actBtselect:(id)sender {
     UIButton *bt = (UIButton *)sender;
     NSLog(@"actBtselect:%ld",(long)bt.tag);
@@ -91,14 +99,14 @@
         _phoneInput.text = @"";
         _userContentV.alpha = 0;
     }
-    if(bt.tag==15){//粘贴
-        UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
-        NSString *string = pasteboard.string;
-        if (string&&string.length>0&&string.length<7) {
-            _phoneInput.text=string;
-        }
-    }
-    if(bt.tag==16){//删除
+//    if(bt.tag==15){//粘贴
+//        UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
+//        NSString *string = pasteboard.string;
+//        if (string&&string.length>0&&string.length<7) {
+//            _phoneInput.text=string;
+//        }
+//    }
+    if(bt.tag==15){//删除
         NSString *str =_phoneInput.text;
         if(str.length>0){
             str=[str substringToIndex:str.length-1];
@@ -167,5 +175,13 @@
 }
 
 
+-(void)dismissBotton{
+    NSLog(@"dismissBotton-------");
+    self.alpha = 0;
+    _phoneInput.text = @"";
+}
+
+
+
 
 @end

+ 35 - 35
ABtong/ABtong/ALLController/call/PhoneKeybord.xib

@@ -82,11 +82,12 @@
                     <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
                     <subviews>
                         <button opaque="NO" tag="3" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F6j-ju-0EL">
-                            <rect key="frame" x="277" y="60" width="65" height="40"/>
+                            <rect key="frame" x="270" y="59" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="3"/>
                             <buttonConfiguration key="configuration" style="filled" title="3">
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <color key="baseBackgroundColor" red="0.10196078431372549" green="0.11764705882352941" blue="0.22745098039215686" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
@@ -95,12 +96,13 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="2" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bFV-yC-FDA">
-                            <rect key="frame" x="164" y="61" width="65" height="40"/>
+                            <rect key="frame" x="156" y="59" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="2" backgroundImage="yuandian"/>
                             <buttonConfiguration key="configuration" style="filled" title="2">
                                 <backgroundConfiguration key="background"/>
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <color key="baseBackgroundColor" red="0.10196078431372549" green="0.11764705882352941" blue="0.22745098039215686" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
@@ -109,13 +111,13 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="1" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nyT-QY-mOH">
-                            <rect key="frame" x="57" y="60" width="65" height="40"/>
+                            <rect key="frame" x="40" y="59" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="1"/>
                             <buttonConfiguration key="configuration" style="filled" title="1" cornerStyle="dynamic">
                                 <backgroundConfiguration key="background"/>
-                                <fontDescription key="titleFontDescription" type="system" pointSize="20"/>
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <color key="baseBackgroundColor" red="0.10196078431372549" green="0.11764705882352941" blue="0.22745098039215686" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
@@ -124,12 +126,13 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="6" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vPP-mP-Ffs">
-                            <rect key="frame" x="277" y="128" width="65" height="40"/>
+                            <rect key="frame" x="270" y="127" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="6" backgroundImage="yuandian"/>
                             <buttonConfiguration key="configuration" style="filled" title="6">
                                 <backgroundConfiguration key="background"/>
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseBackgroundColor" red="0.1019607843" green="0.1176470588" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
                             <connections>
@@ -137,12 +140,13 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="5" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vh7-3g-GDi">
-                            <rect key="frame" x="164" y="128" width="65" height="40"/>
+                            <rect key="frame" x="156" y="127" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="5" backgroundImage="yuandian"/>
                             <buttonConfiguration key="configuration" style="filled" title="5">
                                 <backgroundConfiguration key="background"/>
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseBackgroundColor" red="0.1019607843" green="0.1176470588" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
                             <connections>
@@ -150,12 +154,13 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="4" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tro-4w-Cqf">
-                            <rect key="frame" x="57" y="128" width="65" height="40"/>
+                            <rect key="frame" x="40" y="127" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="4" backgroundImage="yuandian"/>
                             <buttonConfiguration key="configuration" style="filled" title="4">
                                 <backgroundConfiguration key="background"/>
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseBackgroundColor" red="0.1019607843" green="0.1176470588" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
                             <connections>
@@ -163,12 +168,13 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="9" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WBZ-Qk-FM9">
-                            <rect key="frame" x="277" y="196" width="65" height="40"/>
+                            <rect key="frame" x="270" y="194" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="9" backgroundImage="yuandian"/>
                             <buttonConfiguration key="configuration" style="filled" title="9">
                                 <backgroundConfiguration key="background"/>
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseBackgroundColor" red="0.1019607843" green="0.1176470588" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
                             <connections>
@@ -176,12 +182,13 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="8" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4nQ-0K-O8y">
-                            <rect key="frame" x="164" y="196" width="65" height="40"/>
+                            <rect key="frame" x="156" y="194" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="8" backgroundImage="yuandian"/>
                             <buttonConfiguration key="configuration" style="filled" title="8">
                                 <backgroundConfiguration key="background"/>
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseBackgroundColor" red="0.1019607843" green="0.1176470588" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
                             <connections>
@@ -189,12 +196,13 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="7" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XWO-OU-PHN">
-                            <rect key="frame" x="57" y="196" width="65" height="40"/>
+                            <rect key="frame" x="40" y="194" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="7" backgroundImage="yuandian"/>
                             <buttonConfiguration key="configuration" style="filled" title="7">
                                 <backgroundConfiguration key="background"/>
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseBackgroundColor" red="0.1019607843" green="0.1176470588" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
                             <connections>
@@ -202,20 +210,21 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="10" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="j3x-j7-LnC">
-                            <rect key="frame" x="164" y="264" width="65" height="40"/>
+                            <rect key="frame" x="156" y="260" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="0" backgroundImage="yuandian"/>
                             <buttonConfiguration key="configuration" style="filled" title="0">
                                 <backgroundConfiguration key="background"/>
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="22"/>
                                 <color key="baseBackgroundColor" red="0.1019607843" green="0.1176470588" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
                             <connections>
                                 <action selector="keybtselect:" destination="iN0-l3-epB" eventType="touchUpInside" id="5eX-SC-rmg"/>
                             </connections>
                         </button>
-                        <button opaque="NO" tag="12" contentMode="top" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Yaz-k8-sr5">
-                            <rect key="frame" x="277" y="264" width="65" height="40"/>
+                        <button opaque="NO" alpha="0.0" tag="12" contentMode="top" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Yaz-k8-sr5">
+                            <rect key="frame" x="277" y="264" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="#" backgroundImage="yuandian"/>
@@ -227,8 +236,8 @@
                                 <action selector="keybtselect:" destination="iN0-l3-epB" eventType="touchUpInside" id="3qT-Gw-PBV"/>
                             </connections>
                         </button>
-                        <button opaque="NO" tag="11" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JAY-Uo-fWh">
-                            <rect key="frame" x="57" y="264" width="65" height="40"/>
+                        <button opaque="NO" alpha="0.0" tag="11" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JAY-Uo-fWh">
+                            <rect key="frame" x="57" y="264" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="*" backgroundImage="yuandian"/>
@@ -241,7 +250,7 @@
                             </connections>
                         </button>
                         <button opaque="NO" tag="15" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qt4-IT-EQV">
-                            <rect key="frame" x="277" y="337" width="65" height="40"/>
+                            <rect key="frame" x="270" y="326" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                             <fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="17"/>
                             <color key="tintColor" systemColor="opaqueSeparatorColor"/>
@@ -249,8 +258,8 @@
                             <state key="normal" title="删除">
                                 <color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             </state>
-                            <buttonConfiguration key="configuration" style="filled" title="粘贴">
-                                <fontDescription key="titleFontDescription" type="system" pointSize="18"/>
+                            <buttonConfiguration key="configuration" style="filled" title="刪除">
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="18"/>
                                 <color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <color key="baseBackgroundColor" red="0.1019607843" green="0.1176470588" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
@@ -258,13 +267,14 @@
                                 <action selector="keybtselect:" destination="iN0-l3-epB" eventType="touchUpInside" id="OHV-ce-MRX"/>
                             </connections>
                         </button>
-                        <button opaque="NO" tag="13" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RvE-9s-1yB">
-                            <rect key="frame" x="57" y="337" width="65" height="40"/>
+                        <button opaque="NO" tag="13" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RvE-9s-1yB">
+                            <rect key="frame" x="40" y="326" width="80" height="50"/>
                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <color key="tintColor" systemColor="opaqueSeparatorColor"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="关闭"/>
-                            <buttonConfiguration key="configuration" style="filled" image="arrow_down">
+                            <buttonConfiguration key="configuration" style="filled" title="關閉">
+                                <fontDescription key="titleFontDescription" type="boldSystem" pointSize="18"/>
                                 <color key="baseBackgroundColor" red="0.1019607843" green="0.1176470588" blue="0.2274509804" alpha="1" colorSpace="calibratedRGB"/>
                             </buttonConfiguration>
                             <connections>
@@ -278,17 +288,8 @@
                             <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <nil key="highlightedColor"/>
                         </label>
-                        <button opaque="NO" tag="16" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="id8-gj-vqa">
-                            <rect key="frame" x="296" y="8" width="61" height="35"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
-                            <state key="normal" title="Button"/>
-                            <buttonConfiguration key="configuration" style="plain" image="shanjian"/>
-                            <connections>
-                                <action selector="keybtselect:" destination="iN0-l3-epB" eventType="touchUpInside" id="fMu-LA-ebj"/>
-                            </connections>
-                        </button>
                         <button opaque="NO" tag="14" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YRK-hc-emB">
-                            <rect key="frame" x="153" y="337" width="87" height="40"/>
+                            <rect key="frame" x="151" y="326" width="90" height="54"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <state key="normal" title="Button"/>
                             <buttonConfiguration key="configuration" style="filled" image="callbai">
@@ -306,6 +307,7 @@
             <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <connections>
                 <outlet property="avatar" destination="t0I-QC-OQE" id="TR3-1m-AzF"/>
+                <outlet property="bgView" destination="2Zt-D3-2ZK" id="7oZ-sa-8v7"/>
                 <outlet property="nameLb" destination="Ubp-9s-7vW" id="bij-Gw-i7W"/>
                 <outlet property="phoneInput" destination="9WM-im-d2y" id="Ll9-1V-nP2"/>
                 <outlet property="userContentV" destination="NUO-3I-vzO" id="6Hv-T2-bY6"/>
@@ -315,18 +317,16 @@
     </objects>
     <resources>
         <image name="Avatar0" width="88" height="88"/>
-        <image name="arrow_down" width="18" height="10"/>
         <image name="callbai" width="28" height="28"/>
         <image name="callhuixiao" width="24" height="24"/>
         <image name="liaotian" width="24" height="24"/>
-        <image name="shanjian" width="24" height="24"/>
         <image name="shipinth" width="28" height="20"/>
         <image name="yuandian" width="200" height="200"/>
         <systemColor name="linkColor">
-            <color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
         <systemColor name="opaqueSeparatorColor">
-            <color red="0.77647058823529413" green="0.77647058823529413" blue="0.78431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

+ 2 - 2
ABtong/ABtong/ALLController/chatCtr/ChatController.m

@@ -1197,12 +1197,12 @@ static const CGFloat kQuoteViewHeight = 46.0f;
 -(void)showBottonView{
     [self dismissKeyboard];
     _markView.frame = self.view.frame;
-    CGRect popfram = CGRectMake(0,self.view.frame.size.height-250, self.view.frame.size.width, 250);
+    CGRect popfram = CGRectMake(0,self.view.frame.size.height-160, self.view.frame.size.width, 160);
     _popView.frame = popfram;
 }
 
 -(void)hidBottonView{
-    CGRect popfram = CGRectMake(0,self.view.frame.size.height, self.view.frame.size.width, 250);
+    CGRect popfram = CGRectMake(0,self.view.frame.size.height, self.view.frame.size.width, 160);
     _popView.frame = popfram;
     _markView.frame=popfram;
     _markView.backgroundColor = [UIColor lightGrayColor];

+ 21 - 0
ABtong/ABtong/ALLController/chatCtr/ChatListController.m

@@ -11,10 +11,13 @@
 #import "ChatListStore.h"
 #import "ChatController.h"
 #import "ChatNetApi.h"
+#import "GserverListController.h"
+
 
 
 @interface ChatListController()<UITableViewDelegate,UITableViewDataSource,ChatListStoreDelegate>
 @property (weak, nonatomic) IBOutlet UITableView *_tableView;
+@property (weak, nonatomic) IBOutlet UILabel *serverNamelb;
 
 
 @end
@@ -42,6 +45,15 @@
     ChatListStore.shareInstance.chatId =@"";
     [ChatListStore.shareInstance reloadData:true];
     
+    
+    
+    _serverNamelb.text = @"";
+    NSDictionary *actuserInfo = [UDManager.shareInstance getDDManager:nkactuserInfo];
+    NSString *severName = actuserInfo[@"serverIP"]?:@"";
+    if(severName.length==0){
+        severName = actuserInfo[@"serverName"]?:@"";
+    }
+    _serverNamelb.text = severName;
 }
 
 -(void)viewDidDisappear:(BOOL)animated{
@@ -50,6 +62,15 @@
     ChatListStore.shareInstance.delegate = nil;
 }
 
+- (IBAction)gotoservers:(id)sender {
+    GserverListController * resetPwdVc = [[GserverListController alloc] init];
+    resetPwdVc.modalPresentationStyle = UIModalPresentationFullScreen;
+    resetPwdVc.canChange = true;
+    UINavigationController * navi = [[UINavigationController alloc] initWithRootViewController:resetPwdVc];
+    navi.modalPresentationStyle = UIModalPresentationFullScreen;
+    [self presentViewController:navi animated:YES completion:nil];
+}
+
 #pragma mark ChatListStoreDelegate
 -(void)ChatListChange:(NSArray *)array{
     

+ 10 - 36
ABtong/ABtong/ALLController/chatCtr/chetCell/chatpopView.xib

@@ -11,12 +11,12 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="OMp-gG-LGm" customClass="chatpopView">
-            <rect key="frame" x="0.0" y="0.0" width="393" height="220"/>
+            <rect key="frame" x="0.0" y="0.0" width="393" height="160"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
             <subviews>
                 <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="U0i-1H-vFY">
-                    <rect key="frame" x="40" y="14" width="72" height="71"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <rect key="frame" x="16" y="23" width="72" height="71"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                     <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <state key="normal" title="Button"/>
                     <buttonConfiguration key="configuration" style="plain" image="fasongtup" imagePlacement="top" title="发送图片" imagePadding="4">
@@ -27,8 +27,8 @@
                     </connections>
                 </button>
                 <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d20-Qi-Azu">
-                    <rect key="frame" x="161" y="14" width="72" height="71"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <rect key="frame" x="112" y="23" width="72" height="71"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                     <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <state key="normal" title="Button"/>
                     <buttonConfiguration key="configuration" style="plain" image="fasongsp" imagePlacement="top" title="发送视频" imagePadding="4">
@@ -39,8 +39,8 @@
                     </connections>
                 </button>
                 <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="G3I-rx-2Tw">
-                    <rect key="frame" x="280" y="13" width="72" height="71"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
+                    <rect key="frame" x="210" y="23" width="72" height="71"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                     <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <state key="normal" title="Button"/>
                     <buttonConfiguration key="configuration" style="plain" image="fasongwj" imagePlacement="top" title="发送文件" imagePadding="4">
@@ -51,8 +51,8 @@
                     </connections>
                 </button>
                 <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qAv-5Y-9ih">
-                    <rect key="frame" x="40" y="115" width="72" height="71"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
+                    <rect key="frame" x="305" y="23" width="72" height="71"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                     <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <state key="normal" title="Button"/>
                     <buttonConfiguration key="configuration" style="plain" image="paistup" imagePlacement="top" title="拍摄" imagePadding="4">
@@ -62,35 +62,11 @@
                         <action selector="bt6act:" destination="OMp-gG-LGm" eventType="touchUpInside" id="N0h-Hi-Utc"/>
                     </connections>
                 </button>
-                <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bud-Ol-wK2">
-                    <rect key="frame" x="159" y="115" width="72" height="71"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    <state key="normal" title="Button"/>
-                    <buttonConfiguration key="configuration" style="plain" image="yunyinth" imagePlacement="top" title="语音通话">
-                        <fontDescription key="titleFontDescription" type="system" pointSize="0.0"/>
-                    </buttonConfiguration>
-                    <connections>
-                        <action selector="bt4act:" destination="OMp-gG-LGm" eventType="touchUpInside" id="7dd-fh-1vW"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Akx-Vp-a2l">
-                    <rect key="frame" x="280" y="115" width="72" height="71"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    <state key="normal" title="Button"/>
-                    <buttonConfiguration key="configuration" style="plain" image="shipinda" imagePlacement="top" title="视频通话" imagePadding="4">
-                        <fontDescription key="titleFontDescription" type="system" pointSize="0.0"/>
-                    </buttonConfiguration>
-                    <connections>
-                        <action selector="bt5act:" destination="OMp-gG-LGm" eventType="touchUpInside" id="1qF-bG-ONe"/>
-                    </connections>
-                </button>
             </subviews>
             <viewLayoutGuide key="safeArea" id="z4B-XS-7PW"/>
             <color key="backgroundColor" red="0.054901960784313725" green="0.074509803921568626" blue="0.15294117647058825" alpha="1" colorSpace="calibratedRGB"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <point key="canvasLocation" x="350.38167938931298" y="177.46478873239437"/>
+            <point key="canvasLocation" x="350.38167938931298" y="192.25352112676057"/>
         </view>
     </objects>
     <resources>
@@ -98,7 +74,5 @@
         <image name="fasongtup" width="36" height="36"/>
         <image name="fasongwj" width="36" height="36"/>
         <image name="paistup" width="36" height="36"/>
-        <image name="shipinda" width="36" height="25.666666030883789"/>
-        <image name="yunyinth" width="36" height="36"/>
     </resources>
 </document>

+ 63 - 21
ABtong/ABtong/ALLController/friendCtr/FriendController.m

@@ -15,12 +15,19 @@
 #import "ChatHistoryController.h"
 #import "ReportViewController.h"
 #import "FriendNetApi.h"
+#import "AppDelegate.h"
 
 @interface FriendController()<UITableViewDelegate,UITableViewDataSource>
 @property (weak, nonatomic) IBOutlet UIImageView *avatar;
 @property (weak, nonatomic) IBOutlet UILabel *namelb;
+@property (weak, nonatomic) IBOutlet UILabel *severName;
+
 @property (weak, nonatomic) IBOutlet UITableView *tableView;
 @property (weak, nonatomic) IBOutlet UIButton *gotochatBt;
+@property (weak, nonatomic) IBOutlet UIButton *tonghuaBt;
+@property (weak, nonatomic) IBOutlet UIButton *shipinBt;
+@property (weak, nonatomic) IBOutlet UIButton *addFriend;
+
 
 
 
@@ -37,6 +44,7 @@
     [super viewDidLoad];
     [self.navigationController setNavigationBarHidden:YES animated:NO];
     NSLog(@"FriendController:%@",self.friendMsg);
+    _addFriend.alpha = 0;
     if(self.friendMsg){
         _isfriend=YES;
         [self initCelldata];
@@ -45,7 +53,6 @@
     else{
 //        _gotochatBt.alpha = 0;
         [self getnetFriendMsg];
-//        [self chetRelation];
     }
     
     [self initsubView];
@@ -63,15 +70,27 @@
     
     _avatar.layer.cornerRadius = 25.0f;
     
-    _gotochatBt.layer.borderWidth = 0.5f;
-//    _gotochatBt.layer.borderColor = [UIColor lightGrayColor].CGColor; //globalColor(GCTypeGreen);
-    _gotochatBt.layer.cornerRadius = 8.0f; // 可选,设置圆角
-    _gotochatBt.backgroundColor=globalColor(GCTypeBlued);
+//    _gotochatBt.layer.borderWidth = 0.5f;
+    _gotochatBt.layer.cornerRadius = 25.0f; // 可选,设置圆角
+    _gotochatBt.backgroundColor=globalColor(GCTypeinpuv);
     _gotochatBt.tintColor = [UIColor whiteColor];
     
+    _tonghuaBt.layer.cornerRadius = 25.0f; // 可选,设置圆角
+    _tonghuaBt.backgroundColor=globalColor(GCTypeinpuv);
+    _tonghuaBt.tintColor = [UIColor whiteColor];
+    
+    _shipinBt.layer.cornerRadius = 25.0f; // 可选,设置圆角
+    _shipinBt.backgroundColor=globalColor(GCTypeinpuv);
+    _shipinBt.tintColor = [UIColor whiteColor];
+    
+    _addFriend.layer.cornerRadius = 8.0f; // 可选,设置圆角
+    _addFriend.backgroundColor=globalColor(GCTypeBlued);
+    _addFriend.tintColor = [UIColor whiteColor];
+    
 }
 
 -(void)initCelldata{
+    [self chetRelation];
     NSString *stravatar = self.friendMsg[@"avatar"]?:@"";
     [_avatar sd_setImageWithURL:[NSURL URLWithString:stravatar] placeholderImage:[UIImage imageNamed:@"Avatar"]];
     NSDictionary *d1 =@{
@@ -82,8 +101,16 @@
     
     _namelb.text = self.friendMsg[@"name"];
     
+    NSDictionary *actuserInfo = [UDManager.shareInstance getDDManager:nkactuserInfo];
+    NSString *severName = actuserInfo[@"serverIP"]?:@"";
+    if(severName.length==0){
+        severName = actuserInfo[@"serverName"]?:@"";
+    }
+    
+    _severName.text = [NSString stringWithFormat:@"服務器:%@",severName];
+    
     NSDictionary *d2 =@{
-        @"name":@"手机",
+        @"name":NSLocalizedString(@"拨号号码", @""),
         @"image":@"shouji",
         @"detetle":self.friendMsg[@"mobile"]?:@""
     };
@@ -111,7 +138,7 @@
     _cellDatas = [[NSMutableArray alloc] init];
 //    [_cellDatas addObject:d1];
     [_cellDatas addObject:d2];
-    [_cellDatas addObject:d3];
+//    [_cellDatas addObject:d3];
     [_cellDatas addObject:d4];
     [_cellDatas addObject:d5];
     [_cellDatas addObject:d6];
@@ -190,7 +217,18 @@
     [self presentViewController :uiNavC animated:YES completion:nil];
     
 }
+- (IBAction)tonghua:(id)sender {
+    
+    NSDictionary *data=self.self.friendMsg;
+    NSString *chatId = data[@"id"];
+    [[AppDelegate sharedInstance] startJSCall:chatId room:@"" isCaller:YES audioOnly:YES];
+}
 
+- (IBAction)shipin:(id)sender {
+    NSDictionary *data=self.self.friendMsg;
+    NSString *chatId = data[@"id"];
+    [[AppDelegate sharedInstance] startJSCall:chatId room:@"" isCaller:YES audioOnly:NO];
+}
 
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -200,10 +238,10 @@
     if(section==0){
         cellT =@"cellA1";
     }
-    if(section==1){
-        cellT =@"cellA2";
-    }
-    if(section==2||section==3||section==4){
+//    if(section==1){
+//        cellT =@"cellA2";
+//    }
+    if(section==1||section==2||section==3){
         cellT =@"cellB";
     }
     
@@ -218,7 +256,7 @@
     NSDictionary *time =_cellDatas[section];
     NSString *title = NSLocalizedString(time[@"name"], @"");
     
-    if(section==0||section==1){
+    if(section==0){
         cell.imageView.image = [UIImage imageNamed:time[@"image"]];
         cell.textLabel.text =title;
         cell.textLabel.textColor = [UIColor whiteColor];
@@ -239,7 +277,7 @@
         titleLb.font = [UIFont systemFontOfSize:17.0f];
         [cell.contentView addSubview:titleLb];
         
-    }else if(section==2||section==3||section==4){
+    }else if(section==1||section==2||section==3){
         cell.imageView.image = [UIImage imageNamed:time[@"image"]];
         cell.textLabel.text =title;
         cell.textLabel.textColor = [UIColor whiteColor];
@@ -247,7 +285,7 @@
         CGRect ctfrm = cell.contentView.frame;
         right.frame = CGRectMake(ctfrm.size.width-30, 21, 20, 20);
         [cell.contentView addSubview:right];
-    }else if (section==5){
+    }else if (section==4){
         cell.imageView.image = [UIImage imageNamed:time[@"image"]];
         cell.textLabel.text =title;
         cell.textLabel.textColor = [UIColor whiteColor];
@@ -287,7 +325,7 @@
 
 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
     NSLog(@"indexPath:%ld",(long)indexPath.section);
-    if(indexPath.section==2){
+    if(indexPath.section==1){
         UIStoryboard *board = [UIStoryboard storyboardWithName:@"ChatHistory" bundle:[NSBundle mainBundle]];
         ChatHistoryController *chatctr = [board instantiateViewControllerWithIdentifier:@"ChatHistoryController"];
         UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:chatctr];
@@ -299,7 +337,7 @@
         [self presentViewController :uiNavC animated:YES completion:nil];
     }
     
-    if(indexPath.section==3){
+    if(indexPath.section==2){
         
         ReportViewController *Reportctr = [[ReportViewController alloc] init];
         UINavigationController *uiNavC = [[UINavigationController alloc] initWithRootViewController:Reportctr];
@@ -312,7 +350,7 @@
     }
     
     
-    if (indexPath.section == 4) {
+    if (indexPath.section == 3) {
         //拉黑
         NSString *msgnot = [NSString stringWithFormat:@"%@%@",self.friendMsg[@"name"],NSLocalizedString(@"加入黑名单", @"")];
         UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"加入黑名单", @"")
@@ -354,11 +392,11 @@
 }
 
 -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
-    return 52.0;
+    return 62.0;
 }
 
 -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
-    CGFloat height =10.0;
+    CGFloat height =20.0;
 //    if(section==1||section==3||section==4){
 //        height =0.0;
 //    }
@@ -366,7 +404,7 @@
 }
 
 -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
-    CGFloat height =10.0;
+    CGFloat height =20.0;
 //    if(section==1||section==3||section==4){
 //        height =0.0;
 //    }
@@ -384,11 +422,13 @@
         if(state){
             NSLog(@"isfriend1:");
             self.isfriend = true;
+            self.addFriend.alpha = 0;
         }
         else{
             NSLog(@"isfriend2:");
             self.isfriend=false;
-            self->_gotochatBt.alpha = 0;
+            self.addFriend.alpha = 1;
+            
         }
     } fail:^(NSError * _Nonnull error) {
         
@@ -396,4 +436,6 @@
 }
 
 
+
+
 @end

+ 26 - 0
ABtong/ABtong/ALLController/geren/AppLockPasswordController.m

@@ -86,6 +86,16 @@
     self.oldPasswordField.secureTextEntry = YES;
     self.oldPasswordField.borderStyle = UITextBorderStyleRoundedRect;
     [self.view addSubview:self.oldPasswordField];
+    self.oldPasswordField.textColor = UIColor.whiteColor;
+    self.oldPasswordField.borderStyle = UITextBorderStyleNone;
+    self.oldPasswordField.layer.borderWidth = 1.f;
+    self.oldPasswordField.layer.borderColor = UIColor.lightGrayColor.CGColor;
+    self.oldPasswordField.layer.cornerRadius = 5.f;
+    
+    UIView * leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 40)];
+    
+    self.oldPasswordField.leftViewMode = UITextFieldViewModeAlways;
+    self.oldPasswordField.leftView = leftView;
     
     // 密码输入框
     self.passwordField = [[UITextField alloc] init];
@@ -93,6 +103,14 @@
     self.passwordField.secureTextEntry = YES;
     self.passwordField.borderStyle = UITextBorderStyleRoundedRect;
     [self.view addSubview:self.passwordField];
+    self.passwordField.textColor = UIColor.whiteColor;
+    self.passwordField.borderStyle = UITextBorderStyleNone;
+    self.passwordField.layer.borderWidth = 1.f;
+    self.passwordField.layer.borderColor = UIColor.lightGrayColor.CGColor;
+    self.passwordField.layer.cornerRadius = 5.f;
+    UIView * leftView1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 40)];
+    self.passwordField.leftViewMode = UITextFieldViewModeAlways;
+    self.passwordField.leftView = leftView1;
     
     // 确认密码输入框 (仅在设置和修改模式显示)
     self.confirmField = [[UITextField alloc] init];
@@ -100,6 +118,14 @@
     self.confirmField.secureTextEntry = YES;
     self.confirmField.borderStyle = UITextBorderStyleRoundedRect;
     [self.view addSubview:self.confirmField];
+    self.confirmField.textColor = UIColor.whiteColor;
+    self.confirmField.borderStyle = UITextBorderStyleNone;
+    self.confirmField.layer.borderWidth = 1.f;
+    self.confirmField.layer.borderColor = UIColor.lightGrayColor.CGColor;
+    self.confirmField.layer.cornerRadius = 5.f;
+    UIView * leftView2 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 40)];
+    self.confirmField.leftViewMode = UITextFieldViewModeAlways;
+    self.confirmField.leftView = leftView2;
     
     // 提交按钮
     self.submitButton = [UIButton buttonWithType:UIButtonTypeSystem];

+ 41 - 93
ABtong/ABtong/ALLController/geren/PersonalInfoController.m

@@ -13,17 +13,15 @@
 @interface PersonalInfoController ()<UITextFieldDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate>
 @property (nonatomic, strong) UIImageView * avatarImageView;
 @property (nonatomic, strong) UIButton * avaterEditBtn;
-@property (nonatomic, strong) UIStackView * titleStackView;
 @property (nonatomic, strong) UILabel * nameLbl;
 @property (nonatomic, strong) UILabel * signLbl;
 @property (nonatomic, strong) UILabel * emailLbl;
 @property (nonatomic, strong) UILabel * mobileLbl;
-@property (nonatomic, strong) UILabel * genderLbl;
-@property (nonatomic, strong) UITextField * nameTextfield;//用户名
+
 @property (nonatomic, strong) UITextField * signTextfield;//昵称
 @property (nonatomic, strong) UITextField * emailTextfield;
 @property (nonatomic, strong) UITextField * mobileTextfield;
-@property (nonatomic, strong) UITextField * genderTextfield;
+
 @property (nonatomic, strong) UIButton * saveBtn;
 
 @property (nonatomic, strong) NSMutableDictionary * userInfo;
@@ -72,7 +70,7 @@
     [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.size.mas_equalTo(CGSizeMake(88, 88 ));
         make.top.mas_equalTo(120);
-        make.centerX.mas_equalTo(self.view.mas_centerX);
+        make.left.mas_equalTo(self.view.mas_left).offset(30);
     }];
     
     [self.view addSubview:self.avaterEditBtn];
@@ -82,63 +80,65 @@
         make.right.mas_equalTo(self.avatarImageView.mas_right);
     }];
     
-    [self.view addSubview:self.titleStackView];
-    [self.titleStackView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.height.mas_equalTo(310);
-        make.left.mas_equalTo(20);
-        make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(38);
-        make.width.mas_equalTo(64);
+    
+    [self.view addSubview:self.nameLbl];
+    [self.nameLbl mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(30);
+        make.left.mas_equalTo(self.avatarImageView.mas_right).offset(20);
+        make.top.mas_equalTo(140);
+        make.right.mas_equalTo(self.view.mas_right).offset(-20);
     }];
     
-    [self.view addSubview:self.nameTextfield];
-    [self.nameTextfield mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(self.titleStackView.mas_right).offset(20);
+    [self.view addSubview:self.mobileLbl];
+    [self.mobileLbl mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(30);
+        make.left.mas_equalTo(self.avatarImageView.mas_right).offset(20);
+        make.top.mas_equalTo(self.nameLbl.mas_bottom);
+        make.right.mas_equalTo(self.view.mas_right).offset(-20);
+    }];
+    
+    [self.view addSubview:self.signLbl];
+    [self.signLbl mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.view.mas_left).offset(20);
         make.height.mas_equalTo(50);
         make.right.mas_equalTo(-20);
-        make.centerY.mas_equalTo(self.nameLbl.mas_centerY);
+        make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(15);
     }];
     
     [self.view addSubview:self.signTextfield];
     [self.signTextfield mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(self.titleStackView.mas_right).offset(20);
+        make.left.mas_equalTo(self.view.mas_left).offset(20);
         make.height.mas_equalTo(50);
         make.right.mas_equalTo(-20);
-        make.centerY.mas_equalTo(self.signLbl.mas_centerY);
+        make.top.mas_equalTo(self.signLbl.mas_bottom);
     }];
     
-    [self.view addSubview:self.emailTextfield];
-    [self.emailTextfield mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(self.titleStackView.mas_right).offset(20);
-        make.height.mas_equalTo(50);
-        make.right.mas_equalTo(-20);
-        make.centerY.mas_equalTo(self.emailLbl.mas_centerY);
-    }];
     
-    [self.view addSubview:self.mobileTextfield];
-    [self.mobileTextfield mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(self.titleStackView.mas_right).offset(20);
+    [self.view addSubview:self.emailLbl];
+    [self.emailLbl mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.view.mas_left).offset(20);
         make.height.mas_equalTo(50);
         make.right.mas_equalTo(-20);
-        make.centerY.mas_equalTo(self.mobileLbl.mas_centerY);
+        make.top.mas_equalTo(self.signTextfield.mas_bottom).offset(15);
     }];
     
-    [self.view addSubview:self.genderTextfield];
-    [self.genderTextfield mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(self.titleStackView.mas_right).offset(20);
+    [self.view addSubview:self.emailTextfield];
+    [self.emailTextfield mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.view.mas_left).offset(20);
         make.height.mas_equalTo(50);
         make.right.mas_equalTo(-20);
-        make.centerY.mas_equalTo(self.genderLbl.mas_centerY);
+        make.top.mas_equalTo(self.emailLbl.mas_bottom);
     }];
     
+    
     [self.view addSubview:self.saveBtn];
     [self.saveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
         make.height.mas_equalTo(46);
         make.left.mas_equalTo(20);
         make.right.mas_equalTo(-20);
-        make.top.mas_equalTo(self.genderTextfield.mas_bottom).offset(30);
+        make.bottom.mas_equalTo(self.view.mas_bottom).offset(-50);
     }];
-    _genderLbl.alpha = 0;
-    _genderTextfield.alpha = 0;
+
     [self getUserinfo];
 }
 
@@ -178,11 +178,11 @@
                 NSLog(@"-userInfo:%@",self.userInfo);
                 self.userInfo=[ps mutableCopy];
                 [self.avatarImageView sd_setImageWithURL:getURL(self.userInfo[@"avatar"]) placeholderImage:kImageMake(@"Avatar")];
-                self.nameTextfield.text = self.userInfo[@"username"];
+                self.nameLbl.text = [NSString stringWithFormat:@"%@:%@",NSLocalizedString(@"用户名", @""),self.userInfo[@"username"]?:@""];
                 self.signTextfield.text = self.userInfo[@"name"];
                 self.emailTextfield.text = self.userInfo[@"email"];
-                self.mobileTextfield.text = self.userInfo[@"mobile"];
-                self.genderTextfield.text =  [self.userInfo[@"sex"] isEqualToString:@"0"] ? @"男": @"女";
+                self.mobileLbl.text = [NSString stringWithFormat:@"%@:%@",NSLocalizedString(@"拨号号码", @""),self.userInfo[@"mobile"]?:@""];
+               
             }
             
         } fail:^(NSError * _Nonnull error) {
@@ -222,7 +222,7 @@
         @"name":self.signTextfield.text.length == 0 ? @"" : self.signTextfield.text,
         @"email":self.emailTextfield.text,
         @"mobile":self.mobileTextfield.text.length == 0 ? @"" : self.mobileTextfield.text,
-        @"sex":[self.genderTextfield.text isEqualToString:@"男"]?@"0" :@"1",
+        @"sex":@"1",
         @"avatar":self.userInfo[@"avatar"]
     };
     
@@ -240,7 +240,7 @@
                                      @"id":self.userInfo[@"id"]?:@"",
                                      @"mobile":self.mobileTextfield.text?:@"",
                                      @"name":self.signTextfield.text?:@"",
-                                     @"sex":[self.genderTextfield.text isEqualToString:@"男"]?@"0":@"1",
+                                     @"sex":@"1",
                                      @"username":self.userInfo[@"username"]?:@"",
                                     };
                 
@@ -274,11 +274,7 @@
 - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
     textField.layer.borderColor = globalColor(GCTypeGreen).CGColor;
     textField.textColor = UIColor.whiteColor;
-    if (textField == self.genderTextfield) {
-        //性别弹窗
-        [self showGenderSelectionAlert];
-        return NO;
-    }
+    
     return YES;
 }
  
@@ -443,41 +439,8 @@
     return _mobileLbl;
 }
 
-- (UILabel *)genderLbl{
-    if (!_genderLbl) {
-        _genderLbl = [[UILabel alloc] init];
-        _genderLbl.text = NSLocalizedString(@"性别", @"");
-        _genderLbl.textColor = UIColor.whiteColor;
-        _genderLbl.font = [UIFont systemFontOfSize:16 weight:UIFontWeightRegular];
-    }
-    return _genderLbl;
-}
 
-- (UIStackView *)titleStackView{
-    if (!_titleStackView) {
-        _titleStackView = [[UIStackView alloc] initWithArrangedSubviews:@[self.nameLbl,self.signLbl,self.emailLbl,self.mobileLbl,self.genderLbl]];
-        _titleStackView.axis = UILayoutConstraintAxisVertical;
-        _titleStackView.alignment = UIStackViewAlignmentFill;
-        _titleStackView.distribution = UIStackViewDistributionEqualSpacing;
-        _titleStackView.spacing = 54.f;
-    }
-    return _titleStackView;
-}
 
-- (UITextField *)nameTextfield{
-    if (!_nameTextfield) {
-        _nameTextfield = [[UITextField alloc] init];
-        _nameTextfield.textColor = UIColor.whiteColor;
-        _nameTextfield.borderStyle = UITextBorderStyleNone;
-        _nameTextfield.delegate = self;
-        _nameTextfield.leftViewMode = UITextFieldViewModeAlways;
-        UIView * leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 50)];
-        _nameTextfield.leftView = leftView;
-        _nameTextfield.enabled = NO;
-        
-    }
-    return _nameTextfield;
-}
 
 - (UITextField *)signTextfield{
     if (!_signTextfield) {
@@ -527,21 +490,6 @@
     return _mobileTextfield;
 }
 
-- (UITextField *)genderTextfield{
-    if (!_genderTextfield) {
-        _genderTextfield = [[UITextField alloc] init];
-        _genderTextfield.textColor = UIColor.whiteColor;
-        _genderTextfield.borderStyle = UITextBorderStyleNone;
-        _genderTextfield.layer.borderWidth = 1.f;
-        _genderTextfield.layer.borderColor = UIColor.lightGrayColor.CGColor;
-        _genderTextfield.layer.cornerRadius = 5.f;
-        _genderTextfield.delegate = self;
-        _genderTextfield.leftViewMode = UITextFieldViewModeAlways;
-        UIView * leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 50)];
-        _genderTextfield.leftView = leftView;
-    }
-    return _genderTextfield;
-}
 
 - (UIButton *)saveBtn{
     if (!_saveBtn) {

+ 58 - 22
ABtong/ABtong/ALLController/geren/SecurityController.m

@@ -90,7 +90,6 @@
     
     _cellDatas = [[NSMutableArray alloc] init];
 
-    
     [_cellDatas addObject:d6];
     [_cellDatas addObject:d5];
     [_cellDatas addObject:d4];
@@ -115,15 +114,9 @@
     return 52.0;
 }
 
-- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
-    return [UIView new];
-}
 
 - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
-    if(section==0||section==1){
-        return 60;
-    }
-    return 5.f;
+    return 80.f;
 }
 
 - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
@@ -132,29 +125,66 @@
     
     if(section==0){
         UILabel *notlb = [[UILabel alloc] init];
-        notlb.frame = CGRectMake(0, 0, tableView.frame.size.width, 60);
+        
+        notlb.frame = CGRectMake(0, 0, tableView.frame.size.width, 80);
         [view addSubview:notlb];
         notlb.font = [UIFont systemFontOfSize:15];
         notlb.textColor = [UIColor whiteColor];
-        notlb.numberOfLines=2;
+        notlb.numberOfLines=0;
         notlb.text = NSLocalizedString(@"应用锁密码说明", @"");
+        notlb.lineBreakMode = NSLineBreakByWordWrapping;
+        [notlb sizeToFit];
     }
     if(section==1){
         UILabel *notlb = [[UILabel alloc] init];
-        notlb.frame = CGRectMake(0, 0, tableView.frame.size.width, 60);
+        notlb.frame = CGRectMake(0, 0, tableView.frame.size.width, 80);
         [view addSubview:notlb];
         notlb.font = [UIFont systemFontOfSize:15];
         notlb.textColor = [UIColor whiteColor];
-        notlb.numberOfLines=2;
+        notlb.numberOfLines=0;
         notlb.text = NSLocalizedString(@"安全密码说明", @"");
+        [notlb sizeToFit];
+    }
+    
+    if(section==2){
+        UILabel *notlb = [[UILabel alloc] init];
+        notlb.frame = CGRectMake(0, 0, tableView.frame.size.width, 80);
+        [view addSubview:notlb];
+        notlb.font = [UIFont systemFontOfSize:15];
+        notlb.textColor = [UIColor whiteColor];
+        notlb.numberOfLines=0;
+        notlb.text = NSLocalizedString(@"修改密码提醒", @"");
+        [notlb sizeToFit];
+    }
+    
+    if(section==3){
+        UILabel *notlb = [[UILabel alloc] init];
+        notlb.frame = CGRectMake(0, 0, tableView.frame.size.width, 80);
+        [view addSubview:notlb];
+        notlb.font = [UIFont systemFontOfSize:15];
+        notlb.textColor = [UIColor whiteColor];
+        notlb.numberOfLines=0;
+        notlb.text = NSLocalizedString(@"重置密码提醒", @"");
+        [notlb sizeToFit];
+    }
+    
+    
+    if(section==4){
+        UILabel *notlb = [[UILabel alloc] init];
+        notlb.frame = CGRectMake(0, 0, tableView.frame.size.width, 80);
+        [view addSubview:notlb];
+        notlb.font = [UIFont systemFontOfSize:15];
+        notlb.textColor = [UIColor whiteColor];
+        notlb.numberOfLines=0;
+        notlb.text =NSLocalizedString(@"注销账号提醒", @"");
+        [notlb sizeToFit];
     }
     
+    
     return view;
 }
 
-- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
-    return 5.f;
-}
+
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     
@@ -185,13 +215,9 @@
 }
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
-    if (indexPath.section == 0) {
-        //修改密码
-        ChangePasswordController * changePwdVc = [[ChangePasswordController alloc] init];
-        [self.navigationController pushViewController:changePwdVc animated:YES];
-    }
     
-    if (indexPath.section == 1) {
+    
+    if (indexPath.section == 0) {
         //应用密码
         
         if ([APPLocker.sharedLocker isPasswordSet]) {
@@ -214,12 +240,22 @@
         }
     }
     
-    if (indexPath.section == 2) {
+    if (indexPath.section == 1) {
         //安全密码,不交验直接设置新的
         SecurityPasswordController * securityPwdVc = [[SecurityPasswordController alloc] init];
         [self.navigationController pushViewController:securityPwdVc animated:YES];
     }
     
+    if (indexPath.section == 2) {
+        //修改密码
+        ChangePasswordController * changePwdVc = [[ChangePasswordController alloc] init];
+        [self.navigationController pushViewController:changePwdVc animated:YES];
+    }
+    
+    
+    
+    
+    
     if (indexPath.section == 3) {
         // 重置密码
         GCoverController * resetPwdVc = [[GCoverController alloc] init];

+ 9 - 46
ABtong/ABtong/ALLController/geren/SecurityPasswordController.m

@@ -8,9 +8,6 @@
 #import "APPLocker.h"
 
 @interface SecurityPasswordController ()
-@property (nonatomic, strong) UIStackView * titleStackView;
-@property (nonatomic, strong) UILabel * passwordTitle;
-@property (nonatomic, strong) UILabel * confirmTitle;
 @property (nonatomic, strong) UITextField * passwordTextfield;
 @property (nonatomic, strong) UITextField * confirmTextfield;
 @property (nonatomic, strong) UIButton * saveBtn;
@@ -49,28 +46,21 @@
         make.left.right.top.bottom.mas_equalTo(0);
     }];
     
-    [self.view addSubview:self.titleStackView];
-    [self.titleStackView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.height.mas_equalTo(120);
-        make.left.mas_equalTo(20);
-        make.top.mas_equalTo(SCREEN_TOP+48);
-        make.width.mas_equalTo(70);
-    }];
     
     [self.view addSubview:self.passwordTextfield];
     [self.passwordTextfield mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(104);
+        make.left.mas_equalTo(30);
         make.height.mas_equalTo(50);
-        make.right.mas_equalTo(-20);
-        make.centerY.mas_equalTo(self.passwordTitle.mas_centerY);
+        make.right.mas_equalTo(-30);
+        make.top.mas_equalTo(150);
     }];
     
     [self.view addSubview:self.confirmTextfield];
     [self.confirmTextfield mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(104);
+        make.left.mas_equalTo(30);
         make.height.mas_equalTo(50);
-        make.right.mas_equalTo(-20);
-        make.centerY.mas_equalTo(self.confirmTitle.mas_centerY);
+        make.right.mas_equalTo(-30);
+        make.top.mas_equalTo(self.passwordTextfield.mas_bottom).offset(30);
     }];
     
     [self.view addSubview:self.saveBtn];
@@ -78,7 +68,7 @@
         make.height.mas_equalTo(46);
         make.left.mas_equalTo(20);
         make.right.mas_equalTo(-20);
-        make.top.mas_equalTo(self.confirmTextfield.mas_bottom).offset(30);
+        make.top.mas_equalTo(self.confirmTextfield.mas_bottom).offset(50);
     }];
 }
 
@@ -126,36 +116,7 @@
 }
 
 #pragma mark lazy
-- (UIStackView *)titleStackView{
-    if (!_titleStackView) {
-        _titleStackView = [[UIStackView alloc] initWithArrangedSubviews:@[self.passwordTitle,self.confirmTitle]];
-        _titleStackView.axis = UILayoutConstraintAxisVertical;
-        _titleStackView.alignment = UIStackViewAlignmentFill;
-        _titleStackView.distribution = UIStackViewDistributionEqualSpacing;
-        _titleStackView.spacing = 64.f;
-    }
-    return _titleStackView;
-}
 
-- (UILabel *)passwordTitle{
-    if (!_passwordTitle) {
-        _passwordTitle = [[UILabel alloc] init];
-        _passwordTitle.text = @"新密码";
-        _passwordTitle.textColor = UIColor.whiteColor;
-        _passwordTitle.font =  SYSFONT(16);
-    }
-    return _passwordTitle;
-}
-
-- (UILabel *)confirmTitle{
-    if (!_confirmTitle) {
-        _confirmTitle = [[UILabel alloc] init];
-        _confirmTitle.text = @"确认密码";
-        _confirmTitle.textColor = UIColor.whiteColor;
-        _confirmTitle.font =  SYSFONT(16);
-    }
-    return _confirmTitle;
-}
 
 - (UITextField *)passwordTextfield{
     if (!_passwordTextfield) {
@@ -164,6 +125,7 @@
         _passwordTextfield.borderStyle = UITextBorderStyleNone;
         _passwordTextfield.layer.borderWidth = 1.f;
         _passwordTextfield.layer.borderColor = globalColor(GCTypeDark2).CGColor;
+        _passwordTextfield.placeholder = NSLocalizedString(@"请输入新密码", @"");
         _passwordTextfield.layer.cornerRadius = 5.f;
         _passwordTextfield.secureTextEntry = YES;
 //        _passwordTextfield.delegate = self;
@@ -180,6 +142,7 @@
         _confirmTextfield.textColor = UIColor.whiteColor;
         _confirmTextfield.borderStyle = UITextBorderStyleNone;
         _confirmTextfield.layer.borderWidth = 1.f;
+        _confirmTextfield.placeholder = NSLocalizedString(@"再输入一次", @"");
         _confirmTextfield.layer.borderColor = globalColor(GCTypeDark2).CGColor;
         _confirmTextfield.layer.cornerRadius = 5.f;
         _confirmTextfield.secureTextEntry = YES;

+ 12 - 3
ABtong/ABtong/ALLController/geren/UserConterController.m

@@ -58,6 +58,15 @@
     _nameLb.text = userinfo[@"name"];
     NSURL *av = [NSURL URLWithString:userinfo[@"avatar"]];
     [_avatar sd_setImageWithURL:av placeholderImage:[UIImage imageNamed:@"Avatar"]];
+    
+    
+    _qianmLb.text = @"";
+    NSDictionary *actuserInfo = [UDManager.shareInstance getDDManager:nkactuserInfo];
+    NSString *severName = actuserInfo[@"serverIP"]?:@"";
+    if(severName.length==0){
+        severName = actuserInfo[@"serverName"]?:@"";
+    }
+    _qianmLb.text = severName;
 
 }
 
@@ -70,7 +79,7 @@
     _tableView.dataSource = self;
     NSDictionary *userinfo = [UDManager.shareInstance getDDManager:nkactuserInfo];
     _nameLb.text = userinfo[@"name"];
-    _qianmLb.alpha = 0;
+
     NSURL *av = [NSURL URLWithString:userinfo[@"avatar"]];
     _avatar.layer.cornerRadius = 41.0;
     _avatar.layer.borderWidth = 1.0;
@@ -279,13 +288,13 @@
 }
 
 -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
-    CGFloat height =10.0;
+    CGFloat height =15.0;
     
     return height;
 }
 
 -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
-    CGFloat height =10.0;
+    CGFloat height =15.0;
     
     UIView *view =[[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, height)];
     view.backgroundColor = [UIColor clearColor];

+ 7 - 0
ABtong/ABtong/ALLController/login/GLoginController.m

@@ -30,6 +30,8 @@
 @property (weak, nonatomic) IBOutlet UIButton *loginBt;
 @property (weak, nonatomic) IBOutlet UIButton *wangjiBt;
 @property (weak, nonatomic) IBOutlet UIButton *agreedBt;
+@property (weak, nonatomic) IBOutlet UIButton *slServer;
+
 
 @property (nonatomic)  BOOL isagreed;
 
@@ -128,6 +130,11 @@
     _loginBt.layer.cornerRadius = 27;
     _loginBt.layer.masksToBounds = YES; // 防止子视图超出圆角边界
     
+    [_slServer setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+    [_slServer setBackgroundColor:globalColor(GCTypeDark1)];
+    _slServer.layer.cornerRadius = 6;
+    _slServer.layer.masksToBounds = YES; // 防止子视图超出圆角边界
+    
     NSString *vendorIdentifier = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
     NSLog(@"vendorIdentifier:%@",vendorIdentifier);
     

+ 27 - 3
ABtong/ABtong/ALLController/login/GserverListController.m

@@ -125,7 +125,7 @@
     _serverV.frame = self.view.frame;
     CGRect popfram = CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height);
     _serverV.frame = popfram;
-    [_serverV setViewContent];
+    [_serverV setViewContent:nil];
 }
 
 
@@ -175,7 +175,7 @@
     NSInteger index=indexPath.row;
     // 创建删除操作
     UIContextualAction *deleteAction = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive
-                                                                               title:@"删除"
+                                                                               title:NSLocalizedString(@"删除", @"")
                                                                              handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
         
         // 删除聊天
@@ -187,8 +187,23 @@
     // 设置删除按钮颜色
     deleteAction.backgroundColor = [UIColor redColor];
     
+    
+    // 创建删除操作
+    UIContextualAction *editAction = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive
+                                                                               title:NSLocalizedString(@"编辑", @"")
+                                                                             handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
+        
+        // 删除聊天
+        [weakself editChatWith:index];
+        // 告诉系统操作已完成
+        completionHandler(YES);
+    }];
+    
+    // 设置删除按钮颜色
+    editAction.backgroundColor = globalColor(GCTypeGreend);
+    
     // 创建配置并返回
-    UISwipeActionsConfiguration *config = [UISwipeActionsConfiguration configurationWithActions:@[deleteAction]];
+    UISwipeActionsConfiguration *config = [UISwipeActionsConfiguration configurationWithActions:@[deleteAction,editAction]];
     config.performsFirstActionWithFullSwipe = YES; // 完全滑动直接执行删除
     return config;
 }
@@ -204,6 +219,15 @@
     }];
 }
 
+-(void)editChatWith:(NSInteger)index{
+    NSDictionary *item = [_serverArray objectAtIndex:index];
+    _serverV.frame = self.view.frame;
+    CGRect popfram = CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height);
+    _serverV.frame = popfram;
+    [_serverV setViewContent:item];
+    
+}
+
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
     NSLog(@"1111");
     NSDictionary *item = [_serverArray objectAtIndex:indexPath.row];

+ 1 - 1
ABtong/ABtong/ALLController/login/ServerIPInputView.h

@@ -20,7 +20,7 @@
 
 @property (nonatomic,weak) id <ServerIPInputViewDelegate> delegate;
 
--(void)setViewContent;
+-(void)setViewContent:(NSDictionary *)dic;
 
 @end
 

+ 54 - 29
ABtong/ABtong/ALLController/login/ServerIPInputView.m

@@ -25,6 +25,8 @@
 @property (weak, nonatomic) IBOutlet UIButton *qxBt;
 @property (weak, nonatomic) IBOutlet UIButton *qrBt;
 
+@property (strong, nonatomic) NSDictionary *dic;
+
 @end
 
 
@@ -41,57 +43,80 @@
 - (IBAction)cancelBt:(id)sender {
     [self endEditing:YES];
     [self.delegate actionNote:@"1"];
+    self.dic = nil;
 }
 - (IBAction)querenBtact:(id)sender {
     
-    NSString *name = _inputName.text;
-    NSString *ipdiz = _inputIp.text;
-    NSString *userName=_userName.text;
-    NSString *passWord = _passWord.text;
+    NSString *name = _inputName.text?:@"";
+    NSString *ipdiz = _inputIp.text?:@"";
+    NSString *userName=_userName.text?:@"";
+    NSString *passWord = _passWord.text?:@"";
     
     
     if(name.length==0||ipdiz.length==0||userName.length==0||passWord.length==0){
         [MBProgressHUD showWithText:@"请完善信息"];
         return;
     }
-    NSLog(@"%@:%@",name,ipdiz);
-    NSDictionary *dic=@{
-        @"userId":@"",
-        @"userName":userName,
-        @"passWord":passWord,
-        @"serverName":name,
-        @"serverIP":ipdiz,
-        @"serverId":@"",
-        @"token":@"",
-    };
-    [GDBManager.shareInstance insertlcUserServer:dic succ:^(NSArray * _Nullable array) {
-        [self endEditing:YES];
-        [self.delegate actionNote:@"2"];
+    
+    if(self.dic){
+        NSMutableDictionary *Dict = [NSMutableDictionary dictionaryWithDictionary:self.dic];
+        [Dict setObject:name forKey:@"serverName"];
+        [Dict setObject:ipdiz forKey:@"serverIP"];
+        [Dict setObject:passWord forKey:@"passWord"];
+        [Dict setObject:userName forKey:@"userName"];
+        [GDBManager.shareInstance updataUserServer:[Dict copy] succ:nil fail:nil];
+    }
+    else{
+        NSDictionary *dic=@{
+            @"userId":@"",
+            @"userName":userName,
+            @"passWord":passWord,
+            @"serverName":name,
+            @"serverIP":ipdiz,
+            @"serverId":@"",
+            @"token":@"",
+        };
+        NSLog(@"dic:%@",dic);
         
-        self->_inputName.text=@"";
-        self->_inputIp.text=@"";
-        self->_userName.text=@"";
-        self->_passWord.text=@"";
         
-    } fail:^(NSString * _Nullable error) {
-        [MBProgressHUD showWithText:@"数据保存失败"];
-    }];
+        [GDBManager.shareInstance insertlcUserServer:dic succ:^(NSArray * _Nullable array) {
+            [self endEditing:YES];
+            [self.delegate actionNote:@"2"];
+            
+            self->_inputName.text=@"";
+            self->_inputIp.text=@"";
+            self->_userName.text=@"";
+            self->_passWord.text=@"";
+            self.dic = nil;
+            
+        } fail:^(NSString * _Nullable error) {
+            [MBProgressHUD showWithText:@"数据保存失败"];
+        }];
+    }
     
     [self endEditing:YES];
     [self.delegate actionNote:@"2"];
 }
 
--(void)setViewContent{
+-(void)setViewContent:(NSDictionary *)dic{
     _contentView.layer.cornerRadius = 10.0f;
     [_inputName becomeFirstResponder];
     [self initSubView];
+    if(dic){
+        self.inputName.text=dic[@"serverName"];
+        self.inputIp.text=dic[@"serverIP"];
+        self.userName.text=dic[@"userName"];
+        self.passWord.text=dic[@"passWord"];
+        self.dic = dic;
+        NSLog(@"self.dic:%@",self.dic);
+    }
 }
 
 -(void)initSubView{
     
     _inputName.borderStyle=UITextBorderStyleNone;
     _inputName.layer.borderWidth = 1.0f;
-    _inputName.layer.borderColor = globalColor(GCTypeGreen).CGColor; //globalColor(GCTypeGreen);
+    _inputName.layer.borderColor = UIColor.lightGrayColor.CGColor;
     _inputName.layer.cornerRadius = 8.0f; // 可选,设置圆角
     _inputName.backgroundColor = [UIColor clearColor];
     _inputName.textColor=[UIColor whiteColor];
@@ -104,7 +129,7 @@
     
     _inputIp.borderStyle=UITextBorderStyleNone;
     _inputIp.layer.borderWidth = 1.0f;
-    _inputIp.layer.borderColor = globalColor(GCTypeGreen).CGColor; //globalColor(GCTypeGreen);
+    _inputIp.layer.borderColor = UIColor.lightGrayColor.CGColor;
     _inputIp.layer.cornerRadius = 8.0f; // 可选,设置圆角
     _inputIp.backgroundColor = [UIColor clearColor];
     _inputIp.textColor=[UIColor whiteColor];
@@ -117,7 +142,7 @@
     
     _userName.borderStyle=UITextBorderStyleNone;
     _userName.layer.borderWidth = 1.0f;
-    _userName.layer.borderColor = globalColor(GCTypeGreen).CGColor; //globalColor(GCTypeGreen);
+    _userName.layer.borderColor = UIColor.lightGrayColor.CGColor;
     _userName.layer.cornerRadius = 8.0f; // 可选,设置圆角
     _userName.backgroundColor = [UIColor clearColor];
     _userName.textColor=[UIColor whiteColor];
@@ -130,7 +155,7 @@
     
     _passWord.borderStyle=UITextBorderStyleNone;
     _passWord.layer.borderWidth = 1.0f;
-    _passWord.layer.borderColor = globalColor(GCTypeGreen).CGColor; //globalColor(GCTypeGreen);
+    _passWord.layer.borderColor = UIColor.lightGrayColor.CGColor;
     _passWord.layer.cornerRadius = 8.0f; // 可选,设置圆角
     _passWord.backgroundColor = [UIColor clearColor];
     _passWord.textColor=[UIColor whiteColor];

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 225 - 209
ABtong/ABtong/Base.lproj/Main.storyboard


+ 1 - 1
ABtong/ABtong/Common/CommonUI/Util/config.h

@@ -156,7 +156,7 @@ static inline UIColor *globalColor(GlobalColorType type) {
         case GCTypeOrangeR:
             return [UIColor colorWithRed:0xFF/255.0 green:0x66/255.0 blue:0x00/255.0 alpha:1.0];
         case GCTypeDark1:
-            return [UIColor colorWithRed:0xF6/255.0 green:0xF6/255.0 blue:0xF6/255.0 alpha:1.0];
+            return [UIColor colorWithRed:0xF3/255.0 green:0xF4/255.0 blue:0xFF/255.0 alpha:1.0];
         case GCTypeDark2:
             return [UIColor colorWithRed:0xD2/255.0 green:0xD2/255.0 blue:0xD2/255.0 alpha:1.0];
         case GCTypeDark3:

+ 21 - 23
ABtong/ABtong/Common/Network/GDBManager.m

@@ -1123,28 +1123,12 @@
     [self.db beginTransaction];
     @try {
         NSDictionary *safeDict = [self replaceNullsWithEmptyStringInDictionary:msg];
-        
+        NSLog(@"updataUserServer:%@",safeDict);
     
-        NSString *deleteSQL = [NSString stringWithFormat:
-                               @"DELETE FROM %@ WHERE userName = ? AND serverIP=?",
-                               @"lcUserServer"];
-        
-        if (![self.db executeUpdate:deleteSQL, safeDict[@"userName"],safeDict[@"serverIP"]]) {
-                NSLog(@"lcUserServer 删除旧数据失败(userName=%@): %@", safeDict[@"userName"], [self.db lastErrorMessage]);
-            // 不终止,继续尝试插入
-        }
-        else{
-           NSLog(@"lcUserServer 删除旧数据(userName=%@): %@", safeDict[@"userName"], [self.db lastErrorMessage]);
-        }
-        
-        
-        // 准备SQL语句(使用参数化查询,避免SQL注入)
-        NSString *insertSQL = [NSString stringWithFormat:
-                               @"INSERT INTO %@ ('userId','userName','passWord','serverName','serverIP','serverId','token','name','avatar') VALUES (?,?,?,?,?,?,?,?,?)",
-                               @"lcUserServer"];
+        NSString *updataSQL = @"UPDATE lcUserServer SET userId=?,userName=?,passWord=?,serverName=?,serverIP=?,serverId=?,token=?,name=?,avatar=? WHERE id = ?";
         
         // 执行插入(使用参数化查询)
-        BOOL success = [self.db executeUpdate:insertSQL,
+        BOOL success = [self.db executeUpdate:updataSQL,
                         safeDict[@"userId"],
                         safeDict[@"userName"],
                         safeDict[@"passWord"],
@@ -1153,7 +1137,8 @@
                         safeDict[@"serverId"],
                         safeDict[@"token"],
                         safeDict[@"name"],
-                        safeDict[@"avatar"]];
+                        safeDict[@"avatar"],
+                        safeDict[@"id"]];
         
         if (!success) {
             // 记录失败的消息
@@ -1194,7 +1179,7 @@
         userid = [UDManager.shareInstance getSDManager:dkuserId];
     }
     NSString *sql1=@"create table if not exists Callmsglist_";
-    NSString *tablejg = @"(id CHAR PRIMARY KEY,chatId CHAR,type CHAR,messageType CHAR,timestamp BIGINT,localtime BIGINT,Message TEXT)";
+    NSString *tablejg = @"(id CHAR PRIMARY KEY,chatId CHAR,severName CHAR,type CHAR,messageType CHAR,timestamp BIGINT,localtime BIGINT,Message TEXT)";
     NSString *sql = [NSString stringWithFormat:@"%@%@ %@",sql1,userid,tablejg];
     NSLog(@"createCallmsgTable --- sql:%@",sql);
     BOOL success = [self.db executeUpdate:sql];
@@ -1233,6 +1218,8 @@
     }
     
     NSString *userid = [UDManager.shareInstance getSDManager:dkuserId];
+    NSDictionary *actuserInfo = [UDManager.shareInstance getDDManager:nkactuserInfo];
+    actuserInfo = [self replaceNullsWithEmptyStringInDictionary:actuserInfo];
     if (userid.length == 0) {
         if (fail) fail(@"用户ID获取失败");
         return;
@@ -1244,7 +1231,6 @@
     // 2. 处理localtime
     NSString *localtime = [NSString stringWithFormat:@"%@", safeDict[@"localtime"]];
 
-    NSString *msgtype = safeDict[@"messageType"];
     BOOL urlMark = true;
     // 3. 开启事务
     [self.db beginTransaction];
@@ -1284,14 +1270,18 @@
         NSData *jsonData = [NSJSONSerialization dataWithJSONObject:safeDict options:0 error:nil];
         NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
         
+        NSData *jsonDatas = [NSJSONSerialization dataWithJSONObject:actuserInfo options:0 error:nil];
+        NSString *severName = [[NSString alloc] initWithData:jsonDatas encoding:NSUTF8StringEncoding];
+        
         NSString *insertSQL = [NSString stringWithFormat:
-                               @"INSERT INTO %@ (id,chatId,type,messageType,timestamp,localtime,Message) VALUES (?,?,?,?,?,?,?)",
+                               @"INSERT INTO %@ (id,chatId,severName,type,messageType,timestamp,localtime,Message) VALUES (?,?,?,?,?,?,?,?)",
                                tableName];
         
         // 6. 执行插入
         BOOL success = [self.db executeUpdate:insertSQL,
                         safeDict[@"id"],
                         safeDict[@"chatId"],
+                        severName,
                         safeDict[@"result"],
                         safeDict[@"messageType"],
                         safeDict[@"timestamp"],
@@ -1342,10 +1332,18 @@
     while ([rs next]) {
         NSLog(@"rs:%@",[rs stringForColumn:@"type"]);
         NSString *msg =[rs stringForColumn:@"Message"];
+        NSString *severName =[rs stringForColumn:@"severName"];
         //NSLog(@"msg:%@",msg);
         NSData *data = [msg dataUsingEncoding:NSUTF8StringEncoding];
         if (data) {
             NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
+            NSData *datas = [severName dataUsingEncoding:NSUTF8StringEncoding];
+            if(datas){
+                NSDictionary *serverd = [NSJSONSerialization JSONObjectWithData:datas options:0 error:nil];
+                NSMutableDictionary *Dict = [NSMutableDictionary dictionaryWithDictionary:jsonDict];
+                [Dict setObject:serverd?:@"" forKey:@"severName"];
+                jsonDict = [Dict copy];
+            }
             [array addObject:jsonDict];
         }
         

+ 98 - 2
ABtong/ABtong/Localizable.xcstrings

@@ -265,6 +265,30 @@
         }
       }
     },
+    "修改密码提醒" : {
+      "comment" : "第一次使用請修改初始密碼後再使用,或通過驗證原密碼設定新密碼,不定期更換密碼更安全。",
+      "extractionState" : "manual",
+      "localizations" : {
+        "en" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "Please change the initial password before using it for the first time, or set a new password by verifying the original password. Changing the password periodically is more secure."
+          }
+        },
+        "zh-Hans" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "第一次使用请修改初始密码后再使用,或通过验证原密码设置新密码,不定期更换密码更安全。"
+          }
+        },
+        "zh-Hant" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "第一次使用請修改初始密碼後再使用,或通過驗證原密碼設定新密碼,不定期更換密碼更安全。"
+          }
+        }
+      }
+    },
     "修改应用锁密码" : {
       "comment" : "修改應用鎖密碼",
       "extractionState" : "manual",
@@ -554,7 +578,7 @@
       }
     },
     "删除" : {
-      "comment" : "除",
+      "comment" : "除",
       "extractionState" : "manual",
       "localizations" : {
         "en" : {
@@ -572,7 +596,7 @@
         "zh-Hant" : {
           "stringUnit" : {
             "state" : "translated",
-            "value" : "除"
+            "value" : "除"
           }
         }
       }
@@ -2041,6 +2065,30 @@
         }
       }
     },
+    "注销账号提醒" : {
+      "comment" : "如果你的帳號已經綁定有郵箱,請通過郵箱驗證碼註銷帳號,或者你可以聯系平臺管理員獲得幫助。",
+      "extractionState" : "manual",
+      "localizations" : {
+        "en" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "If your account is already linked to an email, please use the email verification code to cancel the account, or you can contact the platform administrator for assistance."
+          }
+        },
+        "zh-Hans" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "如果你的账号已经绑定有邮箱,请通过邮箱验证码注销账号,或者你可以联系平台管理员获得帮助。"
+          }
+        },
+        "zh-Hant" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "如果你的帳號已經綁定有郵箱,請通過郵箱驗證碼註銷帳號,或者你可以聯系平臺管理員獲得幫助。"
+          }
+        }
+      }
+    },
     "消息免打扰" : {
       "comment" : "消息免打擾",
       "extractionState" : "manual",
@@ -2257,6 +2305,30 @@
         }
       }
     },
+    "编辑" : {
+      "comment" : "編輯",
+      "extractionState" : "manual",
+      "localizations" : {
+        "en" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "edit"
+          }
+        },
+        "zh-Hans" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "编辑"
+          }
+        },
+        "zh-Hant" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "編輯"
+          }
+        }
+      }
+    },
     "网络不可用" : {
       "comment" : "網路不可用,請檢查網路",
       "extractionState" : "manual",
@@ -3025,6 +3097,30 @@
         }
       }
     },
+    "重置密码提醒" : {
+      "comment" : "如果你的帳號已經綁定有郵箱,請通過郵箱驗證碼重置密碼。",
+      "extractionState" : "manual",
+      "localizations" : {
+        "en" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "If your account is already linked to an email, please reset your password using the email verification code."
+          }
+        },
+        "zh-Hans" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "如果你的账号已经绑定有邮箱,请通过邮箱验证码重置密码。"
+          }
+        },
+        "zh-Hant" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "如果你的帳號已經綁定有郵箱,請通過郵箱驗證碼重置密碼。"
+          }
+        }
+      }
+    },
     "错误" : {
       "comment" : "錯誤",
       "extractionState" : "manual",

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.