Commit d82ca26bf80d0d3d762e3d90a15f3b6a655aa5f4
1 parent
24796ab2
no message
Showing
3 changed files
with
13 additions
and
5 deletions
metaCode/Classes/Main/HomePages/Controller/AuthController/push相关/CNHomepageDuanJuDetailViewController.swift
| ... | ... | @@ -130,7 +130,8 @@ class CNHomepageDuanJuDetailViewController: CNLiveBaseViewController ,UITableVi |
| 130 | 130 | let cell = CNLiveAlbumCell() |
| 131 | 131 | return cell |
| 132 | 132 | } |
| 133 | - cell.setupNewUIMsgModel(model: albumModel,isDetail: true) | |
| 133 | + cell.isDetail = true | |
| 134 | + cell.albumMsgModel = albumModel | |
| 134 | 135 | return cell |
| 135 | 136 | } |
| 136 | 137 | } | ... | ... |
metaCode/Classes/Main/HomePages/View/HomePage/CNLiveHomePageDuanJuCell.swift
| ... | ... | @@ -105,7 +105,8 @@ class CNLiveHomePageDuanJuCell:UITableViewCell,UITableViewDelegate,UITableViewDa |
| 105 | 105 | let cell = CNLiveAlbumCell() |
| 106 | 106 | return cell |
| 107 | 107 | } |
| 108 | - cell.setupNewUIMsgModel(model: model,isDetail: false) | |
| 108 | + cell.isDetail = false | |
| 109 | + cell.albumMsgModel = model | |
| 109 | 110 | return cell |
| 110 | 111 | } |
| 111 | 112 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ... | ... |
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveAlbumCell.swift
| ... | ... | @@ -11,6 +11,8 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 11 | 11 | |
| 12 | 12 | var albumModelArr:Array<CNLiveAlbumListModel>? |
| 13 | 13 | |
| 14 | + var isDetail:Bool = false | |
| 15 | + | |
| 14 | 16 | var _albumMsgModel : CNLiveAlbumMsgModel? |
| 15 | 17 | var albumMsgModel : CNLiveAlbumMsgModel? { |
| 16 | 18 | get{ |
| ... | ... | @@ -18,6 +20,8 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 18 | 20 | } |
| 19 | 21 | set{ |
| 20 | 22 | _albumMsgModel = newValue! |
| 23 | + | |
| 24 | + self.setupNewUIMsgModel(model: _albumMsgModel!, isDetail: self.isDetail) | |
| 21 | 25 | } |
| 22 | 26 | } |
| 23 | 27 | |
| ... | ... | @@ -29,6 +33,8 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 29 | 33 | } |
| 30 | 34 | set{ |
| 31 | 35 | _albumModel = newValue! |
| 36 | + | |
| 37 | + self.setupNewUI(model: _albumModel!) | |
| 32 | 38 | } |
| 33 | 39 | } |
| 34 | 40 | //MARK: - 懒加载 |
| ... | ... | @@ -82,7 +88,7 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 82 | 88 | fatalError("init(coder:) has not been implemented") |
| 83 | 89 | } |
| 84 | 90 | func setupNewUI(model:CNLiveAlbumModel){ |
| 85 | - self.albumModel = model | |
| 91 | + | |
| 86 | 92 | self.titleLabl.text = model.title |
| 87 | 93 | self.subTitleLabel.text = model.subTitle |
| 88 | 94 | self.iconImgView.kf.setImage(with: URL(string: model.poster)) |
| ... | ... | @@ -90,13 +96,13 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 90 | 96 | self.playBtn.left = KSreenWidth-80 |
| 91 | 97 | } |
| 92 | 98 | func setupNewUIMsgModel(model:CNLiveAlbumMsgModel,isDetail:Bool){ |
| 93 | - self.albumMsgModel = model | |
| 99 | + | |
| 94 | 100 | //在追短剧model |
| 95 | 101 | self.titleLabl.text = model.albumName |
| 96 | 102 | self.subTitleLabel.text = model.subTitle |
| 97 | 103 | self.iconImgView.kf.setImage(with: URL(string: model.albumImg)) |
| 98 | 104 | self.titleLabl.width = KSreenWidth-(self.iconImgView.right+15)-80-30 |
| 99 | - if isDetail{ | |
| 105 | + if self.isDetail{ | |
| 100 | 106 | self.playBtn.left = KSreenWidth-80 |
| 101 | 107 | }else{ |
| 102 | 108 | self.playBtn.left = KSreenWidth-80-30 | ... | ... |