mortimer 6 years ago
parent
commit
5c2cc34e1c
25 changed files with 771 additions and 37 deletions
  1. 39 1
      KXCardHelp.xcodeproj/project.pbxproj
  2. BIN
      KXCardHelp.xcworkspace/xcuserdata/mortimer.xcuserdatad/UserInterfaceState.xcuserstate
  3. 33 1
      KXCardHelp.xcworkspace/xcuserdata/mortimer.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 4 4
      KXCardHelp/AppDelegate/HFile/LVKBDefineHeader.h
  5. 4 4
      KXCardHelp/Base/Tab/LVKBBaseTabBarViewController.m
  6. BIN
      KXCardHelp/GS/NewCard/Model/.DS_Store
  7. 17 0
      KXCardHelp/GS/NewCard/Model/NewHomeModel.h
  8. 13 0
      KXCardHelp/GS/NewCard/Model/NewHomeModel.m
  9. 19 0
      KXCardHelp/GS/NewCard/VC/ORCHMoneyRecord2ChildViewController.h
  10. 257 0
      KXCardHelp/GS/NewCard/VC/ORCHMoneyRecord2ChildViewController.m
  11. 27 0
      KXCardHelp/GS/NewCard/View/NewHomeTableViewCell.h
  12. 117 0
      KXCardHelp/GS/NewCard/View/NewHomeTableViewCell.m
  13. 108 0
      KXCardHelp/GS/NewCard/View/NewHomeTableViewCell.xib
  14. 0 1
      KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.m
  15. 1 5
      KXCardHelp/GS/NewHome/View/LVKBAddAlarmClockView.m
  16. 1 1
      KXCardHelp/GS/NewHome/View/LVKBNewHomeTableViewCell.m
  17. 37 10
      KXCardHelp/GS/NewHome/cardManage/LVKBCardManageViewController.m
  18. 3 2
      KXCardHelp/GS/NewHome/cardManage/View/LVKBAddCardManageView.h
  19. 46 1
      KXCardHelp/GS/NewHome/cardManage/View/LVKBAddCardManageView.m
  20. 14 1
      KXCardHelp/GS/NewHome/cardManage/View/LVKBAddCardManageView.xib
  21. 1 1
      KXCardHelp/GS/NewHome/cardManage/View/LVKBCardManageTableViewCell.h
  22. 22 0
      KXCardHelp/GS/NewHome/cardManage/View/LVKBCardManageTableViewCell.m
  23. 3 0
      KXCardHelp/GS/NewHome/cardManage/View/LVKBCardManageTableViewCell.xib
  24. 3 3
      KXCardHelp/GS/PickerView/PickerView.m
  25. 2 2
      KXCardHelp/Info.plist

File diff suppressed because it is too large
+ 39 - 1
KXCardHelp.xcodeproj/project.pbxproj


BIN
KXCardHelp.xcworkspace/xcuserdata/mortimer.xcuserdatad/UserInterfaceState.xcuserstate


+ 33 - 1
KXCardHelp.xcworkspace/xcuserdata/mortimer.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -20,7 +20,7 @@
20 20
             ignoreCount = "0"
21 21
             continueAfterRunningActions = "No"
22 22
             filePath = "KXCardHelp/AppDelegate/AppDelegate.m"
23
-            timestampString = "559217807.052886"
23
+            timestampString = "559218951.484901"
24 24
             startingColumnNumber = "9223372036854775807"
25 25
             endingColumnNumber = "9223372036854775807"
26 26
             startingLineNumber = "217"
@@ -61,5 +61,37 @@
61 61
             landmarkType = "7">
62 62
          </BreakpointContent>
63 63
       </BreakpointProxy>
64
+      <BreakpointProxy
65
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
66
+         <BreakpointContent
67
+            shouldBeEnabled = "Yes"
68
+            ignoreCount = "0"
69
+            continueAfterRunningActions = "No"
70
+            filePath = "KXCardHelp/GS/NewHome/View/LVKBNewHomeTableViewCell.m"
71
+            timestampString = "559226861.157945"
72
+            startingColumnNumber = "9223372036854775807"
73
+            endingColumnNumber = "9223372036854775807"
74
+            startingLineNumber = "40"
75
+            endingLineNumber = "40"
76
+            landmarkName = "-setModel:"
77
+            landmarkType = "7">
78
+         </BreakpointContent>
79
+      </BreakpointProxy>
80
+      <BreakpointProxy
81
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
82
+         <BreakpointContent
83
+            shouldBeEnabled = "Yes"
84
+            ignoreCount = "0"
85
+            continueAfterRunningActions = "No"
86
+            filePath = "KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.m"
87
+            timestampString = "559226861.158047"
88
+            startingColumnNumber = "9223372036854775807"
89
+            endingColumnNumber = "9223372036854775807"
90
+            startingLineNumber = "263"
91
+            endingLineNumber = "263"
92
+            landmarkName = "-alarmView"
93
+            landmarkType = "7">
94
+         </BreakpointContent>
95
+      </BreakpointProxy>
64 96
    </Breakpoints>
65 97
 </Bucket>

+ 4 - 4
KXCardHelp/AppDelegate/HFile/LVKBDefineHeader.h

@@ -36,16 +36,16 @@
36 36
 #define KXAlertTextDate @"KXAlertTextDate"
37 37
 
38 38
 //渠道号
39
-#define CHCHANNEL_ID        @"2004"//--
39
+#define CHCHANNEL_ID        @"2004"//
40 40
 #define HomeAdvID           @"17"//弹窗
41 41
 #define AppdelegateAdvID    @"18"//启动图
42 42
 
43 43
 #define CHTOKEN @"CHTOKEN"
44 44
 #define CHNinePWD @"CHNinePWD"
45 45
 //字符串宏
46
-#define  UMAPP_KEY  @"5b7e1f9fb27b0a6573000010"//--
47
-#define  BUGLY_ID   @"2b8be66cb7"//--
48
-#define APPLE_APP_ID @"1433874143"//--
46
+#define  UMAPP_KEY  @"5ba4d8cdf1f5567c8b0000a8"//--
47
+#define  BUGLY_ID   @"25f8302580"
48
+#define APPLE_APP_ID @"1436926057"//--
49 49
 #define BAIDU_APP_ID @"RmyUkQQ5zGPztDATQAcb8LRB"//--
