Commit e601e86227156bff631d5f6882998638e95d2057
1 parent
96992613
云测bug修复
Showing
5 changed files
with
38 additions
and
15 deletions
CNLiveCMineModule/Classes/CNCSubMine/ViewController/CNMinePersonNicknameController.m
| ... | ... | @@ -436,13 +436,13 @@ static NSString *sexCellId = @"sexCellId"; |
| 436 | 436 | UITextPosition *position = [textField positionFromPosition:selectedRange.start offset:0]; |
| 437 | 437 | |
| 438 | 438 | NSInteger maxLength = (_type == SettingTypeNick) ? _nickMaxLength : _locMaxLength; |
| 439 | - if (range.length > maxLength) { | |
| 439 | + if (range.length >= maxLength) { | |
| 440 | 440 | return NO; |
| 441 | 441 | } |
| 442 | 442 | // 没有高亮选择的字,则对已输入的文字进行字数统计和限制,防止中文被截断 |
| 443 | 443 | if (!position || !selectedRange){ |
| 444 | 444 | NSInteger maxLength = (_type == SettingTypeNick) ? _nickMaxLength : _locMaxLength; |
| 445 | - if (toBeString.length > maxLength){ | |
| 445 | + if (toBeString.length >= maxLength){ | |
| 446 | 446 | //中文和emoj表情存在问题,需要对此进行处理 |
| 447 | 447 | NSRange rangeRange = [toBeString rangeOfComposedCharacterSequencesForRange:NSMakeRange(0, maxLength)]; |
| 448 | 448 | textField.text = [toBeString substringWithRange:rangeRange]; | ... | ... |
CNLiveCMineModule/Classes/Colletion/ViewController/CNMineCollectController.m
| ... | ... | @@ -30,6 +30,19 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 30 | 30 | @implementation CNMineCollectController |
| 31 | 31 | #pragma mark - Data |
| 32 | 32 | - (void)loadData{ |
| 33 | + if (![CNLiveBusinessTools connectedToNetwork]) { | |
| 34 | + if (self.data.count == 0) { | |
| 35 | + [self.tableView.mj_footer endRefreshing]; | |
| 36 | + [self showEmptyViewWithImage:[UIImage imageNamed:@"c_mine_wifi_no"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)]; | |
| 37 | + [self setCNAPIErrorEmptyView]; | |
| 38 | + self.tableView.mj_footer.hidden = self.data.count == 0; | |
| 39 | + | |
| 40 | + }else{ | |
| 41 | + [QMUITips showInfo:@"无法连接网络"]; | |
| 42 | + } | |
| 43 | + | |
| 44 | + return; | |
| 45 | + } | |
| 33 | 46 | weakself |
| 34 | 47 | [CNCCollectionPresent loadCollectionNewsWithPage:_pageNo succeed:^(NSArray *dataArr) { |
| 35 | 48 | [QMUITips hideAllTipsInView:AppKeyWindow]; |
| ... | ... | @@ -58,6 +71,7 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 58 | 71 | |
| 59 | 72 | } |
| 60 | 73 | } |
| 74 | + [weakSelf.emptyView removeFromSuperview]; | |
| 61 | 75 | weakSelf.tableView.mj_footer.hidden = weakSelf.data.count == 0; |
| 62 | 76 | [weakSelf.tableView reloadData]; |
| 63 | 77 | } error:^{ |
| ... | ... | @@ -79,12 +93,8 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 79 | 93 | } |
| 80 | 94 | |
| 81 | 95 | #pragma mark - Networking |
| 82 | -- (void)cn_noNetworking { | |
| 83 | - [self showEmptyViewWithImage:[UIImage imageNamed:@"c_mine_wifi_no"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)]; | |
| 84 | - [self setCNNoNetworkingEmptyView]; | |
| 85 | -} | |
| 86 | - | |
| 87 | 96 | - (void)cn_wifiOrWWANNetworking { |
| 97 | + self.pageNo = 1; | |
| 88 | 98 | [self loadData]; |
| 89 | 99 | } |
| 90 | 100 | |
| ... | ... | @@ -94,8 +104,6 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 94 | 104 | if(self.data.count > 0){ |
| 95 | 105 | _pageNo = 1; |
| 96 | 106 | _isRefreshing = NO; |
| 97 | - [self.data removeAllObjects]; | |
| 98 | - | |
| 99 | 107 | } |
| 100 | 108 | [self loadData]; |
| 101 | 109 | ... | ... |
CNLiveCMineModule/Classes/Colletion/ViewController/CNMineGoodsCollectViewController.m
| ... | ... | @@ -24,6 +24,19 @@ |
| 24 | 24 | NSLog(@"收藏销毁了"); |
| 25 | 25 | } |
| 26 | 26 | - (void)requestData:(NSInteger)pageNumber{ |
| 27 | + if (![CNLiveBusinessTools connectedToNetwork]) { | |
| 28 | + if (self.data.count == 0) { | |
| 29 | + [self.tableView.mj_footer endRefreshing]; | |
| 30 | + [self showEmptyViewWithImage:[UIImage imageNamed:@"c_mine_wifi_no"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)]; | |
| 31 | + [self setCNAPIErrorEmptyView]; | |
| 32 | + self.tableView.mj_footer.hidden = self.data.count == 0; | |
| 33 | + | |
| 34 | + }else{ | |
| 35 | + [QMUITips showInfo:@"无法连接网络"]; | |
| 36 | + } | |
| 37 | + | |
| 38 | + return; | |
| 39 | + } | |
| 27 | 40 | weakself |
| 28 | 41 | [CNCCollectionPresent loadCollectGoods:pageNumber succeed:^(NSArray *dataArr) { |
| 29 | 42 | [self hideEmptyView]; |
| ... | ... | @@ -57,7 +70,9 @@ |
| 57 | 70 | if (weakSelf.data.count == 0) { |
| 58 | 71 | [weakSelf showEmptyViewWithImage:[UIImage imageNamed:@"c_mine_wifi_no"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)]; |
| 59 | 72 | [weakSelf setCNAPIErrorEmptyView]; |
| 60 | - weakSelf.tableView.mj_footer.hidden = self.data.count == 0; | |
| 73 | + [weakSelf.data removeAllObjects]; | |
| 74 | + weakSelf.tableView.mj_footer.hidden = weakSelf.data.count == 0; | |
| 75 | + [weakSelf.tableView reloadData]; | |
| 61 | 76 | } |
| 62 | 77 | }]; |
| 63 | 78 | } |
| ... | ... | @@ -87,10 +102,6 @@ |
| 87 | 102 | } |
| 88 | 103 | |
| 89 | 104 | #pragma mark - Networking |
| 90 | -- (void)cn_noNetworking { | |
| 91 | - [self showEmptyViewWithImage:[UIImage imageNamed:@"c_mine_wifi_no"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)]; | |
| 92 | - [self setCNNoNetworkingEmptyView]; | |
| 93 | -} | |
| 94 | 105 | |
| 95 | 106 | - (void)cn_wifiOrWWANNetworking { |
| 96 | 107 | [self loadData]; | ... | ... |
CNLiveCMineModule/Classes/inte/Controller/CNLiveCMineInteViewController.m
| ... | ... | @@ -111,7 +111,7 @@ |
| 111 | 111 | } |
| 112 | 112 | -(CGSize)collectionView:(UICollectionView*)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section |
| 113 | 113 | { |
| 114 | - return CGSizeMake(kScreenWidth, self.announModel ? 310 : 260); | |
| 114 | + return CGSizeMake(kScreenWidth, self.announModel ? 260 + 50 *RATIO : 210 + 50*RATIO); | |
| 115 | 115 | } |
| 116 | 116 | - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString*)kind atIndexPath:(NSIndexPath*)indexPath { |
| 117 | 117 | // 判断返回表头类型 还是表尾类型 | ... | ... |
Example/CNLiveCMineModule/CNLiveCMineViewModuleImpl.m
| ... | ... | @@ -162,4 +162,8 @@ |
| 162 | 162 | - (void)skipType:(NSString*)type to:(NSString*)to shopType:(NSString*)shopType currentVC:(UIViewController*)currentVC{ |
| 163 | 163 | |
| 164 | 164 | } |
| 165 | +///base64加密 | |
| 166 | +- (NSString *)base64StringDecrypt:(NSString *)str encryptKey:(NSString *)encryptKey{ | |
| 167 | + return str; | |
| 168 | +} | |
| 165 | 169 | @end | ... | ... |