Преглед на файлове

bug修改,更新提示页面的搭建

15555599100 преди 6 години
родител
ревизия
3c45c66f97
променени са 28 файла, в които са добавени 355 реда и са изтрити 84 реда
  1. 6 0
      HappyWork/HappyWork.xcodeproj/project.pbxproj
  2. BIN
      HappyWork/HappyWork.xcworkspace/xcuserdata/zhangxiaoguang.xcuserdatad/UserInterfaceState.xcuserstate
  3. 23 0
      HappyWork/HappyWork/Assets.xcassets/Common/update_icon.imageset/Contents.json
  4. BIN
      HappyWork/HappyWork/Assets.xcassets/Common/update_icon.imageset/升级.png
  5. BIN
      HappyWork/HappyWork/Assets.xcassets/Common/update_icon.imageset/升级@2x.png
  6. BIN
      HappyWork/HappyWork/Assets.xcassets/Common/update_icon.imageset/升级@3x.png
  7. 3 1
      HappyWork/HappyWork/Base/PageListViewController.m
  8. 2 1
      HappyWork/HappyWork/Class/DemandHall/DemanHall_详情/View/DemanHallDetailHeaderView.m
  9. 12 4
      HappyWork/HappyWork/Class/DemandHall/ViewController/DemanHallViewController.m
  10. 4 3
      HappyWork/HappyWork/Class/DemandHall/ViewModel/DemanHallViewModel.m
  11. 3 1
      HappyWork/HappyWork/Class/DemandHall/Views/View/DemanHallNaviBarView.m
  12. 19 0
      HappyWork/HappyWork/Class/DemandHall/Views/View/HWUpdateView.h
  13. 210 0
      HappyWork/HappyWork/Class/DemandHall/Views/View/HWUpdateView.m
  14. 13 3
      HappyWork/HappyWork/Class/LoginRegister/ViewController/LoginRegisterViewController.m
  15. 3 1
      HappyWork/HappyWork/Class/LoginRegister/ViewController/RegisterAgreementViewController.m
  16. 1 0
      HappyWork/HappyWork/Class/PersonalCenter/我的报名_signup/ViewController/MySignUpViewController.m
  17. 1 1
      HappyWork/HappyWork/Class/PersonalCenter/我的报名_signup/ViewModel/MySignUpViewModel.m
  18. 1 0
      HappyWork/HappyWork/Class/PersonalCenter/我的订单_order/Model/MyOrderModel.h
  19. 21 4
      HappyWork/HappyWork/Class/PersonalCenter/我的订单_order/ViewModel/MyOrderViewModel.m
  20. 1 0
      HappyWork/HappyWork/Class/PersonalCenter/收款记录_record/Model/PaymentRecordModel.h
  21. 1 1
      HappyWork/HappyWork/Class/PersonalCenter/收款记录_record/ViewController/PaymentRecordDetailViewController.m
  22. 3 0
      HappyWork/HappyWork/Class/PersonalCenter/收款记录_record/ViewController/PaymentRecordViewController.m
  23. 1 1
      HappyWork/HappyWork/Class/PersonalCenter/收款记录_record/ViewModel/PaymentRecordViewModel.m
  24. 13 2
      HappyWork/HappyWork/Custom/CustomView/Refresh_上拉下拉刷新/HWRefreshFooterView.m
  25. 12 4
      HappyWork/HappyWork/Custom/FBLayout/FBScrollLayoutView.m
  26. 1 1
      HappyWork/HappyWork/Support/HWAppService.h
  27. 0 56
      HappyWork/HappyWork/Support/HWAppService.m
  28. 1 0
      HappyWork/HappyWork/Support/HappyWork.pch

+ 6 - 0
HappyWork/HappyWork.xcodeproj/project.pbxproj

@@ -95,6 +95,7 @@
 		71382910233A1B09007256F4 /* HWAFHttpTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 7138290F233A1B09007256F4 /* HWAFHttpTool.m */; };
 		71382916233A1E30007256F4 /* HWProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 71382915233A1E30007256F4 /* HWProgressHUD.m */; };
 		713DE88323715A3200E0E5EA /* DemanHallEmptyCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 713DE88223715A3200E0E5EA /* DemanHallEmptyCell.m */; };