50 50
 #define BAIDU_SECRET @"v05kUTuG3gwvXKdgLoXTbMl7RCgOWz0b"//--
51 51
 //公钥

+ 4 - 4
KXCardHelp/Base/Tab/LVKBBaseTabBarViewController.m

@@ -7,7 +7,7 @@
7 7
 //
8 8
 
9 9
 #import "LVKBBaseTabBarViewController.h"
10
-
10
+#import "ORCHMoneyRecord2ChildViewController.h"
11 11
 @interface LVKBBaseTabBarViewController ()
12 12
 @property(nonatomic)BOOL initViewFlag;//已经初始化了视图
13 13
 @end
@@ -127,11 +127,11 @@
127 127
     //提醒表
128 128
     [[YDFMDB sharedInstance] createTableName:@"notiTable" fieldNamesDictionaryArray:@[@{@"name":@"notiStr",@"type":@"text"},@{@"name":@"day",@"type":@"text"},@{@"name":@"hour",@"type":@"text"},@{@"name":@"min",@"type":@"text"},@{@"name":@"isOpen",@"type":@"text"}]];
129 129
     //还款记录表
130
-    [[YDFMDB sharedInstance] createTableName:@"repayRecordTable" fieldNamesDictionaryArray:@[@{@"name":@"month",@"type":@"text"},@{@"name":@"day",@"type":@"text"},@{@"name":@"title",@"type":@"text"},@{@"name":@"detail",@"type":@"text"},@{@"name":@"showLine",@"type":@"text"}]];
130
+    [[YDFMDB sharedInstance] createTableName:@"repayRecordTable" fieldNamesDictionaryArray:@[@{@"name":@"month",@"type":@"text"},@{@"name":@"day",@"type":@"text"},@{@"name":@"noOverRePay",@"type":@"text"}]];
131 131
     //银行卡表
132
-     [[YDFMDB sharedInstance] createTableName:@"cardsTable" fieldNamesDictionaryArray:@[@{@"name":@"bankName",@"type":@"text"},@{@"name":@"cardNo",@"type":@"text"},@{@"name":@"user",@"type":@"text"},@{@"name":@"cardType",@"type":@"text"}]];
132
+     [[YDFMDB sharedInstance] createTableName:@"homeTable" fieldNamesDictionaryArray:@[@{@"name":@"cardBankName",@"type":@"text"},@{@"name":@"cardCode",@"type":@"text"},@{@"name":@"dayStr",@"type":@"text"}]];
133 133
     LVKBBaseNavViewController *newHome=[self navigationControllerWithViewController:[[LVKBNewHomeViewController alloc]init] title:@"首页" imageName:@"tab_home"];
134
-    LVKBBaseNavViewController *newCard=[self navigationControllerWithViewController:[[LVKBNewCardViewController alloc]init] title:@"添加卡" imageName:@"tab_handleCard"];
134
+    LVKBBaseNavViewController *newCard=[self navigationControllerWithViewController:[[ORCHMoneyRecord2ChildViewController alloc]init] title:@"添加卡" imageName:@"tab_handleCard"];
135 135
 //    LVKBNewCardViewController
136 136
     LVKBBaseNavViewController *person=[self navigationControllerWithViewController:[[LVKBPersonViewController alloc]init] title:@"个人" imageName:@"tab_person"];
137 137
     self.viewControllers=@[newHome,newCard,person];

BIN
KXCardHelp/GS/NewCard/Model/.DS_Store


+ 17 - 0
KXCardHelp/GS/NewCard/Model/NewHomeModel.h

@@ -0,0 +1,17 @@
1
+//
2
+//  NewHomeModel.h
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/8/22.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+@interface NewHomeModel : NSObject
12
+@property(nonatomic,copy)NSString *cardBankName;
13
+
14
+@property(nonatomic,copy)NSString *cardCode;
15
+
16
+@property(nonatomic,copy)NSString *dayStr;
17
+@end

+ 13 - 0
KXCardHelp/GS/NewCard/Model/NewHomeModel.m

@@ -0,0 +1,13 @@
1
+//
2
+//  NewHomeModel.m
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/8/22.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import "NewHomeModel.h"
10
+
11
+@implementation NewHomeModel
12
+
13
+@end

+ 19 - 0
KXCardHelp/GS/NewCard/VC/ORCHMoneyRecord2ChildViewController.h

@@ -0,0 +1,19 @@
1
+//
2
+//  ORCHMoneyRecord2ChildViewController.h
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/9/7.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import "LVKBBaseViewController.h"
10
+typedef NS_ENUM(NSUInteger, ChildType) {
11
+    /** 银行卡 */
12
+    ChildTypeCard,
13
+    /** 记账 */
14
+    ChildTypeBill,
15
+};
16
+
17
+@interface ORCHMoneyRecord2ChildViewController : LVKBBaseViewController
18
+@property(nonatomic,strong)NSMutableArray *dataArray;
19
+@end

+ 257 - 0
KXCardHelp/GS/NewCard/VC/ORCHMoneyRecord2ChildViewController.m

