From a2589f9891509d85a873192d56e785885513e780 Mon Sep 17 00:00:00 2001
From: younger_times <841720330@qq.com>
Date: 星期二, 18 七月 2023 15:54:32 +0800
Subject: [PATCH] 新增

---
 WanPai/Root/Course/TCell/CourseOnlineTCell.swift |   40 ++++++++++++++++++++++++++++++++++------
 1 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/WanPai/Root/Course/TCell/CourseOnlineTCell.swift b/WanPai/Root/Course/TCell/CourseOnlineTCell.swift
index 97ef7b7..0058fb1 100644
--- a/WanPai/Root/Course/TCell/CourseOnlineTCell.swift
+++ b/WanPai/Root/Course/TCell/CourseOnlineTCell.swift
@@ -1,14 +1,42 @@
-//
-//  CourseOnlineTCell.swift
-//  WanPai
-//
-//  Created by 无故事王国 on 2023/6/16.
-//
+    //
+    //  CourseOnlineTCell.swift
+    //  WanPai
+    //
+    //  Created by 无故事王国 on 2023/6/16.
+    //
 
 import UIKit
 
 class CourseOnlineTCell: UITableViewCell {
 
+    var videoDetailModel:VideoDetailModel!{
+        didSet{
+            img_cover.sd_setImage(with: URL(string: videoDetailModel.cover))
+            label_content.text = videoDetailModel.introduce
+            label_title.text = videoDetailModel.name
+            label_coin.text = "\(videoDetailModel.integral)积分"
+            label_coinTitle.isHidden = videoDetailModel.study == 1
+            label_coin.isHidden = videoDetailModel.study == 1
+
+            switch videoDetailModel.study{
+                case 1:
+                    btn_state.setTitle("已学习", for: .normal)
+                    btn_state.backgroundColor = UIColor(hexStr: "#ADA9A9")
+                default:
+                    btn_state.setTitle("查看详情", for: .normal)
+                    btn_state.backgroundColor = Def_ThemeColor
+            }
+        }
+    }
+
+    @IBOutlet weak var label_title: UILabel!
+    @IBOutlet weak var label_content: UILabel!
+    @IBOutlet weak var label_coin: UILabel!
+    @IBOutlet weak var label_coinTitle: UILabel!
+    @IBOutlet weak var btn_state: UIButton!
+    @IBOutlet weak var img_cover: UIImageView!
+
+
     override func awakeFromNib() {
         super.awakeFromNib()
         selectionStyle = .none

--
Gitblit v1.7.1