+		713E8DB02372662400EE66DC /* HWUpdateView.m in Sources */ = {isa = PBXBuildFile; fileRef = 713E8DAF2372662400EE66DC /* HWUpdateView.m */; };
 		71A3B090234C135E004D73A5 /* MySignUpDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A3B08F234C135E004D73A5 /* MySignUpDetailViewController.m */; };
 		71A3B094234D6CB4004D73A5 /* DemanHallDetailSignUpView.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A3B093234D6CB4004D73A5 /* DemanHallDetailSignUpView.m */; };
 		71A3B097234D94F6004D73A5 /* DemanHallModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A3B096234D94F6004D73A5 /* DemanHallModel.m */; };
@@ -304,6 +305,8 @@
 		71382915233A1E30007256F4 /* HWProgressHUD.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HWProgressHUD.m; sourceTree = "<group>"; };
 		713DE88123715A3200E0E5EA /* DemanHallEmptyCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemanHallEmptyCell.h; sourceTree = "<group>"; };
 		713DE88223715A3200E0E5EA /* DemanHallEmptyCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemanHallEmptyCell.m; sourceTree = "<group>"; };
+		713E8DAE2372662400EE66DC /* HWUpdateView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HWUpdateView.h; sourceTree = "<group>"; };
+		713E8DAF2372662400EE66DC /* HWUpdateView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HWUpdateView.m; sourceTree = "<group>"; };
 		71A3B08E234C135E004D73A5 /* MySignUpDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MySignUpDetailViewController.h; sourceTree = "<group>"; };
 		71A3B08F234C135E004D73A5 /* MySignUpDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MySignUpDetailViewController.m; sourceTree = "<group>"; };
 		71A3B091234D62C9004D73A5 /* HWAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HWAPI.h; sourceTree = "<group>"; };
@@ -591,6 +594,8 @@
 				713828C62338BA63007256F4 /* DemanHallBannerView.m */,
 				712AF713233350E000EBD542 /* DemanHallNaviBarView.h */,
 				712AF714233350E000EBD542 /* DemanHallNaviBarView.m */,
+				713E8DAE2372662400EE66DC /* HWUpdateView.h */,
+				713E8DAF2372662400EE66DC /* HWUpdateView.m */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -1505,6 +1510,7 @@
 				7138290C2339F324007256F4 /* HWAppUserProfile.m in Sources */,
 				712AF6D42333074400EBD542 /* LoginRegisterViewController.m in Sources */,
 				712AF7642334747200EBD542 /* DemanHallDetailPositionView.m in Sources */,
+				713E8DB02372662400EE66DC /* HWUpdateView.m in Sources */,
 				712AF7872334ADC300EBD542 /* UIViewController+HJNavBar.m in Sources */,
 				712AF79A2335AF7700EBD542 /* PaymentRecordCell.m in Sources */,
 				712AF72D2333737100EBD542 /* DemanhallAddressProvinceView.m in Sources */,

BIN
HappyWork/HappyWork.xcworkspace/xcuserdata/zhangxiaoguang.xcuserdatad/UserInterfaceState.xcuserstate


+ 23 - 0
HappyWork/HappyWork/Assets.xcassets/Common/update_icon.imageset/Contents.json

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

BIN
HappyWork/HappyWork/Assets.xcassets/Common/update_icon.imageset/升级.png


BIN
HappyWork/HappyWork/Assets.xcassets/Common/update_icon.imageset/升级@2x.png


BIN
HappyWork/HappyWork/Assets.xcassets/Common/update_icon.imageset/升级@3x.png


+ 3 - 1
HappyWork/HappyWork/Base/PageListViewController.m

@@ -73,7 +73,7 @@
     [self.parametersDict setValue:[HWAppUserProfile sharedInstance].enterpriseId forKey:@"platform_company_id"];
     [self.parametersDict setValue:@(self.currentPage) forKey:@"pageNo"];
     [self.parametersDict setValue:@(10) forKey:@"pageSize"];
-    
+
 }
 
 /* 结束刷新操作 */
@@ -106,10 +106,12 @@
     {
         // 判断数据加载是否到了最后一页,如果是最后一页了就用endRefreshingWithNoMoreData去结束动画效果,
         //这样可以显示MJRefreshStateNoMoreData状态下的提示信息
+        NSLog(@"-----没了-----");
         [self.refreshFooter endRefreshingWithNoMoreData];
     }
     else
     {
+        NSLog(@"-----有-----");
         [self.refreshFooter endRefreshing];
     }
 }

+ 2 - 1
HappyWork/HappyWork/Class/DemandHall/DemanHall_详情/View/DemanHallDetailHeaderView.m

@@ -80,13 +80,14 @@
     }
     
     [self.timeBtn setTitle:model.expiryDate  forState:UIControlStateNormal];
