| | |
| | | |
| | | class Home_Style_1_TCell: UITableViewCell { |
| | | |
| | | var model:ToDayMeditationModel?{ |
| | | didSet{ |
| | | if let m = model{ |
| | | |
| | | if m.id == 0{ |
| | | img_cover.image = UIImage(named: "bt_private") |
| | | view_data.isHidden = true |
| | | }else{ |
| | | view_data.isHidden = false |
| | | img_cover.sd_setImage(with: URL(string: m.imageUrl.jq_urlEncoded())) |
| | | |
| | | let turple = Date.jq_formateToTime_tuple(m.time) |
| | | let minute = (turple.hour * 60 + turple.minute) |
| | | let second = turple.second |
| | | |
| | | label_title.text = "\(m.clientMeditationVO!.meditationTitle) | \(String(format: "%.2ld:%.2ld", minute,second))" |
| | | label_joinNum.text = "\(m.clientMeditationVO!.realLearnedNum + m.clientMeditationVO!.virtualLearnedNum)人已参加学习" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | private var model:ToDayMeditationModel? |
| | | |
| | | @IBOutlet weak var img_cover: UIImageView! |
| | | @IBOutlet weak var label_title: UILabel! |
| | | @IBOutlet weak var label_joinNum: UILabel! |
| | |
| | | selectionStyle = .none |
| | | } |
| | | |
| | | func setTodayMeditationModel(_ model:ToDayMeditationModel){ |
| | | if model.id == 0{ |
| | | img_cover.image = UIImage(named: "bt_private") |
| | | view_data.isHidden = true |
| | | }else{ |
| | | view_data.isHidden = false |
| | | img_cover.sd_setImage(with: URL(string: model.imageUrl.jq_urlEncoded())) |
| | | |
| | | let turple = Date.jq_formateToTime_tuple(model.time) |
| | | let minute = (turple.hour * 60 + turple.minute) |
| | | let second = turple.second |
| | | |
| | | label_title.text = "\(model.clientMeditationVO!.meditationTitle) | \(String(format: "%.2ld:%.2ld", minute,second))" |
| | | label_joinNum.text = "\(model.clientMeditationVO!.realLearnedNum + model.clientMeditationVO!.virtualLearnedNum)人已参加学习" |
| | | } |
| | | } |
| | | |
| | | func setplaying(){ |
| | | |
| | | if model?.meditationId == AudioPlayer.getSharedInstance().meditationModel?.id{ |