@@ -0,0 +1,257 @@
1
+//
2
+//  ORCHMoneyRecord2ChildViewController.m
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/9/7.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import "ORCHMoneyRecord2ChildViewController.h"
10
+#import "NewHomeModel.h"
11
+@interface ORCHMoneyRecord2ChildViewController ()
12
+<
13
+UITableViewDelegate,
14
+UITableViewDataSource,
15
+UITextFieldDelegate
16
+>
17
+@property(nonatomic,strong)UIButton    *addBtn;
18
+
19
+
20
+@property(nonatomic,strong)UITableView *tableView;
21
+@end
22
+
23
+@implementation ORCHMoneyRecord2ChildViewController
24
+
25
+- (void)viewDidLoad {
26
+    [super viewDidLoad];
27
+    [self.navigationBar setNavTitle:@"信用卡管理"];
28
+    self.navigationBar.showNavigationBarBottomLine=YES;
29
+    [self initUI];
30
+    [self adjustUI];
31
+}
32
+
33
+-(void)viewWillAppear:(BOOL)animated{
34
+    [super viewWillAppear:animated];
35
+    NSArray *arr=[[YDFMDB sharedInstance]selectDataByConditionString:nil withSelectStringArray:@[@"cardBankName",@"cardCode",@"dayStr"] withTableName:@"homeTable" limit:-1 descID:YES];
36
+    [self.dataArray removeAllObjects];
37
+    for (NSDictionary *dic in arr) {
38
+        NSLog(@"dic--%@",dic);
39
+        NewHomeModel *model=[[NewHomeModel alloc]init];
40
+        model.cardBankName=dic[@"cardBankName"];
41
+        model.cardCode=dic[@"cardCode"];
42
+        model.dayStr=dic[@"dayStr"];
43
+        [self.dataArray addObject:model];
44
+    }
45
+    [self.tableView reloadData];
46
+}
47
+
48
+-(void)initUI{
49
+    
50
+    [self.view addSubview:self.addBtn];
51
+    [self.view addSubview:self.tableView];
52
+}
53
+
54
+-(void)setChildType:(ChildType)childType{
55
+    self.addBtn.hidden=NO;
56
+    
57
+}
58
+
59
+-(void)adjustUI{
60
+    [self.addBtn mas_makeConstraints:^(MASConstraintMaker *make) {
61
+        make.left.mas_equalTo(FITSIZE(12));
62
+        make.right.mas_equalTo((-FITSIZE(12)));
63
+        make.top.mas_equalTo(10+NavBarHeight);
64
+        make.height.mas_equalTo(44);
65
+    }];
66
+    
67
+    UIButton *btn=[self.addBtn viewWithTag:10001];
68
+    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
69
+        make.centerY.equalTo(self.addBtn.mas_centerY);
70
+        make.width.height.mas_equalTo(self.addBtn.mas_height);
71
+        make.right.mas_equalTo(0);
72
+    }];
73
+}
74
+
75
+
76
+
77
+
78
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
79
+    NSInteger sum=self.dataArray.count<1?1:self.dataArray.count;
80
+    return sum;
81
+}
82
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
83
+    UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"NewHomeTableViewCell"];
84
+    cell.contentView.backgroundColor=self.view.backgroundColor;
85
+    if (self.dataArray.count>indexPath.row) {
86
+        @try{
87
+            [cell setValue:self.dataArray[indexPath.row] forKey:@"model"];
88
+        }@catch(NSException *e){
89
+        };
90
+    }
91
+    
92
+    return cell;
93
+}
94
+
95
+-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
96
+    return 120;
97
+}
98
+
99
+
100
+#pragma mark -代理   UITextFieldDelegate
101
+- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
102
+    
103
+    if ([@"" isEqualToString:string]) {
104
+        return YES;
105
+    }
106
+    if ([@"0123456789" rangeOfString:string].location!= NSNotFound) {
107
+        return YES;
108
+    }
109
+    if ([@"." isEqualToString:string]) {
110
+        if ([textField.text rangeOfString:@"."].location==NSNotFound) {
111
+            return YES;
112
+        }
113
+    }
114
+    return NO;
115
+}
116
+
117
+
118
+
119
+#pragma mark -懒加载
120
+-(UIButton *)addBtn{
121
+    if (!_addBtn) {
122
+        _addBtn=[UIButton buttonWithType:UIButtonTypeCustom];
123
+        _addBtn.layer.cornerRadius=8;
124
+        _addBtn.layer.masksToBounds=YES;
125
+        _addBtn.backgroundColor=[UIColor whiteColor];
126
+//        _addBtn.layer.borderWidth=1;
127
+//        _addBtn.layer.borderColor=[UIColor baseColor].CGColor;
128
+        _addBtn.titleLabel.font=[UIFont systemFontOfSize:15];
129
+        [_addBtn setTitle:@"+添加信用卡还款记录" forState:UIControlStateNormal];
130
+        [_addBtn setTitleColor:[UIColor baseColor] forState:UIControlStateNormal];
131
+        WeakSelf(weakSelf)
132
+        [[_addBtn rac_signalForControlEvents:UIControlEventTouchUpInside]subscribeNext:^(id x) {
133
+            [weakSelf showBankCard:@"" bank:@"" weakSelf:weakSelf];
134
+        }];
135
+        UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom];
136
+        btn.tag=10001;
137
+        [btn setImage:[UIImage imageNamed:@"camera_orange"] forState:UIControlStateNormal];
138
+        [[btn rac_signalForControlEvents:UIControlEventTouchUpInside]subscribeNext:^(id x) {
139
+            [self  bankCardOCROnline];
140
+        }];
141
+        btn.backgroundColor=[UIColor clearColor];
142
+        [_addBtn addSubview:btn];
143
+    }
144
+    return _addBtn;
145
+}
146
+
147
+
148
+-(void)showBankCard:(NSString *)bankCard bank:(NSString *)bank  weakSelf:(ORCHMoneyRecord2ChildViewController *)weakSelf{
149
+    NSLog(@"+添加信用卡还款记录");
150
+    UIAlertController *addAlertVC = [UIAlertController alertControllerWithTitle:@"添加信用卡" message:@"" preferredStyle:UIAlertControllerStyleAlert];
151
+    [addAlertVC addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
152
+        textField.placeholder = @"请输入信用卡所属银行";
153
+        textField.text=bank;
154
+    }];
155
+    [addAlertVC addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
156
+        textField.placeholder = @"请输入卡号";
157
+        textField.delegate=weakSelf;
158
+        textField.text=bankCard;
159
+        textField.keyboardType=UIKeyboardTypeDecimalPad;
160
+    }];
161
+    [addAlertVC addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
162
+        textField.placeholder = @"请输入还款日(0~28)";
163
+        textField.keyboardType=UIKeyboardTypeNumberPad;
164
+    }];
165
+    
166
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
167
+    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
168
+        NSString *cardBank=addAlertVC.textFields.firstObject.text;
169
+        NSString *cardCode=addAlertVC.textFields[1].text;
170
+        NSString *day=addAlertVC.textFields[2].text;
171
+        NSInteger dayInt=[day integerValue];
172
+        if (cardBank.length==0) {
173
+            [weakSelf homeShowMessage:@"您没有输入银行"];
174
+        }else if(cardCode.length<4){
175
+            [weakSelf homeShowMessage:@"卡号必须大于4位"];
176
+        }else if (dayInt<0||dayInt>28) {
177
+            [weakSelf homeShowMessage:@"还款日只能是数字,并且介于0~28之间"];
178
+        }else{
179
+            [weakSelf homeShowMessage:@"添加完成"];
180
+            NewHomeModel *model=[[NewHomeModel alloc]init];
181
+            model.cardBankName=cardBank;
182
+            model.cardCode=cardCode;
183
+            model.dayStr=[@(dayInt) stringValue];
184
+            [[YDFMDB sharedInstance]addSingleDataStringDictionary:@{@"cardBankName":model.cardBankName,@"cardCode":model.cardCode,@"dayStr":model.dayStr} withTableName:@"homeTable"];
185
+            [weakSelf.dataArray insertObject:model atIndex:0];
186
+            [weakSelf.tableView reloadData];
187
+        }
188
+        
189
+    }];
190
+    //添加 取消事件 到 弹窗界面
191
+    [addAlertVC addAction:cancelAction];
192
+    [addAlertVC addAction:okAction];
193
+    [weakSelf.navigationController presentViewController:addAlertVC animated:NO completion:nil];
194
+}
195
+
196
+
197
+#pragma mark -百度ocr
198
+- (void)bankCardOCROnline{
199
+    if(![PublicFunction isCanUseCamera]){
200
+        [self showMessage:@"没有相机权限,请前往设置开启"];
201
+        return;
202
+    }
203
+    WeakSelf(weakSelf)
204
+    UIViewController * vc =
205
+    [AipCaptureCardVC ViewControllerWithCardType:CardTypeBankCard andImageHandler:^(UIImage *image) {
206
+        [self dismissViewControllerAnimated:YES completion:nil];
207
+        [[AipOcrService shardService] detectBankCardFromImage:image successHandler:^(id result) {
208
+            if ([NSThread currentThread]!=[NSThread mainThread]) {
209
+                dispatch_sync(dispatch_get_main_queue(), ^{
210
+                    if (result[@"result"]) {
211
+                        if (result[@"result"][@"bank_name"]&&result[@"result"][@"bank_card_number"]) {
212
+                            //银行名称
213
+                            [weakSelf showBankCard:result[@"result"][@"bank_card_number"] bank:result[@"result"][@"bank_name"] weakSelf:weakSelf];
214
+                        }
215
+                    }
216
+                    
217
+                });
218
+            }else{
219
+                if (result[@"result"]) {
220
+                    if (result[@"result"][@"bank_name"]&&result[@"result"][@"bank_card_number"]) {
221
+                        //银行名称
222
+                        [weakSelf showBankCard:result[@"result"][@"bank_card_number"] bank:result[@"result"][@"bank_name"] weakSelf:weakSelf];
223
+                    }
224
+                }
225
+            }
226
+        } failHandler:^(NSError *err) {
227
+            [self showMessage:@"识别失败"];
228
+        }];
229
+    }];
230
+    [self presentViewController:vc animated:YES completion:nil];
231
+    
232
+}
233
+
234
+
235
+-(void)homeShowMessage:(NSString *)msg{
236
+    [MBProgressHUD showMessage:msg toView:self.view];
237
+}
238
+
239
+-(UITableView *)tableView{
240
+    if (!_tableView) {
241
+        _tableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 64+NavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT-safeBottomHeight-NavBarHeight-64-50-NavBarHeight)];
242
+        _tableView.delegate=self;
243
+        _tableView.dataSource=self;
244
+        _tableView.backgroundColor=[UIColor CHColorWithHex:0xF6F7F9];
245
+        [_tableView registerNib:[UINib nibWithNibName:@"NewHomeTableViewCell" bundle:nil] forCellReuseIdentifier:@"NewHomeTableViewCell"];
246
+        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
247
+    }
248
+    return _tableView;
249
+}
250
+
251
+-(NSMutableArray *)dataArray{
252
+    if (!_dataArray) {
253
+        _dataArray=[NSMutableArray array];
254
+    }
255
+    return _dataArray;
256
+}
257
+@end