+    
     if (model.number)
     {
         [self.numberBtn setTitle:[NSString stringWithFormat:@"任务数:%@",model.number] forState:UIControlStateNormal];
     }
     else
     {
-        self.numberBtn.hidden = YES;
+        [self.numberBtn setTitle:@"任务数:若干" forState:UIControlStateNormal];
     }
     
     NSMutableAttributedString *countAtt1 = [[NSMutableAttributedString alloc]initWithString:self.moneylabel.text];

+ 12 - 4
HappyWork/HappyWork/Class/DemandHall/ViewController/DemanHallViewController.m

@@ -12,6 +12,7 @@
 #import "PersonalCenterViewController.h"//个人中心
 #import "DemanHallDetailViewController.h"//详情
 #import "DemanHallViewModel.h"
+#import "HWUpdateView.h"
 
 @interface DemanHallViewController ()
 <
@@ -37,6 +38,9 @@ DemanHallMenuFilterViewDelegate
     
     [super viewDidLoad];
     [self dealWithRequestResult];
+//    HWUpdateView *updateView =  [[HWUpdateView alloc]init];
+//    [updateView.doneBtn addTarget:self action:@selector(updateDoneButtonClick:) forControlEvents:UIControlEventTouchUpInside];
+    
 }
 
 #pragma mark – init
@@ -78,15 +82,16 @@ DemanHallMenuFilterViewDelegate
         
         [weakSelf successfulRefreshOperation];
         
-        weakSelf.lastPage = [data[@"data"][@"isLast"] boolValue];
-        
+         weakSelf.lastPage = [data[@"data"][@"isLast"] boolValue];
         if (weakSelf.viewModel.listArray.count == 0)
-        {
+        {//空页面是否显示(没有加载更多了)
             weakSelf.refreshFooter.noText = YES;
+            weakSelf.lastPage = [data[@"data"][@"isLast"] boolValue];
         }
         else
         {
             weakSelf.refreshFooter.noText = NO;
+           
         }
         
     } fail:^(id  _Nonnull data) {
@@ -212,7 +217,10 @@ DemanHallMenuFilterViewDelegate
     PersonalCenterViewController *vc = [[PersonalCenterViewController alloc]init];
     [self.navigationController pushViewController:vc animated:YES];
 }
-
+- (void)updateDoneButtonClick:(UIButton *)btn {
+    
+    
+}
 
 #pragma mark - setter and getter
 

+ 4 - 3
HappyWork/HappyWork/Class/DemandHall/ViewModel/DemanHallViewModel.m

@@ -119,16 +119,17 @@
             
             cell.companyLabel.text = model.companyName;
             cell.titleLabel.text = model.name;
-            cell.timeLabel.text = model.createTime;
+            
+            cell.timeLabel.text = [HWAppService time_timestampToString:[NSString stringWithFormat:@"%ld",(long)[HWAppService timeSwitchTimestamp:model.createTime]] withType:kTimeStampDateOnlyHorizonLine];
             cell.addressView.taglabel.text = model.provinceCityCountry;
+            
             if (model.number)
             {
-                cell.numberView.hidden = NO;
                 cell.numberView.taglabel.text = [NSString stringWithFormat:@"任务数:%@",model.number];
             }
             else
             {
-                cell.numberView.hidden = YES;
+                cell.numberView.taglabel.text = [NSString stringWithFormat:@"任务数:若干"];
             }
             
             if ([model.stage integerValue] == 0)

+ 3 - 1
HappyWork/HappyWork/Class/DemandHall/Views/View/DemanHallNaviBarView.m

@@ -39,8 +39,9 @@
         make.height.mas_equalTo(44);
     }];
     [self.rigthBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.right.equalTo(self.mas_right).offset(-20);
+        make.right.equalTo(self.mas_right).offset(-15);
         make.centerY.equalTo(self.titleLabel);
+        make.size.mas_offset(CGSizeMake(40, 30));
     }];
     [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
         
@@ -50,6 +51,7 @@
         make.height.mas_equalTo(1);
     }];
     
+//    self.rigthBtn.backgroundColor = [UIColor yellowColor];
 }
 
 #pragma mark setter and getter

+ 19 - 0
HappyWork/HappyWork/Class/DemandHall/Views/View/HWUpdateView.h

@@ -0,0 +1,19 @@
+//
+//  HWUpdateView.h
+//  HappyWork
+//
+//  Created by 张晓光 on 2019/11/6.
+//  Copyright © 2019 张晓光. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface HWUpdateView : UIView
+
+@property (nonatomic, strong) UIButton *doneBtn;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 210 - 0
HappyWork/HappyWork/Class/DemandHall/Views/View/HWUpdateView.m

