Jelajahi Sumber

登录流程测试修改

15555599100 6 tahun lalu
induk
melakukan
3d976b6ced
70 mengubah file dengan 740 tambahan dan 418 penghapusan
  1. TEMPAT SAMPAH
      HappyJob/.DS_Store
  2. 16 4
      HappyJob/HappyJob.xcodeproj/project.pbxproj
  3. 1 1
      HappyJob/HappyJob/API/FBNetworking/FBBaseAPIManager.m
  4. 1 2
      HappyJob/HappyJob/AppDelegate.m
  5. 19 0
      HappyJob/HappyJob/BClass/BHome_首页/API/BHomeDataBox.h
  6. 166 0
      HappyJob/HappyJob/BClass/BHome_首页/API/BHomeDataBox.m
  7. 1 0
      HappyJob/HappyJob/BClass/BHome_首页/Model/BHomeListModel.m
  8. 2 0
      HappyJob/HappyJob/BClass/BHome_首页/Model/BHomeResumeDetailModel.m
  9. 2 3
      HappyJob/HappyJob/BClass/BHome_首页/Model/BHomeResumeDetailWorkExperienceListModel.m
  10. 18 21
      HappyJob/HappyJob/BClass/BHome_首页/ViewController/BHomeResumeDetailViewController.m
  11. 58 78
      HappyJob/HappyJob/BClass/BHome_首页/ViewController/BHomeViewController.m
  12. 8 1
      HappyJob/HappyJob/BClass/BHome_首页/Views/Cell/BHomeListCell.h
  13. 0 68
      HappyJob/HappyJob/BClass/BHome_首页/Views/Cell/BHomeListCell.m
  14. 5 2
      HappyJob/HappyJob/BClass/BHome_首页/Views/View/BHomeNoCertificationView.m
  15. 10 3
      HappyJob/HappyJob/BClass/BHome_首页/企业认证/ViewController/BHomeCertificationEnterpriseVC.m
  16. 7 0
      HappyJob/HappyJob/BClass/BHome_首页/企业认证/ViewController/BHomeCertificationFailVC.m
  17. 6 5
      HappyJob/HappyJob/BClass/BHome_首页/企业认证/ViewController/BHomeCertificationingEnterpriseVC.m
  18. 3 2
      HappyJob/HappyJob/BClass/BHome_首页/面试邀请/ViewController/BHomeInvitationViewController.m
  19. 17 0
      HappyJob/HappyJob/BClass/BMessage_消息/API/BMessageDataBox.h
  20. 113 0
      HappyJob/HappyJob/BClass/BMessage_消息/API/BMessageDataBox.m
  21. 5 1
      HappyJob/HappyJob/BClass/BMessage_消息/View/BMessageCell.h
  22. 4 44
      HappyJob/HappyJob/BClass/BMessage_消息/View/BMessageCell.m
  23. 36 55
      HappyJob/HappyJob/BClass/BMessage_消息/ViewController/BMessageViewController.m
  24. 2 1
      HappyJob/HappyJob/BClass/BMy_我的/设置/ViewControlletr/BSetViewController.m
  25. 0 1
      HappyJob/HappyJob/BClass/BPosition_职位/API/BCheckPeopleAPI.m
  26. 0 1
      HappyJob/HappyJob/BClass/BPosition_职位/API/BPositionDetailAPI.m
  27. 2 6
      HappyJob/HappyJob/BClass/BPosition_职位/API/BPositionListAPI.m
  28. 4 1
      HappyJob/HappyJob/BClass/BPosition_职位/ViewController/BCheckPeopleViewController.m
  29. 7 4
      HappyJob/HappyJob/BClass/BPosition_职位/ViewController/BPositionDetailViewController.m
  30. 10 6
      HappyJob/HappyJob/BClass/BPosition_职位/ViewController/BPositionViewController.m
  31. 3 0
      HappyJob/HappyJob/Base/UserInfo/HJCompanyInfoModel.h
  32. 0 1
      HappyJob/HappyJob/Base/UserInfo/HJMemberInfoModel.h
  33. 0 6
      HappyJob/HappyJob/Base/UserInfo/HJMemberInfoModel.m
  34. 4 0
      HappyJob/HappyJob/Base/UserInfo/HJUserInfoModel.m
  35. 1 1
      HappyJob/HappyJob/CClass/Home_首页/HJHomeViewController.m
  36. 2 2
      HappyJob/HappyJob/CClass/Home_首页/Header_头视图/JobSort_分类信息/HJJobSortView.m
  37. 3 1
      HappyJob/HappyJob/CClass/Home_首页/Header_头视图/Scroll_轮播器/HJBannerScrollView.m
  38. 1 0
      HappyJob/HappyJob/CClass/Home_首页/HomeAPIManager/HJHomeDataBox.m
  39. 1 0
      HappyJob/HappyJob/CClass/JobList_工作列表信息/FullTime_全职工作/HJFullTimeDetailViewController.m
  40. 3 2
      HappyJob/HappyJob/CClass/JobList_工作列表信息/FullTime_全职工作/HJFullTimeTableViewCell.m
  41. 0 1
      HappyJob/HappyJob/CClass/JobList_工作列表信息/FullTime_全职工作/HJFullTimeViewController.m
  42. 2 2
      HappyJob/HappyJob/CClass/JobList_工作列表信息/HJPositionDataBox.m
  43. 1 0
      HappyJob/HappyJob/CClass/JobList_工作列表信息/PositionDetail_岗位详情/PositionDetailAPIManager/HJPositionDetailDataBox.m
  44. 2 2
      HappyJob/HappyJob/CClass/Join_拼工/Apply_申请拼工/HJJoinApplyViewController.m
  45. 17 7
      HappyJob/HappyJob/CClass/Join_拼工/HJJoinDetailHeaderView.m
  46. 1 1
      HappyJob/HappyJob/CClass/Join_拼工/HJJoinDetailViewController.m
  47. 16 1
      HappyJob/HappyJob/CClass/Join_拼工/HJJoinViewController.m
  48. 18 5
      HappyJob/HappyJob/CClass/Me_我/MeAPIManager/HJGetUserInfoAPIManager.m
  49. 10 8
      HappyJob/HappyJob/CClass/Me_我/Setting_设置/HJSettingViewController.m
  50. 3 3
      HappyJob/HappyJob/CClass/Me_我/View/Header_头视图/HJMeDistributeView.m
  51. 5 8
      HappyJob/HappyJob/CClass/Me_我/ViewController/HJMeViewController.m
  52. 1 2
      HappyJob/HappyJob/Custom/WeiXin/HJWeiXinAPIManager.m
  53. 1 0
      HappyJob/HappyJob/HappyJob-Prefix.pch
  54. 1 1
      HappyJob/HappyJob/Login_登录/LoginAPIManager/HJLoginBindingPhoneAPIManager.m
  55. 5 0
      HappyJob/HappyJob/Login_登录/LoginAPIManager/HJLoginDataBox.m
  56. 2 0
      HappyJob/HappyJob/Login_登录/LoginAPIManager/HJLoginInfoMergeAPI.h
  57. 2 1
      HappyJob/HappyJob/Login_登录/LoginAPIManager/HJLoginInfoMergeAPI.m
  58. 6 2
      HappyJob/HappyJob/Login_登录/ViewController/HJLoginBindingPhoneViewController.m
  59. 15 9
      HappyJob/HappyJob/Login_登录/ViewController/HJLoginViewController.m
  60. 45 19
      HappyJob/HappyJob/Login_登录/信息合并/View/HJLoginInfoMergeCell.m
  61. 0 1
      HappyJob/HappyJob/Login_登录/信息合并/View/HJLoginInfoMergeFailView.m
  62. 5 1
      HappyJob/HappyJob/Login_登录/信息合并/View/个人资料/HJLoginInfoLookResumePersonalDataListView.m
  63. 17 4
      HappyJob/HappyJob/Login_登录/信息合并/View/个人资料/HJLoginInfoLookResumePersonalDataView.m
  64. 4 1
      HappyJob/HappyJob/Login_登录/信息合并/View/工作经验/HJLoginInfoLookResumeExperienceView.m
  65. 2 0
      HappyJob/HappyJob/Login_登录/信息合并/View/求职意向/HJLoginInfoLookResumeObjectiveView.m
  66. 1 0
      HappyJob/HappyJob/Login_登录/信息合并/ViewController/HJLoginInfoMergeViewController.h
  67. 8 9
      HappyJob/HappyJob/Login_登录/信息合并/ViewController/HJLoginInfoMergeViewController.m
  68. 1 0
      HappyJob/HappyJob/Support/HJAppUserType.h
  69. 3 1
      HappyJob/HappyJob/Support/HJAppUserType.m
  70. 5 6
      HappyJob/HappyJob/Support/HJConfig.h

TEMPAT SAMPAH
HappyJob/.DS_Store


+ 16 - 4
HappyJob/HappyJob.xcodeproj/project.pbxproj

@@ -80,6 +80,7 @@
 		713D34412306387A007DCBB6 /* HJJoinDetailHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 713D34402306387A007DCBB6 /* HJJoinDetailHeaderView.m */; };
 		713D344423066D43007DCBB6 /* HJFullTimeDetailHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 713D344323066D43007DCBB6 /* HJFullTimeDetailHeaderView.m */; };
 		713D344723066DC6007DCBB6 /* HJPartTimeDetailHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 713D344623066DC6007DCBB6 /* HJPartTimeDetailHeaderView.m */; };
+		713D344A2306F16D007DCBB6 /* BMessageDataBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 713D34492306F16D007DCBB6 /* BMessageDataBox.m */; };
 		715E5CD222D16E3A00AAFA24 /* BHomeCertificationEnterpriseAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 715E5CD122D16E3A00AAFA24 /* BHomeCertificationEnterpriseAPI.m */; };
 		715E5CD622D1C60500AAFA24 /* BReleasePartTimeJobsAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 715E5CD522D1C60500AAFA24 /* BReleasePartTimeJobsAPI.m */; };
 		715E5CDC22D2D32800AAFA24 /* BHomeCertificationingEnterpriseVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 715E5CDB22D2D32800AAFA24 /* BHomeCertificationingEnterpriseVC.m */; };
@@ -122,6 +123,7 @@
 		71714E2E22C99E6B009984B6 /* UIButton+ImageTitleSpace.m in Sources */ = {isa = PBXBuildFile; fileRef = 71714E2322C99E6B009984B6 /* UIButton+ImageTitleSpace.m */; };
 		71714E2F22C99E6B009984B6 /* NSDictionary+ValueAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 71714E2422C99E6B009984B6 /* NSDictionary+ValueAccess.m */; };
 		71714E3222C9A27C009984B6 /* BMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71714E3122C9A27C009984B6 /* BMainViewController.m */; };
+		717213872309406200E14B44 /* BHomeDataBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 717213862309406200E14B44 /* BHomeDataBox.m */; };
 		71A2B01922F2939E00B4FACF /* HJLoginInfoMergeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A2B01822F2939E00B4FACF /* HJLoginInfoMergeViewController.m */; };
 		71A2B01E22F2A2ED00B4FACF /* HJLoginInfoMergeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A2B01D22F2A2ED00B4FACF /* HJLoginInfoMergeCell.m */; };
 		71A2B02122F2B3D700B4FACF /* HJLoginInfoMergePopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A2B02022F2B3D700B4FACF /* HJLoginInfoMergePopupView.m */; };
@@ -512,6 +514,8 @@
 		713D344323066D43007DCBB6 /* HJFullTimeDetailHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HJFullTimeDetailHeaderView.m; sourceTree = "<group>"; };
 		713D344523066DC6007DCBB6 /* HJPartTimeDetailHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HJPartTimeDetailHeaderView.h; sourceTree = "<group>"; };
 		713D344623066DC6007DCBB6 /* HJPartTimeDetailHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HJPartTimeDetailHeaderView.m; sourceTree = "<group>"; };
+		713D34482306F16D007DCBB6 /* BMessageDataBox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BMessageDataBox.h; sourceTree = "<group>"; };
+		713D34492306F16D007DCBB6 /* BMessageDataBox.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BMessageDataBox.m; sourceTree = "<group>"; };
 		715E5CD022D16E3A00AAFA24 /* BHomeCertificationEnterpriseAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BHomeCertificationEnterpriseAPI.h; sourceTree = "<group>"; };
 		715E5CD122D16E3A00AAFA24 /* BHomeCertificationEnterpriseAPI.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BHomeCertificationEnterpriseAPI.m; sourceTree = "<group>"; };
 		715E5CD422D1C60500AAFA24 /* BReleasePartTimeJobsAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BReleasePartTimeJobsAPI.h; sourceTree = "<group>"; };
@@ -596,6 +600,8 @@
 		71714E2522C99E6B009984B6 /* UIImage+FitSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+FitSize.h"; sourceTree = "<group>"; };
 		71714E3022C9A27C009984B6 /* BMainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BMainViewController.h; sourceTree = "<group>"; };
 		71714E3122C9A27C009984B6 /* BMainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BMainViewController.m; sourceTree = "<group>"; };
+		717213852309406200E14B44 /* BHomeDataBox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BHomeDataBox.h; sourceTree = "<group>"; };
+		717213862309406200E14B44 /* BHomeDataBox.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BHomeDataBox.m; sourceTree = "<group>"; };
 		71A2B01722F2939E00B4FACF /* HJLoginInfoMergeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HJLoginInfoMergeViewController.h; sourceTree = "<group>"; };
 		71A2B01822F2939E00B4FACF /* HJLoginInfoMergeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HJLoginInfoMergeViewController.m; sourceTree = "<group>"; };
 		71A2B01C22F2A2ED00B4FACF /* HJLoginInfoMergeCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HJLoginInfoMergeCell.h; sourceTree = "<group>"; };
@@ -1545,6 +1551,8 @@
 				715E5D1B22D4335800AAFA24 /* BHomeListAPI.m */,
 				715E5D2022D44D8700AAFA24 /* BHomeResumeDetailAPI.h */,
 				715E5D2122D44D8700AAFA24 /* BHomeResumeDetailAPI.m */,
+				717213852309406200E14B44 /* BHomeDataBox.h */,
+				717213862309406200E14B44 /* BHomeDataBox.m */,
 			);
 			path = API;
 			sourceTree = "<group>";
@@ -1724,6 +1732,8 @@
 			children = (
 				715E5D3322D48E8100AAFA24 /* BMessageListAPI.h */,
 				715E5D3422D48E8100AAFA24 /* BMessageListAPI.m */,
+				713D34482306F16D007DCBB6 /* BMessageDataBox.h */,
+				713D34492306F16D007DCBB6 /* BMessageDataBox.m */,
 			);
 			path = API;
 			sourceTree = "<group>";