+ 27 - 0
KXCardHelp/GS/NewCard/View/NewHomeTableViewCell.h

@@ -0,0 +1,27 @@
1
+//
2
+//  NewHomeTableViewCell.h
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/8/21.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import <UIKit/UIKit.h>
10
+#import "NewHomeModel.h"
11
+@interface NewHomeTableViewCell : UITableViewCell
12
+@property(nonatomic,strong)NewHomeModel *model;
13
+
14
+@property (weak, nonatomic) IBOutlet UIButton *showExample;
15
+@property UIViewController *a5wLDkgF;
16
+@property UIMotionEffect *aUsLhMF;
17
+@property UIBarButtonItem *aOua1HN;
18
+@property UIMenuItem *aYhp9co32W;
19
+@property UIButton *aUAErZJS;
20
+@property UIInputView *aOdEGN;
21
+@property UIView *aeaEBrbqxoi;
22
+@property UIRegion *alO9Bkd;
23
+@property UIAlertView *aRse3H;
24
+@property UIActivity *afIYtvs;
25
+@property UIAlertAction *a8bW6L1;
26
+@property UIAlertAction *a9GUhW3L2nC;
27
+@end

File diff suppressed because it is too large
+ 117 - 0
KXCardHelp/GS/NewCard/View/NewHomeTableViewCell.m


+ 108 - 0
KXCardHelp/GS/NewCard/View/NewHomeTableViewCell.xib

