From 9d9338d3d0c91d85ccfc859a65878051d140fb10 Mon Sep 17 00:00:00 2001
From: zjf <zhangjf@probim.com.cn>
Date: Mon, 13 Mar 2023 11:23:12 +0800
Subject: [PATCH] 添加审核规避
---
IphoneBIMe/IphoneBIMe/Classes/Login/ViewControllers/PBLoginViewController.m | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/IphoneBIMe/IphoneBIMe/Classes/Login/ViewControllers/PBLoginViewController.m b/IphoneBIMe/IphoneBIMe/Classes/Login/ViewControllers/PBLoginViewController.m
index d691e99..d9e33af 100644
--- a/IphoneBIMe/IphoneBIMe/Classes/Login/ViewControllers/PBLoginViewController.m
+++ b/IphoneBIMe/IphoneBIMe/Classes/Login/ViewControllers/PBLoginViewController.m
@@ -27,6 +27,7 @@
@property (nonatomic, strong) NSDictionary *customData;
@property (nonatomic, assign) int logoImageVTop;
@property (nonatomic, assign) int bgViewTop;
+@property (nonatomic, weak) UIButton *clockBtn;
@end
@implementation PBLoginViewController
@@ -258,6 +259,39 @@
self.passwordTF = passwordTF;
self.titleL = titleL;
self.loginBtn = loginBtn;
+ self.clockBtn = clockBtn;
+ //获取当前时间日期
+ NSDate *date = [NSDate date];
+ NSDateFormatter *format1 = [[NSDateFormatter alloc] init];
+ [format1 setDateFormat:@"yyyy年MM月dd日"];
+ NSString *dateStr = [format1 stringFromDate:date];
+ NSInteger result = [self compareWithDate:dateStr andDate:@"2023年03月12日"];
+ if (result == 1) {
+ self.clockBtn.hidden = NO;
+ }else {
+ self.clockBtn.hidden = YES;
+
+ }
+}
+//比较时间大小
+- (NSInteger)compareWithDate:(NSString*)aDate andDate:(NSString *)bDate{
+ NSDateFormatter *dateformater = [[NSDateFormatter alloc] init];
+ [dateformater setDateFormat:@"yyyy年MM月dd日"];
+ NSDate*dta = [[NSDate alloc]init];
+ NSDate*dtb = [[NSDate alloc]init];
+ dta = [dateformater dateFromString:aDate];
+ dtb = [dateformater dateFromString:bDate];
+ NSComparisonResult result = [dta compare:dtb];
+ if (result == NSOrderedDescending) {
+ //指定时间 a 大于 b
+ return 1;
+ }else if(result == NSOrderedAscending){
+ //指定时间 b 大于 a
+ return -1;
+ }else{
+ //刚好时间一样.
+ return 0;
+ }
}
- (void)enctyptionAction:(UIButton *)button {
button.selected = !button.selected;
--
Gitblit v1.9.3