@@ -0,0 +1,210 @@
+//
+//  HWUpdateView.m
+//  HappyWork
+//
+//  Created by 张晓光 on 2019/11/6.
+//  Copyright © 2019 张晓光. All rights reserved.
+//
+
+#import "HWUpdateView.h"
+
+@interface HWUpdateView ()
+
+@property (nonatomic, strong) UIView      *bigView;
+@property (nonatomic, strong) UIImageView *icon;
+@property (nonatomic, strong) UIView      *bgView;
+@property (nonatomic, strong) UILabel *titleLabel;
+@property (nonatomic, strong) UILabel *detailLabel;
+@property (nonatomic, strong) UIView  *liveView;
+@property (nonatomic, strong) UIButton *cancelBtn;
+
+@end
+
+@implementation HWUpdateView
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    
+    if (self = [super initWithFrame:frame])
+    {
+        self.frame = [UIScreen mainScreen].bounds;
+        [[[[UIApplication sharedApplication] delegate] window] addSubview:self];
+        self.backgroundColor = [UIColor colorFromHexString:@"000000" Alpha:0.5];
+        [self initSubViews];
+    }
+    return self;
+}
+
+- (void)initSubViews {
+    
+    [self addSubview:self.bigView];
+    [self.bigView addSubview:self.icon];
+    [self.bigView addSubview:self.bgView];
+    
+    [self.bgView addSubview:self.titleLabel];
+    [self.bgView addSubview:self.detailLabel];
+    [self.bgView addSubview:self.liveView];
+    [self.bgView addSubview:self.cancelBtn];
+    [self.bgView addSubview:self.doneBtn];
+    
+    [self.bigView mas_makeConstraints:^(MASConstraintMaker *make) {
+        
+        make.center.equalTo(self);
+        make.width.mas_equalTo(HJHorizontalScale(335));
+    }];
+    [self.icon mas_makeConstraints:^(MASConstraintMaker *make) {
+        
+        make.left.equalTo(self.bigView).offset(0);
+        make.right.equalTo(self.bigView).offset(0);
+        make.top.equalTo(self.bigView).offset(0);
+        make.height.mas_offset(HJHorizontalScale(161));
+    }];
+    [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(self.bigView).offset(0);
+        make.right.equalTo(self.bigView).offset(0);
+        make.top.equalTo(self.icon.mas_bottom).offset(0);
+        make.bottom.equalTo(self.bigView.mas_bottom).offset(0);
+    }];
+
+    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+
+        make.centerX.equalTo(self.bgView);
+        make.top.equalTo(self.bgView.mas_top).offset(28);
+    }];
+
+    [self.detailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+
+        make.centerX.equalTo(self.bgView);
+        make.top.equalTo(self.titleLabel.mas_bottom).offset(9);
+        make.left.equalTo(self.icon).offset(30);
+        make.right.equalTo(self.icon).offset(-30);
+    }];
+    [self.liveView mas_makeConstraints:^(MASConstraintMaker *make) {
+
+        make.left.equalTo(self.bgView).offset(0);
+        make.right.equalTo(self.bgView).offset(0);
+        make.top.equalTo(self.detailLabel.mas_bottom).offset(70);
+        make.height.mas_equalTo(1);
+    }];
+
+    [self.cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(self.bgView).offset(0);
+        make.bottom.equalTo(self.bgView.mas_bottom).offset(0);
+        make.top.equalTo(self.liveView.mas_bottom).offset(0);
+        make.height.mas_equalTo(55);
+        make.right.equalTo(self.doneBtn.mas_left).offset(0);
+        make.width.equalTo(self.doneBtn.mas_width);
+    }];
+    [self.doneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.equalTo(self.bgView).offset(0);
+        make.bottom.equalTo(self.bgView.mas_bottom).offset(0);
+        make.top.equalTo(self.liveView.mas_bottom).offset(0);
+        make.height.mas_equalTo(55);
+    }];
+    
+    self.detailLabel.text = @"1.修复目前版本的已知bug若干;\n2.修复目前版本的已知bug若干;";
+    
+}
+
+-(void)removeViewFromWindow
+{
+    [UIView animateWithDuration:0.3 animations:^{
+        self.alpha = 0;
+    } completion:^(BOOL finished) {
+        [self removeFromSuperview];
+    }];
+}
+
+#pragma mark - event response
+
+- (void)cancelButtonClick:(UIButton *)btn {
+    
+    [self removeViewFromWindow];
+}
+
+#pragma mark - setter and getter
+
+- (UIView *)bigView {
+    
+    if (_bigView == nil)
+    {
+        _bigView = [[UIView alloc]init];
+        _bigView.layer.cornerRadius = 5;
+        _bigView.layer.masksToBounds = YES;
+    }
+    return _bigView;
+}
+- (UIView *)bgView {
+    
+    if (_bgView == nil)
+    {
+        _bgView = [[UIView alloc]init];
+        _bgView.backgroundColor = COLOR_GRAY_F5;
+    }
+    return _bgView;
+}
+- (UIImageView *)icon {
+    
+    if (_icon == nil)
+    {
+        _icon = [[UIImageView alloc]init];
+        _icon.contentMode = UIViewContentModeScaleAspectFit;
+        _icon.image = [UIImage imageNamed:@"update_icon"];
+    }
+    return _icon;
+}
+- (UILabel *)titleLabel {
+    
+    if (_titleLabel == nil)
+    {
+        _titleLabel = [[UILabel alloc]init];
+        _titleLabel.font = [UIFont boldSystemFontOfSize:19];
+        _titleLabel.textColor = COLOR_BACK_31;
+        _titleLabel.text = @"发现可用的新版本!";
+    }
+    return _titleLabel;
+}
+- (UILabel *)detailLabel {
+    
+    if (_detailLabel == nil)
+    {
+        _detailLabel = [[UILabel alloc]init];
+        _detailLabel.font = [UIFont systemFontOfSize:16];
+        _detailLabel.textColor = COLOR_GRAY_88;
+        _detailLabel.numberOfLines = 0;
+    }
+    return _detailLabel;
+}
+- (UIView *)liveView {
+    
+    if (_liveView == nil)
+    {
+        _liveView = [[UIView alloc]init];
+        _liveView.backgroundColor = COLOR_BACK_CD;
+    }
+    return _liveView;
+}
+- (UIButton *)cancelBtn {
+    
+    if (_cancelBtn == nil)
+    {
+        _cancelBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+        [_cancelBtn setTitle:@"稍后再说" forState:UIControlStateNormal];
+        [_cancelBtn setTitleColor:COLOR_GRAY_88 forState:UIControlStateNormal];
+        _cancelBtn.titleLabel.font = [UIFont systemFontOfSize:17];
+        [_cancelBtn addTarget:self action:@selector(cancelButtonClick:) forControlEvents:UIControlEventTouchUpInside];
+    }
+    return _cancelBtn;
+}
+- (UIButton *)doneBtn {
+    
+    if (_doneBtn == nil)
+    {
+        _doneBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+        [_doneBtn setTitle:@"立刻升级" forState:UIControlStateNormal];
+        [_doneBtn setTitleColor:COLOR_GRAY_F5 forState:UIControlStateNormal];
+        _doneBtn.titleLabel.font = [UIFont boldSystemFontOfSize:17];
+        _doneBtn.backgroundColor = [UIColor colorFromHexString:@"823BFF"];
+    }
+    return _doneBtn;
+}
+@end