@@ -1970,9 +1980,9 @@
 		71AC1A0D22F3BBE100569CB5 /* 信息合并 */ = {
 			isa = PBXGroup;
 			children = (
-				71AC1A1022F3BC1000569CB5 /* Model */,
-				71AC1A1122F3BC1100569CB5 /* View */,
 				71AC1A0E22F3BC1000569CB5 /* ViewController */,
+				71AC1A1122F3BC1100569CB5 /* View */,
+				71AC1A1022F3BC1000569CB5 /* Model */,
 			);
 			path = "信息合并";
 			sourceTree = "<group>";
@@ -2691,10 +2701,10 @@
 		C41393EC225363DB009F61FE /* UserInfo */ = {
 			isa = PBXGroup;
 			children = (
-				713D342D23024CE1007DCBB6 /* HJMemberInfoModel.h */,
-				713D342E23024CE1007DCBB6 /* HJMemberInfoModel.m */,
 				C41393ED225364CE009F61FE /* HJUserInfoModel.h */,
 				C41393EE225364CE009F61FE /* HJUserInfoModel.m */,
+				713D342D23024CE1007DCBB6 /* HJMemberInfoModel.h */,
+				713D342E23024CE1007DCBB6 /* HJMemberInfoModel.m */,
 				717086E922E84176004ADC88 /* HJUserResumeModel.h */,
 				717086EA22E84176004ADC88 /* HJUserResumeModel.m */,
 				715E5CE622D2E45100AAFA24 /* HJCompanyInfoModel.h */,
@@ -3467,6 +3477,7 @@
 				C40F58A422B098700047D6E6 /* HJJoinCycleScrollViewCell.m in Sources */,
 				C4FB5CF22271BC160004010F /* NSDateComponents+XHCategory.m in Sources */,
 				C40FA7202277045800EB2371 /* HJGetFullTimePositionAPIManager.m in Sources */,
+				717213872309406200E14B44 /* BHomeDataBox.m in Sources */,
 				71A2B03F22F2F21700B4FACF /* HJLoginInfoLookResumeExperienceListView.m in Sources */,
 				C40CA4412244A35400F303A6 /* HJJobDetailForwardView.m in Sources */,
 				C40E8F04226D9AA700F3900A /* HJHomeHeaderView.m in Sources */,
@@ -3659,6 +3670,7 @@
 				71714E2B22C99E6B009984B6 /* NSObject+Associate.m in Sources */,
 				713269CC22CCFC4A00DEB10B /* BHomeNoCertificationView.m in Sources */,
 				C4F657B8224E0F4400E1E625 /* HJLoginPhoneLoginAPIManager.m in Sources */,
+				713D344A2306F16D007DCBB6 /* BMessageDataBox.m in Sources */,
 				C4FB5CF02271BC160004010F /* NSDate+XHCategory.m in Sources */,
 				C412BD9E22781DB60098893C /* HJPageableAPIManager.m in Sources */,
 				713269B522CCDCAD00DEB10B /* BHomeInvitationViewController.m in Sources */,

+ 1 - 1
HappyJob/HappyJob/API/FBNetworking/FBBaseAPIManager.m

@@ -59,7 +59,7 @@
 #pragma mark - YTKRequestDelegate
 
 - (void)requestFinished:(__kindof YTKBaseRequest *)request {
-//    DDLogDebug(@"[%@: %@] = %@", [self requestUrl], [self requestArgument], request.responseObject);
+    DDLogDebug(@"[%@: %@] = %@", [self requestUrl], [self requestArgument], request.responseObject);
     
     [self callingSuccessWithResponseObject:request.responseObject];
 }

+ 1 - 2
HappyJob/HappyJob/AppDelegate.m

@@ -39,6 +39,7 @@
     
     //配置Bugly
     [Bugly startWithAppId:kBuglyAppID];
+    [[HJAppUserType sharedInstance] loadUserType];
     
     //配置广告数据
     [self setupAd];
@@ -75,8 +76,6 @@
     }
     [self.window makeKeyAndVisible];
     
-//    //设置状态栏为白色的
-//    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
     return YES;
 }
 

+ 19 - 0
HappyJob/HappyJob/BClass/BHome_首页/API/BHomeDataBox.h

@@ -0,0 +1,19 @@
+//
+//  BHomeDataBox.h
+//  HappyJob
+//
+//  Created by 张晓光 on 2019/8/18.
+//  Copyright © 2019 Bob. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface BHomeDataBox : NSObject<FBAPIManagerDataBox,UITableViewDataSource>
+
+- (UIViewController *)positionDetailViewControllerAtIndexPath:(NSIndexPath *)indexPath;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 166 - 0
HappyJob/HappyJob/BClass/BHome_首页/API/BHomeDataBox.m

@@ -0,0 +1,166 @@
+//
+//  BHomeDataBox.m
+//  HappyJob
+//
+//  Created by 张晓光 on 2019/8/18.
+//  Copyright © 2019 Bob. All rights reserved.
+//
+
+#import "BHomeDataBox.h"
+#import "BHomeEnterpriseAuthAPI.h"
+#import "BHomeChangeIdentityAPI.h"
+#import "BHomeResumeDetailAPI.h"
+#import "BHomeListAPI.h"
+#import "BHomeListCell.h"
+#import "BHomeListModel.h"
+#import "BHomeResumeDetailViewController.h"
+
+@interface BHomeDataBox ()
+
+@property (nonatomic, strong) NSMutableArray *dataSource;
+
+@end
+
+@implementation BHomeDataBox
+
+- (id)manager:(FBBaseAPIManager *)manager boxingData:(NSDictionary *)data {
+    
+    FBAPIManagerErrorType type = manager.errorType;
+    
+    if (type == FBAPIManagerErrorTypeNoError)
+    {
+        if ([manager isKindOfClass:[BHomeEnterpriseAuthAPI class]])
+        {
+            return data;
+        }
+        if ([manager isKindOfClass:[BHomeChangeIdentityAPI class]])
+        {
+            return data;
+        }
+        if ([manager isKindOfClass:[BHomeListAPI class]])
+        {//数据分页
+            [self manager:(BHomeListAPI *)manager configDataSourceWithArray:[data valueForKeyPath:@"data.applyResume"]];
+            return [self.dataSource copy];
+        }
+        if ([manager isKindOfClass:[BHomeResumeDetailAPI class]])
+        {
+            return data;
+        }
+    }
+    else if (type == FBAPIManagerErrorTypeNoContent)
+    {
+        return [data valueForKey:@"errmsg"];
+    }
+    else
+    {
+        return manager.errorMessage;
+    }
+    return data;
+    
+}
+#pragma mark - UITableViewDataSource
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    
+    return self.dataSource.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    static NSString *listCell = @"listCell";
+    BHomeListCell *cell = [tableView dequeueReusableCellWithIdentifier:listCell];
+    if (cell == nil)
+    {
+        cell = [[BHomeListCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:listCell];
+    }
+
+    BHomeListModel *model = [self positionModelAtIndexPath:indexPath];
+    
+    //名字
+    cell.nameLabel.text = model.realName;
+    
+    //头像
+    [cell.headerImageV sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.headImg]] placeholderImage:[UIImage imageNamed:@"portrait_default"]];
+    NSString *sex = @"";
+    if ([model.gender integerValue] == 2)
+    {
+        sex = @"女";
+    }
+    else
+    {
+        sex = @"男";
+    }
+    
+    //学历
+    NSArray *schoolArray = @[@"不限",@"小学",@"中学",@"高中",@"大专",@"本科",@"研究生",@"博士",@"博士后",@"其他"];
+    NSString *schoolStr = [NSString stringWithFormat:@"%@",schoolArray[[model.highestQualification integerValue]]];
+    
+    //求职意向
+    NSArray *positionArray = @[@"普工", @"客服", @"销售", @"服务员", @"物流仓储", @"司机", @"才艺技能", @"文员助理", @"快递配送", @"促销导购", @"展会演出", @"家教培训", @"模特", @"贸易采购", @"厨师", @"编辑", @"线上推广", @"设计", @"技工", @"保洁", @"其它"];
+    NSString *positionStr = @"";
+    if (model.expectationPosition.length > 0)
+    {
+        NSArray *expectationPositionArray = [model.expectationPosition componentsSeparatedByString:@","];
+        for (int i = 0; i <expectationPositionArray.count ; i ++ )
+        {
+            if (positionStr.length > 0)
+            {
+                positionStr = [NSString stringWithFormat:@"%@,%@",positionStr,positionArray[[expectationPositionArray[i] integerValue]]];
+            }
+            else
+            {
+                positionStr = [NSString stringWithFormat:@"%@",positionArray[[expectationPositionArray[i] integerValue]]];
+            }
+        }
+    }
+    if (positionStr.length > 0)
+    {
+        cell.jobsLabel.text = [NSString stringWithFormat:@"%@,%@岁,%@,求职意向:%@",sex,model.birthYear,schoolStr,positionStr];
+    }
+    else
+    {
+        cell.jobsLabel.text = [NSString stringWithFormat:@"%@,%@岁,%@",sex,model.birthYear,schoolStr];
+    }
+    
+    //投递岗位
+    cell.positionLabel.text = [NSString stringWithFormat:@"投递岗位:%@",model.dpPositionName];
+    
+    //时间
+    if (model.createDate)
+    {
+        cell.timeLabel.text = [[model.createDate componentsSeparatedByString:@" "] firstObject];
+    }
+    
+    return cell;
+}
+#pragma mark - private methods
+
+- (BHomeListModel *)positionModelAtIndexPath:(NSIndexPath *)indexPath {
+    
+    NSDictionary *dict = [self.dataSource objectAtIndex:indexPath.row];
+    BHomeListModel *model = [BHomeListModel yy_modelWithJSON:dict];
+    return model;
+}
+- (UIViewController *)positionDetailViewControllerAtIndexPath:(NSIndexPath *)indexPath {
+    
+    BHomeListModel *model = [self positionModelAtIndexPath:indexPath];
+    BHomeResumeDetailViewController *detail = [[BHomeResumeDetailViewController alloc] init];
+    detail.resumeID = model.ID;
+    detail.dpPositionName = model.dpPositionName;
+    detail.applyId = model.applyId;
+    return detail;
+}
+- (void)manager:(FBBaseAPIManager<FBPageableAPIManager> *)manager configDataSourceWithArray:(NSArray *)array {
+    
+    if (manager.isFirstPage)
+    {
+        // 如果请求返回的数据是第一页,就重新加载数据源
+        self.dataSource = [NSMutableArray arrayWithArray:array];
+    }
+    else
+    {
+        [self.dataSource addObjectsFromArray:array];
+    }
+    
+}
+@end

+ 1 - 0
HappyJob/HappyJob/BClass/BHome_首页/Model/BHomeListModel.m

@@ -12,6 +12,7 @@
 
 
 + (NSDictionary *)modelCustomPropertyMapper {
+    
     return @{
              @"ID": @"id"
              };

+ 2 - 0
HappyJob/HappyJob/BClass/BHome_首页/Model/BHomeResumeDetailModel.m

@@ -12,11 +12,13 @@
 @implementation BHomeResumeDetailModel
 
 + (NSDictionary *)modelCustomPropertyMapper {
+    
     return @{
              @"ID": @"id"
              };
 }
 + (NSDictionary *)modelContainerPropertyGenericClass {
+    
     return @{
              @"hpPositionAddressList": [BHomeResumeDetailWorkExperienceListModel class]
              };

+ 2 - 3
HappyJob/HappyJob/BClass/BHome_首页/Model/BHomeResumeDetailWorkExperienceListModel.m

@@ -11,9 +11,8 @@
 @implementation BHomeResumeDetailWorkExperienceListModel
 
 + (NSDictionary *)modelCustomPropertyMapper {
-    return @{
-             @"ID": @"id"
-             };
+    
+    return @{@"ID": @"id" };
 }
 
 

+ 18 - 21
HappyJob/HappyJob/BClass/BHome_首页/ViewController/BHomeResumeDetailViewController.m

@@ -11,10 +11,10 @@
 #import "BHomeResumeDetailIntentionCell.h"
 #import "BHomeResumeDetailExperienceCell.h"
 #import "BHomeResumeDetailExperienceListCell.h"
-
 #import "BHomeInvitationViewController.h"
 #import "BHomeResumeDetailAPI.h"//简历详情
 #import "BHomeResumeDetailModel.h"
+#import "BHomeDataBox.h"
 
 @interface BHomeResumeDetailViewController ()
 <
@@ -28,6 +28,7 @@ FBAPIManagerInterceptor
 @property (nonatomic, strong) UIButton    *invitationBtn;//邀请btn
 @property (nonatomic, strong) UIButton    *phoneBtn;//电话沟通
 @property (nonatomic, strong) BHomeResumeDetailAPI *detailAPI;
+@property (nonatomic, strong) BHomeDataBox         *dataBox;
 @property (nonatomic, strong) NSDictionary         *dataDict;
 
 @end
@@ -44,12 +45,10 @@ FBAPIManagerInterceptor
     [self autoLayOutViews];
     
     // 错误页面刷新事件
-    [self.view.errorView.refreshButton addTarget:self
-                                     action:@selector(refreshButtonClicked:)
-                           forControlEvents:UIControlEventTouchUpInside];
+    [self.view.errorView.refreshButton addTarget:self action:@selector(refreshButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
     
 }
-#pragma mark - event methods
+#pragma mark - event response
 /* 错误页面刷新事件 */
 - (void)refreshButtonClicked:(UIButton *)btn {
     
@@ -97,26 +96,15 @@ FBAPIManagerInterceptor
     [self.view  dismissErrorView];
     if (manager == self.detailAPI)
     {
-        self.dataDict = [manager fetchDataWithBox:nil][@"data"][@"hpResume"];
+        self.dataDict = [manager fetchDataWithBox:self.dataBox][@"data"][@"hpResume"];
         [self.tableView reloadData];
     }
 }
 - (void)managerCallAPIDidFailed:(FBBaseAPIManager *)manager {
     
     [self.view showErrorView];
-    FBAPIManagerErrorType type = manager.errorType;
-    if (type == FBAPIManagerErrorTypeNoContent)
-    {
-        id fetchData = [manager fetchDataWithBox:nil];
-        if ([fetchData isKindOfClass:[NSDictionary class]])
-        {
-            [self.view fb_showFailureWithStatus:fetchData[@"errmsg"]];
-        }
-    }
-    else
-    {
-        [self.view fb_showFailureWithStatus:manager.errorMessage];
-    }
+    [self.view fb_showFailureWithStatus:manager.errorMessage];
+    
 }
 #pragma mark - UITableViewDelegate
 
@@ -133,7 +121,7 @@ FBAPIManagerInterceptor
     else
     {
         BHomeResumeDetailModel *model = [BHomeResumeDetailModel yy_modelWithJSON:self.dataDict];
-        return 1 + model.hpResumeWorkExperienceList.count;//
+        return 1 + model.hpResumeWorkExperienceList.count;
     }
 }
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -191,6 +179,7 @@ FBAPIManagerInterceptor
 }
 
 #pragma mark - 布局
+
 - (void)autoLayOutViews {
     
     self.view.backgroundColor = COLOR_GRAYFA;
@@ -220,8 +209,16 @@ FBAPIManagerInterceptor
     _phoneBtn.layer.cornerRadius = 35/2;
     
 }
-#pragma mark - setter&getter
+#pragma mark - setter && getter
 
+- (BHomeDataBox *)dataBox {
+    
+    if (_dataBox == nil)
+    {
+        _dataBox = [[BHomeDataBox alloc]init];
+    }
+    return _dataBox;
+}
 - (BHomeResumeDetailAPI *)detailAPI {
     
     if (_detailAPI == nil)

+ 58 - 78
HappyJob/HappyJob/BClass/BHome_首页/ViewController/BHomeViewController.m

@@ -17,22 +17,21 @@
 #import "BHomeEnterpriseAuthAPI.h"//查询企业认证结果
 #import "BHomeChangeIdentityAPI.h"//自发布切换身份
 #import "BHomeListAPI.h"//简历列表
-#import "BHomeListModel.h"
+#import "BHomeDataBox.h"
 
 
 @interface BHomeViewController ()
 <
 UITableViewDelegate,
-UITableViewDataSource,
 UITextFieldDelegate,
 FBAPIManagerDelegate,
 FBAPIManagerInterceptor
 >
 
 @property (nonatomic, strong) BHomeNoCertificationView *certificationView;
-@property (nonatomic, strong) TableViewListView      *tableView;
+@property (nonatomic, strong) HJPageListView         *tableView;
 @property (nonatomic, strong) BHomeSearchView        *searchView;
-@property (nonatomic, strong) NSMutableArray         *listArray;//简历列表
+@property (nonatomic, strong) BHomeDataBox           *dataBox;
 @property (nonatomic, strong) BHomeEnterpriseAuthAPI *authAPI;//查询企业认证结果
 @property (nonatomic, strong) BHomeChangeIdentityAPI *IDAPI;//自发布切换身份
 @property (nonatomic, strong) BHomeListAPI           *listAPI;//简历列表
@@ -41,6 +40,10 @@ FBAPIManagerInterceptor
 
 @implementation BHomeViewController
 
+- (void)dealloc {
+    
+    [[NSNotificationCenter defaultCenter] removeObserver:self name:@"refreshEnterpriseAuthResult" object:nil];
+}
 - (void)viewWillAppear:(BOOL)animated {
     
     [super viewWillAppear:animated];
@@ -58,24 +61,24 @@ FBAPIManagerInterceptor
     IQKeyboardManager *keyboardManager =  [IQKeyboardManager sharedManager];
     keyboardManager.enable = YES;
     keyboardManager.enableAutoToolbar = YES;
-    [[NSNotificationCenter defaultCenter] removeObserver:self name:@"refreshEnterpriseAuthResult" object:nil];
 }
 
 - (void)viewDidLoad {
+    
     [super viewDidLoad];
     
     [self hj_setupWhiteColorNavBar];
     self.navigationItem.title = @"简历";
-    self.listArray = [NSMutableArray array];
-    [self.authAPI start];
     //认证成功回调(只有提交里信息)
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshEnterpriseAuthResult:) name:@"refreshEnterpriseAuthResult" object:nil];
     // 错误页面刷新事件
-    [self.view.errorView.refreshButton addTarget:self
-                                          action:@selector(refreshButtonClicked:)
-                                forControlEvents:UIControlEventTouchUpInside];
-    
+    [self.view.errorView.refreshButton addTarget:self action:@selector(refreshButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
+    self.edgesForExtendedLayout = UIRectEdgeNone;
+    [self.authAPI start];
 }
+
+#pragma mark - event response
+/* 认证成功回调(只有提交里信息) */
 - (void)refreshEnterpriseAuthResult:(NSNotificationCenter *)noti {
     
     [self.authAPI start];
@@ -100,6 +103,8 @@ FBAPIManagerInterceptor
     }];
 }
 
