| | |
| | | } |
| | | |
| | | if needPayment{ |
| | | let attribute = AttributedStringbuilder.build().add(string: " 疗愈币", withFont: .systemFont(ofSize: 12,weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: "\(m.generalPrice.jq_formatFloat)", withFont: .systemFont(ofSize: 21.71, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: " 立即购买 ", withFont: .systemFont(ofSize: 16, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).mutableAttributedString |
| | | let attribute = AttributedStringbuilder.build().add(string: " 疗愈币", withFont: .systemFont(ofSize: 12,weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: "\(m.iosPrice.jq_formatFloat)", withFont: .systemFont(ofSize: 21.71, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).add(string: " 立即购买 ", withFont: .systemFont(ofSize: 16, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).mutableAttributedString |
| | | weakSelf.studyBtn.setAttributedTitle(attribute, for: .normal) |
| | | }else{ |
| | | let attribute = AttributedStringbuilder.build().add(string: " 立即学习 ", withFont: .systemFont(ofSize: 16, weight: .bold), withColor: UIColor(hexString: "#F6F6F6")!).mutableAttributedString |
| | |
| | | }else{ |
| | | weakSelf.style = .style2 |
| | | DispatchQueue.main.asyncAfter(delay: 0.5) { |
| | | weakSelf.headerView.setVideo(url: m.detailUrl, coverImageUrl: m.coverUrl, delegate: self!) |
| | | weakSelf.headerView.setVideo(url: m.detailUrl, coverImageUrl: m.coverUrl.jq_urlEncoded(), delegate: self!) |
| | | } |
| | | weakSelf.pageMenu.setItems(["简介"], selectedItemIndex: 0) |
| | | } |
| | |
| | | push(vc: vc);return |
| | | } |
| | | |
| | | let vc = PaymentOrderVC(id: m.id, type: .course) |
| | | let vc = PaymentOrderVC(courseItemModel: m, type: .course) |
| | | push(vc: vc) |
| | | } |
| | | } |
| | | |
| | | @objc func sendGift(_ btn:QMUIButton){ |
| | | if let price = courseDetailModel?.generalPrice{ |
| | | if let price = courseDetailModel?.iosPrice{ |
| | | CourseSendGiftView.show(price:price) { |
| | | let vc = PaymentOrderVC(id: self.courseDetailModel!.id,type: .course,giftToOther: true) |
| | | let vc = PaymentOrderVC(courseItemModel: self.courseDetailModel!,type: .course,giftToOther: true) |
| | | self.push(vc: vc) |
| | | } |
| | | } |