Ver Código Fonte

基本完成

chuangye jia 6 anos atrás
pai
commit
dacc5a5310
26 arquivos alterados com 488 adições e 37 exclusões
  1. BIN
      .DS_Store
  2. 1 1
      KXCardHelp.xcodeproj/xcuserdata/chuangyejia.xcuserdatad/xcschemes/xcschememanagement.plist
  3. BIN
      KXCardHelp.xcworkspace/xcuserdata/chuangyejia.xcuserdatad/UserInterfaceState.xcuserstate
  4. 124 0
      KXCardHelp.xcworkspace/xcuserdata/chuangyejia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  5. BIN
      KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/1125.png
  6. BIN
      KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/1242.png
  7. BIN
      KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/640 copy 2.png
  8. BIN
      KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/640 copy.png
  9. BIN
      KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/640.png
  10. BIN
      KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/750.png
  11. 1 1
      KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/Contents.json
  12. 46 3
      KXCardHelp/Base/Tab/LVKBBaseTabBarViewController.m
  13. 1 1
      KXCardHelp/Category/NSDate+JCYEX.h
  14. 7 2
      KXCardHelp/Category/NSDate+JCYEX.m
  15. 1 1
      KXCardHelp/GS/NewCard/VC/LVKBNewCardViewController.h
  16. 120 9
      KXCardHelp/GS/NewCard/VC/LVKBNewCardViewController.m
  17. 0 1
      KXCardHelp/GS/NewCard/VC/ORCHMoneyRecord2ChildViewController.m
  18. 7 1
      KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.h
  19. 140 9
      KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.m
  20. 1 1
      KXCardHelp/GS/NewHome/View/LVKBAddAlarmClockView.m
  21. 14 1
      KXCardHelp/GS/NewHome/View/LVKBAddAlarmClockView.xib
  22. 1 0
      KXCardHelp/GS/NewHome/View/LVKBNewSignInView.h
  23. 8 1
      KXCardHelp/GS/NewHome/View/LVKBNewSignInView.xib
  24. 13 2
      KXCardHelp/GS/NewHome/cardManage/LVKBCardManageViewController.m
  25. 2 2
      KXCardHelp/Main/Home/Card/View/LVKBHomeCardsTableViewCell.m
  26. 1 1
      Pods/Pods.xcodeproj/xcuserdata/chuangyejia.xcuserdatad/xcschemes/xcschememanagement.plist

BIN
.DS_Store


+ 1 - 1
KXCardHelp.xcodeproj/xcuserdata/chuangyejia.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -7,7 +7,7 @@
7 7
 		<key>KXCardHelp.xcscheme</key>
8 8
 		<dict>
9 9
 			<key>orderHint</key>
10
-			<integer>1</integer>
10
+			<integer>0</integer>
11 11
 		</dict>
12 12
 	</dict>
13 13
 </dict>

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


+ 124 - 0
KXCardHelp.xcworkspace/xcuserdata/chuangyejia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2,4 +2,128 @@
2 2
 <Bucket
3 3
    type = "0"
4 4
    version = "2.0">
5
+   <Breakpoints>
6
+      <BreakpointProxy
7
+         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
8
+         <BreakpointContent
9
+            shouldBeEnabled = "Yes"
10
+            ignoreCount = "0"
11
+            continueAfterRunningActions = "No"
12
+            scope = "0"
13
+            stopOnStyle = "0">
14
+         </BreakpointContent>
15
+      </BreakpointProxy>
16
+      <BreakpointProxy
17
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
18
+         <BreakpointContent
19
+            shouldBeEnabled = "Yes"
20
+            ignoreCount = "0"
21
+            continueAfterRunningActions = "No"
22
+            filePath = "KXCardHelp/Base/VC/LVKBBaseViewController.m"
23
+            timestampString = "559241188.502535"
24
+            startingColumnNumber = "9223372036854775807"
25
+            endingColumnNumber = "9223372036854775807"
26
+            startingLineNumber = "60"
27
+            endingLineNumber = "60"
28
+            landmarkName = "-showMessage:"
29
+            landmarkType = "7">
30
+         </BreakpointContent>
31
+      </BreakpointProxy>
32
+      <BreakpointProxy
33
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
34
+         <BreakpointContent
35
+            shouldBeEnabled = "Yes"
36
+            ignoreCount = "0"
37
+            continueAfterRunningActions = "No"
38
+            filePath = "KXCardHelp/Base/VC/LVKBBaseViewController.m"
39
+            timestampString = "559241188.503283"
40
+            startingColumnNumber = "9223372036854775807"
41
+            endingColumnNumber = "9223372036854775807"
42
+            startingLineNumber = "64"
43
+            endingLineNumber = "64"
44
+            landmarkName = "-showMessage:"
45
+            landmarkType = "7">
46
+         </BreakpointContent>
47
+      </BreakpointProxy>
48
+      <BreakpointProxy
49
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
50
+         <BreakpointContent
51
+            shouldBeEnabled = "No"
52
+            ignoreCount = "0"
53
+            continueAfterRunningActions = "No"
54
+            filePath = "KXCardHelp/GS/NewHome/View/LVKBNewHomeTableViewCell.m"
55
+            timestampString = "559244148.923709"
56
+            startingColumnNumber = "9223372036854775807"
57
+            endingColumnNumber = "9223372036854775807"
58
+            startingLineNumber = "47"
59
+            endingLineNumber = "47"
60
+            landmarkName = "-switchAction:"
61
+            landmarkType = "7">
62
+         </BreakpointContent>
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/VC/LVKBNewHomeViewController.m"
71
+            timestampString = "559249326.567625"
72
+            startingColumnNumber = "9223372036854775807"
73
+            endingColumnNumber = "9223372036854775807"
74
+            startingLineNumber = "346"
75
+            endingLineNumber = "346"
76
+            landmarkName = "-creatNotTitle:day:hour:min:"
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 = "559249326.567701"
88
+            startingColumnNumber = "9223372036854775807"
89
+            endingColumnNumber = "9223372036854775807"
90
+            startingLineNumber = "132"
91
+            endingLineNumber = "132"
92
+            landmarkName = "-switchActionByIndex:status:"
93
+            landmarkType = "7">
94
+         </BreakpointContent>
95
+      </BreakpointProxy>
96
+      <BreakpointProxy
97
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
98
+         <BreakpointContent
99
+            shouldBeEnabled = "Yes"
100
+            ignoreCount = "0"
101
+            continueAfterRunningActions = "No"
102
+            filePath = "KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.m"
103
+            timestampString = "559249326.56802"
104
+            startingColumnNumber = "9223372036854775807"
105
+            endingColumnNumber = "9223372036854775807"
106
+            startingLineNumber = "360"
107
+            endingLineNumber = "360"
108
+            landmarkName = "-creatNotTitle:day:hour:min:"
109
+            landmarkType = "7">
110
+         </BreakpointContent>
111
+      </BreakpointProxy>
112
+      <BreakpointProxy
113
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
114
+         <BreakpointContent
115
+            shouldBeEnabled = "Yes"
116
+            ignoreCount = "0"
117
+            continueAfterRunningActions = "No"
118
+            filePath = "KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.m"
119
+            timestampString = "559249326.568078"
120
+            startingColumnNumber = "9223372036854775807"
121
+            endingColumnNumber = "9223372036854775807"
122
+            startingLineNumber = "311"
123
+            endingLineNumber = "311"
124
+            landmarkName = "-alarmView"
125
+            landmarkType = "7">
126
+         </BreakpointContent>
127
+      </BreakpointProxy>
128
+   </Breakpoints>
5 129
 </Bucket>

