| | |
| | | guard m != nil else { |
| | | weakSelf.btn_couponInfo.setTitle("去选择", for: .normal);return |
| | | } |
| | | weakSelf.btn_couponInfo.setTitle("-\(m!.favorable)", for: .normal) |
| | | weakSelf.btn_couponInfo.setTitle("-\(m!.favorable.currency())", for: .normal) |
| | | weakSelf.changePrice(weakSelf.selectClassIndex) |
| | | } |
| | | } |
| | |
| | | var paymentPrice:Double = 0 |
| | | switch payType { |
| | | case .aliPay,.wechat: |
| | | paymentPrice = price |
| | | paymentPrice = discountPrice |
| | | case .coin: |
| | | paymentPrice = Double(coin) |
| | | case .courseNum:break |
| | |
| | | YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { [weak self] result in |
| | | switch result { |
| | | case .success: |
| | | self?.navigationController?.popViewController(animated: false) |
| | | let vc = PaymentResultVC(result: .success, objType: .courseApply) |
| | | // self?.navigationController?.popViewController(animated: false) |
| | | let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id) |
| | | vc.modalPresentationStyle = .fullScreen |
| | | self?.present(vc, animated: true) |
| | | case .cancel: |
| | |
| | | self?.navigationController?.popViewController(animated: false) |
| | | break |
| | | case .coin: |
| | | self?.navigationController?.popViewController(animated: false) |
| | | let vc = PaymentResultVC(result: .success, objType: .courseApply) |
| | | // self?.navigationController?.popViewController(animated: false) |
| | | let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id) |
| | | vc.modalPresentationStyle = .fullScreen |
| | | self?.present(vc, animated: true) |
| | | case .courseNum:break |