+ 13 - 3
HappyWork/HappyWork/Class/LoginRegister/ViewController/LoginRegisterViewController.m

@@ -64,6 +64,11 @@
         [HWProgressHUD fb_showInfoWithStatus:@"请输入手机号码"];
         return;
     }
+    if (self.loginView.phoneView.phoneTF.text.length != 11)
+    {
+        [HWProgressHUD fb_showInfoWithStatus:@"请输入正确手机号码"];
+        return;
+    }
     if (self.loginView.phoneView.codeTF.text.length == 0)
     {
         [HWProgressHUD fb_showInfoWithStatus:@"请输入验证码"];
@@ -115,15 +120,20 @@
         [HWProgressHUD fb_showInfoWithStatus:@"请输入手机号码"];
         return;
     }
-    
+    if (self.loginView.phoneView.phoneTF.text.length != 11)
+    {
+        [HWProgressHUD fb_showInfoWithStatus:@"请输入正确手机号码"];
+        return;
+    }
     codeBtn.userInteractionEnabled = NO;
+    self.second = 60;
+    self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(runTimer) userInfo:self repeats:YES];
     
     [HWAFHttpTool getRequestWithURLStr:get_Code params:@{@"phone":self.loginView.phoneView.phoneTF.text} success:^(NSDictionary *responseDic) {
     
         if ([responseDic[@"errcode"] integerValue] == 0)
         {
-            self.second = 60;
-            self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(runTimer) userInfo:self repeats:YES];
+            
         }
         else
         {

+ 3 - 1
HappyWork/HappyWork/Class/LoginRegister/ViewController/RegisterAgreementViewController.m

@@ -7,10 +7,11 @@
 //
 
 #import "RegisterAgreementViewController.h"
+#import <WebKit/WebKit.h>
 
 @interface RegisterAgreementViewController ()
 
-@property (nonatomic, strong) UIWebView *webView;
+@property (nonatomic, strong) WKWebView *webView;
 
 @end
 
@@ -30,6 +31,7 @@
     [self hj_setupNavBar];
     self.view.backgroundColor = [UIColor whiteColor];
     
+    self.webView = [[WKWebView alloc]init];
     [self.view addSubview:self.webView];
     [self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
        

+ 1 - 0
HappyWork/HappyWork/Class/PersonalCenter/我的报名_signup/ViewController/MySignUpViewController.m

@@ -27,6 +27,7 @@
     self.tableView.delegate = self;
     self.tableView.dataSource = self.viewModel;
     [self dealWithRequestResult];
+    self.blankView.detailLabel.text = @"您目前没有报名需求";
     
 }
 

+ 1 - 1
HappyWork/HappyWork/Class/PersonalCenter/我的报名_signup/ViewModel/MySignUpViewModel.m

@@ -82,7 +82,7 @@
     {
         cell.moneylabel.text = [NSString stringWithFormat:@"%@元*%@期",model.hwRequirement.price,model.hwRequirement.stage];
     }
-    cell.addressView.taglabel.text = model.hwPlatformCompany.provinceCityCountry;
+    cell.addressView.taglabel.text = model.hwRequirement.provinceCityCountry;
     
     NSMutableAttributedString *countAtt1 = [[NSMutableAttributedString alloc]initWithString:cell.moneylabel.text];
        [countAtt1 addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:17] range:NSMakeRange(0, model.hwRequirement.price.length + 1)];

+ 1 - 0
HappyWork/HappyWork/Class/PersonalCenter/我的订单_order/Model/MyOrderModel.h

@@ -33,6 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString *createTime;
 @property (nonatomic, copy) NSString *cardNumber;
 @property (nonatomic, copy) NSString *userId;
+@property (nonatomic, copy) NSString *serviceStage;
 
 @property (nonatomic, strong) DemanHallModel *hwPlatformCompany;
 @property (nonatomic, strong) DemanHallModel *hwRequirement;

+ 21 - 4
HappyWork/HappyWork/Class/PersonalCenter/我的订单_order/ViewModel/MyOrderViewModel.m

@@ -14,6 +14,7 @@
 @interface MyOrderViewModel ()
 
 
+
 @end
 
 @implementation MyOrderViewModel
@@ -78,13 +79,13 @@
     cell.titleLabel.text = model.hwRequirement.name;
     if ([model.hwRequirement.stage integerValue] == 0)
     {
-        cell.moneyLabel.text = [NSString stringWithFormat:@"%@*1次",model.hwRequirement.price];
+        cell.moneyLabel.text = [NSString stringWithFormat:@"%@*1次",model.hwRequirement.price];
     }
     else
     {
-        cell.moneyLabel.text = [NSString stringWithFormat:@"%@*%@期",model.hwRequirement.price,model.hwRequirement.stage];
+        cell.moneyLabel.text = [NSString stringWithFormat:@"%@*%@期",model.hwRequirement.price,model.hwRequirement.stage];
     }
-    cell.addressView.taglabel.text = model.hwPlatformCompany.provinceCityCountry;
+    cell.addressView.taglabel.text = model.hwRequirement.provinceCityCountry;
     
     NSMutableAttributedString *countAtt1 = [[NSMutableAttributedString alloc]initWithString:cell.moneyLabel.text];
           [countAtt1 addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:17] range:NSMakeRange(0, model.hwRequirement.price.length + 1)];
