younger_times
2023-08-08 47a58a1a7d967464e93410e04791aaa4756c1cbd
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
@@ -83,6 +83,7 @@
        btn_addStudent.spacingBetweenImageAndTitle = 4
        tableView.delegate = self
        tableView.dataSource = self
      tableView.separatorStyle = .none
        tableView.register(UINib(nibName: "StudentInfo_2_TCell", bundle: nil), forCellReuseIdentifier: "_StudentInfo_2_TCell")
        view_banner.addSubview(bannerView)
@@ -109,9 +110,9 @@
        StoresInfoView.show(activityDetailModel) { [weak self] status in
            guard let weakSelf = self else { return }
            let price = weakSelf.activityDetailModel.cashPrice * Double(weakSelf.activityDetailModel.participant.count)
            let coin = weakSelf.activityDetailModel.playPaiCoin * weakSelf.activityDetailModel.participant.count
            let course = weakSelf.activityDetailModel.classPrice * weakSelf.activityDetailModel.participant.count
            let price = weakSelf.activityDetailModel.cashPrice * Double(weakSelf.students.count)
            let coin = weakSelf.activityDetailModel.playPaiCoin * weakSelf.students.count
            let course = weakSelf.activityDetailModel.classPrice * weakSelf.students.count
            if status{
                PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course)) { [weak self] type in
@@ -128,6 +129,8 @@
                                                let vc = PaymentResultVC(result: .success, objType: .activityApply)
                                                vc.modalPresentationStyle = .fullScreen
                                                weakSelf.present(vc, animated: true)
                                    weakSelf.btn_enroll.setTitle("已报名", for: .normal)
                                    weakSelf.btn_enroll.backgroundColor = UIColor.gray.withAlphaComponent(0.5)
                                            case .cancel:
                                                alert(msg: "已取消")
                                            case .failure(let error):
@@ -137,8 +140,12 @@
                                        }
                                    }
                                case .wechat:break
                                case .coin:break
                                case .courseNum:break
                        case .coin,.courseNum:
                           let vc = PaymentResultVC(result: .success, objType: .activityApply)
                           vc.modalPresentationStyle = .fullScreen
                           weakSelf.present(vc, animated: true)
                           weakSelf.btn_enroll.setTitle("已报名", for: .normal)
                           weakSelf.btn_enroll.backgroundColor = UIColor.gray.withAlphaComponent(0.5)
                            }
                        }
                    }).disposed(by: weakSelf.disposeBag)