@@ -0,0 +1,108 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
3
+    <device id="retina4_7" orientation="portrait">
4
+        <adaptation id="fullscreen"/>
5
+    </device>
6
+    <dependencies>
7
+        <deployment identifier="iOS"/>
8
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
9
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10
+    </dependencies>
11
+    <objects>
12
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
13
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
14
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="NewHomeTableViewCell">
15
+            <rect key="frame" x="0.0" y="0.0" width="320" height="120"/>
16
+            <autoresizingMask key="autoresizingMask"/>
17
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
18
+                <rect key="frame" x="0.0" y="0.0" width="320" height="119.5"/>
19
+                <autoresizingMask key="autoresizingMask"/>
20
+                <subviews>
21
+                    <view contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I0z-2m-fVJ">
22
+                        <rect key="frame" x="14" y="0.0" width="292" height="101.5"/>
23
+                        <subviews>
24
+                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="d80-c3-Phh">
25
+                                <rect key="frame" x="0.0" y="0.0" width="292" height="35"/>
26
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
27
+                                <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
28
+                                <constraints>
29
+                                    <constraint firstAttribute="height" constant="35" id="oBK-7z-D9S"/>
30
+                                </constraints>
31
+                            </imageView>
32
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="中国银行信用卡 尾号1234" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="31L-8S-pXI">
33
+                                <rect key="frame" x="12" y="9.5" width="164.5" height="17"/>
34
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
35
+                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
36
+                                <nil key="highlightedColor"/>
37
+                            </label>
38
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="20天" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ayk-n1-7qt">
39
+                                <rect key="frame" x="123.5" y="51" width="45" height="24"/>
40
+                                <fontDescription key="fontDescription" type="system" pointSize="20"/>
41
+                                <nil key="highlightedColor"/>
42
+                            </label>
43
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="今日消费距离还款日" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qzw-p4-W12">
44
+                                <rect key="frame" x="91" y="77" width="110.5" height="14.5"/>
45
+                                <fontDescription key="fontDescription" type="system" pointSize="12"/>
46
+                                <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
47
+                                <nil key="highlightedColor"/>
48
+                            </label>
49
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eob-dZ-Qzd">
50
+                                <rect key="frame" x="234" y="8.5" width="46" height="18"/>
51
+                                <color key="backgroundColor" red="1" green="0.86274509803921573" blue="0.47058823529411764" alpha="1" colorSpace="calibratedRGB"/>
52
+                                <constraints>
53
+                                    <constraint firstAttribute="height" constant="18" id="cus-Vn-0fM"/>
54
+                                    <constraint firstAttribute="width" constant="46" id="z6l-Cf-TRa"/>
55
+                                </constraints>
56
+                                <fontDescription key="fontDescription" type="system" pointSize="11"/>
57
+                                <state key="normal" title="示例卡">
58
+                                    <color key="titleColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="calibratedRGB"/>
59
+                                </state>
60
+                                <userDefinedRuntimeAttributes>
61
+                                    <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
62
+                                        <integer key="value" value="8"/>
63
+                                    </userDefinedRuntimeAttribute>
64
+                                    <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
65
+                                </userDefinedRuntimeAttributes>
66
+                            </button>
67
+                        </subviews>
68
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
69
+                        <constraints>
70
+                            <constraint firstItem="qzw-p4-W12" firstAttribute="top" secondItem="Ayk-n1-7qt" secondAttribute="bottom" constant="2" id="5Hi-bD-Flj"/>
71
+                            <constraint firstItem="d80-c3-Phh" firstAttribute="top" secondItem="I0z-2m-fVJ" secondAttribute="top" id="62T-iK-fe6"/>
72
+                            <constraint firstItem="qzw-p4-W12" firstAttribute="centerX" secondItem="I0z-2m-fVJ" secondAttribute="centerX" id="Ak3-S9-J24"/>
73
+                            <constraint firstItem="eob-dZ-Qzd" firstAttribute="centerY" secondItem="d80-c3-Phh" secondAttribute="centerY" id="BV0-if-rPH"/>
74
+                            <constraint firstItem="d80-c3-Phh" firstAttribute="leading" secondItem="I0z-2m-fVJ" secondAttribute="leading" id="HgN-mv-nkx"/>
75
+                            <constraint firstItem="31L-8S-pXI" firstAttribute="leading" secondItem="I0z-2m-fVJ" secondAttribute="leading" constant="12" id="NWN-Vp-khn"/>
76
+                            <constraint firstAttribute="trailing" secondItem="eob-dZ-Qzd" secondAttribute="trailing" constant="12" id="Tq5-sl-kWo"/>
77
+                            <constraint firstItem="Ayk-n1-7qt" firstAttribute="top" secondItem="d80-c3-Phh" secondAttribute="bottom" constant="16" id="VqN-iZ-hAD"/>
78
+                            <constraint firstItem="Ayk-n1-7qt" firstAttribute="centerX" secondItem="I0z-2m-fVJ" secondAttribute="centerX" id="a2o-hM-m5e"/>
79
+                            <constraint firstItem="31L-8S-pXI" firstAttribute="centerY" secondItem="d80-c3-Phh" secondAttribute="centerY" id="eNY-KL-iAC"/>
80
+                            <constraint firstAttribute="trailing" secondItem="d80-c3-Phh" secondAttribute="trailing" id="hpJ-7Y-RiM"/>
81
+                        </constraints>
82
+                        <userDefinedRuntimeAttributes>
83
+                            <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
84
+                                <integer key="value" value="8"/>
85
+                            </userDefinedRuntimeAttribute>
86
+                            <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
87
+                        </userDefinedRuntimeAttributes>
88
+                    </view>
89
+                </subviews>
90
+                <color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="calibratedRGB"/>
91
+                <constraints>
92
+                    <constraint firstAttribute="bottom" secondItem="I0z-2m-fVJ" secondAttribute="bottom" constant="18" id="E9t-RB-oit"/>
93
+                    <constraint firstAttribute="trailing" secondItem="I0z-2m-fVJ" secondAttribute="trailing" constant="14" id="UWr-dW-wei"/>
94
+                    <constraint firstItem="I0z-2m-fVJ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="bAs-MV-XeA"/>
95
+                    <constraint firstItem="I0z-2m-fVJ" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="kOZ-ov-nre"/>
96
+                </constraints>
97
+            </tableViewCellContentView>
98
+            <connections>
99
+                <outlet property="backView" destination="I0z-2m-fVJ" id="5bI-Oe-XoD"/>
100
+                <outlet property="bankNameAndCardCodeLabel" destination="31L-8S-pXI" id="K7y-uS-Uvn"/>
101
+                <outlet property="dayLabel" destination="Ayk-n1-7qt" id="c1g-qj-7cU"/>
102
+                <outlet property="showExample" destination="eob-dZ-Qzd" id="LIl-KN-4P4"/>
103
+                <outlet property="topImageView" destination="d80-c3-Phh" id="SyW-3c-o6G"/>
104
+            </connections>
105
+            <point key="canvasLocation" x="93" y="-2"/>
106
+        </tableViewCell>
107
+    </objects>
108
+</document>