+#pragma mark - UITextFieldDelegate
+
 /* 当点击键盘上的return键*/
 - (BOOL)textFieldShouldReturn:(UITextField *)textField
 {
@@ -108,6 +113,7 @@ FBAPIManagerInterceptor
     [self.listAPI start];
     return YES ;
 }
+
 #pragma mark - FBAPIManagerInterceptor
 
 - (BOOL)manager:(FBBaseAPIManager *)manager shouldStartCallAPIWithParams:(NSDictionary *)params {
@@ -120,6 +126,7 @@ FBAPIManagerInterceptor
     
     [self.view fb_dismiss];
 }
+
 #pragma mark - FBPageableAPIManager
 
 - (void)managerCallAPIDidSuccess:(FBBaseAPIManager *)manager {
@@ -127,57 +134,33 @@ FBAPIManagerInterceptor
     [self.view dismissErrorView];
     if (manager == self.authAPI)
     {
-        NSDictionary *dict = [manager fetchDataWithBox:nil];
-        if ([[dict valueForKeyPath:@"data.isAuth"] boolValue] == NO)
-        {//没有提交企业认证
+        id  fetchData = [manager fetchDataWithBox:self.dataBox];
+        if ([[fetchData valueForKeyPath:@"data.isAuth"] boolValue] == NO)
+        {   //没有提交企业认证
             [self createCertificationView];
         }
-        else if ([[dict valueForKeyPath:@"data.isAuth"] boolValue] == YES)
-        {//有提交企业认证
+        else if ([[fetchData valueForKeyPath:@"data.isAuth"] boolValue] == YES)
+        {   //有提交企业认证
             [self.IDAPI start];
         }
     }
     if (manager == self.IDAPI)
     {
-        NSDictionary *dict = [manager fetchDataWithBox:nil];
+        id  fetchData = [manager fetchDataWithBox:self.dataBox];
+        [self saveCompanyInfo:fetchData];
         [self createTableView];
-        [self saveCompanyInfo:dict];
         [self.listAPI start];
     }
     if (manager == self.listAPI)
     {
-        NSDictionary *dict = [manager fetchDataWithBox:nil];
         [self.tableView managerCallAPIDidSuccess:manager];
-        if (self.listAPI.isFirstPage)
-        {
-            if (![dict[@"data"][@"applyResume"] isKindOfClass:[NSNull class]])
-            {
-                self.listArray = [NSMutableArray arrayWithArray:dict[@"data"][@"applyResume"]];
-            }
-        }
-        else
-        {
-            if (![dict[@"data"][@"applyResume"] isKindOfClass:[NSNull class]])
-            {
-                [self.listArray addObjectsFromArray:dict[@"data"][@"applyResume"]];
-            }
-        }
-        [self.tableView.tableView reloadData];
     }
 }
 - (void)managerCallAPIDidFailed:(FBBaseAPIManager *)manager {
     
     [self.view showErrorView];
-    FBAPIManagerErrorType type = manager.errorType;
-    if (type == FBAPIManagerErrorTypeNoContent)
-    {
-        id fetchData = [manager fetchDataWithBox:nil];
-        if ([fetchData isKindOfClass:[NSDictionary class]])
-        {
-            [self.view fb_showFailureWithStatus:fetchData[@"errmsg"]];
-        }
-    }
-    else
+    id fetchData = [manager fetchDataWithBox:self.dataBox];
+    if ([fetchData isKindOfClass:[NSString class]])
     {
         [self.view fb_showFailureWithStatus:manager.errorMessage];
     }
@@ -186,41 +169,19 @@ FBAPIManagerInterceptor
         [self.tableView managerCallAPIDidFailed:manager];
     }
 }
-/* 存储公司信息 */ 
-- (void)saveCompanyInfo:(NSDictionary *)dict {
-    
-    HJCompanyInfoModel *userInfo = [HJCompanyInfoModel yy_modelWithJSON:[dict valueForKeyPath:@"data.dpEnterpriseAuthentication"]];
-    [HJCompanyInfoModel setCompanyInfo:userInfo];
-}
 
 #pragma mark - UItableView代理
 
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     
-    return self.listArray.count;
-}
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    UIViewController *vc = [self.dataBox positionDetailViewControllerAtIndexPath:indexPath];
+    vc.hidesBottomBarWhenPushed = YES;
+    [self.navigationController pushViewController:vc animated:YES];
     
-    static NSString *listCell = @"listCell";
-    BHomeListCell *cell = [tableView dequeueReusableCellWithIdentifier:listCell];
-    if (cell == nil)
-    {
-        cell = [[BHomeListCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:listCell];
-    }
-    [cell bHomeCellListArray:self.listArray andIndexPath:indexPath];
-    return cell;
 }
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    BHomeListModel *model = [BHomeListModel yy_modelWithJSON:self.listArray[indexPath.row]];
-    BHomeResumeDetailViewController *detail = [[BHomeResumeDetailViewController alloc]init];
-    detail.hidesBottomBarWhenPushed = YES;
-    detail.resumeID = model.ID;
-    detail.dpPositionName = model.dpPositionName;
-    detail.applyId = model.applyId;
-    [self.navigationController pushViewController:detail animated:YES];
 
-}
+#pragma mark - private methods
+
 /* 创建TableView */
 - (void)createTableView {
     
@@ -250,7 +211,7 @@ FBAPIManagerInterceptor
     };
     
 }
-/* 没有认证和认证中的页面 */
+/* 没有认证页面 */
 - (void)createCertificationView {
     
      __weak typeof(self) weakSelf = self;
@@ -260,8 +221,9 @@ FBAPIManagerInterceptor
         
         make.left.right.offset(0);
         make.centerY.equalTo(weakSelf.view);
+        
     }];
-//    [self.certificationView showCertificationResultView];
+   
     _certificationView.certificationBlock = ^{
         
         BHomeCertificationEnterpriseVC *enterpriseVC = [[BHomeCertificationEnterpriseVC alloc]init];
@@ -269,8 +231,24 @@ FBAPIManagerInterceptor
         [weakSelf.navigationController pushViewController:enterpriseVC animated:YES];
     };
 }
-#pragma mark - setter&getter
 
+/* 存储公司信息 */
+- (void)saveCompanyInfo:(NSDictionary *)dict {
+    
+    HJCompanyInfoModel *userInfo = [HJCompanyInfoModel yy_modelWithJSON:[dict valueForKeyPath:@"data.dpEnterpriseAuthentication"]];
+    [HJCompanyInfoModel setCompanyInfo:userInfo];
+}
+
+#pragma mark - setter & getter
+
+- (BHomeDataBox *)dataBox {
+    
+    if (_dataBox == nil)
+    {
+        _dataBox = [[BHomeDataBox alloc] init];
+    }
+    return _dataBox;
+}
 - (BHomeNoCertificationView *)certificationView {
     
     if (_certificationView == nil)
@@ -317,15 +295,17 @@ FBAPIManagerInterceptor
     return _searchView;
 }
 
-- (TableViewListView *)tableView {
+- (HJPageListView *)tableView {
     
     if (_tableView == nil)
     {
-        _tableView = [[TableViewListView alloc] init];
+        _tableView = [[HJPageListView alloc] init];
         _tableView.tableView.delegate = self;
-        _tableView.tableView.dataSource = self;
+        _tableView.tableView.dataSource = self.dataBox;
         _tableView.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
         _tableView.APIManager = self.listAPI;
+        _tableView.dataBox = self.dataBox;
+        //自定义空白页
         _tableView.blankView.imageView.image = [UIImage imageNamed:@"b_home_empty"];
         NSMutableAttributedString *countAtt1 = [[NSMutableAttributedString alloc]initWithString:@"暂时还没有简历投递进来\n\n岗位信息内容填写越丰富\n越容易收到高质量的简历"];
         [countAtt1 addAttribute:NSForegroundColorAttributeName value:COLOR_BACK3 range:NSMakeRange(0, 11)];

+ 8 - 1
HappyJob/HappyJob/BClass/BHome_首页/Views/Cell/BHomeListCell.h

@@ -12,7 +12,14 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface BHomeListCell : UITableViewCell
 
-- (void)bHomeCellListArray:(NSArray *)array andIndexPath:(NSIndexPath *)indexPath;
+@property (nonatomic, strong) UIImageView *headerImageV;
+@property (nonatomic, strong) UIImageView *iconImageV;
+@property (nonatomic, strong) UILabel     *nameLabel;
+@property (nonatomic, strong) UILabel     *jobsLabel;
+@property (nonatomic, strong) UILabel     *positionLabel;
+@property (nonatomic, strong) UILabel     *timeLabel;
+
+
 
 
 @end

+ 0 - 68
HappyJob/HappyJob/BClass/BHome_首页/Views/Cell/BHomeListCell.m

@@ -12,12 +12,6 @@
 @interface BHomeListCell ()
 
 @property (nonatomic, strong) UIView      *bgView;
-@property (nonatomic, strong) UIImageView *headerImageV;
-@property (nonatomic, strong) UIImageView *iconImageV;
-@property (nonatomic, strong) UILabel     *nameLabel;
-@property (nonatomic, strong) UILabel     *jobsLabel;
-@property (nonatomic, strong) UILabel     *positionLabel;
-@property (nonatomic, strong) UILabel     *timeLabel;
 
 @property (nonatomic, strong) UIView      *lineView;
 
@@ -52,68 +46,6 @@
     [self.bgView addSubview:self.lineView];
     
 }
-- (void)bHomeCellListArray:(NSArray *)array andIndexPath:(NSIndexPath *)indexPath {
-    
-    NSDictionary *dict = array[indexPath.row];
-    if (dict)
-    {
-        BHomeListModel *model = [BHomeListModel yy_modelWithJSON:dict];
-        //名字
-        self.nameLabel.text = model.realName;
-        
-        [self.headerImageV sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.headImg]] placeholderImage:[UIImage imageNamed:@"portrait_default"]];
-        NSString *sex = @"";
-        if ([model.gender integerValue] == 2)
-        {
-            sex = @"女";
-        }
-        else
-        {
-            sex = @"男";
-        }
-       
-        //学历
-        NSArray *schoolArray = @[@"不限",@"小学",@"中学",@"高中",@"大专",@"本科",@"研究生",@"博士",@"博士后",@"其他"];
-        NSString *schoolStr = [NSString stringWithFormat:@"%@",schoolArray[[model.highestQualification integerValue]]];
-        
-        //求职意向
-        NSArray *positionArray = @[@"普工", @"客服", @"销售", @"服务员", @"物流仓储", @"司机", @"才艺技能", @"文员助理", @"快递配送", @"促销导购", @"展会演出", @"家教培训", @"模特", @"贸易采购", @"厨师", @"编辑", @"线上推广", @"设计", @"技工", @"保洁", @"其它"];
-        NSString *positionStr = @"";
-        if (model.expectationPosition.length > 0)
-        {
-            NSArray *expectationPositionArray = [model.expectationPosition componentsSeparatedByString:@","];
-            for (int i = 0; i <expectationPositionArray.count ; i ++ )
-            {
-                if (positionStr.length > 0)
-                {
-                    positionStr = [NSString stringWithFormat:@"%@,%@",positionStr,positionArray[[expectationPositionArray[i] integerValue]]];
-                }
-                else
-                {
-                    positionStr = [NSString stringWithFormat:@"%@",positionArray[[expectationPositionArray[i] integerValue]]];
-                }
-            }
-        }
-        if (positionStr.length > 0)
-        {
-            self.jobsLabel.text = [NSString stringWithFormat:@"%@,%@岁,%@,求职意向:%@",sex,model.birthYear,schoolStr,positionStr];
-        }
-        else
-        {
-            self.jobsLabel.text = [NSString stringWithFormat:@"%@,%@岁,%@",sex,model.birthYear,schoolStr];
-        }
-        
-        //投递岗位
-        self.positionLabel.text = [NSString stringWithFormat:@"投递岗位:%@",model.dpPositionName];
-        //时间
-//        self.timeLabel.text = [HJAppService compareCurrentTime:[NSString stringWithFormat:@"%ld",[HJAppService timeSwitchTimestamp:model.createDate]]];
-        if (model.createDate)
-        {
-            self.timeLabel.text = [[model.createDate componentsSeparatedByString:@" "] firstObject];
-        }
-    }
-
-}
 
 #pragma mark - 布局
 

