|
@@ -182,8 +182,18 @@
|
|
|
|
|
|
// MARK: - delegate datasource
|
|
// MARK: - delegate datasource
|
|
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
|
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
|
|
|
+ if (indexPath.section != 2) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ NSInteger tempOff = self.vm.cateModel.image.length > 0 ? 1 : 0;
|
|
|
|
+ if (self.vm.productList.count <= indexPath.row-tempOff)
|
|
|
|
+ {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
|
|
|
+ ASProductBaseModel *m = self.vm.productList[indexPath.row-tempOff];
|
|
|
|
+ UIViewController *viewController = [[CTMediator sharedInstance] Goods_GoodsDetailsC:@{@"entity_id":m.Id}];
|
|
|
|
+ [self.navigationController pushViewController:viewController animated:YES];
|
|
}
|
|
}
|
|
|
|
|
|
// MARK: - UICollectionViewDataSource
|
|
// MARK: - UICollectionViewDataSource
|