无故事王国
2024-03-12 fd05d3dfc61ad3482cfd577279cff72f74c68cf6
WanPai/Root/Search/VC/WorldCupContentApplyInputVC.swift
@@ -74,10 +74,13 @@
                        }
                        bannerView.setItems(items: items)
                        let endDateTimeInterval = Date.jq_StringToTimeInterval(detailModel.registrationClosingTime, "yyyy-MM-dd HH:mm")
                        if endDateTimeInterval < Date().timeIntervalSince1970{
                                    btn_enroll.setTitle("报名已截止", for: .normal)
                                    btn_enroll.backgroundColor = .gray.withAlphaComponent(0.5)
                        if let endDate = detailModel.registrationClosingTime{
                                    let endDateTimeInterval = Date.jq_StringToTimeInterval(endDate, "yyyy-MM-dd HH:mm")
                                    if endDateTimeInterval < Date().timeIntervalSince1970{
                                                btn_enroll.setTitle("报名已截止", for: .normal)
                                                btn_enroll.backgroundColor = .gray.withAlphaComponent(0.5)
                                                btn_enroll.isEnabled = false
                                    }
                        }
@@ -85,7 +88,14 @@
                        label_title.text = detailModel.name
                        label_hot.text = "\(detailModel.heat)"
                        label_duetime.text = detailModel.registrationClosingTime
                        if detailModel.registrationClosingTime != nil{
                                    label_duetime.text = detailModel.registrationClosingTime
                        }else{
                                    label_duetime.text = "无截止时间"
                        }
                        label_starttime.text = detailModel.startTime
                        label_endtime.text = detailModel.endTime
                        label_ageScope.text = detailModel.age + "岁"
@@ -94,14 +104,13 @@
                                    case 2:label_genderCond.text = "女"
                                    default:label_genderCond.text = "全部"
                        }
                        label_city.text = ""
                        label_city.text = [detailModel.province,detailModel.city].joined(separator: "|")
                        label_address.text = detailModel.address
                        label_matchPoint.text = detailModel.storeInfos.map({$0.name}).joined(separator: "、")
                        label_pay_money.text = detailModel.cash == 0 ? "免费":"¥\(detailModel.cash)/人"
                        label_pay_coin.text = detailModel.paiCoin == 0 ? "免费":"\(detailModel.paiCoin)币/人"
                        label_pay_course.text  = detailModel.classHour == 0 ? "免费":"\(detailModel.classHour)课时/人"
            }
            override func setRx() {
@@ -148,8 +157,7 @@
                        }
                        StoresInfoView.show(detailModel.storeInfos.first ?? ActivityDetailStoreModel()) {[weak self] status in
                        StoresInfoView.show(detailModel.storeInfos.first ?? ActivityDetailStoreModel(),type: .worldCup) {[weak self] status in
                                    guard let weakSelf = self else { return }
                                    if status{
                                                var result = [Dictionary<String,Int>]()
@@ -161,9 +169,9 @@
                                                var paiCoin:Int = 0
                                                var classHour:Int = 0
                                                money = weakSelf.detailModel.cash
                                                paiCoin = weakSelf.detailModel.paiCoin
                                                classHour = weakSelf.detailModel.classHour
                                                money = weakSelf.detailModel.cash * Double(weakSelf.students.count)
                                                paiCoin = weakSelf.detailModel.paiCoin * weakSelf.students.count
                                                classHour = weakSelf.detailModel.classHour * weakSelf.students.count
                                                if money == 0 && paiCoin == 0 && classHour == 0{
                                                            weakSelf.payment(payType: .free, result: result)
@@ -173,6 +181,9 @@
                                                                        weakSelf.payment(payType: payType, result: result)
                                                            }
                                                }
                                    }else{
                                                weakSelf.navigationController?.popToRootViewController(animated: true)
                                                NotificationCenter.default.post(name: ChooseHomeStore_Noti, object: nil)
                                    }
                        }
            }