+ 5 - 2
HappyJob/HappyJob/BClass/BHome_首页/Views/View/BHomeNoCertificationView.m

@@ -42,7 +42,7 @@
     [_middleImageV mas_makeConstraints:^(MASConstraintMaker *make) {
         
         make.centerX.equalTo(weakSelf);
-        make.size.mas_offset(CGSizeMake(157, 157));
+//        make.size.mas_offset(CGSizeMake(157, 157));
         make.top.equalTo(weakSelf.mas_top).offset(0);
     }];
     [_label1 mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -56,13 +56,16 @@
     }];
     [_certificationBtn mas_makeConstraints:^(MASConstraintMaker *make) {
         make.centerX.equalTo(weakSelf);
-        make.top.equalTo(weakSelf.label1.mas_bottom).offset(HJHorizontalScale(55));
+        make.top.equalTo(weakSelf.label2.mas_bottom).offset(HJHorizontalScale(20));
         make.size.mas_offset(CGSizeMake(160, 40));
         make.bottom.equalTo(weakSelf.mas_bottom).offset(0);
     }];
     _certificationBtn.layer.cornerRadius = 20;
     
 }
+
+#pragma mark - setter & getter
+
 - (UIImageView *)middleImageV {
     
     if (_middleImageV == nil)

+ 10 - 3
HappyJob/HappyJob/BClass/BHome_首页/企业认证/ViewController/BHomeCertificationEnterpriseVC.m

@@ -24,8 +24,8 @@ UIGestureRecognizerDelegate
 
 @property (nonatomic, strong) UIButton    *backBtn;
 @property (nonatomic, strong) UITableView *tableView;
+@property (nonatomic, assign) BOOL        dateBool;
 @property (nonatomic, strong) BHomeCertificationEnterpriseAPI *enterpriseAPI;//企业认证
-@property (nonatomic, assign) BOOL dateBool;
 
 @end
 
@@ -44,6 +44,7 @@ UIGestureRecognizerDelegate
 
     return UIStatusBarStyleLightContent;
 }
+
 - (void)viewDidLoad {
     [super viewDidLoad];
 
@@ -89,8 +90,10 @@ UIGestureRecognizerDelegate
 }
 
 - (void)managerShouldFinishCallAPI:(FBBaseAPIManager *)manager {
+    
     [self.view fb_dismiss];
 }
+
 #pragma mark - FBAPIManagerDelegate
 
 - (void)managerCallAPIDidSuccess:(FBBaseAPIManager *)manager {
@@ -224,7 +227,7 @@ UIGestureRecognizerDelegate
     }
 }
 
-#pragma mark - 布局 setter&getter
+#pragma mark - 布局 
 
 - (void)autoLayOutViews {
     
@@ -242,12 +245,16 @@ UIGestureRecognizerDelegate
     }];
     
 }
+#pragma mark - event response
 /* 返回按钮*/
 - (void)backButonClick {
     
     [self.navigationController popViewControllerAnimated:YES];
-    [self dismissViewControllerAnimated:YES completion:nil];
+    
 }
+
+#pragma mark - setter & getter
+
 - (UIButton *)backBtn {
     
     if (_backBtn == nil)

+ 7 - 0
HappyJob/HappyJob/BClass/BHome_首页/企业认证/ViewController/BHomeCertificationFailVC.m

@@ -38,6 +38,7 @@
     
 }
 #pragma mark - 导航栏的代理
+
 - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
     // 判断要显示的控制器是否是自己
     BOOL isPushSelfClass = [viewController isKindOfClass:[self class]];
@@ -80,10 +81,16 @@
     }];
     self.certificationBtn.layer.cornerRadius = 44/2;
 }
+
+#pragma mark - event response
+
 - (void)backButonClick {
     
     [self.navigationController popToRootViewControllerAnimated:YES];
 }
+
+#pragma mark - setter & getter
+
 - (UIButton *)backBtn {
     
     if (_backBtn == nil)

+ 6 - 5
HappyJob/HappyJob/BClass/BHome_首页/企业认证/ViewController/BHomeCertificationingEnterpriseVC.m

@@ -32,13 +32,11 @@
     [self autoLayOutViews];
     self.navigationController.delegate = self;
     self.navigationController.interactivePopGestureRecognizer.delegate = self;
-    [self.view az_setGradientBackgroundWithColors:@[[UIColor colorFromHexString:@"1C90EA"],
-                                                    [UIColor colorFromHexString:@"30BBF9"]]
-                                        locations:@[@(0.0),@(1.0f)]
-                                       startPoint:CGPointMake(0, 0)
-                                         endPoint:CGPointMake(1, 1)];
+    [self.view az_setGradientBackgroundWithColors:@[[UIColor colorFromHexString:@"1C90EA"], [UIColor colorFromHexString:@"30BBF9"]] locations:@[@(0.0),@(1.0f)] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 1)];
 }
 
+#pragma mark - event response
+
 - (void)backButonClick {
 
     [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshEnterpriseAuthResult" object:nil userInfo:nil];
@@ -79,6 +77,9 @@
         make.bottom.equalTo(weakSelf.bgView.mas_bottom).offset(0);
     }];
 }
+
+#pragma mark - setter & getter
+
 - (UIView *)bgView {
     
     if (_bgView == nil)

+ 3 - 2
HappyJob/HappyJob/BClass/BHome_首页/面试邀请/ViewController/BHomeInvitationViewController.m

@@ -126,8 +126,8 @@
     
     //公司名字
     self.companyView.companyNameLabel.text = [HJCompanyInfoModel companyInfo].enterpriseName;
+    
     //面试者
-//    self.model.gender;
     if ([self.model.gender isEqualToString:@"1"])
     {
         self.companyView.nameLabel.text = [NSString stringWithFormat:@"%@ 先生:",self.model.realName];
@@ -177,7 +177,8 @@
     };
 
 }
-#pragma mark - setter&getter
+#pragma mark - setter & getter
+
 - (BHomeInvitationAPI *)invitationAPI {
     
     if (_invitationAPI == nil)

+ 17 - 0
HappyJob/HappyJob/BClass/BMessage_消息/API/BMessageDataBox.h

@@ -0,0 +1,17 @@
+//
+//  BMessageDataBox.h
+//  HappyJob
+//
+//  Created by 张晓光 on 2019/8/16.
+//  Copyright © 2019 Bob. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface BMessageDataBox : NSObject<FBAPIManagerDataBox, UITableViewDataSource>
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 113 - 0
HappyJob/HappyJob/BClass/BMessage_消息/API/BMessageDataBox.m

@@ -0,0 +1,113 @@
+//
+//  BMessageDataBox.m
+//  HappyJob
+//
+//  Created by 张晓光 on 2019/8/16.
+//  Copyright © 2019 Bob. All rights reserved.
+//
+
+#import "BMessageDataBox.h"
+#import "BMessageListAPI.h"
+#import "BMessageCell.h"
+#import "BMessageListModel.h"
+
+@interface BMessageDataBox ()
+
+@property (nonatomic, strong) NSMutableArray *dataSource;
+
+@end
+
+@implementation BMessageDataBox
+
+- (id)manager:(FBBaseAPIManager *)manager boxingData:(NSDictionary *)data {
+    
+    FBAPIManagerErrorType type = manager.errorType;
+    
+    if (type == FBAPIManagerErrorTypeNoError)
+    {
+        if ([manager isKindOfClass:[BMessageListAPI class]])
+        {//数据分页
+            [self manager:(BMessageListAPI *)manager configDataSourceWithArray:[data valueForKeyPath:@"data.hpMessage"]];
+            return [self.dataSource copy];
+        }
+    }
+    else if (type == FBAPIManagerErrorTypeNoContent)
+    {
+        return [data valueForKey:@"errmsg"];
+    }
+    else
+    {
+        return manager.errorMessage;
+    }
+    return data;
+    
+}
+
+#pragma mark - UITableViewDataSource
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    
+    return self.dataSource.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    static NSString *listCell = @"cellID";
+    BMessageCell *cell = [tableView dequeueReusableCellWithIdentifier:listCell];
+    if (cell == nil)
+    {
+        cell = [[BMessageCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:listCell];
+    }
+    
+    BMessageListModel *model = [self positionModelAtIndexPath:indexPath];
+    /*
+     0:拼工 1:身份审核 2:返费通知 21.C端自发布企业认证 22. C端自发布岗位认证 23.C端自发布新简历待处理
+     */
+    if ([model.type integerValue] < 3)
+    {
+        cell.stateImageV.image = [UIImage imageNamed:[NSString stringWithFormat:@"msg_title_icon%ld", (long)[model.type integerValue]]];
+    }
+    if ([model.type integerValue] == 21)
+    {
+        cell.stateImageV.image = [UIImage imageNamed:@"b_message_nopass"];
+    }
+    if ([model.type integerValue] == 22)
+    {
+        cell.stateImageV.image = [UIImage imageNamed:@"b_message_position"];
+        
+    }
+    if ([model.type integerValue] == 23)
+    {
+        cell.stateImageV.image = [UIImage imageNamed:@"b_message_resume"];
+    }
+    
+    cell.stateLabel.text = model.title;
+    cell.detailLabel.text = model.content;
+    cell.timeLabel.text = model.messageTime;
+    
+    return cell;
+}
+
+#pragma mark - private methods
+
+- (BMessageListModel *)positionModelAtIndexPath:(NSIndexPath *)indexPath {
+    
+    NSDictionary *dict = [self.dataSource objectAtIndex:indexPath.row];
+    BMessageListModel *model = [BMessageListModel yy_modelWithJSON:dict];
+    return model;
+}
+
+- (void)manager:(FBBaseAPIManager<FBPageableAPIManager> *)manager configDataSourceWithArray:(NSArray *)array {
+    
+    if (manager.isFirstPage)
+    {
+        // 如果请求返回的数据是第一页,就重新加载数据源
+        self.dataSource = [NSMutableArray arrayWithArray:array];
+    }
+    else
+    {
+        [self.dataSource addObjectsFromArray:array];
+    }
+    
+}
+@end

+ 5 - 1
HappyJob/HappyJob/BClass/BMessage_消息/View/BMessageCell.h

@@ -12,7 +12,11 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface BMessageCell : UITableViewCell
 
-- (void)bMessageCellArray:(NSArray *)array andIndexpath:(NSIndexPath *)indexPath;
+@property (nonatomic, strong) UIImageView *stateImageV;
+@property (nonatomic, strong) UILabel     *stateLabel;
+@property (nonatomic, strong) UILabel     *detailLabel;
+@property (nonatomic, strong) UILabel     *timeLabel;
+
 
 @end
 

+ 4 - 44
HappyJob/HappyJob/BClass/BMessage_消息/View/BMessageCell.m

@@ -12,10 +12,6 @@
 @interface BMessageCell ()
 
 @property (nonatomic, strong) UIView      *bgView;
-@property (nonatomic, strong) UIImageView *stateImageV;
-@property (nonatomic, strong) UILabel     *stateLabel;
-@property (nonatomic, strong) UILabel     *detailLabel;
-@property (nonatomic, strong) UILabel     *timeLabel;
 @property (nonatomic, strong) UIView      *lineView;
 
 @end
@@ -47,41 +43,7 @@
     [self.bgView addSubview:self.lineView];
     
 }
-- (void)bMessageCellArray:(NSArray *)array andIndexpath:(NSIndexPath *)indexPath {
-    
-    NSDictionary *dict = array[indexPath.row];
-    if (dict)
-    {
-        BMessageListModel *model = [BMessageListModel yy_modelWithJSON:dict];
-        /*
-         0:拼工 1:身份审核 2:返费通知 21.C端自发布企业认证 22. C端自发布岗位认证 23.C端自发布新简历待处理
-         */
-        if ([model.type integerValue] < 3)
-        {
-            self.stateImageV.image = [UIImage imageNamed:[NSString stringWithFormat:@"msg_title_icon%ld", (long)[model.type integerValue]]];
-        }
-        if ([model.type integerValue] == 21)
-        {
-            _stateImageV.image = [UIImage imageNamed:@"b_message_nopass"];
-           
-        }
-        if ([model.type integerValue] == 22)
-        {
-            
-            _stateImageV.image = [UIImage imageNamed:@"b_message_position"];
-            
-        }
-        if ([model.type integerValue] == 23)
-        {
-            _stateImageV.image = [UIImage imageNamed:@"b_message_resume"];
-            
-        }
-        _stateLabel.text = model.title;
-        _detailLabel.text = model.content;
-        _timeLabel.text = model.messageTime;
-    }
 
-}
 - (void)autoLayOutViews {
     
     __weak typeof(self) weakSelf = self;
@@ -117,13 +79,11 @@
         make.bottom.equalTo(weakSelf.bgView.mas_bottom).offset(0);
         make.height.mas_equalTo(1);
     }];
-    
-//    _stateImageV.image = [UIImage imageNamed:@"b_message_nopass"];
-//    _stateLabel.text = @"新简历处理";
-//    _detailLabel.text = @"你好,。。。。。。。。。。。。";
-//    _timeLabel.text = @"2019-09-08";
-    
+
 }
