fix
杨锴
2024-08-23 adc2db9bb29e7f316c46b6de679db1522ffc9cc8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//
//  HomeItemDetailVC.swift
//  XQMuse
//
//  Created by 无故事王国 on 2024/8/14.
//
 
import UIKit
import JQTools
 
class HomeItemDetailVC: BaseVC {
 
                @IBOutlet weak var slider_voice: UISlider!
                @IBOutlet weak var view_function: UIView!
                @IBOutlet weak var btn_play: UIButton!
                @IBOutlet weak var label_title: UILabel!
                @IBOutlet weak var label_subtitle: UILabel!
                @IBOutlet weak var btn_like: UIButton!
                @IBOutlet weak var label_commentNum: UILabel!
                
    override func viewDidLoad() {
        super.viewDidLoad()
                                title = "心泉·疗愈"
    }
 
                override func viewDidAppear(_ animated: Bool) {
                                super.viewDidAppear(animated)
 
                                //如果从支付过来的,移除支付
                                navigationController!.viewControllers.removeAll { vc in
                                                if vc is PaymentOrderResultVC || vc is PaymentOrderVC{
                                                                return true
                                                }
                                                return false
                                }
                }
 
                override func setUI() {
 
                                let collect_bitem = UIBarButtonItem(image: UIImage(named: "btn_collect"), style: .plain, target: self, action: #selector(collectionAction))
                                collect_bitem.tintColor = .white
                                let share_bitem = UIBarButtonItem(image: UIImage(named: "btn_share"), style: .plain, target: self, action: #selector(shareAction))
                                share_bitem.tintColor = .white
                                share_bitem.imageInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 15)
                                navigationItem.rightBarButtonItems = [share_bitem,collect_bitem]
 
 
                                let v1 = UIView()
                                v1.backgroundColor = UIColor(hexStr: "#B6DC90")
                                v1.bounds = CGRect(x: 0, y: 0, width: 17, height: 17)
                                v1.jq_borderWidth = 2
                                v1.jq_borderColor = .white
                                v1.jq_cornerRadius = 8.5
 
                                slider_voice.setThumbImage(v1.qmui_snapshotLayerImage(), for: .normal)
                                slider_voice.setThumbImage(v1.qmui_snapshotLayerImage(), for: .highlighted)
 
                }
 
                override func viewWillAppear(_ animated: Bool) {
                                super.viewWillAppear(animated)
                                (navigationItem.leftBarButtonItem?.customView as? UIButton)?.setImage(UIImage(named: "btn_back")?.withTintColor(.white), for: .normal)
                }
 
                @IBAction func playAction(_ sender: UIButton) {
 
                }
 
                @IBAction func timeAction(_ sender: UIButton) {
                                CountdownChooseListView.show()
                }
 
                @IBAction func commentAction(_ sender: TapBtn) {
                                let vc = CommentListVC()
                                vc.modalPresentationStyle = .custom
                                present(vc, animated: true)
                }
 
                @IBAction func beLikeAction(_ sender: UIButton) {
 
                }
 
                
                @IBAction func playWayAction(_ sender: UIButton) {
 
                }
 
                @IBAction func settingAction(_ sender: UIButton) {
                                PlaySettingView.show()
                }
 
                @objc func collectionAction(){
 
                }
 
                @objc func shareAction(){
                                ShareView.show()
                }
 
                override func viewDidLayoutSubviews() {
                                super.viewDidLayoutSubviews()
 
                                view_function.jq_gradientColor(colorArr: [UIColor.black.withAlphaComponent(0.15).cgColor,UIColor.clear.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 0, y: 1), endPoint: CGPoint(x: 0, y: 0), bounds: nil, locations: nil)
                }
 
 
                override var preferredStatusBarStyle: UIStatusBarStyle{
                                return .lightContent
                }
}