From 09a372bc45fde16fd42257ab6f78b8deeecf720b Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期三, 16 四月 2025 16:38:05 +0800 Subject: [PATCH] fix bug --- XQMuse/Root/Course/View/CourseSendGiftView.swift | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/XQMuse/Root/Course/View/CourseSendGiftView.swift b/XQMuse/Root/Course/View/CourseSendGiftView.swift index c1b9fc4..c67584e 100644 --- a/XQMuse/Root/Course/View/CourseSendGiftView.swift +++ b/XQMuse/Root/Course/View/CourseSendGiftView.swift @@ -15,6 +15,8 @@ @IBOutlet weak var label_price: UILabel! @IBOutlet weak var cons_bottom: NSLayoutConstraint! + private var price:Double = 0 + private var clouse:(()->Void)? override func awakeFromNib() { @@ -24,8 +26,10 @@ layoutIfNeeded() } - static func show(_ clouse:@escaping()->Void){ + static func show(price:Double,clouse:@escaping()->Void){ let view = CourseSendGiftView.jq_loadNibView() + view.frame = sceneDelegate?.window?.frame ?? .zero + view.label_price.text = "¥\(price.jq_formatFloat)" sceneDelegate?.window?.addSubview(view) view.clouse = clouse view.cons_bottom.constant = 0 @@ -37,7 +41,7 @@ override func layoutSubviews() { super.layoutSubviews() - btn_complete.jq_gradientNibColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 18.5) + btn_complete.localGradientColor(cornerRadius: 18.5,bounds: CGRect(x: 0, y: 0, width: JQ_ScreenW - 46 * 2, height: 40)) } @IBAction func completeAction(_ sender: UIButton) { -- Gitblit v1.7.1