From 745e4fc64ca2912c011d925f12e638ed6d81b367 Mon Sep 17 00:00:00 2001
From: 杨锴 <841720330@qq.com>
Date: 星期五, 15 十一月 2024 15:20:59 +0800
Subject: [PATCH] fix bug

---
 XQMuse/Root/Course/View/CourseDetailHeaderView.swift |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/XQMuse/Root/Course/View/CourseDetailHeaderView.swift b/XQMuse/Root/Course/View/CourseDetailHeaderView.swift
index cfc13c3..36f4835 100644
--- a/XQMuse/Root/Course/View/CourseDetailHeaderView.swift
+++ b/XQMuse/Root/Course/View/CourseDetailHeaderView.swift
@@ -10,8 +10,32 @@
 
 class CourseDetailHeaderView: UIView,JQNibView{
 				
+				@IBOutlet weak var label_title: UILabel!
+				@IBOutlet weak var label_teacher: UILabel!
+				@IBOutlet weak var label_studyNum: UILabel!
+				@IBOutlet weak var image_cover: UIImageView!
 				@IBOutlet weak var icon: UIImageView!
+
+    private var videoView:VideoView?
+
+
 				override func awakeFromNib() {
 								super.awakeFromNib()
 				}
+
+				func setCourseModel(_ model:CourseModel){
+								label_title.text = model.courseTitle
+								label_teacher.text = "导师 \(model.tutor)"
+								label_studyNum.text = "\(model.count)人已加入学习"
+								image_cover.sd_setImage(with: URL(string: model.detailUrl.jq_urlEncoded()))
+				}
+
+    func setVideo(url:String,coverImageUrl:String,delegate:CLPlayerDelegate){
+        videoView = VideoView(url: url, autoPlay: false, placeHoderImageUrl: coverImageUrl, delegate: delegate)
+
+        addSubview(videoView!)
+        videoView!.snp.makeConstraints { make in
+            make.edges.equalTo(self.image_cover)
+        }
+    }
 }

--
Gitblit v1.7.1