杨锴
2024-11-05 0fb7413df54760ac6bd15b90b738e0706de1629e
XQMuse/Root/Home/VC/HomeItemDetailVC.swift
@@ -63,13 +63,17 @@
                        }
                        Services.getMeditationDetail(id: id).subscribe(onNext: {[unowned self] data in
                                    self.model = data.data
                                    self.collect_bitem.image = data.data?.favorite == .yes ? UIImage(named: "btn_collect_1_s"):UIImage(named: "btn_collect_1")
                                    self.collect_bitem.tintColor = data.data?.favorite == .yes ? UIColor(hexString: "fe5b60"):.white
            self.img_background.sd_setImage(with: URL(string: data.data?.backgroundUrl ?? ""))
                                    if audioPlayer.meditationModel?.id == data.data?.id{
                                                audioPlayer.delegate = self
                                    }
            if let m = data.data{
                self.model = m
                let dateTuple = Date.jq_formateToTime_tuple(m.meditationSecondList.first ?? 0)
                self.label_totalTime.text = String(format: "%02ld:%02ld", dateTuple.hour * 60 + dateTuple.minute,dateTuple.second)
                self.collect_bitem.image = m.favorite == .yes ? UIImage(named: "btn_collect_1_s"):UIImage(named: "btn_collect_1")
                self.collect_bitem.tintColor = m.favorite == .yes ? UIColor(hexString: "fe5b60"):.white
                self.img_background.sd_setImage(with: URL(string: data.data?.backgroundUrl ?? ""))
                if audioPlayer.meditationModel?.id == m.id{
                    audioPlayer.delegate = self
                }
            }
                        }).disposed(by: disposeBag)
        //如果从支付过来的,移除支付
@@ -92,7 +96,7 @@
        if let m = model,timeLook > 0{
            Services.watchMuse(id: m.id, timeLook: timeLook).subscribe(onNext: {_ in
                NotificationCenter.default.post(name: TreeTaskUpdate_Noti, object: nil)
            }).disposed(by: disposeBag)
        }
    }
@@ -119,7 +123,7 @@
                        slider_voice.setThumbImage(v1.qmui_snapshotLayerImage(), for: .highlighted)
                        view_coutdown.isHidden = true
                        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)
                        view_function.jq_gradientColor(colorArr: [UIColor.black.withAlphaComponent(0.35).cgColor,UIColor.clear.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 0, y: 1), endPoint: CGPoint(x: 0, y: 0), bounds: nil, locations: nil)
            }