BIN
KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/1125.png


BIN
KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/1242.png


BIN
KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/640 copy 2.png


BIN
KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/640 copy.png


BIN
KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/640.png


BIN
KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/750.png


+ 1 - 1
KXCardHelp/Assets.xcassets/LaunchImage1.launchimage/Contents.json

@@ -30,7 +30,7 @@
30 30
     {
31 31
       "orientation" : "portrait",
32 32
       "idiom" : "iphone",
33
-      "filename" : "640 copy 2.png",
33
+      "filename" : "640 copy.png",
34 34
       "extent" : "full-screen",
35 35
       "minimum-system-version" : "7.0",
36 36
       "scale" : "2x"

+ 46 - 3
KXCardHelp/Base/Tab/LVKBBaseTabBarViewController.m

@@ -9,6 +9,9 @@
9 9
 #import "LVKBBaseTabBarViewController.h"
10 10
 #import "ORCHMoneyRecord2ChildViewController.h"
11 11
 @interface LVKBBaseTabBarViewController ()
12
+<
13
+LVKBNewHomeViewControllerDelegate
14
+>
12 15
 @property(nonatomic)BOOL initViewFlag;//已经初始化了视图
13 16
 @end
14 17
 
@@ -36,6 +39,25 @@
36 39
 //    self.tabBar.layer.shadowRadius=7;
37 40
     self.tabBar.layer.shadowOpacity =0.1f;
38 41
 }
42
+-(void)resetTabByIndex:(NSInteger)index{
43
+    switch (index) {
44
+        case 0:
45
+            self.selectedIndex=1;
46
+            break;
47
+        case 1:
48
+        {
49
+            self.selectedIndex=1;
50
+            UINavigationController *nav = (UINavigationController *)self.viewControllers[1];
51
+            LVKBNewCardViewController *vc=(LVKBNewCardViewController *)(nav.topViewController);
52
+            [vc addCard];
53
+            
54
+        }
55
+            break;
56
+        default:
57
+            break;
58
+    }
59
+}
60
+
39 61
 
40 62
 #pragma mark ------------------ 版本更新检测 ------