@@ -110,7 +111,15 @@
     }
     if ([model.status integerValue] == 2)
     {
-        cell.stateLabel.text = @"已确认";
+        
+        if (model.serviceStage)
+        {
+            cell.stateLabel.text = [NSString stringWithFormat:@"第%@期服务中",model.serviceStage];
+        }
+        else
+        {
+            cell.stateLabel.text = @"已确认";
+        }
     }
     if ([model.status integerValue] == 3)
     {
@@ -166,6 +175,14 @@
             [HWProgressHUD fb_showSuccessWithStatus:@"确认订单成功"];
             NSMutableDictionary *listDict = [self.listArray[indexPath.row] mutableCopy];
             [listDict setValue:@"2" forKey:@"status"];
+            
+            NSDictionary *dict = self.listArray[indexPath.row];
+            MyOrderModel *model = [MyOrderModel mj_objectWithKeyValues:dict];
+            
+            if ([model.hwRequirement.stage integerValue] > 1)
+            {
+                [listDict setValue:@"1" forKey:@"serviceStage"];
+            }
             [self.listArray setObject:listDict atIndexedSubscript:indexPath.row];
             
             [self.delegate makeSureOrderIndexPath:indexPath andMyOrderViewModel:self];

+ 1 - 0
HappyWork/HappyWork/Class/PersonalCenter/收款记录_record/Model/PaymentRecordModel.h

@@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString *delFlag;
 @property (nonatomic, copy) NSString *ID;
 @property (nonatomic, copy) NSString *payment;
+@property (nonatomic, copy) NSString *netPayment;
 @property (nonatomic, copy) NSString *createBy;
 @property (nonatomic, copy) NSString *updateBy;
 @property (nonatomic, copy) NSString *failureReason;

+ 1 - 1
HappyWork/HappyWork/Class/PersonalCenter/收款记录_record/ViewController/PaymentRecordDetailViewController.m

@@ -160,7 +160,7 @@
     {
         _collectedAmountView = [[PaymentRecordDetailView alloc]init];
         _collectedAmountView.titleLabel.text = @"收款金额";
-        _collectedAmountView.contentLabel.text = [HWAppService thousandSeparatorStringWithNumber:self.model.payment];
+        _collectedAmountView.contentLabel.text = [HWAppService thousandSeparatorStringWithNumber:self.model.netPayment];
     }
     return _collectedAmountView;
 }

