| | |
| | | |
| | | switch objType{ |
| | | case .member: |
| | | btn_again.isHidden = result == .success |
| | | btn_back.isHidden = result == .success |
| | | btn_backHome.isHidden = result != .success |
| | | collectionView.isHidden = result != .success |
| | | switch result { |
| | | case .fail(let str, _): |
| | | label_content.text = str |
| | | case .success: |
| | | label_content.text = "支付成功,恭喜您成为玩湃会员!并获得优惠券!" |
| | | case .none:break |
| | | } |
| | | btn_again.isHidden = result == .success |
| | | btn_back.isHidden = result == .success |
| | | btn_backHome.isHidden = result != .success |
| | | collectionView.isHidden = result != .success |
| | | switch result { |
| | | case .fail(let str, _): |
| | | label_content.text = str |
| | | case .success: |
| | | label_content.text = "支付成功,恭喜您成为玩湃会员!" |
| | | case .none:break |
| | | } |
| | | // Services.queryMemberCoupon(menthod: 1).subscribe(onNext: { data in |
| | | // |
| | | // }) { error in |
| | | // |
| | | // }.disposed(by: disposeBag) |
| | | |
| | | case .courseApply: |
| | | //课时购买 |
| | | btn_backHome.isHidden = true |
| | | if let id = courseConfigId{ |
| | | Services.paymentCourseCouponList(id: id).subscribe(onNext: { data in |
| | | Services.paymentCourseCouponList(id: id).subscribe(onNext: {[weak self] data in |
| | | if let models = data.data{ |
| | | self.models = models |
| | | self.collectionView.reloadData() |
| | | self?.models = models |
| | | self?.collectionView.reloadData() |
| | | } |
| | | }) { error in |
| | | |
| | |
| | | case .success: |
| | | btn_again.setTitle("查看预约", for: .normal) |
| | | btn_back.setTitle("返回首页", for: .normal) |
| | | label_content.text = "报名成功,请注意预约开始时间!" |
| | | label_content.text = "预约成功,请注意预约开始时间!" |
| | | case .none:break |
| | | } |
| | | |
| | |
| | | |
| | | @IBAction func backAction(_ sender: UIButton) { |
| | | |
| | | navigationController?.popViewController(animated: true, { |
| | | if sender.titleLabel?.text == "我的数据"{ |
| | | if sender.titleLabel?.text == "返回首页"{ |
| | | navigationController?.qmui_popToRootViewController(animated: true, completion: { |
| | | JQ_currentViewController().tabBarController?.selectedIndex = 0 |
| | | }) |
| | | } |
| | | |
| | | if sender.titleLabel?.text == "我的数据"{ |
| | | navigationController?.popViewController(animated: true, { |
| | | JQ_currentViewController().jq_push(vc: GamesDataSourceVC()) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | override var preferredStatusBarStyle: UIStatusBarStyle{ |
| | | return .lightContent |