41 63
 /**
@@ -129,9 +151,11 @@
129 151
     //还款记录表
130 152
     [[YDFMDB sharedInstance] createTableName:@"repayRecordTable" fieldNamesDictionaryArray:@[@{@"name":@"month",@"type":@"text"},@{@"name":@"day",@"type":@"text"},@{@"name":@"noOverRePay",@"type":@"text"}]];
131 153
     //银行卡表
132
-     [[YDFMDB sharedInstance] createTableName:@"homeTable" fieldNamesDictionaryArray:@[@{@"name":@"cardBankName",@"type":@"text"},@{@"name":@"cardCode",@"type":@"text"},@{@"name":@"dayStr",@"type":@"text"}]];
133
-    LVKBBaseNavViewController *newHome=[self navigationControllerWithViewController:[[LVKBNewHomeViewController alloc]init] title:@"首页" imageName:@"tab_home"];
134
-    LVKBBaseNavViewController *newCard=[self navigationControllerWithViewController:[[ORCHMoneyRecord2ChildViewController alloc]init] title:@"添加卡" imageName:@"tab_handleCard"];
154
+     [[YDFMDB sharedInstance] createTableName:@"homeTable" fieldNamesDictionaryArray:@[@{@"name":@"cardBankName",@"type":@"text"},@{@"name":@"cardCode",@"type":@"text"}]];
155
+    LVKBNewHomeViewController *vc=[[LVKBNewHomeViewController alloc]init];
156
+    vc.delegate=self;
157
+    LVKBBaseNavViewController *newHome=[self navigationControllerWithViewController:vc title:@"首页" imageName:@"tab_home"];
158
+    LVKBBaseNavViewController *newCard=[self navigationControllerWithViewController:[[LVKBNewCardViewController alloc]init] title:@"添加卡" imageName:@"tab_handleCard"];
135 159
 //    LVKBNewCardViewController
136 160
     LVKBBaseNavViewController *person=[self navigationControllerWithViewController:[[LVKBPersonViewController alloc]init] title:@"个人" imageName:@"tab_person"];
137 161
     self.viewControllers=@[newHome,newCard,person];
@@ -151,4 +175,23 @@
151 175
 
152 176
 
153 177
 
178
+//// 1.创建通知
179
+//UILocalNotification *localNotification = [[UILocalNotification alloc] init];
180
+//// 2.设置通知的必选参数
181
+//// 设置通知显示的内容
182
+//localNotification.alertBody = @"本地通知测试";
183
+//// 设置通知的发送时间,单位秒
184
+//localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:10];
185
+////解锁滑动时的事件
186
+//localNotification.alertAction = @"别磨蹭了!";
187
+////收到通知时App icon的角标
188
+//localNotification.applicationIconBadgeNumber = 1;
189
+////推送是带的声音提醒,设置默认的字段为UILocalNotificationDefaultSoundName
190
+//localNotification.soundName = UILocalNotificationDefaultSoundName;
191
+//// 3.发送通知(🐽 : 根据项目需要使用)
192
+//// 方式一: 根据通知的发送时间(fireDate)发送通知
193
+//[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
194
+
195
+
196
+
154 197
 @end

+ 1 - 1
KXCardHelp/Category/NSDate+JCYEX.h

@@ -13,5 +13,5 @@
13 13
 +(NSInteger)getCurrentMonthDayCount;
14 14
 +(NSInteger)getCurrentDay;
15 15
 +(NSString *)getCurrentYearMonthDay;
16
-
16
++(NSString *)getCurrentYearMonth;
17 17
 @end

+ 7 - 2
KXCardHelp/Category/NSDate+JCYEX.m

@@ -53,7 +53,12 @@
53 53
     [formatter setDateFormat:@"yyyy-MM-dd"];
54 54
     NSString *currentDate=[formatter stringFromDate:date];
55 55
     return currentDate;
56
-    
57
-    
56
+}
57
++(NSString *)getCurrentYearMonth{
58
+    NSDate *date=[NSDate date];
59
+    NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
60
+    [formatter setDateFormat:@"yyyy-MM"];
61
+    NSString *currentDate=[formatter stringFromDate:date];
62
+    return currentDate;
58 63
 }
59 64
 @end

+ 1 - 1
KXCardHelp/GS/NewCard/VC/LVKBNewCardViewController.h

@@ -9,5 +9,5 @@
9 9
 #import "LVKBBaseViewController.h"
10 10
 
11 11
 @interface LVKBNewCardViewController : LVKBBaseViewController
12
-
12
+-(void)addCard;
13 13
 @end

+ 120 - 9
KXCardHelp/GS/NewCard/VC/LVKBNewCardViewController.m

@@ -9,6 +9,7 @@
9 9
 #import "LVKBNewCardViewController.h"
10 10
 #import "LVKBHomeCardsTableViewCell.h"
11 11
 #import "LVKBHomeCardsModel.h"
12
+#import "NewHomeModel.h"
12 13
 @interface LVKBNewCardViewController ()
13 14
 <
14 15
 UITableViewDelegate,
@@ -30,6 +31,21 @@ CHHomeCardsTableViewCellDelegate
30 31
     [self adjustUI];
31 32
 }
32 33
 
34
+
35
+-(void)viewWillAppear:(BOOL)animated{
36
+    [super viewWillAppear:animated];
37
+    NSArray *arr=[[YDFMDB sharedInstance]selectDataByConditionString:nil withSelectStringArray:@[@"cardBankName",@"cardCode"] withTableName:@"homeTable" limit:-1 descID:YES];
38
+    [self.dataArray removeAllObjects];
39
+    for (NSDictionary *dic in arr) {
40
+        NSLog(@"dic--%@",dic);
41
+        LVKBHomeCardsModel *model=[[LVKBHomeCardsModel alloc]init];
42
+        model.bank_name=dic[@"cardBankName"];
43
+        model.card_num=dic[@"cardCode"];
44
+        [self.dataArray addObject:model];
45
+    }
46
+    [self.tableView reloadData];
47
+}
48
+
33 49
 -(void)initUI{
34 50
     [self.view addSubview:self.createCard];
35 51
     [self.view addSubview:self.tableView];
@@ -58,17 +74,17 @@ CHHomeCardsTableViewCellDelegate
58 74
 #pragma mark -代理
59 75
 
60 76
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
61
-    return self.dataArray.count+1;
77
+    return self.dataArray.count;
62 78
 }
63 79
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
64 80
     LVKBHomeCardsTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"cell"];
65
-//    LVKBHomeCardsModel *model=self.dataArray[indexPath.row];
66
-//    if (indexPath.row==0) {
67
-//        model.is_main=@"1";
68
-//    }
69
-//    cell.model=model;
70
-//    cell.cellDelegate=self;
71
-//    cell.indexPath=indexPath;
81
+    LVKBHomeCardsModel *model=self.dataArray[indexPath.row];
82
+    if (indexPath.row==0) {
83
+        model.is_main=@"1";
84
+    }
85
+    cell.model=model;
86
+    cell.cellDelegate=self;
87
+    cell.indexPath=indexPath;
72 88
     cell.selectionStyle=UITableViewCellSelectionStyleNone;
73 89
     return cell;
74 90
 }
@@ -78,11 +94,106 @@ CHHomeCardsTableViewCellDelegate
78 94
 
79 95
 
80 96
 -(void)jcy_homeCardsCellDeleteByIndexPath:(NSIndexPath *)indexPath{
97
+    LVKBHomeCardsModel *model=self.dataArray[indexPath.row];
98
+    [[YDFMDB sharedInstance]deleteDataByEqualConditionStringDictionary:@{@"cardCode":model.card_num} withTableName:@"homeTable"];
99
+    [self.dataArray removeObjectAtIndex:indexPath.row];
100
+    [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationTop];
81 101
     
82 102
     
103
+}
104
+
105
+
106
+
107
+-(void)addCard{
108
+    NSLog(@"+添加信用卡还款记录");
109
+    WeakSelf(weakSelf)
110
+    UIAlertController *addAlertVC = [UIAlertController alertControllerWithTitle:@"添加信用卡" message:@"" preferredStyle:UIAlertControllerStyleAlert];
111
+    [addAlertVC addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
112
+        textField.placeholder = @"请输入信用卡所属银行";
113
+    }];
114
+    [addAlertVC addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
115
+        textField.placeholder = @"请输入卡号";
116
+        textField.keyboardType=UIKeyboardTypeDecimalPad;
117
+    }];
83 118
     
119
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
120
+    UIAlertAction *opAction = [UIAlertAction actionWithTitle:@"信用卡拍照识别" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
121
+        [self bankCardOCROnline];
122
+    }];
123
+    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
124
+        NSString *cardBank=addAlertVC.textFields.firstObject.text;
125
+        NSString *cardCode=addAlertVC.textFields[1].text;
126
+        if (cardBank.length==0) {
127
+            [weakSelf homeShowMessage:@"您没有输入银行"];
128
+        }else if(cardCode.length<4){
129
+            [weakSelf homeShowMessage:@"卡号必须大于4位"];
130
+        }else{
131
+            [weakSelf homeShowMessage:@"添加完成"];
132
+            LVKBHomeCardsModel *model=[[LVKBHomeCardsModel alloc]init];
133
+            model.bank_name=cardBank;
134
+            model.card_num=cardCode;
135
+            [[YDFMDB sharedInstance]addSingleDataStringDictionary:@{@"cardBankName":model.bank_name,@"cardCode":model.card_num} withTableName:@"homeTable"];
136
+            [weakSelf.dataArray insertObject:model atIndex:0];
137
+            [weakSelf.tableView reloadData];
138
+        }
139
+        
140
+    }];
141
+    //添加 取消事件 到 弹窗界面
142
+    [addAlertVC addAction:cancelAction];
143
+    [addAlertVC addAction:opAction];
144
+    [addAlertVC addAction:okAction];
145
+    [weakSelf.navigationController presentViewController:addAlertVC animated:NO completion:nil];
84 146
 }
85 147
 
148
+#pragma mark -百度ocr
149
+- (void)bankCardOCROnline{
150
+    if(![PublicFunction isCanUseCamera]){
151
+        [self showMessage:@"没有相机权限,请前往设置开启"];
152
+        return;
153
+    }
154
+    WeakSelf(weakSelf)
155
+    UIViewController * vc =
156
+    [AipCaptureCardVC ViewControllerWithCardType:CardTypeBankCard andImageHandler:^(UIImage *image) {
157
+        [self dismissViewControllerAnimated:YES completion:nil];
158
+        [[AipOcrService shardService] detectBankCardFromImage:image successHandler:^(id result) {
159
+            if ([NSThread currentThread]!=[NSThread mainThread]) {
160
+                dispatch_sync(dispatch_get_main_queue(), ^{
161
+                    if (result[@"result"]) {
162
+                        if (result[@"result"][@"bank_name"]&&result[@"result"][@"bank_card_number"]) {
163
+                            LVKBHomeCardsModel *model=[[LVKBHomeCardsModel alloc]init];
164
+                            model.bank_name=result[@"result"][@"bank_name"];
165
+                            model.card_num=result[@"result"][@"bank_card_number"];
166
+                            [[YDFMDB sharedInstance]addSingleDataStringDictionary:@{@"cardBankName":model.bank_name,@"cardCode":model.card_num} withTableName:@"homeTable"];
167
+                            [weakSelf.dataArray insertObject:model atIndex:0];
168
+                            [weakSelf.tableView reloadData];
169
+                        }
170
+                    }
171
+                    
172
+                });
173
+            }else{
174
+                if (result[@"result"]) {
175
+                    LVKBHomeCardsModel *model=[[LVKBHomeCardsModel alloc]init];
176
+                    model.bank_name=result[@"result"][@"bank_name"];
177
+                    model.card_num=result[@"result"][@"bank_card_number"];
178
+                    [[YDFMDB sharedInstance]addSingleDataStringDictionary:@{@"cardBankName":model.bank_name,@"cardCode":model.card_num} withTableName:@"homeTable"];
179
+                    [weakSelf.dataArray insertObject:model atIndex:0];
180
+                    [weakSelf.tableView reloadData];
181
+                }
182
+            }
183
+        } failHandler:^(NSError *err) {
184
+            [self showMessage:@"识别失败"];
185
+        }];
186
+    }];
187
+    [self presentViewController:vc animated:YES completion:nil];
188
+    
189
+}
190
+
191
+
192
+-(void)homeShowMessage:(NSString *)msg{
193
+    [MBProgressHUD showMessage:msg toView:self.view];
194
+}
195
+
196
+
86 197
 
87 198
 #pragma mark -懒加载
88 199
 -(UIButton *)createCard{
@@ -95,7 +206,7 @@ CHHomeCardsTableViewCellDelegate
95 206
         _createCard.layer.cornerRadius=8;
96 207
         _createCard.layer.masksToBounds=YES;
97 208
         [[_createCard rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
98
-//            [self requestCheckIdentityStatus];
209
+            [self addCard];
99 210
         }];
100 211
         _createCard.frame=CGRectMake(FITSIZE(12), NavBarHeight+10, SCREEN_WIDTH-2*FITSIZE(12), 46);
101 212
     }

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

@@ -228,7 +228,6 @@ UITextFieldDelegate
228 228
         }];
229 229
     }];
230 230
     [self presentViewController:vc animated:YES completion:nil];
231
-    
232 231
 }
233 232
 
234 233
 

+ 7 - 1
KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.h

@@ -8,6 +8,12 @@
8 8
 
9 9
 #import "LVKBBaseViewController.h"
10 10
 
11
-@interface LVKBNewHomeViewController : LVKBBaseViewController
11
+@protocol LVKBNewHomeViewControllerDelegate <NSObject>
12
+
13
+-(void)resetTabByIndex:(NSInteger)index;
12 14
 
13 15
 @end
16
+
17
+@interface LVKBNewHomeViewController : LVKBBaseViewController
18
+@property(nonatomic,strong)id<LVKBNewHomeViewControllerDelegate> delegate;
19
+@end

+ 140 - 9
KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.m

@@ -41,12 +41,29 @@ LVKBNewHomeTableViewHeaderDelegate
41 41
     
42 42
 }
43 43
 
44
+
45
+-(void)viewWillAppear:(BOOL)animated{
46
+    [super viewWillAppear:animated];
47
+    NSArray *arr=[[YDFMDB sharedInstance]selectDataByConditionString:nil withSelectStringArray:@[@"notiStr",@"day",@"hour",@"min",@"isOpen"] withTableName:@"notiTable" limit:-1 descID:YES];
48
+    [self.dataArray removeAllObjects];
49
+    for (NSDictionary *dic in arr) {
50
+        LVKBNewHomeModel *model=[[LVKBNewHomeModel alloc]init];
51
+        model.title=dic[@"notiStr"];
52
+        model.day=[dic[@"day"] integerValue];
53
+        model.hour=[dic[@"hour"] integerValue];
54
+        model.min=[dic[@"min"] integerValue];
55
+        model.isOpen=[dic[@"isOpen"] integerValue];
56
+        [self.dataArray addObject:model];
57
+    }
58
+    [self.tableView reloadData];
59
+}
60
+
44 61
 -(void)initUI{
45 62
     [self.view addSubview:self.topImageView];
46 63
     [self.view addSubview:self.tableView];
47 64
     [self.view addSubview:self.centerView];
48 65
     [self.view addSubview:self.signInBtn];
49
-    [[UIApplication sharedApplication].keyWindow addSubview:self.siginInView];
66
+    [self.view addSubview:self.siginInView];
50 67
     [self.view addSubview:self.alarmView];
51 68
 }
52 69
 
@@ -94,6 +111,7 @@ LVKBNewHomeTableViewHeaderDelegate
94 111
     LVKBNewHomeModel *model=self.dataArray[indexPath.row];
95 112
     model.index=indexPath.row;
96 113
     [cell setModel:model];
114
+    cell.delegate=self;
97 115
     cell.layer.cornerRadius=5;
98 116
     cell.layer.masksToBounds=YES;
99 117
     return cell;
@@ -104,9 +122,20 @@ LVKBNewHomeTableViewHeaderDelegate
104 122
 }
105 123
 
106 124
 -(void)switchActionByIndex:(NSInteger)index status:(BOOL)status{
125
+    
126
+    
127
+    
107 128
     LVKBNewHomeModel *model=self.dataArray[index];
129
+    
108 130
     model.isOpen=status;
109 131
     
132
+    if (status) {
133
+        [self creatNotTitle:model.title  day:model.day hour:model.hour min:model.min];
134
+    }else{
135
+        [self deleteNotTitle:model.title  day:model.day hour:model.hour min:model.min];
136
+    }
137
+    
138
+    [[YDFMDB sharedInstance] changeDataByEqualConditionStringDictionary:@{@"notiStr":model.title,@"day":@(model.day),@"hour":@(model.hour),@"min":@(model.min)} withNewStringDictionary:@{@"isOpen":@(model.isOpen)} withTableName:@"notiTable"];
110 139
 }
111 140
 - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
112 141
     return YES;
@@ -124,6 +153,9 @@ LVKBNewHomeTableViewHeaderDelegate
124 153
 - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
125 154
     //在这里实现删除操作
126 155
     //删除数据,和删除动画
156
+    LVKBNewHomeModel *model=self.dataArray[indexPath.row];
157
+    [self deleteNotTitle:model.title  day:model.day hour:model.hour min:model.min];
158
+    [[YDFMDB sharedInstance] deleteDataByEqualConditionStringDictionary:@{@"notiStr":model.title,@"day":@(model.day),@"hour":@(model.hour),@"min":@(model.min),@"isOpen":@(model.isOpen)} withTableName:@"notiTable"];
127 159
     [self.dataArray removeObjectAtIndex:indexPath.row];
128 160
     [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationLeft];
129 161
 }
@@ -135,15 +167,14 @@ LVKBNewHomeTableViewHeaderDelegate
135 167
 
136 168
 -(void)didSelectItemByIndex:(NSInteger)index{
137 169
     NSLog(@"didSelectItemByIndex--%@",@(index));
170
+    
138 171
     switch (index) {
139 172
         case 0:
140
-        {
141
-            
142
-        }
143
-            break;
144 173
         case 1:
145 174
         {
146
-            
175
+            if (self.delegate &&[self.delegate respondsToSelector:@selector(resetTabByIndex:)]) {
176
+                [self.delegate resetTabByIndex:index];
177
+            }
147 178
         }
148 179
             break;
149 180
         case 2:
@@ -158,8 +189,6 @@ LVKBNewHomeTableViewHeaderDelegate
158 189
     }
159 190
 }
160 191
 -(void)didSelectBtn{
161
-    NSLog(@"didSelectBtn");
162
-    
163 192
     [UIView  animateWithDuration:0.5f animations:^{
164 193
         self.alarmView.y=0;
165 194
     }];
@@ -204,7 +233,17 @@ LVKBNewHomeTableViewHeaderDelegate
204 233
         UILabel *label=[[UILabel alloc]init];
205 234
         label.font=[UIFont systemFontOfSize:20];
206 235
         label.textColor=[UIColor CHColorWithHex:0x333333];
207
-        label.text=@"距离主卡还款日还有 10 天";
236
+        NSString *day=[[NSUserDefaults standardUserDefaults] objectForKey:@"zhuka_huankuan"];
237
+        NSInteger currentDay=[NSDate getCurrentDay];
238
+        if (day) {
239
+            if ([day integerValue]>=currentDay) {
240
+                 label.text=[NSString stringWithFormat:@"距离主卡还款日还有 %li 天",[day integerValue]-currentDay];
241
+            }else{
242
+                label.text=[NSString stringWithFormat:@"距离主卡还款日还有 %li 天",30-currentDay+[day integerValue]];
243
+            }
244
+        }else{
245
+            label.text=@"距离主卡还款日还有 -- 天";
246
+        }
208 247
         label.tag=1001;
209 248
         [_centerView addSubview:label];
210 249
     }
@@ -231,6 +270,21 @@ LVKBNewHomeTableViewHeaderDelegate
231 270
         _signInBtn=[UIButton buttonWithType:UIButtonTypeCustom];
232 271
         [_signInBtn setImage:[UIImage imageNamed:@"gs_signIn"] forState:UIControlStateNormal];
233 272
         [[_signInBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
273
+            NSInteger day=[NSDate getCurrentDay];
274
+            NSNumber *num=[[NSUserDefaults standardUserDefaults]objectForKey:@"gs_day"];
275
+            NSNumber *numCount=[[NSUserDefaults standardUserDefaults]objectForKey:@"gs_daycount"];
276
+            if (day==[num integerValue]) {
277
+                
278
+            }else if ((day-[num integerValue]%30)==1) {
279
+                //签到一天
280
+                numCount=@([numCount integerValue]+1);
281
+            }else{
282
+                numCount=@(1);
283
+            }
284
+            self.siginInView.dayCountLabel.text=[numCount stringValue];
285
+            [[NSUserDefaults standardUserDefaults]setObject:@(day) forKey:@"gs_day"];
286
+            [[NSUserDefaults standardUserDefaults]setObject:numCount forKey:@"gs_daycount"];
287
+            
234 288
             [UIView  animateWithDuration:0.5f animations:^{
235 289
                 self.siginInView.y=0;
236 290
             }];
@@ -266,6 +320,17 @@ LVKBNewHomeTableViewHeaderDelegate
266 320
             model.hour=hour;
267 321
             model.min=min;
268 322
             model.isOpen=1;
323
+            [[YDFMDB sharedInstance]addSingleDataStringDictionary:
324
+              @{@"notiStr":dic[@"notiStr"],
325
+                @"day":@(day),
326
+                @"hour":@(hour),
327
+                @"min":@(min),
328
+                @"isOpen":@(1)
329
+                } withTableName:@"notiTable"];
330
+            if (weakSelf.dataArray.count==0) {
331
+                [[NSUserDefaults standardUserDefaults]setObject:@(day) forKey:@"zhuka_huankuan"];
332
+            }
333
+            [weakSelf creatNotTitle:dic[@"notiStr"] day:day hour:hour min:min];
269 334
             [weakSelf.dataArray addObject:model];
270 335
             [weakSelf.tableView reloadData];
271 336
         };
@@ -274,4 +339,70 @@ LVKBNewHomeTableViewHeaderDelegate
274 339
     return _alarmView;
275 340
 }
276 341
 
342
+
343
+
344
+
345
+-(void)creatNotTitle:(NSString *)title day:(NSInteger )day hour:(NSInteger )hour min:(NSInteger) min{
346
+    UILocalNotification *localNotification = [[UILocalNotification alloc] init];
347
+    if (localNotification == nil) {
348
+        return;
349
+    }
350
+    //设置本地通知的触发时间(如果要立即触发,无需设置),这里设置为20妙后
351
+    NSString *date=[NSDate getCurrentYearMonth];
352
+    date=[NSString stringWithFormat:@"%@-%2li %2li-%2li",date,day,hour,min];
353
+    
354
+    NSDateFormatter *formatter1 = [[NSDateFormatter alloc]init];
355
+    [formatter1 setDateFormat:@"yyyy-MM-dd HH-mm"];
356
+    NSDate *resDate = [formatter1 dateFromString:date];
357
+    
358
+    localNotification.fireDate = resDate;
359
+    //设置本地通知的时区
360
+    localNotification.timeZone = [NSTimeZone defaultTimeZone];
361
+    //设置通知的内容
362
+    localNotification.alertBody = title;
363
+    //设置通知动作按钮的标题
364
+    localNotification.alertAction = @"查看";
365
+    //设置提醒的声音,可以自己添加声音文件,这里设置为默认提示声
366
+    localNotification.soundName = UILocalNotificationDefaultSoundName;
367
+    //设置通知的相关信息,这个很重要,可以添加一些标记性内容,方便以后区分和获取通知的信息
368
+    NSDictionary *dict =@{@"sign":[NSString stringWithFormat:@"%@%li%li%li",title,day,hour,min]};
369
+    [localNotification setUserInfo:dict];
370
+    
371
+    // ios8后,需要添加这个注册,才能得到授权
372
+    if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) {
373
+        UIUserNotificationType type =  UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound;
374
+        UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:type
375
+                                                                                 categories:nil];
376
+        [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
377
+        // 通知重复提示的单位,可以是天、周、月
378
+        localNotification.repeatInterval = NSCalendarUnitMonth;
379
+    }
380
+    
381
+    //在规定的日期触发通知
382
+    [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
383
+}
384
+
385
+-(void)deleteNotTitle:(NSString *)title day:(NSInteger )day hour:(NSInteger )hour min:(NSInteger) min{
386
+     NSDictionary *dict =@{@"sign":[NSString stringWithFormat:@"%@%li%li%li",title,day,hour,min]};
387
+    NSArray *narry=[[UIApplication sharedApplication] scheduledLocalNotifications];
388
+    NSUInteger acount=[narry count];
389
+    if (acount>0)
390
+    {
391
+        // 遍历找到对应nfkey和notificationtag的通知
392
+        for (int i=0; i<acount; i++)
393
+        {
394
+            UILocalNotification *myUILocalNotification = [narry objectAtIndex:i];
395
+            NSDictionary *userInfo = myUILocalNotification.userInfo;
396
+            NSString *obj = [userInfo objectForKey:@"sign"];
397
+            if (obj==dict[@"sign"])
398
+            {
399
+                // 删除本地通知
400
+                [[UIApplication sharedApplication] cancelLocalNotification:myUILocalNotification];
401
+                break;
402
+            }
403
+        }
404
+    }
405
+    
406
+}
407
+
277 408
 @end

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

@@ -151,7 +151,7 @@ UITextFieldDelegate
151 151
     }else{
152 152
         UITableViewCell *cell=[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]];
153 153
         cell.textLabel.text=[NSString stringWithFormat:@"%@",[string substringWithRange:NSMakeRange(string.length-5, 5)]];
154
-        self.hour   =[[string substringToIndex:2] integerValue];
154
+        self.hour   =[[[string componentsSeparatedByString:@" "][1] substringToIndex:2] integerValue];
155 155
         self.secound=[[string substringFromIndex:string.length-2] integerValue];
156 156
     }
157 157
 }

+ 14 - 1
KXCardHelp/GS/NewHome/View/LVKBAddAlarmClockView.xib

@@ -30,17 +30,28 @@
30 30
                         </view>
31 31
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3yu-nl-Xbt">
32 32
                             <rect key="frame" x="33" y="303" width="210" height="50"/>
33
-                            <color key="backgroundColor" red="0.42854352680000002" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
33
+                            <color key="backgroundColor" red="0.55686274509803924" green="0.50196078431372548" blue="0.97647058823529409" alpha="1" colorSpace="calibratedRGB"/>
34 34
                             <constraints>
35 35
                                 <constraint firstAttribute="height" constant="50" id="wks-2D-rqc"/>
36 36
                             </constraints>
37 37
                             <state key="normal" title="保存">
38 38
                                 <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
39 39
                             </state>
40
+                            <userDefinedRuntimeAttributes>
41
+                                <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
42
+                                    <integer key="value" value="5"/>
43
+                                </userDefinedRuntimeAttribute>
44
+                            </userDefinedRuntimeAttributes>
40 45
                             <connections>
41 46
                                 <action selector="closeAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="aAL-yC-j8Y"/>
42 47
                             </connections>
43 48
                         </button>
49
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(默认第一个闹钟为主卡还款日)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5ad-Wk-WxG">
50
+                            <rect key="frame" x="54" y="268" width="168.5" height="14.5"/>
51
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
52
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
53
+                            <nil key="highlightedColor"/>
54
+                        </label>
44 55
                     </subviews>
45 56
                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
46 57
                     <constraints>
@@ -53,7 +64,9 @@
53 64
                         <constraint firstItem="3yu-nl-Xbt" firstAttribute="leading" secondItem="4Me-Wp-lh2" secondAttribute="leading" constant="33" id="e60-s7-azp"/>
54 65
                         <constraint firstItem="3yu-nl-Xbt" firstAttribute="top" secondItem="5oD-hs-CFx" secondAttribute="bottom" constant="45" id="l1S-FA-v6I"/>
55 66
                         <constraint firstItem="5oD-hs-CFx" firstAttribute="top" secondItem="CWJ-3o-iNf" secondAttribute="bottom" constant="30" id="nGX-IG-co8"/>
67
+                        <constraint firstItem="5ad-Wk-WxG" firstAttribute="centerX" secondItem="5oD-hs-CFx" secondAttribute="centerX" id="nYG-WO-BPY"/>
56 68
                         <constraint firstAttribute="trailing" secondItem="3yu-nl-Xbt" secondAttribute="trailing" constant="33" id="tUv-ea-ZCI"/>
69
+                        <constraint firstItem="5ad-Wk-WxG" firstAttribute="top" secondItem="5oD-hs-CFx" secondAttribute="bottom" constant="10" id="vcM-jP-vwc"/>
57 70
                         <constraint firstItem="CWJ-3o-iNf" firstAttribute="top" secondItem="4Me-Wp-lh2" secondAttribute="top" constant="31" id="viV-Jp-bya"/>
58 71
                         <constraint firstItem="CWJ-3o-iNf" firstAttribute="centerX" secondItem="4Me-Wp-lh2" secondAttribute="centerX" id="yDN-Cd-Bai"/>
59 72
                     </constraints>

+ 1 - 0
KXCardHelp/GS/NewHome/View/LVKBNewSignInView.h

@@ -11,6 +11,7 @@
11 11
 NS_ASSUME_NONNULL_BEGIN
12 12
 
13 13
 @interface LVKBNewSignInView : UIView
14
+@property (weak, nonatomic) IBOutlet UILabel *dayCountLabel;
14 15
 
15 16
 @end
16 17
 

+ 8 - 1
KXCardHelp/GS/NewHome/View/LVKBNewSignInView.xib

@@ -25,8 +25,12 @@
25 25
                                 <constraint firstAttribute="width" constant="181" id="yCr-tX-LGV"/>
26 26
                             </constraints>
27 27
                         </imageView>
28
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p8u-sV-TrR">
28
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p8u-sV-TrR">
29 29
                             <rect key="frame" x="152.5" y="59.5" width="31.5" height="36"/>
30
+                            <constraints>
31
+                                <constraint firstAttribute="height" constant="36" id="Css-vi-NS1"/>
32
+                                <constraint firstAttribute="width" constant="31.5" id="MmF-Wv-QQt"/>
33
+                            </constraints>
30 34
                             <fontDescription key="fontDescription" type="system" pointSize="30"/>
31 35
                             <nil key="textColor"/>
32 36
                             <nil key="highlightedColor"/>
@@ -70,6 +74,9 @@
70 74
                 <constraint firstItem="pRs-tL-PYs" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="QkI-DF-HME"/>
71 75
                 <constraint firstItem="st7-8f-jqG" firstAttribute="centerY" secondItem="pRs-tL-PYs" secondAttribute="centerY" id="aQG-64-nXh"/>
72 76
             </constraints>
77
+            <connections>
78
+                <outlet property="dayCountLabel" destination="p8u-sV-TrR" id="dc2-qS-C7s"/>
79
+            </connections>
73 80
         </view>
74 81
     </objects>
75 82
     <resources>

+ 13 - 2
KXCardHelp/GS/NewHome/cardManage/LVKBCardManageViewController.m

@@ -33,13 +33,24 @@ UITableViewDataSource
33 33
     [self adjustUI];
34 34
 }
35 35
 
36
+-(void)viewWillAppear:(BOOL)animated{
37
+    [super viewWillAppear:animated];
38
+
39
+    NSArray *arr=[[YDFMDB sharedInstance]selectDataByConditionString:nil withSelectStringArray:@[@"month",@"day",@"noOverRePay"] withTableName:@"repayRecordTable" limit:-1 descID:YES];
40
+    [self.dataArray removeAllObjects];
41
+    [self.dataArray addObjectsFromArray:arr];
42
+    [self sortData];
43
+    [self.tableView reloadData];
44
+}
45
+
46
+
36 47
 -(void)initUI{
37 48
     [self.view addSubview:self.createCard];
38 49
     [self.view addSubview:self.tableView];
39 50
     [self.view addSubview:self.addView];
40
-    
41 51
 }
42 52
 
53
+
43 54
 -(void)adjustUI{
44 55
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
45 56
         make.left.right.mas_equalTo(0);
@@ -144,7 +155,7 @@ UITableViewDataSource
144 155
                                 @"day":@(day),
145 156
                                 @"noOverRePay":@(noOverRePay)
146 157
                                 };
147
-            
158
+            [[YDFMDB sharedInstance]addSingleDataStringDictionary:@{@"month":@(month),@"day":@(day),@"noOverRePay":@(noOverRePay)} withTableName:@"repayRecordTable"];
148 159
             [weakSelf.dataArray addObject:dic];
149 160
             [weakSelf sortData];
150 161
             [weakSelf.tableView reloadData];

+ 2 - 2
KXCardHelp/Main/Home/Card/View/LVKBHomeCardsTableViewCell.m

@@ -37,7 +37,7 @@
37 37
 
38 38
 -(void)setModel:(LVKBHomeCardsModel *)model{
39 39
     _model=model;
40
-    [self.leftImgview sd_setImageWithURL:[NSURL URLWithString:model.bank_icon]];
40
+    [self.leftImgview sd_setImageWithURL:[NSURL URLWithString:model.bank_icon] placeholderImage:[UIImage imageNamed:@"bank_icon_blue"]];
41 41
     self.bankNameLabel.text=model.bank_name;
42 42
     self.bankCodeLabel.text=model.card_num;
43 43
     if ([model.is_main integerValue]==1) {
@@ -45,7 +45,7 @@
45 45
     }else{
46 46
         self.bankTypeLabel.text=@"";
47 47
     }
48
-    self.userNameLabel.text=model.user_name;
48
+    self.userNameLabel.text=(model.user_name==nil?@"卡帮":model.user_name);
49 49
 }
50 50
 
51 51
 @end

+ 1 - 1
Pods/Pods.xcodeproj/xcuserdata/chuangyejia.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -7,7 +7,7 @@
7 7
 		<key>AFNetworking.xcscheme</key>
8 8
 		<dict>
9 9
 			<key>orderHint</key>
10
-			<integer>0</integer>
10
+			<integer>1</integer>
11 11
 		</dict>
12 12
 		<key>FLAnimatedImage.xcscheme</key>
13 13
 		<dict>