+ 3 - 0
HappyWork/HappyWork/Class/PersonalCenter/收款记录_record/ViewController/PaymentRecordViewController.m

@@ -26,6 +26,7 @@
     self.navigationItem.title = @"收款记录";
     [self dealWithRequestResult];
     
+    
 }
 
 #pragma mark – init
@@ -36,6 +37,8 @@
     self.tableView.delegate = self;
     self.tableView.dataSource = self.viewModel;
     self.view.backgroundColor = COLOR_GRAY_F5;
+    self.blankView.detailLabel.text = @"您目前没有收款记录";
+    
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
         
         make.top.equalTo(self.view.mas_top).offset(10);

+ 1 - 1
HappyWork/HappyWork/Class/PersonalCenter/收款记录_record/ViewModel/PaymentRecordViewModel.m

@@ -74,7 +74,7 @@
     
     cell.orderLabel.text = model.orderNumber;
     cell.timeLabel.text = model.updateTime;
-    cell.moneyLabel.text = [NSString stringWithFormat:@"¥%@",[HWAppService thousandSeparatorStringWithNumber:model.payment]];
+    cell.moneyLabel.text = [NSString stringWithFormat:@"¥%@",[HWAppService thousandSeparatorStringWithNumber:model.netPayment]];
     cell.taxLabel.text = [NSString stringWithFormat:@"已扣税额:¥%@",[HWAppService thousandSeparatorStringWithNumber:model.taxFee]];
     return cell;
 }

+ 13 - 2
HappyWork/HappyWork/Custom/CustomView/Refresh_上拉下拉刷新/HWRefreshFooterView.m

@@ -14,7 +14,7 @@
     
     if (self = [super initWithFrame:frame])
     {
-        self.stateLabel.textColor = [UIColor colorFromHexString:@"CDCFD3"];//CDCFD3
+        self.stateLabel.textColor = [UIColor colorFromHexString:@"CDCFD3"];
         self.stateLabel.font = [UIFont systemFontOfSize:14];
     }
     return self;