+ 0 - 1
KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.m

@@ -254,7 +254,6 @@ LVKBNewHomeTableViewHeaderDelegate
254 254
         _alarmView.backgroundColor=[[UIColor blackColor]colorWithAlphaComponent:0.7];
255 255
         WeakSelf(weakSelf)
256 256
         _alarmView.addAlarmClock = ^(NSInteger day, NSInteger hour, NSInteger min, NSString *alermText) {
257
-//            @{@"name":@"notiStr",@"type":@"text"},@{@"name":@"day",@"type":@"text"},@{@"name":@"hour",@"type":@"text"},@{@"name":@"min",@"type":@"text"}
258 257
             NSDictionary *dic=@{@"notiStr":alermText==nil?@"":alermText,
259 258
                                 @"day":@(day),
260 259
                                 @"hour":@(hour),

+ 1 - 5
KXCardHelp/GS/NewHome/View/LVKBAddAlarmClockView.m

@@ -38,10 +38,6 @@ UITextFieldDelegate
38 38
         if (self.addAlarmClock) {
39 39
             self.addAlarmClock(self.day, self.hour, self.secound, self.str);
40 40
         }
41
-        NSLog(@"成功");
42
-        self.day=0;
43
-        self.hour=0;
44
-        self.secound=0;
45 41
     }
46 42
     
47 43
     [UIView animateWithDuration:0.5 animations:^{
@@ -156,7 +152,7 @@ UITextFieldDelegate
156 152
         UITableViewCell *cell=[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]];
157 153
         cell.textLabel.text=[NSString stringWithFormat:@"%@",[string substringWithRange:NSMakeRange(string.length-5, 5)]];
158 154
         self.hour   =[[string substringToIndex:2] integerValue];
159
-        self.secound=[[string substringFromIndex:3] integerValue];
155
+        self.secound=[[string substringFromIndex:string.length-2] integerValue];
160 156
     }
161 157
 }
162 158
 

+ 1 - 1
KXCardHelp/GS/NewHome/View/LVKBNewHomeTableViewCell.m

@@ -37,7 +37,7 @@
37 37
     _model=model;
38 38
     [self.switchBtn setSelected:model.isOpen];
39 39
     self.titleLabel.text=model.title;
40
-    self.dayLabel.text=[NSString stringWithFormat:@"每月%li日 %li:%li",model.day,model.hour,model.min];
40
+    self.dayLabel.text=[NSString stringWithFormat:@"每月%li日 %li:%2li",model.day,model.hour,model.min];
41 41
    
42 42
 }
43 43
 

+ 37 - 10
KXCardHelp/GS/NewHome/cardManage/LVKBCardManageViewController.m

@@ -18,7 +18,7 @@ UITableViewDataSource
18 18
 @property(nonatomic,strong) UIButton       *createCard;
19 19
 @property(nonatomic,strong) UITableView    *tableView;
20 20
 @property(nonatomic,strong) NSMutableArray *dataArray;
21
-@property(nonatomic,strong)  LVKBAddCardManageView *addView;
21
+@property(nonatomic,strong) LVKBAddCardManageView *addView;
22 22
 
23 23
 @end
24 24
 
@@ -36,7 +36,7 @@ UITableViewDataSource
36 36
 -(void)initUI{
37 37
     [self.view addSubview:self.createCard];
38 38
     [self.view addSubview:self.tableView];
39
-    [[UIApplication sharedApplication].keyWindow addSubview:self.addView];
39
+    [self.view addSubview:self.addView];
40 40
     
41 41
 }
42 42
 
@@ -48,7 +48,22 @@ UITableViewDataSource
48 48
     }];
49 49
 }
50 50
 
51
-
51
+-(void)sortData{
52
+    //冒泡法
53
+    for (int i=0; i<self.dataArray.count; i++) {
54
+        for (int j=i+1; j<self.dataArray.count; j++) {
55
+            NSDictionary *dic=self.dataArray[i];
56
+            NSDictionary *dic2=self.dataArray[j];
57
+            if ([dic[@"month"] integerValue]<[dic2[@"month"] integerValue]) {
58
+                [self.dataArray exchangeObjectAtIndex:i withObjectAtIndex:j];
59
+            }else if([dic[@"day"] integerValue]<[dic2[@"day"] integerValue]){
60
+                 [self.dataArray exchangeObjectAtIndex:i withObjectAtIndex:j];
61
+            }
62
+        }
63
+    }
64
+    
65
+    
66
+}
52 67
 
53 68
 #pragma mark -代理
54 69
 
@@ -58,13 +73,11 @@ UITableViewDataSource
58 73
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
59 74
     LVKBCardManageTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"cell"];
60 75
     cell.backgroundColor=self.view.backgroundColor;
76
+    cell.selectionStyle=UITableViewCellSelectionStyleNone;
61 77
     if (0==indexPath.row) {
62 78
         cell.line.hidden=YES;
63
-        cell.dateLabel.text=@"2月26日";
64
-    }
65
-    if (1==indexPath.row) {
66
-        cell.dateLabel.text=@"1月27日";
67 79
     }
80
+    cell.dic=self.dataArray[indexPath.row];
68 81
     return cell;
69 82
 }
70 83
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
@@ -86,9 +99,9 @@ UITableViewDataSource
86 99
         _createCard.layer.cornerRadius=8;
87 100
         _createCard.layer.masksToBounds=YES;
88 101
         [[_createCard rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
89
-            //            [self requestCheckIdentityStatus];
90 102
             [UIView animateWithDuration:0.5 animations:^{
91 103
                self.addView.y=0;
104
+                
92 105
             }];
93 106
             
94 107
             
@@ -114,8 +127,6 @@ UITableViewDataSource
114 127
 -(NSMutableArray *)dataArray{
115 128
     if (!_dataArray) {
116 129
         _dataArray=[NSMutableArray array];
117
-        [_dataArray addObject:@(1)];
118
-         [_dataArray addObject:@(1)];
119 130
     }
120 131
     return _dataArray;
121 132
 }
@@ -126,6 +137,22 @@ UITableViewDataSource
126 137
         _addView=[[[NSBundle mainBundle] loadNibNamed:@"LVKBAddCardManageView" owner:self options:nil] lastObject];
127 138
         _addView.frame=CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT);
128 139
         _addView.backgroundColor=[[UIColor blackColor]colorWithAlphaComponent:0.7];
140
+        WeakSelf(weakSelf)
141
+        _addView.dayAndMonthBlock = ^(NSInteger month, NSInteger day,NSInteger noOverRePay) {
142
+            NSDictionary *dic=@{
143
+                                @"month":@(month),
144
+                                @"day":@(day),
145
+                                @"noOverRePay":@(noOverRePay)
146
+                                };
147
+            
148
+            [weakSelf.dataArray addObject:dic];
149
+            [weakSelf sortData];
150
+            [weakSelf.tableView reloadData];
151
+            
152
+        };
153
+ 
154
+
155
+        
129 156
     }
