杨锴
2024-11-07 62a24b3c7cf92919a93ee575e9460037e1a53816
XQMuse/Root/Home/VC/HomeItemListVC.swift
@@ -23,10 +23,12 @@
            private var collectionView:UICollectionView!
            private var topTitle:String!
            private var viewModel = HomeItemViewModel()
    private var showType: DisplayType!
            init(topTitle:String,id:Int) {
            init(topTitle:String,id:Int,showType: DisplayType) {
                        super.init(nibName: nil, bundle: nil)
                        self.topTitle = topTitle
        self.showType = showType
                        self.viewModel.id.accept(id)
            }
@@ -69,7 +71,7 @@
            func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
                        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_HomeRelaxBanner_2_CCell", for: indexPath) as! HomeRelaxBanner_2_CCell
                        let model = viewModel.dataSource.value!.list[indexPath.row]
                        cell.setMeditationModel(model)
        cell.setMeditationModel(model,showType: showType)
                        return cell
            }
@@ -80,9 +82,9 @@
            func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
                        let m = viewModel.dataSource.value!.list[indexPath.row]
        let isVip = UserViewModel.getAvatarInfo().isVip
        let isVip = UserViewModel.getAvatarInfo().checkVip()
        if m.chargeType == .free || (m.chargeType == .vipFree && isVip == .yes) || (m.chargeType == .payment && m.isBuy == .yes){
        if m.chargeType == .free || (m.chargeType == .vipFree && isVip) || (m.chargeType == .payment && m.isBuy == .yes){
            let detailVC = HomeItemDetailVC(id: m.id)
            jq_push(vc: detailVC)
        }else{