File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,10 @@ - (NSError *)checkLoginSuccess:(CODataResponse *)response
7373 // 二次认证
7474 NSString *msg = [response displayMsg ];
7575 error = [NSError errorWithDomain: @" net.coding.ipad" code: OPErrorCodeNeedAuthCode userInfo: @{NSLocalizedDescriptionKey : msg, NSLocalizedFailureReasonErrorKey : msg}];
76+ } else if (response.msg [@" email" ] || response.msg [@" j_captcha_error" ]) {
77+ // 用户名密码、验证码
78+ NSString *msg = [response displayMsg ];
79+ error = [NSError errorWithDomain: @" net.coding.ipad" code: response.code userInfo: @{NSLocalizedDescriptionKey : msg, NSLocalizedFailureReasonErrorKey : msg}];
7680 }
7781 }
7882 else {
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ - (void)didReceiveMemoryWarning {
5252
5353- (void )loadData
5454{
55- COProjectsRequest *request = [COProjectsRequest alloc ];
55+ COProjectsRequest *request = [COProjectsRequest request ];
5656 request.type = @" all" ;
5757 request.sort = @" hot" ;
5858 request.page = 1 ;// 增加页面呢
@@ -70,6 +70,10 @@ - (void)loadData
7070
7171- (void )showData : (NSArray *)data
7272{
73+ data = [data filteredArrayUsingPredicate: [NSPredicate predicateWithFormat: @" isPublic == %d" , NO ]];
74+ if (data.count <= 0 ) {
75+ return ;
76+ }
7377 self.originData = [NSMutableArray arrayWithArray: data];
7478 // 页面判断
7579 [self .data addObjectsFromArray: data];
You can’t perform that action at this time.
0 commit comments