Commit adfa12939ec3f07ca3a095a4ac7079a717a12be8
1 parent
408a5e0a
0.6.3
Showing
3 changed files
with
20 additions
and
5 deletions
CNLiveCMineModule.podspec
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,8 +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 | -// [self.tableView scrollToTopAnimated:NO]; | |
| 120 | + if ([self.isRefresh isEqualToString:@"0"]){ | |
| 121 | + [self.tableView scrollToTopAnimated:NO]; | |
| 122 | + } | |
| 121 | 123 | } |
| 122 | 124 | |
| 123 | 125 | - (void)viewDidLoad { |
| ... | ... | @@ -125,7 +127,7 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 125 | 127 | // Do any additional setup after loading the view. |
| 126 | 128 | // self.title = @"收藏"; |
| 127 | 129 | self.view.backgroundColor = CNLiveColorWithHexString(@"#F2F2F2"); |
| 128 | - | |
| 130 | + self.isRefresh = @"1"; | |
| 129 | 131 | _pageNo = 1; |
| 130 | 132 | _isRefreshing = NO; |
| 131 | 133 | |
| ... | ... | @@ -232,6 +234,7 @@ static NSString * const kCNLiveWebViewForCollectionRefreshKey = @"kCNLiveWebView |
| 232 | 234 | |
| 233 | 235 | } |
| 234 | 236 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| 237 | + self.isRefresh = @"0"; | |
| 235 | 238 | CNMyCollectDataSourceModel *model = self.data[indexPath.row]; |
| 236 | 239 | if ([model.type isEqualToString:@"3"]) { |
| 237 | 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]; | ... | ... |