+
+#pragma mark - setter & getter
+
 - (UIView *)bgView {
     
     if (_bgView == nil)

+ 36 - 55
HappyJob/HappyJob/BClass/BMessage_消息/ViewController/BMessageViewController.m

@@ -7,14 +7,14 @@
 //
 
 #import "BMessageViewController.h"
-#import "BMessageCell.h"
 #import "BMessageListAPI.h"
+#import "BMessageDataBox.h"
 
-@interface BMessageViewController ()<UITableViewDelegate,UITableViewDataSource,FBAPIManagerDelegate>
+@interface BMessageViewController ()<UITableViewDelegate,FBAPIManagerDelegate>
 
-@property (nonatomic, strong) TableViewListView *tableView;
-@property (nonatomic, strong) BMessageListAPI   *listAPI;
-@property (nonatomic, strong) NSMutableArray    *listArray;
+@property (nonatomic, strong) HJPageListView   *tableView;
+@property (nonatomic, strong) BMessageListAPI  *listAPI;
+@property (nonatomic, strong) BMessageDataBox  *dataBox;
 
 @end
 
@@ -24,77 +24,56 @@
     [super viewDidLoad];
     
     self.navigationItem.title = @"消息";
-    self.listArray = [NSMutableArray array];
+    
     [self hj_setupWhiteColorNavBar];
     [self autoLayOutViews];
-    
     [self.listAPI start];
+    
+}
+
+- (void)autoLayOutViews {
+    
+    [self.view addSubview:self.tableView];
+    
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        
+        make.edges.equalTo(self.view);
+        
+    }];
+    
 }
 #pragma mark - FBAPIManagerDelegate
 
 - (void)managerCallAPIDidSuccess:(FBBaseAPIManager *)manager {
     
-    NSDictionary *dict = [manager fetchDataWithBox:nil];
     if (manager == self.listAPI)
     {
         [self.tableView managerCallAPIDidSuccess:manager];
-        if (self.listAPI.isFirstPage)
-        {
-            self.listArray = [NSMutableArray arrayWithArray:dict[@"data"][@"hpMessage"]];
-        }
-        else
-        {
-            [self.listArray addObjectsFromArray:dict[@"data"][@"hpMessage"]];
-        }
-        [self.tableView.tableView reloadData];
     }
 }
 - (void)managerCallAPIDidFailed:(FBBaseAPIManager *)manager {
     
-    [self.tableView managerCallAPIDidFailed:manager];
-    FBAPIManagerErrorType type = manager.errorType;
-    if (type == FBAPIManagerErrorTypeNoContent)
+    if (manager == self.listAPI)
     {
-        id fetchData = [manager fetchDataWithBox:nil];
-        if ([fetchData isKindOfClass:[NSDictionary class]])
+        [self.tableView managerCallAPIDidFailed:manager];
+        
+        id fetchData = [manager fetchDataWithBox:self.dataBox];
+        if ([fetchData isKindOfClass:[NSString class]])
         {
-            [self.view fb_showFailureWithStatus:fetchData[@"errmsg"]];
+            [self.view fb_showFailureWithStatus:fetchData];
         }
     }
-    else
-    {
-        [self.view fb_showFailureWithStatus:manager.errorMessage];
-    }
 }
 
-#pragma mark - UITableView
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    
-    return self.listArray.count;
-}
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+#pragma mark - setter & getter
+
+- (BMessageDataBox *)dataBox {
     
-    static NSString *listCell = @"cellID";
-    BMessageCell *cell = [tableView dequeueReusableCellWithIdentifier:listCell];
-    if (cell == nil)
+    if (_dataBox == nil)
     {
-        cell = [[BMessageCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:listCell];
+        _dataBox = [[BMessageDataBox alloc] init];
     }
-    [cell bMessageCellArray:self.listArray andIndexpath:indexPath];
-    return cell;
-}
-
-#pragma mark - setter&getter
-
-- (void)autoLayOutViews {
-    
-    [self.view addSubview:self.tableView];
-    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
-        
-        make.left.right.top.bottom.offset(0);
-        make.top.offset(0);
-    }];
-    
+    return _dataBox;
 }
 - (BMessageListAPI *)listAPI {
     
@@ -106,18 +85,20 @@
     }
     return _listAPI;
 }
-- (TableViewListView *)tableView {
+- (HJPageListView *)tableView {
     
     if (_tableView == nil)
     {
-        _tableView = [[TableViewListView alloc] init];
+        _tableView = [[HJPageListView alloc] init];
         _tableView.tableView.delegate = self;
-        _tableView.tableView.dataSource = self;
+        _tableView.tableView.dataSource = self.dataBox;
         _tableView.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
         _tableView.APIManager = self.listAPI;
+        _tableView.dataBox = self.dataBox;
         //自定义空白页
         _tableView.blankView.imageView.image = [UIImage imageNamed:@"msg_blank"];
         _tableView.blankView.label.text = @"暂无数据~空空如也";
+        self.edgesForExtendedLayout = UIRectEdgeNone;
     }
     return _tableView;
 }

+ 2 - 1
HappyJob/HappyJob/BClass/BMy_我的/设置/ViewControlletr/BSetViewController.m

@@ -141,8 +141,9 @@
     
     [self dismissViewControllerAnimated:NO completion:^{
         // 清空所有本地用户信息
+        [[HJAppUserType sharedInstance] loginoutType];
+        [[HJAppUserType sharedInstance] saveUserType];
         [HJUserInfoModel clear];
-        [HJMemberInfoModel clear];
         AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
         [appdelegate switchTabBar];
 

+ 0 - 1
HappyJob/HappyJob/BClass/BPosition_职位/API/BCheckPeopleAPI.m

@@ -24,7 +24,6 @@
              @"positionCategory":self.positionCategory,
              @"type":self.type,
              @"member_id":[HJMemberInfoModel memberInfo].memberId
-             
              };
     
 }

+ 0 - 1
HappyJob/HappyJob/BClass/BPosition_职位/API/BPositionDetailAPI.m

@@ -49,7 +49,6 @@
              @"user_token":[HJUserInfoModel userInfo].userToken,
              @"id":self.ID,
              @"member_id":[HJMemberInfoModel memberInfo].memberId
-            
              };
     
 }

+ 2 - 6
HappyJob/HappyJob/BClass/BPosition_职位/API/BPositionListAPI.m

@@ -16,12 +16,8 @@
 }
 - (NSDictionary *)parameters {
     
-    NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:@{
-                                                                                @"user_id": [HJUserInfoModel userInfo].userID,
-                                                                                @"user_token": [HJUserInfoModel userInfo].userToken,
-                                                                                @"pageNo": @(self.currentPageNumber),
-                                                                                @"member_id":[HJMemberInfoModel memberInfo].memberId
-                                                                                }];
+    NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:@{ @"user_id": [HJUserInfoModel userInfo].userID, @"user_token": [HJUserInfoModel userInfo].userToken, @"pageNo": @(self.currentPageNumber), @"member_id":[HJMemberInfoModel memberInfo].memberId }];
+    
     if (![self.isOn isEqualToString:@"-1"])
     {
         [dict setObject:self.isOn forKey:@"isOn"];

+ 4 - 1
HappyJob/HappyJob/BClass/BPosition_职位/ViewController/BCheckPeopleViewController.m

@@ -223,7 +223,9 @@ FBAPIManagerInterceptor
         self.btnView.allBtn.selected = NO;
     }
 }
+
 #pragma mark - 布局
+
 - (void)autoLayOutViews {
     
     __weak typeof(self) weakSelf = self;
@@ -306,7 +308,8 @@ FBAPIManagerInterceptor
     };
 }
 
-#pragma mark - setter&getter
+#pragma mark - setter & getter
+
 - (BCheckPeopleApplysStatusAPI *)applysStatusAPI {
     
     if (_applysStatusAPI == nil)

+ 7 - 4
HappyJob/HappyJob/BClass/BPosition_职位/ViewController/BPositionDetailViewController.m

@@ -42,15 +42,17 @@ FBAPIManagerInterceptor
     [self.detailAPI start];
     [self autoLayOutViews];
     // 错误页面刷新事件
-    [self.view.errorView.refreshButton addTarget:self
-                                          action:@selector(refreshButtonClicked:)
-                                forControlEvents:UIControlEventTouchUpInside];
+    [self.view.errorView.refreshButton addTarget:self action:@selector(refreshButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
     
 }
+
+#pragma mark - event response
+
 - (void)refreshButtonClicked:(UIButton *)btn {
     
     [self.detailAPI start];
 }
+
 #pragma mark - FBAPIManagerInterceptor
 
 - (BOOL)manager:(FBBaseAPIManager *)manager shouldStartCallAPIWithParams:(NSDictionary *)params {
@@ -224,7 +226,8 @@ FBAPIManagerInterceptor
     NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:0];
     [self.tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationNone];
 }
-#pragma mark - setter&getter
+
+#pragma mark - setter & getter
 
 - (void)autoLayOutViews {
     

+ 10 - 6
HappyJob/HappyJob/BClass/BPosition_职位/ViewController/BPositionViewController.m

@@ -62,6 +62,7 @@ FBAPIManagerInterceptor
     [self.navigationController setNavigationBarHidden:NO animated:animated];
 }
 - (void)viewDidLoad {
+    
     [super viewDidLoad];
     
     self.navigationItem.title = @"职位";
@@ -69,10 +70,14 @@ FBAPIManagerInterceptor
     [self hj_setupWhiteColorNavBar];
     
     // 错误页面刷新事件
-    [self.view.errorView.refreshButton addTarget:self
-                                          action:@selector(refreshButtonClicked:)
-                                forControlEvents:UIControlEventTouchUpInside];
+    [self.view.errorView.refreshButton addTarget:self action:@selector(refreshButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
+    
+    // 解决底部被UITabBar遮挡的问题
+    self.edgesForExtendedLayout = UIRectEdgeNone;
 }
+
+#pragma mark - event response
+
 - (void)refreshButtonClicked:(UIButton *)btn {
     
     [self.authAPI start];
@@ -96,7 +101,6 @@ FBAPIManagerInterceptor
     
     [self.view dismissErrorView];
     NSDictionary *dict = [manager fetchDataWithBox:nil];
-    
     if (manager == self.authAPI)
     {
         if ([[dict valueForKeyPath:@"data.isAuth"] boolValue] == NO)
@@ -149,6 +153,7 @@ FBAPIManagerInterceptor
         [self.tableView.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];
     }
 }
+
 - (void)managerCallAPIDidFailed:(FBBaseAPIManager *)manager {
     
     [self.view showErrorView];
@@ -202,7 +207,6 @@ FBAPIManagerInterceptor
             vc.hidesBottomBarWhenPushed = YES;
             [self.navigationController pushViewController:vc animated:YES];
         }
-        
     };
     //查看简历
     cell.resumeBlock = ^{
@@ -453,7 +457,7 @@ FBAPIManagerInterceptor
     };
 }
 
-#pragma mark - setter&getter
+#pragma mark - setter && getter
 
 - (BHomeNoCertificationView *)certificationView {
     

+ 3 - 0
HappyJob/HappyJob/Base/UserInfo/HJCompanyInfoModel.h

@@ -11,10 +11,12 @@
 NS_ASSUME_NONNULL_BEGIN
 
 typedef NS_ENUM(NSUInteger, HJCompanyAuthStatusType) {
+    
     HJCompanyAuthStatusTypeNoAuth = 0,
     HJCompanyAuthStatusTypeAuthing = 1,
     HJCompanyAuthStatusTypeAuthFailed = 2,
     HJCompanyAuthStatusTypeAuthSuccess = 3,
+    
 };
 
 @interface HJCompanyInfoModel : HJBaseModel
@@ -29,6 +31,7 @@ typedef NS_ENUM(NSUInteger, HJCompanyAuthStatusType) {
 + (instancetype)companyInfo;
 
 + (void)setCompanyInfo:(HJCompanyInfoModel *)model;
+
 + (void)removeCompanyInfo;
 
 

+ 0 - 1
HappyJob/HappyJob/Base/UserInfo/HJMemberInfoModel.h

@@ -36,7 +36,6 @@ typedef NS_ENUM(NSUInteger, HJMAuthStatusType) {
 
 + (void)removeMemberInfo;
 
-+ (void)clear;
 
 @end
 

+ 0 - 6
HappyJob/HappyJob/Base/UserInfo/HJMemberInfoModel.m

@@ -42,11 +42,5 @@ static NSString * const kMember = @"MemberArchivedData";
     [userDefaults removeObjectForKey:kMember];
 }
 
-+ (void)clear {
-    
-    [HJMemberInfoModel removeMemberInfo];
-    
-}
-
 
 @end

+ 4 - 0
HappyJob/HappyJob/Base/UserInfo/HJUserInfoModel.m

@@ -9,6 +9,8 @@
 #import "HJUserInfoModel.h"
 #import "HJMessageModel.h"
 #import "HJResumeModel.h"
+#import "HJMemberInfoModel.h"
+#import "HJCompanyInfoModel.h"
 
 static NSString * const kUserInfo = @"UserInfoArchivedData";
 static NSString * const kSearchHistory = @"SearchHistoryArchivedData";
@@ -98,6 +100,8 @@ static NSString * const kSearchHistory = @"SearchHistoryArchivedData";
     [HJUserInfoModel removeAllSearchHistory];
     [HJMessageModel removeLocalMessage];
     [HJResumeModel removeResume];
+    [HJCompanyInfoModel removeCompanyInfo];
+    [HJMemberInfoModel removeMemberInfo];
 }
 
 @end

+ 1 - 1
HappyJob/HappyJob/CClass/Home_首页/HJHomeViewController.m

@@ -125,6 +125,7 @@
     vc.hidesBottomBarWhenPushed = YES;
     [self.navigationController pushViewController:vc animated:YES];
 }
+
 #pragma mark - UIScrollViewDelegate
 
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
@@ -379,7 +380,6 @@
         _pageListView.APIManager = self.getHotPositionAPIManager;
         _pageListView.dataBox = self.positionDataBox;
         _pageListView.delegate = self;
-            
         // 去除顶部空白
         if (@available(iOS 11.0, *))
         {

+ 2 - 2
HappyJob/HappyJob/CClass/Home_首页/Header_头视图/JobSort_分类信息/HJJobSortView.m

@@ -120,14 +120,14 @@
 - (UIButton *)createButtonWithTitle:(NSString *)title imageNamed:(NSString *)imageNamed {
     
     UIButton *button = [[UIButton alloc] init];
-    button.titleLabel.font = [UIFont systemFontOfSize:12];
+    button.titleLabel.font = [UIFont systemFontOfSize:14];
     button.titleLabel.textAlignment = NSTextAlignmentCenter;
     [button setImage:[UIImage imageNamed:imageNamed] forState:UIControlStateNormal];
     [button setTitle:title forState:UIControlStateNormal];
     [button setTitleColor:COLOR_BACK6 forState:UIControlStateNormal];
     //文字图片上下显示
     CGSize imageSize = CGSizeMake(HJHorizontalScale(54), HJHorizontalScale(54));
-    CGSize titleSize = CGSizeMake(HJHorizontalScale(54), HJHorizontalScale(13));
+    CGSize titleSize = CGSizeMake(HJHorizontalScale(70), HJHorizontalScale(13));
     CGFloat maxWidth = MAX(imageSize.width, titleSize.width);
     CGFloat padding = 9;
     button.imageRect = CGRectMake((maxWidth - imageSize.width) / 2, 0, imageSize.width, imageSize.height);

+ 3 - 1
HappyJob/HappyJob/CClass/Home_首页/Header_头视图/Scroll_轮播器/HJBannerScrollView.m

@@ -93,7 +93,7 @@
     self.scrollBGView.layer.shadowRadius = 10.0;
     self.scrollBGView.layer.cornerRadius = 10.0;
     self.scrollBGView.clipsToBounds = NO;
-    //上方的
+    //实现圆角(上方)
     UIBezierPath *fieldPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_WIDTH - 30, HJHorizontalScale(182)) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(10.0, 10.0)];
     CAShapeLayer *fieldLayer = [[CAShapeLayer alloc] init];
     fieldLayer.frame = CGRectMake(0, 0, SCREEN_WIDTH - 30, HJHorizontalScale(182));
@@ -129,6 +129,7 @@
 
 }
 #pragma mark - SDCycleScrollViewDelegate
