| | |
| | | private var clouse:((Int)->Void)! |
| | | |
| | | private var id:Int! |
| | | private var storeId:Int! |
| | | override func awakeFromNib() { |
| | | super.awakeFromNib() |
| | | tableView.delegate = self |
| | |
| | | paymentCourseView.queryData() |
| | | } |
| | | |
| | | static func show(storeId:Int,number:Int,clouse:@escaping (Int)->Void){ |
| | | let paymentCourseView = PaymentCourseView.jq_loadNibView() |
| | | paymentCourseView.storeId = storeId |
| | | paymentCourseView.label_num.text = "所需课时数:\(number)" |
| | | paymentCourseView.clouse = clouse |
| | | paymentCourseView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | sceneDelegate?.window?.addSubview(paymentCourseView) |
| | | paymentCourseView.cons_bottom.constant = 0 |
| | | UIView.animate(withDuration: 0.4) { |
| | | paymentCourseView.alpha = 1 |
| | | paymentCourseView.layoutIfNeeded() |
| | | } |
| | | paymentCourseView.queryStoreData() |
| | | } |
| | | |
| | | |
| | | private func queryData(){ |
| | | Services.querypaymentCompetitionCourseList(id: id).subscribe(onNext: { data in |
| | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | private func queryStoreData(){ |
| | | Services.getMyCourseList(storeId: storeId).subscribe(onNext: { data in |
| | | if let models = data.data{ |
| | | self.models = models |
| | | self.tableView.reloadData() |
| | | } |
| | | }) { error in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | | |
| | | |
| | | private func hidden(){ |