From 62a24b3c7cf92919a93ee575e9460037e1a53816 Mon Sep 17 00:00:00 2001
From: 杨锴 <841720330@qq.com>
Date: 星期四, 07 十一月 2024 19:10:20 +0800
Subject: [PATCH] fix bug

---
 XQMuse/Root/Home/VC/HomeItemListVC.swift |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/XQMuse/Root/Home/VC/HomeItemListVC.swift b/XQMuse/Root/Home/VC/HomeItemListVC.swift
index 257dfcd..c57fb6f 100644
--- a/XQMuse/Root/Home/VC/HomeItemListVC.swift
+++ b/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{

--
Gitblit v1.7.1