| | |
| | | } |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | let id = viewModel.dataSource.value!.list[indexPath.row].id |
| | | let vc = HomeItemDetailVC(id: id) |
| | | push(vc: vc) |
| | | let m = viewModel.dataSource.value!.list[indexPath.row] |
| | | |
| | | if m.chargeType == .free || (m.chargeType == .vipFree && UserViewModel.getAvatarInfo().isVip == .yes) || (m.chargeType == .payment && m.paidStatus == .yes){ |
| | | let detailVC = HomeItemDetailVC(id: m.id) |
| | | jq_push(vc: detailVC) |
| | | }else{ |
| | | if m.chargeType == .vipFree{ |
| | | let vc = VIPCenterVC() |
| | | jq_push(vc: vc) |
| | | }else{ |
| | | let vc = PaymentOrderVC(id: m.id,type: .muse,giftToOther: true) |
| | | jq_push(vc: vc) |
| | | } |
| | | } |
| | | } |
| | | } |