| | |
| | | } |
| | | |
| | | override var preferredStatusBarStyle: UIStatusBarStyle{ |
| | | return .lightContent |
| | | return .darkContent |
| | | } |
| | | |
| | | override var shouldAutorotate: Bool{ |
| | |
| | | image.sizeToFit() |
| | | image.frame = CGRect(x:0,y:0,width:width,height:height) |
| | | image.contentMode = .scaleToFill |
| | | image.tag = images.count - 1 |
| | | image.isUserInteractionEnabled = true |
| | | setImage(image: image, index: images.count - 1) |
| | | scrollView.addSubview(image) |
| | |
| | | image.frame = CGRect(x:width * CGFloat(images.count + |
| | | 1),y:0,width:width,height:height) |
| | | image.contentMode = .scaleToFill |
| | | image.tag = 0 |
| | | image.isUserInteractionEnabled = true |
| | | scrollView.addSubview(image) |
| | | setImage(image: image, index: 0) |
| | |
| | | @IBOutlet weak var label_courseMoney: UILabel! |
| | | @IBOutlet weak var btn_complete: UIButton! |
| | | @IBOutlet weak var btn_integral: UIButton! |
| | | |
| | | |
| | | private var hasNotStudent:Bool = false |
| | | private var clouse:((PayType)->Void)? |
| | | private var payType:PayType? |
| | | |
| | |
| | | layoutIfNeeded() |
| | | } |
| | | |
| | | static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),_ clouse:@escaping (PayType)->Void){ |
| | | static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),hasNotStudent:Bool = false,_ clouse:@escaping (PayType)->Void){ |
| | | let paymentView = PaymentView.jq_loadNibView() |
| | | paymentView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | paymentView.clouse = clouse |
| | |
| | | paymentView.label_coinMoney.text = "\(money.coin ?? 0)币" |
| | | paymentView.label_courseMoney.text = "\(money.course ?? 0)课时" |
| | | paymentView.label_integral.text = "\(money.integral ?? 0)积分" |
| | | paymentView.view_course.alpha = hasNotStudent ? 0.5:1 |
| | | sceneDelegate?.window?.addSubview(paymentView) |
| | | paymentView.cons_bottom.constant = 0 |
| | | |
| | |
| | | if !paymentView.view_wechat.isHidden{customType.append(.wechat)} |
| | | if !paymentView.view_coin.isHidden{customType.append(.coin)} |
| | | |
| | | paymentView.btn_course.isUserInteractionEnabled = !hasNotStudent |
| | | |
| | | paymentView.payType = customType.first |
| | | switch customType.first { |
| | | case .aliPay:paymentView.btn_alipay.isSelected = true |
| | |
| | | } |
| | | } |
| | | |
| | | if page == "线上课得积分" || page == "看视频得奖励"{ |
| | | if page == "线上课得积分"{ |
| | | if type == "详情"{ |
| | | let vc = CourseVideoDetailVC(id: id ?? 0) |
| | | vc.title = page |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else{ |
| | | }else if type == "列表"{ |
| | | let vc = CourseOnlineSubListVC(classificationId: id ?? 0) |
| | | vc.title = page |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else if type == "主页"{ |
| | | let vc = CourseOnlineListVC(position: 1) |
| | | vc.title = page |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | } |
| | | } |
| | | |
| | | // if page == "看视频得奖励"{ |
| | | // if type == "详情"{ |
| | | // let vc = CourseVideoDetailVC(id: id ?? 0) |
| | | // vc.title = page |
| | | // JQ_currentViewController().jq_push(vc: vc) |
| | | // }else{ |
| | | // let vc = CourseOnlineSubListVC(classificationId: id ?? 0) |
| | | // vc.title = page |
| | | // JQ_currentViewController().jq_push(vc: vc) |
| | | // } |
| | | // } |
| | | if page == "看视频得奖励"{ |
| | | if type == "详情"{ |
| | | let vc = CourseVideoDetailVC(id: id ?? 0) |
| | | vc.title = page |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else if type == "列表"{ |
| | | let vc = CourseOnlineSubListVC(classificationId: id ?? 0) |
| | | vc.title = page |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | }else if type == "主页"{ |
| | | let vc = CourseOnlineListVC(position: 2) |
| | | vc.title = page |
| | | JQ_currentViewController().jq_push(vc: vc) |
| | | } |
| | | } |
| | | |
| | | if page == "预约场地"{ |
| | | if type == "详情"{ |
| | |
| | | var gender:GenderType = .man |
| | | var height:Double = 0 |
| | | var weight:Double = 0 |
| | | var isStudent = 0 // 1:是学员, 0:否 |
| | | } |
| | | |
| | | |
| | |
| | | var userPopulation: Int = 0 |
| | | var useScope: Int = 0 |
| | | var available:String = "" |
| | | var timePeriod:String = "" //有效期 |
| | | } |
| | | |
| | | struct YardBookingDetailModel:HandyJSON{ |
| | |
| | | #if DEBUG |
| | | //let All_Url = "https://ds867zleb4ow.xiaomiqiu.com" |
| | | //let All_Url = "http://192.168.110.27:56666" |
| | | let All_Url = "http://8.137.22.229:56666" |
| | | let All_Url = "http://8.137.22.229:56666" //正式地址 |
| | | //let All_Url = "http://8.137.22.229:56666" |
| | | let Game_Url = "https://try.daowepark.com" |
| | | //let All_Url = "https://console-mock.apipost.cn/mock/b5b2dee0-5564-40ae-f082-a352d502a153" |
| | | //let All_Url = "http://192.168.110.165:10393/mock/b5b2dee0-5564-40ae-f082-a352d502a153" |
| | |
| | | let course = weakSelf.activityDetailModel.classPrice * weakSelf.students.count |
| | | |
| | | if status{ |
| | | PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course,integral:nil)) { [weak self] type in |
| | | let isStudent = weakSelf.students.filter({$0.isStudent == 0}).count > 0 ? true:false |
| | | PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in |
| | | guard let weakSelf = self else { return } |
| | | if type == .courseNum{ |
| | | PaymentCourseView.show(id: weakSelf.activityDetailModel.id,number:course) { id in |
| | |
| | | let tableView = BaseTableView(frame: .zero, style: .plain) |
| | | tableView.delegate = self |
| | | tableView.dataSource = self |
| | | tableView.separatorStyle = .none |
| | | tableView.register(UINib(nibName: "ActivityInfoTCell", bundle: nil), forCellReuseIdentifier: "_ActivityInfoTCell") |
| | | return tableView |
| | | }() |
| | |
| | | btn_exercise.isHidden = studentAppointModel.status != .complete |
| | | btn_cancel.isHidden = true |
| | | btn_qrCode.isHidden = studentAppointModel.status != .pedding |
| | | btn_qrCode.isHidden = false |
| | | |
| | | switch studentAppointModel.status{ |
| | | case .pedding:label_status.textColor = UIColor(hexStr: "#FD7402") |
| | |
| | | @IBOutlet weak var view_exerciseTitle: UIView! |
| | | @IBOutlet weak var view_footer: UIView! |
| | | |
| | | private var updateProdDate:Date? |
| | | |
| | | |
| | | var startClouseHomeModel:StartClouseHomeModel? |
| | | var weeklyCourseModel:WeeklyCourseModel? |
| | |
| | | return btn |
| | | |
| | | }() |
| | | |
| | | |
| | | override func viewDidAppear(_ animated: Bool) { |
| | | super.viewDidAppear(animated) |
| | | |
| | | if let date = updateProdDate{ |
| | | //防止反复切换,15秒 |
| | | if Date().timeIntervalSince1970 - date.timeIntervalSince1970 > 15{ |
| | | updateData() |
| | | } |
| | | } |
| | | } |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | |
| | | |
| | | private func updateData(){ |
| | | if let m = startClouseHomeModel{ |
| | | |
| | | updateProdDate = Date() |
| | | img_header.sd_setImage(with: URL(string: m.stuImg)) |
| | | label_stu_name.text = m.stuName |
| | | img_gender.image = m.stuSex == .man ? UIImage(named: "icon_man") : UIImage(named: "icon_woman") |
| | |
| | | guard let weakSelf = self else { return } |
| | | PaymentView.show(money: (ali: weakSelf.gameListModel.cash, wx: weakSelf.gameListModel.cash, coin: weakSelf.gameListModel.playCoin, course: nil,integral:weakSelf.gameListModel.integral)) { [weak self] payType in |
| | | guard let weakSelf = self else { return } |
| | | Services.payGame(configId: weakSelf.gameListModel.id, gameId: weakSelf.gameListModel.gameId, spaceId: weakSelf.spaceId, sutuId: weakSelf.sutuId, type: payType).subscribe(onNext: {data in |
| | | Services.payGame(configId: weakSelf.gameListModel.id, gameId: weakSelf.gameListModel.gameId, spaceId: weakSelf.storeId, sutuId: weakSelf.sutuId, type: payType).subscribe(onNext: {data in |
| | | switch payType { |
| | | case .wechat:break |
| | | case .aliPay: |
| | |
| | | alert(msg: data.msg) |
| | | } |
| | | }) { error in |
| | | alertError(msg: error.localizedDescription) |
| | | |
| | | }.disposed(by: disposeBag) |
| | | } |
| | | |
| | |
| | | |
| | | extension LoginVC:UITextViewDelegate{ |
| | | func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool { |
| | | |
| | | var str:String = "" |
| | | |
| | | if #available(iOS 16.0, *) { |
| | | if let str = URL.host(percentEncoded: true){ |
| | | str = URL.host(percentEncoded: true)! |
| | | } else { |
| | | str = URL.host! |
| | | } |
| | | |
| | | switch str { |
| | | case "treaty": |
| | | push(vc: CommonWebVC(type: .privacy)) |
| | |
| | | default:break |
| | | } |
| | | return true |
| | | } |
| | | } else { |
| | | // Fallback on earlier versions |
| | | } |
| | | return false |
| | | } |
| | | } |
| | |
| | | case .none: |
| | | label_fullMinus.isHidden = true |
| | | } |
| | | label_vaildTime.text = String(format: "有效期至%@-%@", courseCouponModel.startTime,courseCouponModel.endTime) |
| | | label_vaildTime.text = String(format: "有效期至%@", courseCouponModel.timePeriod) |
| | | } |
| | | } |
| | | } |
| | |
| | | weakSelf.items.append(RechargeItem(coin: v.wpGold, money: v.amount)) |
| | | } |
| | | |
| | | let h = ceil(Double(weakSelf.items.count) / 3.0) * weakSelf.cellH + (floor(Double(weakSelf.items.count) / 3.0) - 1) * 18.0 |
| | | let h = ceil(Double(weakSelf.items.count) / 3.0) * weakSelf.cellH + (floor(Double(weakSelf.items.count) / 3.0) - 1) * 21.0 |
| | | weakSelf.cons_collectHei.constant = h |
| | | weakSelf.collectionView.reloadData() |
| | | }).disposed(by: disposeBag) |
| | |
| | | pageMenu.delegate = self |
| | | pageViewController.delegate = self |
| | | |
| | | pageViewController.scroll(toPage: toPage, animation: false) |
| | | pageMenu.selectedItemIndex = toPage |
| | | |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+0.3) { |
| | | self.pageViewController.scroll(toPage: self.toPage, animation: false) |
| | | self.pageMenu.selectedItemIndex = self.toPage |
| | | } |
| | | } |
| | | |
| | | override func setUI() { |