| | |
| | | super.viewDidLoad() |
| | | viewModel.configure(collectionView,needMore: false) |
| | | |
| | | startLocation() |
| | | // startLocation() |
| | | |
| | | viewModel.dataSource.subscribe(onNext: {[weak self] data in |
| | | guard let weakSelf = self else { return } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | Services.homeInfo2(storeId: weakSelf.viewModel.storeId.value).subscribe(onNext: {data in |
| | | |
| | | }) { error in |
| | | |
| | | }.disposed(by: weakSelf.disposeBag) |
| | | |
| | | |
| | | group.notify(queue: .main){ |
| | | //重置Layout,不然不更新 |
| | |
| | | |
| | | extension HomeVC: WaterFallLayoutDelegate{ |
| | | func waterFlowLayout(_ waterFlowLayout: WaterFallFlowLayout, itemHeight indexPath: IndexPath) -> CGFloat { |
| | | let item = items[indexPath.row] |
| | | |
| | | if indexPath.row % 2 != 0{ |
| | | return 185 |
| | | }else{ |