| | |
| | | @IBOutlet weak var label_courseMoney: UILabel! |
| | | @IBOutlet weak var btn_complete: UIButton! |
| | | @IBOutlet weak var btn_integral: UIButton! |
| | | |
| | | |
| | | private var hasNotStudent:Bool = false |
| | | private var clouse:((PayType)->Void)? |
| | | private var payType:PayType? |
| | | |
| | |
| | | layoutIfNeeded() |
| | | } |
| | | |
| | | static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),_ clouse:@escaping (PayType)->Void){ |
| | | static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),hasNotStudent:Bool = false,_ clouse:@escaping (PayType)->Void){ |
| | | let paymentView = PaymentView.jq_loadNibView() |
| | | paymentView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | paymentView.clouse = clouse |
| | |
| | | paymentView.label_coinMoney.text = "\(money.coin ?? 0)币" |
| | | paymentView.label_courseMoney.text = "\(money.course ?? 0)课时" |
| | | paymentView.label_integral.text = "\(money.integral ?? 0)积分" |
| | | paymentView.view_course.alpha = hasNotStudent ? 0.5:1 |
| | | sceneDelegate?.window?.addSubview(paymentView) |
| | | paymentView.cons_bottom.constant = 0 |
| | | |
| | |
| | | if !paymentView.view_wechat.isHidden{customType.append(.wechat)} |
| | | if !paymentView.view_coin.isHidden{customType.append(.coin)} |
| | | |
| | | paymentView.btn_course.isUserInteractionEnabled = !hasNotStudent |
| | | |
| | | paymentView.payType = customType.first |
| | | switch customType.first { |
| | | case .aliPay:paymentView.btn_alipay.isSelected = true |