| | |
| | | @IBAction func completeAction(_ sender: UIButton) { |
| | | |
| | | guard let m = courseModel else {return} |
| | | guard btn_isRead.isSelected else { |
| | | alertError(msg: "请先阅读并同意《课程/疗愈音频购买协议》");return |
| | | } |
| | | |
| | | if giftToOther { |
| | | |
| | | guard !tf_phone.text!.isEmpty else { |
| | | alertError(msg: "请输入您要赠送人的手机号");return |
| | | } |
| | | |
| | | guard giftUserId != nil else { |
| | | alertError(msg: "请先查询赠送人是否存在");return |
| | | } |
| | | } |
| | | |
| | | guard balance > m.generalPrice else{ |
| | | CommonAlertView.show(title: "提示", content: "当前余额不足,请先充值", cancelStr: "暂不充值", completeStr: "去充值", isSingle: false) { state in |
| | |
| | | } |
| | | } |
| | | return |
| | | } |
| | | |
| | | guard btn_isRead.isSelected else { |
| | | alertError(msg: "请先阅读并同意《课程/疗愈音频购买协议》");return |
| | | } |
| | | |
| | | if giftToOther { |
| | | guard giftUserId != nil else { |
| | | alertError(msg: "请输入您要赠送人的手机号");return |
| | | } |
| | | } |
| | | |
| | | let vc = PaymentOrderResultVC(courseId: courseId, price: m.generalPrice) |