@@ -22,23 +22,34 @@
 - (void)setState:(MJRefreshState)state {
     
 //    MJRefreshCheckState;
+
+    [super setState:state];
     
     switch (state) {
+            
         case MJRefreshStateIdle:
+        {
             self.stateLabel.text = nil;
             break;
+        }
         case MJRefreshStatePulling:
+        {
             self.stateLabel.text = @"松开立即加載更多";
             break;
+        }
         case MJRefreshStateRefreshing:
+        {
             self.stateLabel.text = @"数据加载中...";
             break;
+        }
         case MJRefreshStateNoMoreData:
         {
-//            NSLog(@":::::::::::%d",self.noText);
             // 第一次加载的时候没有数据,不显示更多文体提示
+//            NSLog(@"-------------");
             self.stateLabel.text = (self.scrollView.mj_totalDataCount > 0) ? (self.noText ? @"":@"没有更多了") : nil;
+            break;
         }
+            
         default:
             break;
     }

+ 12 - 4
HappyWork/HappyWork/Custom/FBLayout/FBScrollLayoutView.m

@@ -88,7 +88,9 @@
 #pragma mark - getters and setters
 
 - (UIView *)headerView {
-    if (_headerView == nil) {
+    
+    if (_headerView == nil)
+    {
         _headerView = [[UIView alloc] init];
         _headerView.backgroundColor = [UIColor whiteColor];
     }
@@ -96,7 +98,9 @@
 }
 
 - (UIView *)contentView {
-    if (_contentView == nil) {
+    
+    if (_contentView == nil)
+    {
         _contentView = [[UIView alloc] init];
         _contentView.backgroundColor = [UIColor whiteColor];
     }
@@ -104,7 +108,9 @@
 }
 
 - (UIView *)footerView {
-    if (_footerView == nil) {
+    
+    if (_footerView == nil)
+    {
         _footerView = [[UIView alloc] init];
         _footerView.backgroundColor = [UIColor whiteColor];
     }
@@ -112,7 +118,9 @@
 }
 
 - (UIScrollView *)scrollView {
-    if (_scrollView == nil) {
+    
+    if (_scrollView == nil)
+    {
         _scrollView = [[UIScrollView alloc] init];
     }
     return _scrollView;

+ 1 - 1
HappyWork/HappyWork/Support/HWAppService.h

@@ -26,7 +26,7 @@ typedef enum _TimeStampType {
 @interface HWAppService : NSObject
 
 /* 时间 */
-+ (NSString *)compareCurrentTime:(NSString *)str;
+//+ (NSString *)compareCurrentTime:(NSString *)str;
 
 /* 时间 */
 + (NSString *)compareCurrentDayTime:(NSString *)str;

+ 0 - 56
HappyWork/HappyWork/Support/HWAppService.m

@@ -10,62 +10,6 @@
 
 @implementation HWAppService
 
-/** 返回更新时间 */
-+ (NSString *)compareCurrentTime:(NSString *)str {
-    
-    // 获取当前时时间戳 1466386762.345715 十位整数 6位小数
-    NSTimeInterval currentTime = [[NSDate date] timeIntervalSince1970];
-    // 创建歌曲时间戳(后台返回的时间 一般是13位数字)
-    long long oldtime = [str longLongValue];
-    NSTimeInterval createTime = oldtime/1000;
-    // 时间差
-    NSTimeInterval time = currentTime - createTime;
-    //秒
-    NSInteger seconds = time / 1;
-    if (seconds == 0)
-    {
-        return @"刚刚";
-    }
-    if (seconds < 60)
-    {
-        return [NSString stringWithFormat:@"%ld%@",(long)seconds,@"秒前"];
-    }
-    //秒转分
-    NSInteger minutes = time / 60;
-    if (minutes < 60)
-    {
-        return [NSString stringWithFormat:@"%ld%@",(long)minutes,@"分前"];
-    }
-    // 秒转小时
-    NSInteger hours = time/3600;
-    
-    if (hours<24)
-    {
-        return [NSString stringWithFormat:@"%ld%@",(long)hours,@"小时前"];
-    }
-    //秒转天数
-    NSInteger days = time/3600/24;
-    if (days < 30)
-    {
-        if (days == 1)
-        {
-            return @"昨天";
-        }
-        else
-        {
-            return [NSString stringWithFormat:@"%ld%@",(long)days,@"天前"];
-        }
-    }
-    //秒转月
-    NSInteger months = time/3600/24/30;
-    if (months < 12)
-    {
-        return [NSString stringWithFormat:@"%ld%@",(long)months,@"月前"];
-    }
-    //秒转年
-    NSInteger years = time/3600/24/30/12;
-    return [NSString stringWithFormat:@"%ld%@",(long)years,@"年前"];
-}
 /* 时间 */
 + (NSString *)compareCurrentDayTime:(NSString *)str {
     

+ 1 - 0
HappyWork/HappyWork/Support/HappyWork.pch

@@ -69,6 +69,7 @@ self.navigationItem.backBarButtonItem = barItem;
 
 #define COLOR_BACK_C     [UIColor colorFromHexString:@"CCCCCC"]
 
+#define COLOR_BACK_CD    [UIColor colorFromHexString:@"CDCFD3"]
 
 /*
  *改变头像刷新