Commit 8a54326de5408aa2cb173f88f1afd429af15a719
1 parent
7a01c6c1
闪退修改
Showing
1 changed file
with
6 additions
and
3 deletions
CNLiveScioLive/Pages/Newsound/OldController/VoiceViewController.m
| ... | ... | @@ -222,7 +222,7 @@ static const NSInteger margin = 34; |
| 222 | 222 | |
| 223 | 223 | NSString *strUrl = @"http://app.phonemovie.cnlive.com/gxb/api/cataloglatest"; |
| 224 | 224 | |
| 225 | - NSString *categoryId = [NSString stringWithFormat:@"{\"plat\":\"a\",\"version\":\"5.0\",\"appid\":\"gxb\",\"categoryId\":\"spzl/news/\",\"page\":\"%ld\",\"pageSize\":\"10\"}",(long)self.engPageNumber]; | |
| 225 | + NSString *categoryId = [NSString stringWithFormat:@"{\"plat\":\"a\",\"version\":\"5.0\",\"appid\":\"gxb\",\"categoryId\":\"spzl/news/\",\"page\":\"%ld\"}",(long)self.engPageNumber]; | |
| 226 | 226 | |
| 227 | 227 | if (![[Reachability reachabilityForInternetConnection] currentReachabilityStatus]) { |
| 228 | 228 | [AlertViewTool showHUDViewText:CustomStr(@"NetworkiInterruption")]; |
| ... | ... | @@ -343,7 +343,7 @@ static const NSInteger margin = 34; |
| 343 | 343 | |
| 344 | 344 | NSString *strUrl = @"http://app.phonemovie.cnlive.com/gxb/api/cataloglatest"; |
| 345 | 345 | |
| 346 | - NSString *categoryId = [NSString stringWithFormat:@"{\"plat\":\"a\",\"version\":\"5.0\",\"appid\":\"gxb\",\"categoryId\":\"spzl/news/\",\"page\":\"%ld\",\"pageSize\":\"10\"}",(long)self.engPageNumber]; | |
| 346 | + NSString *categoryId = [NSString stringWithFormat:@"{\"plat\":\"a\",\"version\":\"5.0\",\"appid\":\"gxb\",\"categoryId\":\"spzl/news/\",\"page\":\"%ld\"}",(long)self.engPageNumber]; | |
| 347 | 347 | |
| 348 | 348 | if (![[Reachability reachabilityForInternetConnection] currentReachabilityStatus]) { |
| 349 | 349 | [AlertViewTool showHUDViewText:CustomStr(@"NetworkiInterruption")]; |
| ... | ... | @@ -1070,12 +1070,15 @@ static const NSInteger margin = 34; |
| 1070 | 1070 | |
| 1071 | 1071 | - (void)favoriteBtnClicked:(id)sender { |
| 1072 | 1072 | TableData *notice = [[TableData alloc] initWithJSONDictionary:_dictionary]; |
| 1073 | + if (!notice.pageUrl) { | |
| 1074 | + return; | |
| 1075 | + } | |
| 1073 | 1076 | BOOL isIn = [[DBAction sharedDBAction] isInTable:[User_Defaults objectForKey:Language_Local] notice:notice]; |
| 1074 | 1077 | NSMutableDictionary *author = [NSMutableDictionary dictionaryWithContentsOfFile:FavouriteAuthors_PATH]; |
| 1075 | 1078 | if (!author) { |
| 1076 | 1079 | author = [NSMutableDictionary dictionary]; |
| 1077 | 1080 | } |
| 1078 | - | |
| 1081 | + | |
| 1079 | 1082 | if (!isIn) { |
| 1080 | 1083 | BOOL isInsert = [[DBAction sharedDBAction] insertTable:[User_Defaults objectForKey:Language_Local] notice:notice]; |
| 1081 | 1084 | [author setObject:_dictionary[@"author"] forKey:notice.pageUrl]; | ... | ... |