+
 - (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didScrollToIndex:(NSInteger)index {
     
     for (UIButton *btn in self.pageControlView.subviews)
@@ -171,6 +172,7 @@
     _bannerList = [bannerList copy];
     
     id pics = [bannerList valueForKeyPath:@"picUrl"];
+    
     if ([pics isKindOfClass:[NSArray class]])
     {
         [self setImageURLStringArray:pics];

+ 1 - 0
HappyJob/HappyJob/CClass/Home_首页/HomeAPIManager/HJHomeDataBox.m

@@ -19,6 +19,7 @@
         if ([manager isKindOfClass:[HJGetDynamicBannerAPIManager class]])
         {
             id list = [data valueForKeyPath:@"data.bannerList"];
+            
             if ([list isKindOfClass:[NSArray class]] && [list count] > 0)
             {
                 return (NSArray *)list;

+ 1 - 0
HappyJob/HappyJob/CClass/JobList_工作列表信息/FullTime_全职工作/HJFullTimeDetailViewController.m

@@ -68,6 +68,7 @@
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginRefresh:) name:@"loginRefreshNotification" object:nil];
 }
 #pragma mark - event response 通知
+
 - (void)loginRefresh:(NSNotification *)notification {
     
     [self.detailAPIManager start];

+ 3 - 2
HappyJob/HappyJob/CClass/JobList_工作列表信息/FullTime_全职工作/HJFullTimeTableViewCell.m

@@ -75,6 +75,7 @@
     [self.addressLabel mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self.companyLabel.mas_bottom).offset(9);
         make.left.equalTo(self.companyLabel);
+        make.right.equalTo(self.bgView).offset(-15);
     }];
     [self.openBtn mas_makeConstraints:^(MASConstraintMaker *make) {
         
@@ -252,8 +253,8 @@
         _addressLabel = [[UILabel alloc] init];
         _addressLabel.textColor = COLOR_GRAY8;
         _addressLabel.font = [UIFont systemFontOfSize:13];
-        _addressLabel.textAlignment = NSTextAlignmentRight;
-        [_addressLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
+//        _addressLabel.textAlignment = NSTextAlignmentLeft;
+//        [_addressLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
     }
     return _addressLabel;
 }

+ 0 - 1
HappyJob/HappyJob/CClass/JobList_工作列表信息/FullTime_全职工作/HJFullTimeViewController.m

@@ -189,7 +189,6 @@
         _pageListView.tableView.dataSource = self.positionDataBox;
         _pageListView.APIManager = self.getFullTimePositionAPIManager;
         _pageListView.dataBox = self.positionDataBox;
-    
     }
     return _pageListView;
 }

+ 2 - 2
HappyJob/HappyJob/CClass/JobList_工作列表信息/HJPositionDataBox.m

@@ -48,7 +48,6 @@ static NSString * const HJJoinTableViewCellIdentifier = @"HJJoinTableViewCell";
 - (id)manager:(FBBaseAPIManager *)manager boxingData:(NSDictionary *)data {
     
     self.manager = manager;
-
     FBAPIManagerErrorType type = manager.errorType;
     if (type == FBAPIManagerErrorTypeNoError)
     {
@@ -378,7 +377,8 @@ static NSString * const HJJoinTableViewCellIdentifier = @"HJJoinTableViewCell";
             [self dealwithPositionOpenAtIndexPath:indexPath];
             [weakCell.welfareView reloadData];
             [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];
-            
+            [tableView beginUpdates];
+            [tableView  endUpdates];
         };
         if (model.isOpen)
         {

+ 1 - 0
HappyJob/HappyJob/CClass/JobList_工作列表信息/PositionDetail_岗位详情/PositionDetailAPIManager/HJPositionDetailDataBox.m

@@ -453,6 +453,7 @@ NSString * const HJPositionListRefreshNotification = @"HJPositionListRefreshNoti
         _peopleDateLabel.textColor = COLOR_BACK6;
         _peopleDateLabel.textAlignment = NSTextAlignmentLeft;
         _peopleDateLabel.font = [UIFont systemFontOfSize:14];
+        [_peopleDateLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
     }
     return _peopleDateLabel;
 }

+ 2 - 2
HappyJob/HappyJob/CClass/Join_拼工/Apply_申请拼工/HJJoinApplyViewController.m

@@ -135,10 +135,10 @@ NSString *const HJJoinApplySuccessNotification = @"HJJoinApplySuccessNotificatio
     if ([footerView.subviews indexOfObject:self.shareBtn] != NSNotFound)
     {
         [self.invitationBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.edges.equalTo(footerView).with.insets(UIEdgeInsetsMake(9, 15, 9, 250));
+            make.edges.equalTo(footerView).with.insets(UIEdgeInsetsMake(9, 15, 9, HJHorizontalScale(250)));
         }];
         [self.shareBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.edges.equalTo(footerView).with.insets(UIEdgeInsetsMake(9, 135, 9, 15));
+            make.edges.equalTo(footerView).with.insets(UIEdgeInsetsMake(9, HJHorizontalScale(135), 9, 15));
         }];
         
     }

+ 17 - 7
HappyJob/HappyJob/CClass/Join_拼工/HJJoinDetailHeaderView.m

@@ -78,7 +78,8 @@
    
     [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self.bgView.mas_top).offset(15);
-        make.left.equalTo(self.bgView).offset(15);
+        make.leading.equalTo(self.bgView.mas_leading).offset(15);
+        
     }];
     
     [self.salaryView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -90,27 +91,33 @@
     [self.peopleView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.leading.equalTo(self.titleView);
         make.top.equalTo(self.titleView.mas_bottom).offset(13);
+        make.width.mas_greaterThanOrEqualTo(90);
     }];
     [self.timerLabel mas_makeConstraints:^(MASConstraintMaker *make) {
 
-        make.centerY.equalTo(self.peopleView);
-        make.right.equalTo(self.bgView.mas_right).offset(-15);
+        make.top.equalTo(self.titleView.mas_bottom).offset(13);
+        make.trailing.equalTo(self.bgView.mas_trailing).offset(-15);
+        make.left.greaterThanOrEqualTo(self.peopleView.mas_right);
 
     }];
     if ([self.bgView.subviews indexOfObject:self.femaleView] != NSNotFound)
     {
         [self.bgView addSubview:self.returnFeeLabel];
+        
         [self.returnFeeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.top.equalTo(self.peopleView.mas_bottom).with.offset(8);
+            
+            make.top.equalTo(self.timerLabel.mas_bottom).with.offset(13);
             make.left.equalTo(self.titleView);
             make.size.mas_offset(CGSizeMake(35, 20));
             make.bottom.equalTo(self.bgView.mas_bottom).offset(-15);
         }];
+        
         [self.femaleView mas_makeConstraints:^(MASConstraintMaker *make) {
 
             make.centerY.equalTo(self.returnFeeLabel);
             make.left.equalTo(self.returnFeeLabel.mas_right).offset(10);
         }];
+        
         if ([self.bgView.subviews indexOfObject:self.maleView] != NSNotFound)
         {
             [self.maleView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -125,17 +132,18 @@
         if ([self.bgView.subviews indexOfObject:self.maleView] != NSNotFound)
         {
             [self.bgView addSubview:self.returnFeeLabel];
+            
             [self.returnFeeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
-                make.top.equalTo(self.peopleView.mas_bottom).with.offset(8);
+                make.top.equalTo(self.timerLabel.mas_bottom).with.offset(13);
                 make.left.equalTo(self.titleView);
                 make.size.mas_offset(CGSizeMake(35, 20));
                 make.bottom.equalTo(self.bgView.mas_bottom).offset(-15);
             }];
+            
             [self.maleView mas_makeConstraints:^(MASConstraintMaker *make) {
                 make.centerY.equalTo(self.returnFeeLabel);
                 make.left.equalTo(self.returnFeeLabel.mas_right).offset(10);
             }];
-
         }
         else
         {
@@ -233,8 +241,10 @@
     {
         _timerLabel = [[UILabel alloc] init];
         _timerLabel.textColor = COLOR_GRAY9;
-        _timerLabel.textAlignment = NSTextAlignmentLeft;
+        _timerLabel.textAlignment = NSTextAlignmentRight;
         _timerLabel.font = [UIFont systemFontOfSize:12];
+        _timerLabel.numberOfLines = 0;
+    
     }
     return _timerLabel;
 }

+ 1 - 1
HappyJob/HappyJob/CClass/Join_拼工/HJJoinDetailViewController.m

@@ -597,7 +597,7 @@ FBAPIManagerDelegate
     if (_joinApplyButton == nil)
     {
         _joinApplyButton = [UIButton buttonWithType:UIButtonTypeCustom];
-        [_joinApplyButton setTitle:@"投递简历" forState:UIControlStateNormal];
+        [_joinApplyButton setTitle:@"申请开团" forState:UIControlStateNormal];
         _joinApplyButton.titleLabel.font = [UIFont systemFontOfSize:17];
         _joinApplyButton.layer.cornerRadius = 5;
         _joinApplyButton.layer.masksToBounds = YES;

+ 16 - 1
HappyJob/HappyJob/CClass/Join_拼工/HJJoinViewController.m

@@ -17,6 +17,7 @@
 #import "CountDown.h"
 #import "XHDate.h"
 
+
 @interface HJJoinViewController () <UITableViewDelegate>
 
 @property (nonatomic, strong) UIButton    *agreementButton;//协议按钮
@@ -59,13 +60,17 @@
     
     //添加城市选择通知
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cityPickerViewSelectCity:) name:HJCityPickerCitySelectedNotification object:nil];
+    
 }
 
 - (void)makeConstraints {
     
     [self.pageListView mas_makeConstraints:^(MASConstraintMaker *make) {
+        
         make.edges.equalTo(self.view);
     }];
+  
+   
 }
 
 #pragma mark - UITableViewDelegate
@@ -169,7 +174,6 @@
     if (_pageListView == nil)
     {
         _pageListView = [[HJPageListView alloc] init];
-        _pageListView.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
         _pageListView.tableView.tableHeaderView = self.headerImageView;
         _pageListView.tableView.delegate = self;
         _pageListView.tableView.dataSource = self.positionDataBox;
@@ -178,6 +182,17 @@
         //自定义空白页
         _pageListView.blankView.imageView.image = [UIImage imageNamed:@"join_blank"];
         _pageListView.blankView.label.text = @"暂时还没有发布的拼工";
+        if (@available(iOS 11.0, *))
+        {
+            _pageListView.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+        }
+        else
+        {
+            self.automaticallyAdjustsScrollViewInsets = NO;
+        }
+        // 解决底部被UITabBar遮挡的问题
+//        self.edgesForExtendedLayout = UIRectEdgeNone;
+//        _pageListView.tableView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
     }
     return _pageListView;
 }

+ 18 - 5
HappyJob/HappyJob/CClass/Me_我/MeAPIManager/HJGetUserInfoAPIManager.m

@@ -57,11 +57,24 @@
 
 - (NSDictionary *)parameters {
     
-    return @{
-        @"user_id": self.userID,
-        @"user_token": self.userToken,
-        @"member_id":[HJMemberInfoModel memberInfo].memberId
-    };
+    NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:@{
+                                                                    @"user_id": [HJUserInfoModel userInfo].userID,
+                                                                 @"user_token": [HJUserInfoModel userInfo].userToken,
+                                                                  @"member_id":[HJMemberInfoModel memberInfo].memberId
+                                                                                }];
+    
+    if ([[HJAppUserType sharedInstance].login_type isEqualToString:@"1"])
+    {
+        [dict setObject:@"1" forKey:@"login_type"];
+    }
+    
+    return [dict copy];
+//    return @{
+//        @"user_id": self.userID,
+//        @"user_token": self.userToken,
+//        @"member_id":[HJMemberInfoModel memberInfo].memberId,
+//        @"login_type":[HJAppUserType sharedInstance].login_type
+//    };
 }
 
 - (FBAPIManagerRequestType)requestType {

+ 10 - 8
HappyJob/HappyJob/CClass/Me_我/Setting_设置/HJSettingViewController.m

@@ -35,7 +35,6 @@ static NSString * const HJSettingCellIdentifier = @"HJSettingCell";
     self.title = @"设置";
     
     [self hj_setupNavBar];
-    
     [self.view addSubview:self.tableView];
     [self.view addSubview:self.logoutButton];
     [self makeConstraints];
@@ -43,16 +42,17 @@ static NSString * const HJSettingCellIdentifier = @"HJSettingCell";
 
 - (void)makeConstraints {
     
-    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.left.right.equalTo(self.view);
-        make.bottom.equalTo(self.logoutButton.mas_top).with.offset(-11);
-    }];
     [self.logoutButton mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(self.view).with.offset(9);
         make.right.equalTo(self.view).with.offset(-9);
-        make.bottom.equalTo(self.mas_bottomLayoutGuide).with.offset(-18);
+        make.bottom.equalTo(self.mas_bottomLayoutGuide).with.offset(-20);
         make.height.mas_equalTo(50);
     }];
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.left.right.equalTo(self.view);
+        make.bottom.equalTo(self.logoutButton.mas_top).with.offset(-11);
+    }];
+    
 }
 
 #pragma mark - UITableViewDelegate
@@ -86,6 +86,7 @@ static NSString * const HJSettingCellIdentifier = @"HJSettingCell";
 }
 
 #pragma mark - UITableViewDataSource
+
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
     
     return 50;