130 157
     return _addView;
131 158
 }

+ 3 - 2
KXCardHelp/GS/NewHome/cardManage/View/LVKBAddCardManageView.h

@@ -7,11 +7,12 @@
7 7
 //
8 8
 
9 9
 #import <UIKit/UIKit.h>
10
-
10
+typedef void(^DayAndMonthBlock)(NSInteger month,NSInteger day,NSInteger noOverRePay);
11 11
 NS_ASSUME_NONNULL_BEGIN
12 12
 
13 13
 @interface LVKBAddCardManageView : UIView
14
-
14
+@property (weak, nonatomic) IBOutlet UILabel *dayByMonthLabel;
15
+@property(nonatomic,copy)DayAndMonthBlock dayAndMonthBlock;
15 16
 @end
16 17
 
17 18
 NS_ASSUME_NONNULL_END

+ 46 - 1
KXCardHelp/GS/NewHome/cardManage/View/LVKBAddCardManageView.m

@@ -5,9 +5,16 @@
5 5
 //  Created by chuangye jia on 2018/9/21.
6 6
 //  Copyright © 2018年 jcymac. All rights reserved.
7 7
 //
8
-
8
+#import "PickerView.h"
9 9
 #import "LVKBAddCardManageView.h"
10
+@interface LVKBAddCardManageView()<PickerViewResultDelegate>
11
+@property(nonatomic)NSInteger day;
12
+@property(nonatomic)NSInteger month;
13
+@property(nonatomic)NSInteger noOverRePay;
14
+@property (weak, nonatomic) IBOutlet UIButton *overRePayBtn;
15
+
10 16
 
17
+@end
11 18
 @implementation LVKBAddCardManageView
12 19
 
13 20
 /*
@@ -17,10 +24,48 @@
17 24
     // Drawing code
18 25
 }
19 26
 */
27
+-(void)awakeFromNib{
28
+    [super awakeFromNib];
29
+    [self.overRePayBtn setImage:[UIImage imageNamed:@"gs_addCard_yes"] forState:UIControlStateSelected];
30
+}
31
+
20 32
 - (IBAction)rightCloseAction:(UIButton *)sender {
21 33
     [UIView animateWithDuration:0.5 animations:^{
22 34
         self.y=SCREEN_HEIGHT;
23 35
     }];
24 36
 }
25 37
 
38
+- (void)pickerView:(UIView *)pickerView result:(NSString *)string{
39
+    NSLog(@"- (void)pickerView:(UIView *)pickerView result:(NSString *)string--%@",string);
40
+    NSArray *arr=[string componentsSeparatedByString:@"-"];
41
+    self.dayByMonthLabel.text=[NSString stringWithFormat:@"%@月%@日",arr[0],arr[1]];
42
+    self.month=[arr[0] integerValue];
43
+    self.day=[arr[1] integerValue];
44
+
45
+}
46
+
47
+- (IBAction)overRePayAction:(UIButton *)sender {
48
+    [sender setSelected:!sender.selected];
49
+    self.noOverRePay=sender.selected;
50
+    NSLog(@"self.noOverRePay%@",@(self.noOverRePay));
51
+}
52
+
53
+
54
+
55
+- (IBAction)daySetting:(UIButton *)sender {
56
+    
57
+    PickerView *picker=[[PickerView  alloc]init];
58
+    picker.delegate=self;
59
+    picker.type=PickerViewTypeBirthday;
60
+    [self addSubview:picker];
61
+}
62
+- (IBAction)saveAction:(UIButton *)sender {
63
+    if (self.month>0&&self.day>0) {
64
+        if (self.dayAndMonthBlock) {
65
+            self.dayAndMonthBlock(self.month, self.day, self.noOverRePay);
66
+        }
67
+    }
68
+    [self rightCloseAction:nil];
69
+}
70
+
26 71
 @end

+ 14 - 1
KXCardHelp/GS/NewHome/cardManage/View/LVKBAddCardManageView.xib

@@ -24,7 +24,7 @@
24 24
                             <nil key="textColor"/>
25 25
                             <nil key="highlightedColor"/>
26 26
                         </label>
27
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="添加银行卡" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xbz-Jj-V0h">
27
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="每月还款日" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xbz-Jj-V0h">
28 28
                             <rect key="frame" x="23" y="84" width="82" height="22"/>
29 29
                             <fontDescription key="fontDescription" type="system" pointSize="16"/>
30 30
                             <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
@@ -40,6 +40,9 @@
40 40
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kBE-aT-jjK">
41 41
                             <rect key="frame" x="107" y="84" width="146" height="22"/>
42 42
                             <state key="normal" image="right_gray"/>
43
+                            <connections>
44
+                                <action selector="daySetting:" destination="iN0-l3-epB" eventType="touchUpInside" id="eI9-o2-sW2"/>
45
+                            </connections>
43 46
                         </button>
44 47
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="是否按期还款" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0In-GA-Igw">
45 48
                             <rect key="frame" x="23" y="147" width="98" height="20"/>
@@ -57,6 +60,9 @@
57 60
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IuU-ob-ezZ">
58 61
                             <rect key="frame" x="213" y="146" width="40" height="22"/>
59 62
                             <state key="normal" image="gs_addCard_no"/>
63
+                            <connections>
64
+                                <action selector="overRePayAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="E3Z-I9-6xl"/>
65
+                            </connections>
60 66
                         </button>
61 67
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Dml-dX-0d0">
62 68
                             <rect key="frame" x="33" y="220" width="210" height="50"/>
@@ -67,6 +73,9 @@
67 73
                             <state key="normal" title="保存">
