diff --git a/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard b/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard index c1f5314..1ab759b 100644 --- a/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard +++ b/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard @@ -731,7 +731,7 @@ - + @@ -1656,7 +1656,7 @@ - + diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift index 8c33c24..6e1f5f5 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift @@ -403,7 +403,15 @@ class HomeFourTableViewCell: UITableViewCell,UICollectionViewDelegate,UICollecti } func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { //点击进入学校 appRootViewController() - NSLog("点击了****\(dataSet[indexPath.row])") + let vc = Story.instantiateViewControllerWithIdentifier("TVStationInforViewControllerVC", storyName: "TVStation") as! TVStationInforViewController + if collectionView.tag == 1{ + vc.TVStationProgram = TVStationInfor(item: dataSet[indexPath.row]) + vc.title = dataSet[indexPath.row].f_Title + }else if collectionView.tag == 3{ + vc.title = dataSet[indexPath.row].f_Title + vc.excellentTVStationProgram = TVStationSubject(item: dataSet[indexPath.row]) + } + ((appRootViewController().childViewControllers[0] as! MViewController).selectedViewController as! UINavigationController).pushViewController(vc, animated: true) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: (getScreenWidth()-40)/3, height: (getScreenWidth()-40)/3+30) diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift index 6cf3770..ebd085f 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift @@ -241,6 +241,11 @@ class TVStationInfor { f_IsExcellent = json["f_IsExcellent"].boolValue f_Url = json["f_Url"].stringValue } + init(item:MicroCourseModel){ + f_Logo=item.f_Img + f_SchoolName=item.f_Title + f_CreatorTime=item.f_CreatorTime + } } class TVStationSubject { @@ -316,4 +321,10 @@ class TVStationSubject { f_TelevisionId = json["f_TelevisionId"].stringValue } + init(item:MicroCourseModel){ + f_Img=item.f_Img + f_Title=item.f_Title + f_CreatorTime=item.f_CreatorTime + f_Detail=item.f_Detail + } } -- libgit2 0.21.0