@@ -227,8 +228,9 @@ static NSString * const HJSettingCellIdentifier = @"HJSettingCell";
     // 清空所有本地用户信息
     [self dismissViewControllerAnimated:NO completion:^{
         
+        [[HJAppUserType sharedInstance] loginoutType];
+        [[HJAppUserType sharedInstance] saveUserType];
         [HJUserInfoModel clear];
-        [HJMemberInfoModel clear];
         AppDelegate *appdelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
         [appdelegate switchTabBar];
 
@@ -263,7 +265,7 @@ static NSString * const HJSettingCellIdentifier = @"HJSettingCell";
         _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
         _tableView.delegate = self;
         _tableView.dataSource = self;
-        _tableView.separatorInset = UIEdgeInsetsZero;
+//        _tableView.separatorInset = UIEdgeInsetsZero;
         _tableView.tableFooterView = [UIView new];
         _tableView.scrollEnabled = NO;
     }

+ 3 - 3
HappyJob/HappyJob/CClass/Me_我/View/Header_头视图/HJMeDistributeView.m

@@ -52,16 +52,16 @@
 - (UIButton *)createButtonWithTitle:(NSString *)title imageNamed:(NSString *)imageNamed {
     
     UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
-    button.titleLabel.font = [UIFont systemFontOfSize:13];
+    button.titleLabel.font = [UIFont systemFontOfSize:12];
     button.titleLabel.textAlignment = NSTextAlignmentCenter;
     [button setImage:[UIImage imageNamed:imageNamed] forState:UIControlStateNormal];
     [button setTitle:title forState:UIControlStateNormal];
     [button setTitleColor:COLOR_BACK6 forState:UIControlStateNormal];
     //文字图片上下显示
     CGSize imageSize = CGSizeMake(HJHorizontalScale(34), HJHorizontalScale(34));
-    CGSize titleSize = CGSizeMake(HJHorizontalScale(54), HJHorizontalScale(13));
+    CGSize titleSize = CGSizeMake(HJHorizontalScale(60), HJHorizontalScale(13));
     CGFloat maxWidth = MAX(imageSize.width, titleSize.width);
-    CGFloat padding = 6;
+    CGFloat padding = 10;
     button.imageRect = CGRectMake((maxWidth - imageSize.width) / 2, 0, imageSize.width, imageSize.height);
     button.titleRect = CGRectMake((maxWidth - titleSize.width) / 2, imageSize.height + padding, titleSize.width, titleSize.height);
     button.frame = CGRectMake(0, 0, maxWidth, imageSize.height + titleSize.height + padding);

+ 5 - 8
HappyJob/HappyJob/CClass/Me_我/ViewController/HJMeViewController.m

@@ -66,7 +66,6 @@ FBAPIManagerDelegate
 - (void)viewDidLoad {
     [super viewDidLoad];
     
-    
     [self hj_setupNavBar];
     [self.view addSubview:self.navBarView];
     [self.view insertSubview:self.tableView belowSubview:self.navBarView];
@@ -162,20 +161,18 @@ FBAPIManagerDelegate
     {
         // 不需要根据返回值来处理视图,在DataBox类中做了封装
         [manager fetchDataWithBox:self.resumeDataBox];
-       
         [self saveUserResumeInfo:[manager fetchDataWithBox:self.resumeDataBox]];
+        [self.refreshHeader endRefreshing];
     }
 }
 
 - (void)managerCallAPIDidFailed:(FBBaseAPIManager *)manager {
     
-    if (manager == self.approveStatusAPIManager)
+    [self.refreshHeader endRefreshing];
+    id fetchData = [manager fetchDataWithBox:self.dataBox];
+    if ([fetchData isKindOfClass:[NSString class]])
     {
-        id fetchData = [manager fetchDataWithBox:self.dataBox];
-        if ([fetchData isKindOfClass:[NSString class]])
-        {
-            [self.view fb_showFailureWithStatus:fetchData];
-        }
+        [self.view fb_showFailureWithStatus:fetchData];
     }
 }
 

+ 1 - 2
HappyJob/HappyJob/Custom/WeiXin/HJWeiXinAPIManager.m

@@ -44,10 +44,9 @@
     if ([resp isKindOfClass:[SendAuthResp class]])
     {
         SendAuthResp *sendAuthResp = (SendAuthResp *)resp;
-//        NSLog(@"::::::::%d",sendAuthResp.errCode);
+
         if ([sendAuthResp.state isEqualToString:@"wx_oauth_authorization_state"])
         {
-            
             // 微信授权成功
             if (sendAuthResp.errCode == 0)
             {

+ 1 - 0
HappyJob/HappyJob/HappyJob-Prefix.pch

@@ -35,6 +35,7 @@
 #import "HJRefreshHeaderView.h"
 #import "HJRefreshFooterView.h"
 #import <DZNEmptyDataSet/UIScrollView+EmptyDataSet.h>
+#import "HJPageListView.h"
 #import "TableViewListView.h"
 #import "UIView+HJLoadingViewAndErrorView.h"
 #import "HJAppService.h"

+ 1 - 1
HappyJob/HappyJob/Login_登录/LoginAPIManager/HJLoginBindingPhoneAPIManager.m

@@ -36,7 +36,7 @@
 
 - (FBAPIManagerErrorType)manager:(FBBaseAPIManager *)manager validWithCallBackData:(NSDictionary *)data {
     
-    if ([[data objectForKey:@"errcode"] integerValue] == 0)
+    if ([[data objectForKey:@"errcode"] integerValue] == 0 || [[data objectForKey:@"errcode"] integerValue] == 2009)
     {
         return FBAPIManagerErrorTypeNoError;
     }

+ 5 - 0
HappyJob/HappyJob/Login_登录/LoginAPIManager/HJLoginDataBox.m

@@ -18,6 +18,7 @@
 
 - (id)manager:(FBBaseAPIManager *)manager boxingData:(NSDictionary *)data {
     
+//    NSLog(@"-----------------");
     FBAPIManagerErrorType type = manager.errorType;
     
     if (type == FBAPIManagerErrorTypeNoError)
@@ -30,11 +31,15 @@
         //手机号登录
         if ([manager isKindOfClass:[HJLoginPhoneLoginAPIManager class]])
         {
+            [[HJAppUserType sharedInstance] setLogin_type:@"1"];
+            [[HJAppUserType sharedInstance] saveUserType];
             return [self dealwithReturnValue:manager boxingData:data];
         }
         //微信登录
         if ([manager isKindOfClass:[HJLoginWeChatLoginAPIManager class]])
         {
+            [[HJAppUserType sharedInstance] setLogin_type:@""];
+            [[HJAppUserType sharedInstance] saveUserType];
             if (((HJLoginWeChatLoginAPIManager *)manager).type == HJLoginWeChatLoginAPIManagerTypeBinding)
             {
                 HJLoginBindingPhoneAPIManager *bindingPhoneAPIManager = [[HJLoginBindingPhoneAPIManager alloc] init];

+ 2 - 0
HappyJob/HappyJob/Login_登录/LoginAPIManager/HJLoginInfoMergeAPI.h

@@ -16,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString *phone;
 @property (nonatomic, copy) NSString *userIds;
 @property (nonatomic, copy) NSString *login_type;
+@property (nonatomic, copy) NSString *currentUser_id;
+
 
 @end
 

+ 2 - 1
HappyJob/HappyJob/Login_登录/LoginAPIManager/HJLoginInfoMergeAPI.m

@@ -51,7 +51,8 @@
              @"user_id": self.user_id,
              @"phone":self.phone,
              @"userIds":self.userIds,
-             @"login_type":self.login_type
+             @"login_type":self.login_type,
+             @"currentUser_id":self.currentUser_id
              };
     
 }

+ 6 - 2
HappyJob/HappyJob/Login_登录/ViewController/HJLoginBindingPhoneViewController.m

@@ -119,16 +119,18 @@
 
 - (void)managerCallAPIDidSuccess:(FBBaseAPIManager *)manager {
     
+    self.bindingButton.userInteractionEnabled = YES;
     if (manager == self.bindingPhoneAPIManager)
     {
        id fetchData = [manager fetchDataWithBox:self.dataBox];
-       
+
         if ([fetchData[@"errcode"] integerValue ] == 2009)
         {
             HJLoginInfoMergeViewController *info = [[HJLoginInfoMergeViewController alloc]init];
             info.userList = [NSMutableArray arrayWithArray:fetchData[@"data"][@"userList"]];
+            info.currentUserDict = [NSDictionary dictionaryWithDictionary:fetchData[@"data"][@"currentUser"]];
             info.loginType = @"1";
-            info.phone = fetchData[@"data"][@"userList"][0][@"hpUser"][@"phone"];
+            info.phone = self.loginFieldView.phoneTextField.text;
             [self.navigationController pushViewController:info animated:YES];
         }
         else
@@ -140,6 +142,7 @@
 
 - (void)managerCallAPIDidFailed:(FBBaseAPIManager *)manager {
     
+    self.bindingButton.userInteractionEnabled = YES;
     id fetchData = [manager fetchDataWithBox:self.dataBox];
     [self.view fb_showFailureWithStatus:fetchData];
 }
@@ -179,6 +182,7 @@
         return;
     }
     
+    self.bindingButton.userInteractionEnabled = NO;
     NSString *phone = self.loginFieldView.phone;
     NSString *code = self.loginFieldView.authCode;
     self.bindingPhoneAPIManager.phone = phone;

+ 15 - 9
HappyJob/HappyJob/Login_登录/ViewController/HJLoginViewController.m

@@ -87,14 +87,15 @@
 - (void)subviewsMakeConstraintsInScrollLayoutView:(FBScrollLayoutView *)scrollLayoutView contentView:(UIView *)contentView {
     
     [self.loginFieldView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.equalTo(contentView).with.offset(HJVerticalScale(50));
+        
+        make.top.equalTo(contentView).with.offset(HJHorizontalScale(27));
         make.left.equalTo(contentView).with.offset(0);
         make.right.equalTo(contentView).with.offset(-0);
     }];
 
     [self.agreementView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.equalTo(self.loginFieldView.mas_bottom).with.offset(HJHorizontalScale(24));
         
+        make.top.equalTo(self.loginFieldView.mas_bottom).with.offset(HJHorizontalScale(24));
         make.left.equalTo(contentView).with.offset(15);
         make.right.equalTo(contentView).with.offset(-15);
     }];
@@ -166,6 +167,7 @@
 
 - (void)managerCallAPIDidSuccess:(FBBaseAPIManager *)manager {
     
+    self.loginButton.userInteractionEnabled = YES;
     HJLoginDataBox *loginDataBox = [[HJLoginDataBox alloc] init];
     id fetchData = [manager fetchDataWithBox:loginDataBox];
    
@@ -179,16 +181,18 @@
         {
             HJLoginInfoMergeViewController *info = [[HJLoginInfoMergeViewController alloc]init];
             info.userList = [NSMutableArray arrayWithArray:fetchData[@"data"][@"userList"]];
-            
+            info.currentUserDict = [NSDictionary dictionaryWithDictionary:fetchData[@"data"][@"currentUser"]];
             if (manager == self.wechatLgoinAPIManager)
             {
                 info.loginType = @"1";
+                info.phone = fetchData[@"data"][@"userList"][0][@"hpUser"][@"phone"];
             }
             else
             {
                 info.loginType = @"2";
+                info.phone = self.loginFieldView.phoneTextField.text;
             }
-            info.phone = fetchData[@"data"][@"userList"][0][@"hpUser"][@"phone"];
+            
             [self.navigationController pushViewController:info animated:YES];
         }
         
@@ -202,6 +206,7 @@
 }
 - (void)managerCallAPIDidFailed:(FBBaseAPIManager *)manager {
     
+    self.loginButton.userInteractionEnabled = YES;
     HJLoginDataBox *loginDataBox = [[HJLoginDataBox alloc] init];
     id fetchData = [manager fetchDataWithBox:loginDataBox];
     if ([fetchData isKindOfClass:[NSString class]])
@@ -238,6 +243,7 @@
         return;
     }
     
+    self.loginButton.userInteractionEnabled = NO;
     NSString *phone = self.loginFieldView.phone;
     NSString *code = self.loginFieldView.authCode;
     self.phoneLoginAPIManager.phone = phone;
@@ -355,17 +361,17 @@
     if (_wechatLoginButton == nil)
     {
         _wechatLoginButton = [UIButton buttonWithType:UIButtonTypeCustom];
-        _wechatLoginButton.titleLabel.font = [UIFont systemFontOfSize:10];
+        _wechatLoginButton.titleLabel.font = [UIFont systemFontOfSize:12];
         [_wechatLoginButton setImage:[UIImage imageNamed:@"login_button_wechat"] forState:UIControlStateNormal];
         [_wechatLoginButton setTitle:@"微信快捷登录" forState:UIControlStateNormal];
-        [_wechatLoginButton setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
+        [_wechatLoginButton setTitleColor:COLOR_BACKC forState:UIControlStateNormal];
         [_wechatLoginButton addTarget:self action:@selector(wechatLoginButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
         
         //文字图片上下显示
-        CGSize imageSize = CGSizeMake(36, 30);
-        CGSize titleSize = CGSizeMake(62, 10);
+        CGSize imageSize = CGSizeMake(28, 23);
+        CGSize titleSize = CGSizeMake(75, 10);
         CGFloat maxWidth = MAX(imageSize.width, titleSize.width);
-        CGFloat padding = 10;
+        CGFloat padding = 20;
         _wechatLoginButton.imageRect = CGRectMake((maxWidth - imageSize.width) / 2, 0, imageSize.width, imageSize.height);
         _wechatLoginButton.titleRect = CGRectMake((maxWidth - titleSize.width) / 2, imageSize.height + padding, titleSize.width, titleSize.height);
         _wechatLoginButton.frame = CGRectMake(0, 0, maxWidth, imageSize.height + titleSize.height + padding);

+ 45 - 19
HappyJob/HappyJob/Login_登录/信息合并/View/HJLoginInfoMergeCell.m

@@ -88,52 +88,79 @@
     {
         HJLoginInfoMergeUserModel *userModel = [HJLoginInfoMergeUserModel yy_modelWithJSON:dict[@"hpUser"]];
         HJResumeModel *resumeModel = [HJResumeModel yy_modelWithJSON:dict[@"hpResume"]];
+        
         self.titleLabel.text = [NSString stringWithFormat:@"用户信息 %ld",indexpath.row + 1];
 
-        NSString *IDStr = @"";
+        NSString *IDNameStr = userModel.realName ? userModel.realName : @"";//resumeModel.realName
+        if (userModel.idCardNumber.length >= 16)
+        {
+            NSString *str = [userModel.idCardNumber stringByReplacingCharactersInRange:NSMakeRange(6, 8) withString:@"****"];
+            IDNameStr = [NSString stringWithFormat:@"%@(%@)",IDNameStr,str];
+        }
+        if (userModel.idCardNumber.length == 0)
+        {
+            _infoLabel.text = @"用户未认证";
+            _infoLabel.textColor = COLOR_GRAY9;
+        }
+        else
+        {
+            _infoLabel.text = IDNameStr;
+            _infoLabel.textColor = [UIColor colorFromHexString:@"2462BA"];
+        }
+        
+        //头像
+        if (resumeModel.photoURLString)
+        {
+            [self.userImageV sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",resumeModel.photoURLString]] placeholderImage:[UIImage imageNamed:@"me_portrait_default"]];
+        }
+        
+        //名字
         if (resumeModel.realName)
         {
-            IDStr = resumeModel.realName;
             _nameLabel.text = resumeModel.realName;
         }
         else
         {
             _nameLabel.text = @"";
         }
-
-        if (userModel.idCardNumber)
-        {
-            NSString *str = [userModel.idCardNumber stringByReplacingCharactersInRange:NSMakeRange(6, 8) withString:@"****"];
-            IDStr = [NSString stringWithFormat:@"%@(%@)",IDStr,str];
-        }
-        _infoLabel.text = IDStr;
         
         NSString *detailStr = @"";
-        if ([userModel.gender integerValue] == 1)
+        if (resumeModel.gender == 1)
         {
             detailStr = @"男";
         }
-        else
+        if (resumeModel.gender == 2)
         {
             detailStr = @"女";
         }
         
-        if (userModel.age)
+        //年龄
+        if (resumeModel.birthYear)
         {
-            detailStr = [NSString stringWithFormat:@"%@,%@",detailStr,userModel.age];
+            NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
+            [dateFormatter setDateFormat:@"yyyy"];
+            NSInteger year = [[dateFormatter stringFromDate:[NSDate date]] integerValue];
+            NSInteger age = year - [resumeModel.birthYear integerValue] + 1;
+            NSString *ageStr = [NSString stringWithFormat:@"%@岁", @(age)];
+            detailStr = [NSString stringWithFormat:@"%@,%@",detailStr,ageStr];
         }
+        
+        //学历
         NSArray *educationDataSource = @[@"小学", @"中学", @"高中", @"大专", @"本科", @"研究生", @"博士", @"博士后",@"其他"];
         if (resumeModel.education)
         {
             detailStr = [NSString stringWithFormat:@"%@,%@",detailStr,educationDataSource[resumeModel.education]];
         }
-        _userDetailLabel.text = detailStr;
-        
-        if (resumeModel.photoURLString)
+        if (detailStr.length == 0)
+        {
+            _userDetailLabel.text = @"暂无简历";
+        }
+        else
         {
-            [self.userImageV sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",resumeModel.photoURLString]]];
+            _userDetailLabel.text = detailStr;
         }
         
+        //是否被选择
         if ([dict[@"isSelect"] boolValue])
         {
             _selectImageV.image = [UIImage imageNamed:@"resume_merger_select"];
@@ -251,8 +278,7 @@
         make.bottom.equalTo(weakSelf.userView.mas_bottom).offset(0);
         make.height.mas_equalTo(1);
     }];
-    
-    
+
 }
 - (void)lookResumeClick {
     

+ 0 - 1
HappyJob/HappyJob/Login_登录/信息合并/View/HJLoginInfoMergeFailView.m

@@ -60,7 +60,6 @@
         make.left.equalTo(weakSelf).offset(15);
         make.right.equalTo(weakSelf).offset(-15);
         make.height.mas_equalTo(50);
-//        make.bottom.equalTo(weakSelf).offset(-HJHorizontalScale(20));
     }];
     self.backBtn.layer.cornerRadius = 25;
     self.backBtn.layer.masksToBounds = YES;

+ 5 - 1
HappyJob/HappyJob/Login_登录/信息合并/View/个人资料/HJLoginInfoLookResumePersonalDataListView.m

@@ -41,6 +41,7 @@
         make.leading.equalTo(weakSelf.mas_leading).offset(28);
         make.top.equalTo(weakSelf.mas_top).offset(16);
         make.bottom.equalTo(weakSelf.mas_bottom).offset(-16);
+        make.trailing.equalTo(weakSelf.rightLabel.mas_leading).offset(-5);
     }];
     [_rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
         make.trailing.equalTo(weakSelf.mas_trailing).offset(-38);
@@ -62,7 +63,8 @@
         _leftlabel = [[UILabel alloc]init];
         _leftlabel.font = [UIFont systemFontOfSize:14];
         _leftlabel.textColor = COLOR_BACK3;
-        
+        _leftlabel.textAlignment = NSTextAlignmentLeft;
+        [_leftlabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
     }
     return _leftlabel;
 }
@@ -73,6 +75,8 @@
         _rightLabel = [[UILabel alloc]init];
         _rightLabel.font = [UIFont systemFontOfSize:14];
         _rightLabel.textColor = COLOR_BACK6;
+        _rightLabel.textAlignment = NSTextAlignmentRight;
+        
         
     }
     return _rightLabel;

+ 17 - 4
HappyJob/HappyJob/Login_登录/信息合并/View/个人资料/HJLoginInfoLookResumePersonalDataView.m

@@ -42,35 +42,46 @@
     
     HJResumeModel *resumeModel = [HJResumeModel yy_modelWithJSON:dict[@"hpResume"]];
     
+    //头像
     if (resumeModel.photoURLString)
     {
-        [self.headerImageV sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",resumeModel.photoURLString]]];
+        [self.headerImageV sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",resumeModel.photoURLString]] placeholderImage:[UIImage imageNamed:@"me_portrait_default"]];
     }
     
+    //性别
     if (resumeModel.gender == 1)
     {
         _sexView.rightLabel.text = @"男";
     }
-    else
+    if (resumeModel.gender == 2)
     {
         _sexView.rightLabel.text = @"女";
     }
     
+    //年龄
     if (resumeModel.birthYear)
     {
-        self.ageView.rightLabel.text = resumeModel.birthYear;
+        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
+        [dateFormatter setDateFormat:@"yyyy"];
+        NSInteger year = [[dateFormatter stringFromDate:[NSDate date]] integerValue];
+        NSInteger age = year - [resumeModel.birthYear integerValue] + 1;
+        self.ageView.rightLabel.text = [NSString stringWithFormat:@"%@岁", @(age)];
     }
     
+    //学历
     NSArray *educationDataSource = @[@"小学", @"中学", @"高中", @"大专", @"本科", @"研究生", @"博士", @"博士后",@"其他"];
     if (resumeModel.education)
     {
         _educationView.rightLabel.text = educationDataSource[resumeModel.education];
     }
 
+    //电话
     if (resumeModel.phone)
     {
         self.contactView.rightLabel.text = resumeModel.phone;
     }
+    
+    //微信号
     if (resumeModel.wechatNumber)
     {
         self.WeChatView.rightLabel.text = resumeModel.wechatNumber;
@@ -153,8 +164,10 @@
         
     }];
     
-   
 }
+
+#pragma mark - setter & getter
+
 - (UIImageView *)headerImageV {
     
     if (_headerImageV == nil)

+ 4 - 1
HappyJob/HappyJob/Login_登录/信息合并/View/工作经验/HJLoginInfoLookResumeExperienceView.m

@@ -68,7 +68,7 @@
             
             NSString *timeStr = listModel.workStartDate ? listModel.workStartDate :@"";
             
-            timeStr = [NSString stringWithFormat:@"%@%@",timeStr,listModel.workEndDate ? listModel.workEndDate : @""];
+            timeStr = [NSString stringWithFormat:@"%@%@",timeStr,listModel.workEndDate ? listModel.workEndDate : @""];
             
             listView.timeLabel.text = timeStr;
             
@@ -130,6 +130,9 @@
     return _bgView;
     
 }
+
+#pragma mark - setter & getter
+
 - (UIButton *)titleBtn {
     
     if (_titleBtn == nil)

+ 2 - 0
HappyJob/HappyJob/Login_登录/信息合并/View/求职意向/HJLoginInfoLookResumeObjectiveView.m

@@ -124,6 +124,8 @@
 
 }
 
+#pragma mark - setter and getter 
+
 - (UIView *)bgView {
     
     if (_bgView == nil)

+ 1 - 0
HappyJob/HappyJob/Login_登录/信息合并/ViewController/HJLoginInfoMergeViewController.h

@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
 @interface HJLoginInfoMergeViewController : UIViewController
 
 @property (nonatomic, strong) NSMutableArray *userList;
+@property (nonatomic, strong) NSDictionary   *currentUserDict;
 @property (nonatomic, copy)   NSString       *loginType;
 @property (nonatomic, copy)   NSString       *phone;
 

+ 8 - 9
HappyJob/HappyJob/Login_登录/信息合并/ViewController/HJLoginInfoMergeViewController.m

@@ -57,12 +57,14 @@ FBAPIManagerInterceptor
 
 - (BOOL)manager:(FBBaseAPIManager *)manager shouldStartCallAPIWithParams:(NSDictionary *)params {
     
+    self.makeSureBtn.userInteractionEnabled = NO;
     [self.view fb_showLoading];
     return YES;
 }
 
 - (void)managerShouldFinishCallAPI:(FBBaseAPIManager *)manager {
     
+    self.makeSureBtn.userInteractionEnabled = YES;
     [self.view fb_dismiss];
 }
 
@@ -110,8 +112,8 @@ FBAPIManagerInterceptor
         
         HJLoginInfoLookResumeViewController *vc =[[HJLoginInfoLookResumeViewController alloc]init];
         vc.resumeDict = self.userList[indexPath.row];
-        
         [self.navigationController pushViewController:vc animated:YES];
+        
     };
     return cell;
 }
@@ -128,10 +130,8 @@ FBAPIManagerInterceptor
     [_userList setObject:dict atIndexedSubscript:indexPath.row];
     [self.tableView reloadData];
     _makeSureBtn.userInteractionEnabled = YES;
-    [_makeSureBtn az_setGradientBackgroundWithColors:@[COLOR_GRADIENT_START,COLOR_GRADIENT_END]
-                                           locations:@[@(0.0),@(1.0f)]
-                                          startPoint:CGPointMake(0, 0)
-                                            endPoint:CGPointMake(1, 0)];
+    [_makeSureBtn az_setGradientBackgroundWithColors:@[COLOR_GRADIENT_START,COLOR_GRADIENT_END] locations:@[@(0.0),@(1.0f)] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
+    
 }
 - (void)autoLayOutViews {
     
@@ -177,12 +177,14 @@ FBAPIManagerInterceptor
             [idsArray addObject:dict[@"hpUser"][@"id"]];
         }
     }
+    _mergeAPI.currentUser_id = self.currentUserDict[@"id"];
     _mergeAPI.userIds = [idsArray componentsJoinedByString:@","];
     [self.mergeAPI start];
     
 }
 
 #pragma mark - setter and getter
+
 - (HJLoginInfoMergeNaviView *)naviView {
     
     if (_naviView == nil)
@@ -232,10 +234,7 @@ FBAPIManagerInterceptor
         _makeSureBtn.layer.masksToBounds = YES;
         [_makeSureBtn addTarget:self action:@selector(makeSureButtonClick) forControlEvents:UIControlEventTouchUpInside];
         _makeSureBtn.userInteractionEnabled = NO;
-        [_makeSureBtn az_setGradientBackgroundWithColors:@[COLOR_BACKC,COLOR_BACKD]
-                                               locations:@[@(0.0),@(1.0f)]
-                                              startPoint:CGPointMake(0, 0)
-                                                endPoint:CGPointMake(1, 0)];
+        [_makeSureBtn az_setGradientBackgroundWithColors:@[COLOR_BACKC,COLOR_BACKD] locations:@[@(0.0),@(1.0f)] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
     }
     return _makeSureBtn;
 }

+ 1 - 0
HappyJob/HappyJob/Support/HJAppUserType.h

@@ -15,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
 /* 用户类型 yes 企业 0 非企业 */
 @property (nonatomic, copy) NSString *userType;
 @property (nonatomic, copy) NSString *userPhone;
+@property (nonatomic, copy) NSString *login_type;//手机登录默认1
 @property (nonatomic, assign) NSInteger fullTimePop;//发布全职返回的步骤
 
 @property (nonatomic, strong)NSMutableDictionary  *customAttributes;//用户字典

+ 3 - 1
HappyJob/HappyJob/Support/HJAppUserType.m

@@ -52,7 +52,7 @@ HJAppUserType *userTypefile = nil;
     [_customAttributes setObject:_userType forKey:@"userType"];
     [_customAttributes setObject:_userPhone forKey:@"userPhone"];
     [_customAttributes setObject:@(_fullTimePop) forKey:@"fullTimePop"];
-
+    [_customAttributes setObject:_login_type forKey:@"login_type"];
     //把字典中的值写到这个路径下
     return [_customAttributes writeToFile:[HJAppUserType localFilePathName] atomically:YES];
 }
@@ -69,12 +69,14 @@ HJAppUserType *userTypefile = nil;
     self.userType = [_customAttributes stringValueForKey:@"userType"];
     self.userPhone = [_customAttributes stringValueForKey:@"userPhone"];
     self.fullTimePop = [_customAttributes integerValueForKey:@"fullTimePop"];
+    self.login_type = [_customAttributes stringValueForKey:@"login_type"];
     return YES;
 }
 //退出登录
 - (void)loginoutType {
     //本地持久化存储(登陆令牌)
     [_customAttributes setObject:@"0" forKey:@"userType"];
+    [_customAttributes setObject:@"" forKey:@"login_type"];
     [self saveUserType];
 }
 

+ 5 - 6
HappyJob/HappyJob/Support/HJConfig.h

@@ -16,16 +16,15 @@
 //static NSString * const kBuglyAppID = @"d3e4636207";
 //static NSString * const kWeiXinAPIKey = @"wx9c053f7126db0b28";
 //
-//
 //#else
 //
 ///* 正式服接口地址 */
 //static NSString * const kHJBaseURL = @"https://web.hap-job.com/happyjob/f/api/";
 ///* Bugly开放平台AppID,注册地址:https://bugly.qq.com */
 //static NSString * const kBuglyAppID = @"b532795704";
-/* 微信开放平台AppID,注册地址:https://open.weixin.qq.com */
+///* 微信开放平台AppID,注册地址:https:open.weixin.qq.com */
 //static NSString * const kWeiXinAPIKey = @"wxeb8c2418a8ace030";
-
+//
 //#endif
 
 
@@ -34,10 +33,12 @@ static NSString * const kHJBaseURL = @"https://kf.hap-job.com/happyjob/f/api/";
 static NSString * const kBuglyAppID = @"d3e4636207";
 static NSString * const kWeiXinAPIKey = @"wx9c053f7126db0b28";
 
+
 /******** 正式服接口地址 ********/
 //static NSString * const kHJBaseURL = @"https://web.hap-job.com/happyjob/f/api/";
+// /* Bugly开放平台AppID,注册地址:https://bugly.qq.com */
 //static NSString * const kBuglyAppID = @"b532795704";
-/* 微信开放平台AppID,注册地址:https://open.weixin.qq.com */
+///* 微信开放平台AppID,注册地址:https:open.weixin.qq.com */
 //static NSString * const kWeiXinAPIKey = @"wxeb8c2418a8ace030";
 
 
@@ -47,6 +48,4 @@ static NSString * const kGAODEAPIKey = @"ec6c542ecc7faeaac443d9c2a0b74d67";
 
 
 
-
-
 #endif /* HJConfig_h */