68 74
                                 <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
69 75
                             </state>
76
+                            <connections>
77
+                                <action selector="saveAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="osU-VR-b3j"/>
78
+                            </connections>
70 79
                         </button>
71 80
                     </subviews>
72 81
                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -116,6 +125,10 @@
116 125
                 <constraint firstItem="EqW-7Y-RdW" firstAttribute="top" secondItem="YJI-7E-BGu" secondAttribute="bottom" id="f3D-Vc-s4o"/>
117 126
                 <constraint firstItem="EqW-7Y-RdW" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="rKq-kE-hIr"/>
118 127
             </constraints>
128
+            <connections>
129
+                <outlet property="dayByMonthLabel" destination="xbz-Jj-V0h" id="A9I-IM-Qdy"/>
130
+                <outlet property="overRePayBtn" destination="IuU-ob-ezZ" id="aXf-f7-puC"/>
131
+            </connections>
119 132
             <point key="canvasLocation" x="138.40000000000001" y="152.47376311844079"/>
120 133
         </view>
121 134
     </objects>

+ 1 - 1
KXCardHelp/GS/NewHome/cardManage/View/LVKBCardManageTableViewCell.h

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
13 13
 @interface LVKBCardManageTableViewCell : UITableViewCell
14 14
 @property (weak, nonatomic) IBOutlet UIView *line;
15 15
 @property (weak, nonatomic) IBOutlet UILabel *dateLabel;
16
-
16
+@property(nonatomic,strong)NSDictionary *dic;
17 17
 @end
18 18
 
19 19
 NS_ASSUME_NONNULL_END

+ 22 - 0
KXCardHelp/GS/NewHome/cardManage/View/LVKBCardManageTableViewCell.m

@@ -9,6 +9,12 @@
9 9
 #import "LVKBCardManageTableViewCell.h"
10 10
 @interface LVKBCardManageTableViewCell()
11 11
 @property (weak, nonatomic) IBOutlet UIView *perpulLineView;
12
+@property (weak, nonatomic) IBOutlet UILabel *dayAndMonthLabel;
13
+
14
+@property (weak, nonatomic) IBOutlet UILabel *statusLabel1;
15
+@property (weak, nonatomic) IBOutlet UILabel *statusLabel2;
16
+
17
+
12 18
 @end
13 19
 
14 20
 
@@ -25,4 +31,20 @@
25 31
     // Configure the view for the selected state
26 32
 }
27 33
 
34
+-(void)setDic:(NSDictionary *)dic{
35
+    NSString *month=dic[@"month"];
36
+    NSString *day=dic[@"day"];
37
+    NSString *noOverRePay=dic[@"noOverRePay"];
38
+    self.dayAndMonthLabel.text=[NSString stringWithFormat:@"%2li月%li日",[month integerValue],[day integerValue]];
39
+    if ([noOverRePay integerValue]==0) {
40
+        self.statusLabel1.text=@"已逾期";
41
+        self.statusLabel2.text=@"(本月还款逾期,注意合理消费)";
42
+    }else{
43
+        self.statusLabel1.text=@"已还款";
44
+        self.statusLabel2.text=@"(本月按期还款啦,棒棒的)";
45
+    }
46
+    
47
+    
48
+}
49
+
28 50
 @end

+ 3 - 0
KXCardHelp/GS/NewHome/cardManage/View/LVKBCardManageTableViewCell.xib

@@ -73,8 +73,11 @@
73 73
             </tableViewCellContentView>
74 74
             <connections>
75 75
                 <outlet property="dateLabel" destination="Dnd-2Q-hue" id="r1A-4P-EIA"/>
76
+                <outlet property="dayAndMonthLabel" destination="Dnd-2Q-hue" id="LLs-Y1-6Bb"/>
76 77
                 <outlet property="line" destination="sPS-Vd-U4P" id="5PX-xx-krR"/>
77 78
                 <outlet property="perpulLineView" destination="sPS-Vd-U4P" id="CQo-e7-sYy"/>
79
+                <outlet property="statusLabel1" destination="bLn-fG-TZl" id="guA-WZ-tJh"/>
80
+                <outlet property="statusLabel2" destination="W4B-Cf-Jqp" id="QZW-vu-AcZ"/>
78 81
             </connections>
79 82
             <point key="canvasLocation" x="52.799999999999997" y="48.125937031484263"/>
80 83
         </tableViewCell>

+ 3 - 3
KXCardHelp/GS/PickerView/PickerView.m

@@ -182,7 +182,7 @@
182 182
             self.titleLab.text = @"选择身高";
183 183
             [self heightData];
184 184
             [self isDataPicker:NO];
185
-             [self.picker selectRow:70 inComponent:0 animated:NO];
185
+            [self.picker selectRow:70 inComponent:0 animated:NO];
186 186
         }
187 187
             break;
188 188
         case PickerViewTypeWeight:
@@ -195,7 +195,7 @@
195 195
             break;
196 196
         case PickerViewTypeBirthday:
197 197
         {
198
-            self.titleLab.text = @"选择出生年月";
198
+            self.titleLab.text = @"选择日期";
199 199
             
200 200
            [self isDataPicker:YES];
201 201
             self.datePicke.datePickerMode = UIDatePickerModeDate;
@@ -296,7 +296,7 @@
296 296
     if (self.type == PickerViewTypeBirthday) {
297 297
         
298 298
         NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
299
-        [formatter setDateFormat:@"yyyy-MM-dd"];
299
+        [formatter setDateFormat:@"MM-dd"];
300 300
         
301 301
         resultStr = [formatter stringFromDate:self.datePicke.date];
302 302
 

+ 2 - 2
KXCardHelp/Info.plist

@@ -23,9 +23,9 @@
23 23
 	<key>LSRequiresIPhoneOS</key>
24 24
 	<true/>
25 25
 	<key>MiSDKAppID</key>
26
-	<string>2882303761517852566</string>
26
+	<string>2882303761517867966</string>
27 27
 	<key>MiSDKAppKey</key>
28
-	<string>5681785253566</string>
28
+	<string>5401786766966</string>
29 29
 	<key>MiSDKRun</key>
30 30
 	<string>${MiSDKRun}</string>
31 31
 	<key>NSAppTransportSecurity</key>