Commit 66b541965872e6917d27f91177a3a466960e825f
Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveCMineModule
* 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveCMineModule: 0.6.5输入框配置 0.6.4 0.6.3 0.6.2 修复云测bug
Showing
8 changed files
with
59 additions
and
9 deletions
CNLiveCMineModule.podspec
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | |
| 9 | 9 | Pod::Spec.new do |s| |
| 10 | 10 | s.name = 'CNLiveCMineModule' |
| 11 | - s.version = '0.6.1' | |
| 11 | + s.version = '0.6.5' | |
| 12 | 12 | s.summary = '网家家C端个人中心' |
| 13 | 13 | |
| 14 | 14 | # This description is used to generate tags and improve search results. |
| ... | ... | @@ -78,5 +78,7 @@ TODO: Add long description of the pod here. |
| 78 | 78 | s.dependency 'libksygpulive' |
| 79 | 79 | s.dependency 'CNLiveNewTripartiteManagement/MBProgressHUD' |
| 80 | 80 | s.dependency 'CNLiveNewIMAManagerKit' |
| 81 | + s.dependency 'CNLiveNewTripartiteManagement/IQKeyboardManager' | |
| 81 | 82 | end |
| 82 | 83 | |
| 84 | + | ... | ... |
CNLiveCMineModule/Classes/CNCMine/View/CNMineEvaAlertView.m
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | #import "CNSwitchView.h" |
| 10 | 10 | #import "CNPlaceholderTextView.h" |
| 11 | 11 | #import <DSBaseModule/DSBaseModule.h> |
| 12 | +#import <IQKeyboardManager/IQKeyboardManager.h> | |
| 12 | 13 | @interface CNMineEvaAlertView() |
| 13 | 14 | @property (nonatomic, strong) UIImageView *topImage; |
| 14 | 15 | @property (nonatomic, strong) UIView *bgView; |
| ... | ... | @@ -93,9 +94,9 @@ |
| 93 | 94 | } |
| 94 | 95 | + (CNMineEvaAlertView *)setUpFeelBadEvaluateAlertViewDoneBlock:(void (^)(NSString * _Nonnull))doneBlock cancelBlock:(nonnull void (^)(void))cancelBlock{ |
| 95 | 96 | CNMineEvaAlertView *alertView = [CNMineEvaAlertView alertView]; |
| 97 | + __weak typeof(alertView) weakAlert = alertView; | |
| 96 | 98 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id _Nonnull sender) { |
| 97 | - alertView.frame = CGRectMake(0, 0,DS_adapt_length(339), DS_adapt_length(567)); | |
| 98 | - [alertView.textView endEditing:YES]; | |
| 99 | + [weakAlert.textView endEditing:YES]; | |
| 99 | 100 | }]; |
| 100 | 101 | [alertView addGestureRecognizer:tap]; |
| 101 | 102 | alertView.frame = CGRectMake(0, 0,kScreenWidth *339/367, kScreenWidth *567/367); |
| ... | ... | @@ -112,6 +113,7 @@ |
| 112 | 113 | __block NSString *swichChooseStr = nil; |
| 113 | 114 | alertView.switchView.chooseBlock = ^(NSString * _Nonnull result) { |
| 114 | 115 | swichChooseStr = result; |
| 116 | + [weakAlert.textView endEditing:YES]; | |
| 115 | 117 | }; |
| 116 | 118 | [alertView.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) { |
| 117 | 119 | make.right.top.equalTo(alertView); |
| ... | ... | @@ -169,7 +171,6 @@ |
| 169 | 171 | modalViewController.contentView = alertView; |
| 170 | 172 | modalViewController.modal = YES; |
| 171 | 173 | [modalViewController showWithAnimated:YES completion:nil]; |
| 172 | - __weak typeof(alertView) weakAlert = alertView; | |
| 173 | 174 | [alertView.closeBtn addBlockForControlEvents:UIControlEventTouchUpInside block:^(id _Nonnull sender) { |
| 174 | 175 | [weakModal hideWithAnimated:YES completion:^(BOOL finished) { |
| 175 | 176 | if (cancelBlock) cancelBlock(); |
| ... | ... | @@ -186,6 +187,26 @@ |
| 186 | 187 | }]; |
| 187 | 188 | return alertView; |
| 188 | 189 | } |
| 190 | +- (void)dealloc{ | |
| 191 | +// [[NSNotificationCenter defaultCenter] removeObserver:self]; | |
| 192 | + NSLog(@"CNMineEvaAlertView - dealloc"); | |
| 193 | +} | |
| 194 | +- (instancetype)init{ | |
| 195 | + if(self = [super init]){ | |
| 196 | +// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardShowNoti:) name:UIKeyboardWillShowNotification object:Nil]; | |
| 197 | + [IQKeyboardManager sharedManager].enable = YES; | |
| 198 | + [IQKeyboardManager sharedManager].enableAutoToolbar = YES; | |
| 199 | + } | |
| 200 | + return self; | |
| 201 | +} | |
| 202 | +#pragma mark - notification | |
| 203 | +- (void)keyboardShowNoti:(NSNotification *)noti{ | |
| 204 | + NSDictionary *userInfo = noti.userInfo; | |
| 205 | + CGRect keyboardRect = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; | |
| 206 | + CGFloat heyboardHeight = keyboardRect.size.height; | |
| 207 | + self.top -= heyboardHeight; | |
| 208 | +} | |
| 209 | +#pragma mark - Getting | |
| 189 | 210 | - (UIView *)bgView |
| 190 | 211 | { |
| 191 | 212 | if (!_bgView) { | ... | ... |
CNLiveCMineModule/Classes/CNCSubMine/ViewController/CNMineCodeVC.m
| ... | ... | @@ -84,9 +84,11 @@ |
| 84 | 84 | { |
| 85 | 85 | [super viewWillAppear:animated]; |
| 86 | 86 | [BHConfig set:@"2" value:@"darenPayMent"]; |
| 87 | + self.navigationController.navigationBarHidden = YES; | |
| 87 | 88 | } |
| 88 | 89 | - (void)viewWillDisappear:(BOOL)animated{ |
| 89 | 90 | [super viewWillDisappear:animated]; |
| 91 | + self.navigationController.navigationBarHidden = NO; | |
| 90 | 92 | } |
| 91 | 93 | - (BOOL)preferredNavigationBarHidden |
| 92 | 94 | { | ... | ... |
CNLiveCMineModule/Classes/CNWallet/ViewController/CNChangePayPasswordController.m
| ... | ... | @@ -226,7 +226,7 @@ |
| 226 | 226 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNCheckVerifyCodeSetPasswordUrl Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { |
| 227 | 227 | if (error) { |
| 228 | 228 | [QMUITips showError:@"验证验证码失败" inView:self.view hideAfterDelay:1.5]; |
| 229 | - self.sendNoteButton.userInteractionEnabled = YES; | |
| 229 | +// self.sendNoteButton.userInteractionEnabled = YES; | |
| 230 | 230 | return; |
| 231 | 231 | } |
| 232 | 232 | NSLog(@"data:%@",responseObject); | ... | ... |
CNLiveCMineModule/Classes/CNWallet/ViewController/CNTradingRecordController.m
| ... | ... | @@ -36,7 +36,7 @@ static NSString *walletDetailCellId = @"walletDetailCellId"; |
| 36 | 36 | @property (nonatomic, strong) CNNoOrderView *noDataView; |
| 37 | 37 | @property (nonatomic, strong) NSArray *timeArr; |
| 38 | 38 | @property (nonatomic, copy) NSString *monthStr; |
| 39 | - | |
| 39 | +@property (nonatomic, strong)NSDate *selectDate; | |
| 40 | 40 | @end |
| 41 | 41 | |
| 42 | 42 | @implementation CNTradingRecordController |
| ... | ... | @@ -132,6 +132,7 @@ static NSString *walletDetailCellId = @"walletDetailCellId"; |
| 132 | 132 | [CNLiveNetworking setupShowDataResult:YES]; |
| 133 | 133 | weakself |
| 134 | 134 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNViewTransferRecordUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { |
| 135 | + [QMUITips hideAllTips]; | |
| 135 | 136 | if (error) { |
| 136 | 137 | NSLog(@"error:%@",error.localizedDescription); |
| 137 | 138 | [weakSelf.tableView.mj_header endRefreshing]; |
| ... | ... | @@ -213,6 +214,7 @@ static NSString *walletDetailCellId = @"walletDetailCellId"; |
| 213 | 214 | //获取当前时间日期 |
| 214 | 215 | NSString *dateStr = [dateFormatter stringFromDate:[NSDate date]]; |
| 215 | 216 | datePicker.minimumDate = [dateFormatter dateFromString: @"2017-01"]; |
| 217 | + [datePicker setDate:self.selectDate?self.selectDate: [dateFormatter dateFromString: dateStr]]; | |
| 216 | 218 | datePicker.maximumDate = [dateFormatter dateFromString: dateStr]; |
| 217 | 219 | [self presentViewController:datePickManager animated:false completion:nil]; |
| 218 | 220 | } |
| ... | ... | @@ -230,6 +232,10 @@ static NSString *walletDetailCellId = @"walletDetailCellId"; |
| 230 | 232 | dateComponents.day = 1; |
| 231 | 233 | NSCalendar * calendar = [NSCalendar currentCalendar]; |
| 232 | 234 | NSDate * date = [calendar dateFromComponents:dateComponents]; |
| 235 | + if ([date compare:datePicker.maximumDate] == NSOrderedDescending) { | |
| 236 | + date = datePicker.maximumDate; | |
| 237 | + } | |
| 238 | + self.selectDate = date; | |
| 233 | 239 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 234 | 240 | [dateFormatter setLocale:[NSLocale currentLocale]]; |
| 235 | 241 | [dateFormatter setDateFormat:@"yyyy年M月"];//dd日h:mm:ss t | ... | ... |
CNLiveCMineModule/Classes/Colletion/ViewController/CNMineCollectController.m
| ... | ... | @@ -101,6 +101,7 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 101 | 101 | - (void)viewDidAppear:(BOOL)animated { |
| 102 | 102 | [super viewDidAppear:animated]; |
| 103 | 103 | if([_isRefresh isEqualToString:@"0"]){ |
| 104 | + _isRefresh = @"1";//1不刷新 | |
| 104 | 105 | if(self.data.count > 0){ |
| 105 | 106 | _pageNo = 1; |
| 106 | 107 | _isRefreshing = NO; |
| ... | ... | @@ -116,7 +117,9 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 116 | 117 | } |
| 117 | 118 | - (void)viewDidDisappear:(BOOL)animated { |
| 118 | 119 | [super viewDidDisappear:animated]; |
| 119 | - _isRefresh = @"0";//1不刷新 | |
| 120 | + if ([self.isRefresh isEqualToString:@"0"]){ | |
| 121 | + [self.tableView scrollToTopAnimated:NO]; | |
| 122 | + } | |
| 120 | 123 | } |
| 121 | 124 | |
| 122 | 125 | - (void)viewDidLoad { |
| ... | ... | @@ -124,7 +127,7 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 124 | 127 | // Do any additional setup after loading the view. |
| 125 | 128 | // self.title = @"收藏"; |
| 126 | 129 | self.view.backgroundColor = CNLiveColorWithHexString(@"#F2F2F2"); |
| 127 | - | |
| 130 | + self.isRefresh = @"1"; | |
| 128 | 131 | _pageNo = 1; |
| 129 | 132 | _isRefreshing = NO; |
| 130 | 133 | |
| ... | ... | @@ -231,6 +234,7 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 231 | 234 | |
| 232 | 235 | } |
| 233 | 236 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| 237 | + self.isRefresh = @"0"; | |
| 234 | 238 | CNMyCollectDataSourceModel *model = self.data[indexPath.row]; |
| 235 | 239 | if ([model.type isEqualToString:@"3"]) { |
| 236 | 240 | [[CNLiveCMineService shareMineProtocol] pushCMineInteContentForCMainWebViewWithURL:model.shareUrl statue:CNLiveCMineIntePushWebViewStatueAnnotationDetail]; | ... | ... |
CNLiveCMineModule/Classes/Colletion/ViewController/CNMineGoodsCollectViewController.m
| ... | ... | @@ -78,6 +78,7 @@ |
| 78 | 78 | } |
| 79 | 79 | - (void)viewDidLoad { |
| 80 | 80 | [super viewDidLoad]; |
| 81 | + self.isRefresh = @"1"; | |
| 81 | 82 | self.view.backgroundColor = CNLiveColorWithHexString(@"#F2F2F2"); |
| 82 | 83 | self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
| 83 | 84 | self.tableView.backgroundColor = CNLiveColorWithHexString(@"#F2F2F2"); |
| ... | ... | @@ -91,7 +92,17 @@ |
| 91 | 92 | -(void)viewDidAppear:(BOOL)animated |
| 92 | 93 | { |
| 93 | 94 | [super viewDidAppear:animated]; |
| 94 | - [self loadData]; | |
| 95 | + //跳转到二级刷新页面 | |
| 96 | + if([self.isRefresh isEqualToString:@"0"]){ | |
| 97 | + self.isRefresh = @"1"; | |
| 98 | + [self loadData]; | |
| 99 | + } | |
| 100 | +} | |
| 101 | +- (void)viewDidDisappear:(BOOL)animated{ | |
| 102 | + [super viewDidDisappear:animated]; | |
| 103 | + if([self.isRefresh isEqualToString:@"0"]){ | |
| 104 | + [self.tableView scrollToTopAnimated:NO]; | |
| 105 | + } | |
| 95 | 106 | } |
| 96 | 107 | -(void)loadData{ |
| 97 | 108 | _pageNo = 1; |
| ... | ... | @@ -145,6 +156,7 @@ |
| 145 | 156 | } |
| 146 | 157 | |
| 147 | 158 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| 159 | + self.isRefresh = @"0"; | |
| 148 | 160 | CNCollectGoodListModel *model = self.data[indexPath.row]; |
| 149 | 161 | [[NSUserDefaults standardUserDefaults] setObject:@{@"time":@0,@"activity_id":@"ds_collect"} forKey:@"CNLiveWebViewUnionNewActivityKey"]; |
| 150 | 162 | [[CNLiveCMineService shareMineProtocol] skipType:@"2" to:model.id shopType:model.shop_type currentVC:self]; | ... | ... |
CNLiveCMineModule/Classes/inte/Controller/CNLiveCMineInteDetailViewController.m
| ... | ... | @@ -114,6 +114,9 @@ static NSInteger const kCNLiveSectionHeaderHeight = 120;//头视图高度 |
| 114 | 114 | dateComponents.day = 1; |
| 115 | 115 | NSCalendar * calendar = [NSCalendar currentCalendar]; |
| 116 | 116 | NSDate * date = [calendar dateFromComponents:dateComponents]; |
| 117 | + if ([date compare:datePicker.maximumDate] == NSOrderedDescending) { | |
| 118 | + date = datePicker.maximumDate; | |
| 119 | + } | |
| 117 | 120 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
| 118 | 121 | [dateFormatter setLocale:[NSLocale currentLocale]]; |
| 119 | 122 | [dateFormatter setDateFormat:@"yyyy-MM"]; | ... | ... |