1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- //
- // RQPlaceDetailNoteViewController.m
- // JiaPei
- //
- // Created by 张嵘 on 2023/4/17.
- //
- #import "RQPlaceDetailNoteViewController.h"
- @interface RQPlaceDetailNoteViewController ()
- /// viewModel
- @property (nonatomic, readonly, strong) RQPlaceDetailNoteViewModel *viewModel;
- @end
- @implementation RQPlaceDetailNoteViewController
- @dynamic viewModel;
- - (void)viewDidLoad {
- [super viewDidLoad];
- @weakify(self)
- self.tableView.backgroundColor = UIColor.whiteColor;
- [[[RQNotificationCenter rac_addObserverForName:RQUserNotificationAlipayOrWechatSuccess object:nil] takeUntil:self.rac_willDeallocSignal] subscribeNext:^(NSNotification * note) {
- @strongify(self)
- PayResp *resp = (PayResp *)note.object;
- NSLog(@"----微信支付成功:%@",resp.returnKey);
- [RQ_COMMON_MANAGER updateVipList];
- [self.tableView reloadData];
- }];
- }
- #pragma mark - OverrideMethods
- /// 配置tableView的区域
- - (UIEdgeInsets)contentInset {
- return UIEdgeInsetsMake(10, 0, RQ_APPLICATION_SAFEAREA_BOTTOM_HEIGHT + 54.f + (RQ_APPLICATION_NAV_BAR_HEIGHT + QMUIHelper.statusBarHeightConstant), 0);
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath {
- RQCommonGroupViewModel *groupViewModel = self.viewModel.dataSource[indexPath.section];
- RQCommonItemViewModel *itemViewModel = groupViewModel.itemViewModels[indexPath.row];
- return [NSClassFromString(itemViewModel.itemClassName) cellWithTableView:tableView];
- }
- - (void)configureCell:(RQCommonCell *)cell atIndexPath:(NSIndexPath *)indexPath withObject:(id)object {
- [cell bindViewModel:object];
- }
- #pragma mark - UITableViewDelegate & UITableViewDataSource
- - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
- !self.scrollCallback ?: self.scrollCallback(scrollView);
- }
- #pragma mark - JXPagerViewListViewDelegate
- - (UIView *)listView {
- return self.view;
- }
- - (UIScrollView *)listScrollView {
- return self.tableView;
- }
- - (void)listViewDidScrollCallback:(void (^)(UIScrollView *))callback {
- self.scrollCallback = callback;
- }
- @end
|