| | |
| | | 1394023F2AB456DB003CF61E /* PaymentCourseView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1394023E2AB456DB003CF61E /* PaymentCourseView.xib */; }; |
| | | 139402422AB4588F003CF61E /* PaymentCourseTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 139402402AB4588F003CF61E /* PaymentCourseTCell.swift */; }; |
| | | 139402432AB4588F003CF61E /* PaymentCourseTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139402412AB4588F003CF61E /* PaymentCourseTCell.xib */; }; |
| | | 1394B9592B047A1B00937CC6 /* LogOffVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1394B9572B047A1B00937CC6 /* LogOffVC.swift */; }; |
| | | 1394B95A2B047A1B00937CC6 /* LogOffVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1394B9582B047A1B00937CC6 /* LogOffVC.xib */; }; |
| | | 139A39ED2A41349800737AFB /* YardBookingTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 139A39EB2A41349800737AFB /* YardBookingTCell.swift */; }; |
| | | 139A39EE2A41349800737AFB /* YardBookingTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139A39EC2A41349800737AFB /* YardBookingTCell.xib */; }; |
| | | 139A39F02A41374100737AFB /* YardBookingSubListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 139A39EF2A41374100737AFB /* YardBookingSubListVC.swift */; }; |
| | |
| | | 1394023E2AB456DB003CF61E /* PaymentCourseView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PaymentCourseView.xib; sourceTree = "<group>"; }; |
| | | 139402402AB4588F003CF61E /* PaymentCourseTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentCourseTCell.swift; sourceTree = "<group>"; }; |
| | | 139402412AB4588F003CF61E /* PaymentCourseTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PaymentCourseTCell.xib; sourceTree = "<group>"; }; |
| | | 1394B9572B047A1B00937CC6 /* LogOffVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogOffVC.swift; sourceTree = "<group>"; }; |
| | | 1394B9582B047A1B00937CC6 /* LogOffVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogOffVC.xib; sourceTree = "<group>"; }; |
| | | 139A39EB2A41349800737AFB /* YardBookingTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YardBookingTCell.swift; sourceTree = "<group>"; }; |
| | | 139A39EC2A41349800737AFB /* YardBookingTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = YardBookingTCell.xib; sourceTree = "<group>"; }; |
| | | 139A39EF2A41374100737AFB /* YardBookingSubListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YardBookingSubListVC.swift; sourceTree = "<group>"; }; |
| | |
| | | 8D8DEDEC2A31D82100F2C7FA /* PaymentResultVC.xib */, |
| | | 13489E082A4C41A400155744 /* ProfileVC.swift */, |
| | | 13489E092A4C41A400155744 /* ProfileVC.xib */, |
| | | 1394B9572B047A1B00937CC6 /* LogOffVC.swift */, |
| | | 1394B9582B047A1B00937CC6 /* LogOffVC.xib */, |
| | | ); |
| | | path = VC; |
| | | sourceTree = "<group>"; |
| | |
| | | 131732BB2A405EF800F722AF /* CalendarDateTimeTCell.xib in Resources */, |
| | | 8D5732BE2A3724A900B2F8E3 /* AddStudentVC.xib in Resources */, |
| | | 136FD9B22A4C354000933B7C /* WelfareRedeemGoodsDetailVC.xib in Resources */, |
| | | 1394B95A2B047A1B00937CC6 /* LogOffVC.xib in Resources */, |
| | | 13272DCD2A40076900AC6481 /* YardBookingTimeView.xib in Resources */, |
| | | 1304B85D2A4EB0F8000D4F2E /* SearchBannerCCell.xib in Resources */, |
| | | 136FD9AE2A4C2F0500933B7C /* RechargeItemCCell.xib in Resources */, |
| | |
| | | 134BD52D2A6008BA00786819 /* YYPaymentResultModel.swift in Sources */, |
| | | 13B640C02A54108B00EA33ED /* UploadImgCCell.swift in Sources */, |
| | | 130E40262A4EC029003A3D75 /* SearchStoreDetailVC.swift in Sources */, |
| | | 1394B9592B047A1B00937CC6 /* LogOffVC.swift in Sources */, |
| | | 1347D1BC2AB448C20052082A /* CourseUnAssignView.swift in Sources */, |
| | | 13DA7D4F2AAF03F90085ABF9 /* CommonScanQRCodeVC.swift in Sources */, |
| | | 13CE11D02AF203E000F6ACA4 /* JJPageControl.swift in Sources */, |
| | |
| | | } |
| | | } |
| | | |
| | | enum StudentAppointTypeList:Int{ |
| | | case all = 0 |
| | | case pedding = 1 |
| | | case complete = 2 |
| | | case cancel = 3 |
| | | } |
| | | |
| | | enum StudentAppointDateType:Int,HandyJSONEnum{ |
| | | case all = 0 |
| | | case week = 1 |
| | |
| | | case sport = 2 |
| | | case communtiy = 3 |
| | | case deepPlayer = 4 |
| | | case more = 5 |
| | | |
| | | |
| | | var image:UIImage{ |
| | |
| | | case .sport:return UIImage(named: "icon_coupon_2")! |
| | | case .communtiy:return UIImage(named: "icon_coupon_3")! |
| | | case .deepPlayer:return UIImage(named: "icon_coupon_4")! |
| | | case .more:return UIImage(named: "icon_coupon_6")! |
| | | } |
| | | } |
| | | |
| | |
| | | case .sport:return "EVENTS" |
| | | case .communtiy:return "ON_LINE" |
| | | case .deepPlayer:return "APPOINTMENT" |
| | | case .more:return "MORE" |
| | | } |
| | | } |
| | | |
| | |
| | | case .sport:return "运动大人" |
| | | case .communtiy:return "社区之王" |
| | | case .deepPlayer:return "深度玩家" |
| | | case .more:return "更多" |
| | | } |
| | | } |
| | | |
| | |
| | | struct StartClouseReportModel:HandyJSON{ |
| | | var bmi:Double = 0 |
| | | var height:Int = 0 |
| | | var url = "" |
| | | var urls = [String]() |
| | | var weight:Int = 0 |
| | | var bodyStatus = "" |
| | | } |
| | |
| | | var coverDrawing: String = "" |
| | | var name: String = "" |
| | | var originalPrice:Double = 0 |
| | | var coin:Int = 0 |
| | | } |
| | | |
| | | struct SearchStoreDetailVenueModel:HandyJSON{ |
| | |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | class func logOff()->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | params.interface(url: "/account/base/appUser/logOff") |
| | | .append(key: "appId", value: UserInfoModel.get()!.userId) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | class func wxLogin(openId:String,nickname:String,headimgurl:String,sex:Int)->Observable<BaseResponse<LoginModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/base/appUser/loginWeChat") |
| | |
| | | |
| | | |
| | | /// 学员预约运动营列表 |
| | | static func studentAppointList(page:Int,stuId:Int,status:StudentAppointType?,search:String,timeType:StudentAppointDateType)->Observable<BaseResponse<[StudentAppointModel]>>{ |
| | | static func studentAppointList(page:Int,stuId:Int,status:StudentAppointTypeList?,search:String,timeType:StudentAppointDateType)->Observable<BaseResponse<[StudentAppointModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/startCource/stuAppointList") |
| | | .append(key: "status", value: status?.rawValue) |
| | | .append(key: "appointStatus", value: status?.rawValue) |
| | | .append(key: "timeType", value: timeType.rawValue) |
| | | .append(key: "search", value: search) |
| | | .append(key: "stuId", value: stuId) |
| | |
| | | btn_cancel.setTitle(name, for: .normal) |
| | | btn_cancel.backgroundColor = color |
| | | case .ongoing: |
| | | btn_cancel.setTitle("进行中", for: .normal) |
| | | btn_cancel.isEnabled = false |
| | | btn_cancel.backgroundColor = UIColor(hexStr: "#C0C0C0") |
| | | let endTime = Date.jq_StringToTimeInterval(m.registerEndTime, "yyyy-MM-dd HH:mm") |
| | | let a = Date.jq_CalByDays(startDate: Date(), endDate: Date(timeIntervalSince1970: endTime)) |
| | | if Date.jq_CalByEnum(startDate: Date(), endDate: Date(timeIntervalSince1970: endTime)).minute > 0{ |
| | | let name = m.apply == 1 ? "取消":"已取消" |
| | | let color = m.apply == 1 ? Def_ThemeColor:UIColor(hexStr: "#C0C0C0") |
| | | btn_cancel.isEnabled = m.apply == 1 |
| | | btn_cancel.setTitle(name, for: .normal) |
| | | btn_cancel.backgroundColor = color |
| | | }else{ |
| | | btn_cancel.setTitle("进行中", for: .normal) |
| | | btn_cancel.isEnabled = false |
| | | btn_cancel.backgroundColor = UIColor(hexStr: "#C0C0C0") |
| | | } |
| | | |
| | | |
| | | case .over: |
| | | btn_cancel.setTitle("已结束", for: .normal) |
| | | btn_cancel.isEnabled = false |
| | |
| | | cell.img_radio.isHidden = true |
| | | cell.activityDetailPartModel = viewModel.dataSource.value[indexPath.row] |
| | | cell.btn_verifiy.isHidden = !viewModel.dataSource.value[indexPath.row].idcard.isEmpty |
| | | cell.btn_delete.isHidden = viewModel.dataSource.value[indexPath.row].isStudent == 0 |
| | | cell.btn_delete.isHidden = viewModel.dataSource.value[indexPath.row].isStudent == 1 |
| | | cell.delClouse = {index in |
| | | CommonAlertView.show(title: "提示", content: "确认删除当前人员吗?") { [weak self] status in |
| | | guard let weakSelf = self else { return } |
| | |
| | | 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") |
| | | default:label_status.textColor = UIColor(hexStr: "#3D3E45") |
| | | case .pedding: |
| | | label_status.textColor = UIColor(hexStr: "#FD7402") |
| | | default: |
| | | label_status.textColor = UIColor(hexStr: "#3D3E45") |
| | | } |
| | | } |
| | | } |
| | |
| | | img_icon.image = mentalInfo.icon |
| | | label_l1.text = mentalInfo.l1 |
| | | label_l2.text = mentalInfo.l2 |
| | | label_info.text = mentalInfo.info |
| | | |
| | | btn_go.setTitle(mentalInfo.btnName, for: .normal) |
| | | |
| | | if mentalInfo.isTopLevel == 1{ |
| | | label_info.text = "" |
| | | }else{ |
| | | label_info.text = mentalInfo.info |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | case 1:vc = CourseBookingSubListVC(status: .pedding, studentId: startClouseHomeModel.stuId) |
| | | case 2:vc = CourseBookingSubListVC(status: .complete, studentId: startClouseHomeModel.stuId) |
| | | case 3:vc = CourseBookingSubListVC(status: .cancel, studentId: startClouseHomeModel.stuId) |
| | | default:vc = CourseBookingSubListVC(status: nil, studentId: startClouseHomeModel.stuId) |
| | | default:vc = CourseBookingSubListVC(status: .all, studentId: startClouseHomeModel.stuId) |
| | | } |
| | | return vc |
| | | } |
| | |
| | | |
| | | class CourseBookingViewModel:RefreshModel<StudentAppointModel>{ |
| | | |
| | | let status = BehaviorRelay<StudentAppointType?>(value: nil) |
| | | let status = BehaviorRelay<StudentAppointTypeList?>(value: nil) |
| | | let search = BehaviorRelay<String>(value: "") |
| | | let studentId = BehaviorRelay<Int>(value: 0) |
| | | let timeType = BehaviorRelay<StudentAppointDateType>(value: .all) |
| | |
| | | }() |
| | | |
| | | |
| | | required init(status:StudentAppointType?,studentId:Int) { |
| | | required init(status:StudentAppointTypeList?,studentId:Int) { |
| | | super.init(nibName: nil, bundle: nil) |
| | | viewModel.status.accept(status) |
| | | viewModel.studentId.accept(studentId) |
| | |
| | | guard let weakSelf = self else { return } |
| | | if let models = data.data{ |
| | | weakSelf.mentals = models |
| | | if models.count > 0{ |
| | | weakSelf.mentals.append(StudentMedalModel(medalName: "更多", medalType: .more)) |
| | | } |
| | | weakSelf.mentalCollectionView.reloadData() |
| | | let he = ceil(Double(models.count) / 3) * 91 + floor(Double(models.count) / 3) * 35 |
| | | let he = ceil(Double(weakSelf.mentals.count) / 3) * 91 + floor(Double(weakSelf.mentals.count) / 3) * 35 |
| | | weakSelf.cons_mentalViewHei.constant = he |
| | | UIView.animate(withDuration: 0.3) { |
| | | weakSelf.view.layoutIfNeeded() |
| | |
| | | return .lightContent |
| | | } |
| | | |
| | | // func scrollViewDidScroll(_ scrollView: UIScrollView) { |
| | | // let offsetX = min(1,max(0,-(scrollView.contentOffset.y / 177.0))) |
| | | // leftBtn.alpha = offsetX |
| | | // } |
| | | |
| | | @objc func localDetailAction(btn:UIButton){ |
| | | let index = btn.tag - 10 |
| | | if let model = weeklyCourseModel?.data[index]{ |
| | | if (weeklyCourseModel?.data[index]) != nil{ |
| | | JQ_MapNavigationTool.startNav(CLLocationCoordinate2D(latitude: weeklyCourseModel!.lat, longitude: weeklyCourseModel!.lon), distanceName: weeklyCourseModel?.name ?? "未命名地址", scheme: "weparklife") |
| | | } |
| | | } |
| | |
| | | if m.type == 1 && m.isType == 0{ |
| | | CommonAlertView.show(title: "提示", content: "确认请假?") { status in |
| | | if status{ |
| | | Services.startCourceRreverse(courseId: m.id, time: weakSelf.currentDate.jq_format("yyyy-MM-dd"), stuId: stuId).subscribe(onNext: {[weak self] data in |
| | | let leveTime = String(format: "%@ %@", weakSelf.currentDate.jq_format("yyyy-MM-dd"),m.time.first!) |
| | | Services.startCourceRreverse(courseId: m.id, time: leveTime, stuId: stuId).subscribe(onNext: {[weak self] data in |
| | | alertSuccess(msg: "请假成功") |
| | | self?.getSelectDayData() |
| | | |
| | |
| | | }) { error in |
| | | |
| | | }.disposed(by: disposeBag) |
| | | |
| | | |
| | | /** |
| | | let item = viewModel.dataSource.value[indexPath.row] |
| | | Services.queryCourseInfo(id: item.coursePackageId).subscribe(onNext: { data in |
| | | if let m = data.data{ |
| | | let vc = CourseDetailApplyVC(detailModel: m,isExtend: item.payStatus.rawValue == 2) |
| | | self.push(vc: vc) |
| | | } |
| | | }).disposed(by: self.disposeBag) |
| | | |
| | | */ |
| | | } |
| | | } |
| | | |
| | |
| | | var info:String! |
| | | var btnName:String! |
| | | var medalType:MedalType = .club |
| | | var isTopLevel:Int! |
| | | } |
| | | |
| | | lazy private var tableView:UITableView = { |
| | |
| | | table.separatorStyle = .none |
| | | table.delegate = self |
| | | table.dataSource = self |
| | | table.contentInset = UIEdgeInsets(top: -21, left: 0, bottom: 0, right: 0) |
| | | table.register(UINib(nibName: "StudentMentalTCell", bundle: nil), forCellReuseIdentifier: "_StudentMentalTCell") |
| | | return table |
| | | }() |
| | |
| | | for model in models{ |
| | | switch model.medalType{ |
| | | case .club: |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_1"), l1: "COURSE", l2: model.medalName, level: model.levelNum, info: String(format: "再上课打卡%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType)) |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_1"), l1: "COURSE", l2: model.medalName, level: model.levelNum, info: String(format: "再上课打卡%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType,isTopLevel: model.isTopLevel)) |
| | | case .communtiy: |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_3"), l1: "ON_LINE", l2: model.medalName, level: model.levelNum, info: String(format: "再预约场地%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType)) |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_3"), l1: "ON_LINE", l2: model.medalName, level: model.levelNum, info: String(format: "再预约场地%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去预约",medalType: model.medalType,isTopLevel: model.isTopLevel)) |
| | | case .deepPlayer: |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_4"), l1: "APPOINTMENT", l2: model.medalName, level: model.levelNum, info: String(format: "再完成课后练习%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去完成",medalType: model.medalType)) |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_4"), l1: "APPOINTMENT", l2: model.medalName, level: model.levelNum, info: String(format: "再完成课后练习%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去完成",medalType: model.medalType,isTopLevel: model.isTopLevel)) |
| | | case .sport: |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_2"), l1: "EVENTS", l2: model.medalName, level: model.levelNum, info: String(format: "再参与活动%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去报名",medalType: model.medalType)) |
| | | self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_2"), l1: "EVENTS", l2: model.medalName, level: model.levelNum, info: String(format: "再参与活动%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去报名",medalType: model.medalType,isTopLevel: model.isTopLevel)) |
| | | default:break |
| | | } |
| | | } |
| | | self?.tableView.reloadData() |
| | |
| | | case .deepPlayer: |
| | | let vc = CourseExerciseSubListVC() |
| | | push(vc: vc) |
| | | default:break |
| | | } |
| | | } |
| | | } |
| | |
| | | import JQTools |
| | | import QMUIKit |
| | | import SDWebImage |
| | | import WebKit |
| | | |
| | | class StudentReportVC: BaseVC { |
| | | |
| | |
| | | @IBOutlet weak var label_stu_BMI: UILabel! |
| | | @IBOutlet weak var stackView: UIStackView! |
| | | @IBOutlet weak var view_line: UIView! |
| | | private let zoomImageView = QMUIZoomImageView() |
| | | @IBOutlet weak var webView: WKWebView! |
| | | |
| | | private var stuId:Int! |
| | | |
| | |
| | | self?.label_stu_wei.attributedText = self?.setAttribute(t1: "\(m.weight)", t2: "kg") |
| | | self?.label_stu_BMI.attributedText = self?.setAttribute(t1: "\(m.bmi)", t2:m.bodyStatus) |
| | | |
| | | SDWebImageDownloader.shared.downloadImage(with: URL(string: m.url)) {[weak self] image, data, error, status in |
| | | if let image{ |
| | | self?.zoomImageView.image = image |
| | | self?.zoomImageView.hideEmpty() |
| | | } |
| | | } |
| | | var html = [String]() |
| | | for img in m.urls{ |
| | | html.append(String(format: "<img src='%@'/>", img)) |
| | | } |
| | | self?.webView.loadHTMLString(html.joined().jq_wrapHtml(), baseURL: nil) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |
| | |
| | | label_stu_hei.attributedText = setAttribute(t1: "0", t2: "cm") |
| | | label_stu_wei.attributedText = setAttribute(t1: "0", t2: "kg") |
| | | label_stu_BMI.attributedText = setAttribute(t1: "0.0", t2: "正常") |
| | | |
| | | |
| | | view.addSubview(zoomImageView) |
| | | zoomImageView.showEmpty(withText: "暂无报告") |
| | | zoomImageView.snp.makeConstraints { make in |
| | | make.top.equalTo(view_line.snp.bottom).offset(30) |
| | | make.left.right.bottom.equalToSuperview() |
| | | } |
| | | } |
| | | |
| | | private func setAttribute(t1:String,t2:String)->NSMutableAttributedString{ |
| | |
| | | <outlet property="stackView" destination="Z7n-yb-GDw" id="zOs-T2-lqM"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | <outlet property="view_line" destination="sbv-cf-74N" id="Ded-aL-ctI"/> |
| | | <outlet property="webView" destination="sAH-pp-Igh" id="2Z7-Tf-6FV"/> |
| | | </connections> |
| | | </placeholder> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
| | |
| | | <constraint firstAttribute="height" constant="1" id="Xnp-LE-bvE"/> |
| | | </constraints> |
| | | </view> |
| | | <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sAH-pp-Igh"> |
| | | <rect key="frame" x="0.0" y="199" width="393" height="619"/> |
| | | <color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <wkWebViewConfiguration key="configuration"> |
| | | <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/> |
| | | <wkPreferences key="preferences"/> |
| | | </wkWebViewConfiguration> |
| | | </wkWebView> |
| | | </subviews> |
| | | <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstAttribute="trailing" secondItem="Z7n-yb-GDw" secondAttribute="trailing" id="ARR-nu-eW0"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="sAH-pp-Igh" secondAttribute="bottom" id="HjO-VT-uVA"/> |
| | | <constraint firstItem="sAH-pp-Igh" firstAttribute="top" secondItem="sbv-cf-74N" secondAttribute="bottom" constant="30" id="SBc-mk-MHP"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="sAH-pp-Igh" secondAttribute="trailing" id="VYN-Yi-fqS"/> |
| | | <constraint firstItem="sAH-pp-Igh" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="ilC-wf-b5Y"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="sbv-cf-74N" secondAttribute="trailing" constant="19" id="kBv-eu-kpg"/> |
| | | <constraint firstItem="Z7n-yb-GDw" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="27" id="nzg-Xn-lNe"/> |
| | | <constraint firstItem="Z7n-yb-GDw" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="24" id="o28-Ul-Nty"/> |
| | |
| | | |
| | | group.notify(queue: .main) { |
| | | self.items = self.items.sorted { v1, v2 in |
| | | var v1Sort = 0 |
| | | var v2Sort = 0 |
| | | if let m1 = v1 as? HomeStoreTopBannerModel,let m2 = v2 as? HomeStoreConfigModel{ |
| | | return m1.sort < m2.sort |
| | | } |
| | | |
| | | v1Sort = (v1 as? HomeStoreConfigModel)?.sort ?? 0 |
| | | v2Sort = (v2 as? HomeStoreConfigModel)?.sort ?? 0 |
| | | |
| | | v1Sort = (v1 as? HomeStoreTopBannerModel)?.sort ?? 0 |
| | | v2Sort = (v2 as? HomeStoreTopBannerModel)?.sort ?? 0 |
| | | |
| | | return v1Sort < v2Sort |
| | | if let m1 = v1 as? HomeStoreConfigModel,let m2 = v2 as? HomeStoreTopBannerModel{ |
| | | return m1.sort < m2.sort |
| | | } |
| | | return false |
| | | } |
| | | |
| | | // let temp = self.items.map { m in |
| | | // if let n = m as? HomeStoreConfigModel{ |
| | | // return "\(n.sort)" |
| | | // } |
| | | // if let n = m as? HomeStoreTopBannerModel{ |
| | | // return "\(n.sort)" |
| | | // } |
| | | // return "" |
| | | // } |
| | | // |
| | | // print("---->") |
| | | // print(temp.joined(separator: ",")) |
| | | // print("---->") |
| | | |
| | | self.layout.collectionView?.reloadData() |
| | | self.collectionView.reloadData() |
| | | } |
New file |
| | |
| | | // |
| | | // LogOffVC.swift |
| | | // WanPai |
| | | // |
| | | // Created by 无故事王国 on 2023/11/15. |
| | | // |
| | | |
| | | import UIKit |
| | | import WebKit |
| | | |
| | | class LogOffVC: BaseVC { |
| | | |
| | | @IBOutlet weak var webView: WKWebView! |
| | | |
| | | private var timer:Timer? |
| | | private var time:Int = 6 |
| | | @IBOutlet weak var btn_complete: UIButton! |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "注销账号" |
| | | btn_complete.isEnabled = false |
| | | btn_complete.backgroundColor = .gray.withAlphaComponent(0.5) |
| | | Services.queryProtocol(.other,progress: false).subscribe(onNext: {[weak self] result in |
| | | if let text = result.data?.jq_wrapHtml(){ |
| | | self?.webView.loadHTMLString(text, baseURL: nil) |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | |
| | | timer = Timer(timeInterval: 1.0, repeats: true, block: {[weak self] t in |
| | | guard let weakSelf = self else { return } |
| | | self?.time -= 1 |
| | | self?.btn_complete.setTitle("确认(\(weakSelf.time))", for: .normal) |
| | | if self?.time == 0{ |
| | | t.invalidate() |
| | | self?.btn_complete.isEnabled = true |
| | | self?.btn_complete.backgroundColor = Def_ThemeColor |
| | | self?.btn_complete.setTitle("确认", for: .normal) |
| | | } |
| | | }) |
| | | timer?.fire() |
| | | RunLoop.current.add(timer!, forMode: .common) |
| | | } |
| | | |
| | | @IBAction func cancelAction(_ sender: UIButton) { |
| | | navigationController?.popViewController() |
| | | } |
| | | |
| | | @IBAction func completeAction(_ sender: Any) { |
| | | CommonAlertView.show(title: "提示", content: "确认注销账号?") { status in |
| | | if status{ |
| | | Services.logOff().subscribe(onNext: {data in |
| | | app.needLogin() |
| | | }).disposed(by: self.disposeBag) |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
| | | <device id="retina6_12" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> |
| | | <capability name="Named colors" minToolsVersion="9.0"/> |
| | | <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | | </dependencies> |
| | | <objects> |
| | | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LogOffVC" customModule="WanPai" customModuleProvider="target"> |
| | | <connections> |
| | | <outlet property="btn_complete" destination="kKD-pi-6sR" id="BIg-jZ-vaX"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | <outlet property="webView" destination="52C-9F-D9l" id="SCc-O0-GaG"/> |
| | | </connections> |
| | | </placeholder> |
| | | <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> |
| | | <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> |
| | | <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> |
| | | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QYG-yy-61T"> |
| | | <rect key="frame" x="41" y="755" width="145.66666666666666" height="40"/> |
| | | <color key="backgroundColor" red="0.95686274509803915" green="0.26666666666666666" blue="0.26666666666666666" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="y2h-76-9FA"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="取消"/> |
| | | <userDefinedRuntimeAttributes> |
| | | <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> |
| | | <real key="value" value="20"/> |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | <connections> |
| | | <action selector="cancelAction:" destination="-1" eventType="touchUpInside" id="Whe-sm-7d1"/> |
| | | </connections> |
| | | </button> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kKD-pi-6sR"> |
| | | <rect key="frame" x="206.66666666666663" y="755" width="145.33333333333337" height="40"/> |
| | | <color key="backgroundColor" name="FE6E0D"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="40" id="a8V-i8-BBC"/> |
| | | </constraints> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/> |
| | | <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
| | | <state key="normal" title="确定"/> |
| | | <userDefinedRuntimeAttributes> |
| | | <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> |
| | | <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> |
| | | <real key="value" value="20"/> |
| | | </userDefinedRuntimeAttribute> |
| | | </userDefinedRuntimeAttributes> |
| | | <connections> |
| | | <action selector="completeAction:" destination="-1" eventType="touchUpInside" id="SEg-4U-Dxj"/> |
| | | </connections> |
| | | </button> |
| | | <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="52C-9F-D9l"> |
| | | <rect key="frame" x="0.0" y="69" width="393" height="676"/> |
| | | <wkWebViewConfiguration key="configuration"> |
| | | <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/> |
| | | <wkPreferences key="preferences"/> |
| | | </wkWebViewConfiguration> |
| | | </wkWebView> |
| | | </subviews> |
| | | <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> |
| | | <color key="backgroundColor" systemColor="systemBackgroundColor"/> |
| | | <constraints> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="52C-9F-D9l" secondAttribute="trailing" id="4fg-pY-hou"/> |
| | | <constraint firstItem="52C-9F-D9l" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="W50-24-EI5"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="kKD-pi-6sR" secondAttribute="bottom" constant="23" id="WlU-eN-5gL"/> |
| | | <constraint firstItem="QYG-yy-61T" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="41" id="YYl-Df-FZo"/> |
| | | <constraint firstItem="QYG-yy-61T" firstAttribute="top" secondItem="52C-9F-D9l" secondAttribute="bottom" constant="10" id="Z1j-cM-h45"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="QYG-yy-61T" secondAttribute="bottom" constant="23" id="Z5D-0C-Yqu"/> |
| | | <constraint firstItem="kKD-pi-6sR" firstAttribute="width" secondItem="QYG-yy-61T" secondAttribute="width" id="a0l-WV-bMS"/> |
| | | <constraint firstItem="kKD-pi-6sR" firstAttribute="leading" secondItem="QYG-yy-61T" secondAttribute="trailing" constant="20" id="mcQ-oq-KBg"/> |
| | | <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="kKD-pi-6sR" secondAttribute="trailing" constant="41" id="vF5-Yg-2FN"/> |
| | | <constraint firstItem="52C-9F-D9l" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="voM-ZQ-47u"/> |
| | | </constraints> |
| | | <point key="canvasLocation" x="19" y="21"/> |
| | | </view> |
| | | </objects> |
| | | <resources> |
| | | <namedColor name="FE6E0D"> |
| | | <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | </namedColor> |
| | | <systemColor name="systemBackgroundColor"> |
| | | <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | </systemColor> |
| | | </resources> |
| | | </document> |
| | |
| | | self.btn_again.setTitle("查看详情", for: .normal) |
| | | NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) |
| | | |
| | | case .fail(let string, _): |
| | | case .fail(let string, let code): |
| | | self.btn_back.setTitle("返回", for: .normal) |
| | | self.btn_again.setTitle("再次支付", for: .normal) |
| | | label_content.text = string |
| | | if code == 3{btn_again.setTitle("去充值", for: .normal)} |
| | | |
| | | case .none:break |
| | | } |
| | |
| | | }.disposed(by: disposeBag) |
| | | |
| | | case .courseApply: |
| | | NotificationCenter.default.post(name: StudentRefresh_Nofi, object: nil) |
| | | //课时购买 |
| | | btn_backHome.isHidden = true |
| | | if let id = courseConfigId{ |
| | |
| | | //课时购买 |
| | | btn_backHome.isHidden = true |
| | | switch result { |
| | | case .fail(let str,_): |
| | | case .fail(let str,let code): |
| | | btn_again.setTitle("再次支付", for: .normal) |
| | | btn_back.setTitle("返回", for: .normal) |
| | | label_content.text = str |
| | | // if code == 3{btn_again.setTitle("去充值", for: .normal)} |
| | | if code == 3{btn_again.setTitle("去充值", for: .normal)} |
| | | case .success: |
| | | btn_again.setTitle("立即预约", for: .normal) |
| | | btn_back.setTitle("返回首页", for: .normal) |
| | |
| | | case .fail(let msg, let code): |
| | | btn_again.setTitle("再次支付", for: .normal) |
| | | btn_back.setTitle("返回", for: .normal) |
| | | label_content.text = msg |
| | | if code == 3{btn_again.setTitle("去充值", for: .normal)} |
| | | |
| | | case .none:break |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @IBAction func logOffAction(_ sender: Any) { |
| | | let vc = LogOffVC() |
| | | push(vc: vc) |
| | | } |
| | | |
| | | |
| | | @IBAction func updateProfileAction(_ sender: UIButton) { |
| | | JQ_ImagePickerTool.getSharedInstance().singleImage({ image in |
| | | self.profileImg = image |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="--" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="yvE-PF-kOr"> |
| | | <rect key="frame" x="52.666666666666629" y="16.333333333333314" width="323.33333333333337" height="18.666666666666671"/> |
| | | <rect key="frame" x="52.666666666666657" y="16.333333333333314" width="323.33333333333337" height="18.666666666666671"/> |
| | | <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> |
| | | <textInputTraits key="textInputTraits"/> |
| | | </textField> |
| | |
| | | </userDefinedRuntimeAttributes> |
| | | <connections> |
| | | <action selector="dismissAccountAction:" destination="-1" eventType="touchUpInside" id="1MR-wG-d2B"/> |
| | | <action selector="logOffAction:" destination="-1" eventType="touchUpInside" id="vzg-QJ-4Yu"/> |
| | | </connections> |
| | | </button> |
| | | </subviews> |
| | |
| | | label_title.text = detailCourseModel.name |
| | | label_teachTime.text = "上课时间:" + (detailCourseModel.classStartTime ?? "") |
| | | label_enrollNum.text = "已报名\(detailCourseModel.applicantsNumber)人" |
| | | let price = String(format: "%@|详情", detailCourseModel.originalPrice.currency()) |
| | | btn_price.setTitle(price, for: .normal) |
| | | |
| | | |
| | | if detailCourseModel.originalPrice != 0{ |
| | | let price = String(format: "%@|详情", detailCourseModel.originalPrice.currency()) |
| | | btn_price.setTitle(price, for: .normal) |
| | | }else if detailCourseModel.coin != 0{ |
| | | let price = String(format: "%ld币|详情", detailCourseModel.coin) |
| | | btn_price.setTitle(price, for: .normal) |
| | | } |
| | | |
| | | label_hasNum.attributedText = AttributedStringbuilder.build().add(string: "包含课时数:", withFont: UIFont.systemFont(ofSize: 14), withColor: UIColor(hexStr: "#737373")).add(string: "\(detailCourseModel.classHours)课时", withFont: UIFont.systemFont(ofSize: 14), withColor: UIColor(hexStr: "#F11010")).mutableAttributedString |
| | | } |
| | |
| | | @IBAction func exchangeAction(_ sender: UIButton) { |
| | | guard exchangeGoodsModel != nil else {return} |
| | | guard exchangeGoodsModel!.residueNum != 0 else {alert(msg: "已兑换光啦");return} |
| | | |
| | | guard exchangeGoodsModel!.redeemedNum != exchangeGoodsModel!.perLimit else {alert(msg: "您已兑换光啦");return} |
| | | if exchangeGoodsModel!.goodType == .course{ |
| | | guard studentModels.count != 0 else {alert(msg: "请选择运动营成员");return} |
| | | } |
| | |
| | | @IBOutlet weak var label_address: UILabel! |
| | | @IBOutlet weak var label_distance: UILabel! |
| | | @IBOutlet weak var label_courseNum: UILabel! |
| | | @IBOutlet weak var view_courseNum: UIView! |
| | | @IBOutlet weak var label_giftCourseNum: UILabel! |
| | | @IBOutlet weak var view_giftCourseNum: UIView! |
| | | @IBOutlet weak var label_attendWeeks: UILabel! |
| | |
| | | weakSelf.label_address.text = model.storeNameAddr |
| | | weakSelf.label_courseNum.text = "\(model.classHours)课时" |
| | | weakSelf.label_giftCourseNum.text = "\(model.freeClassHours)课时" |
| | | weakSelf.view_courseNum.isHidden = model.classHours == 0 |
| | | weakSelf.view_giftCourseNum.isHidden = model.freeClassHours == 0 |
| | | weakSelf.label_attendWeeks.text = model.weekTime |
| | | weakSelf.label_datetime.text = model.time |
| | |
| | | |
| | | weakSelf.label_price.text = model.discountPrice.currency() |
| | | |
| | | weakSelf.img_intro.sd_setImage(with: URL(string: model.detailDrawing)) {[weak self] image, error, type, url in |
| | | weakSelf.img_intro.sd_setImage(with: URL(string: model.introduceDrawing)) {[weak self] image, error, type, url in |
| | | if let img = image{ |
| | | self?.img_intro.image = img |
| | | let radio = img.size.width / img.size.height |
| | |
| | | <outlet property="label_vip" destination="7KS-mD-pbb" id="Nhg-8r-gdk"/> |
| | | <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> |
| | | <outlet property="view_banner" destination="9x3-OB-26n" id="jxs-zv-kio"/> |
| | | <outlet property="view_courseNum" destination="Evs-U2-JQo" id="L7j-9O-2wo"/> |
| | | <outlet property="view_giftCourseNum" destination="He4-gs-Axl" id="8ou-GW-KLc"/> |
| | | </connections> |
| | | </placeholder> |
| | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "我的预约" |
| | | |
| | | // if let model = yardBookingModel{ |
| | | // label_title.text = model.name |
| | | // label_address.text = String(format: "%@(%@)", model.storeName,model.storeAddress) |
| | | // label_type.text = model.siteTypeName |
| | | // view_yard.isHidden = model.siteTypeName.isEmpty |
| | | // } |
| | | |
| | | getData() |
| | | |
| | | yy_popBlock = {[weak self] () in |
| | | guard let weakSelf = self else { return } |
| | | var popToVc:UIViewController? |
| | | for vc in weakSelf.navigationController!.viewControllers{ |
| | | if vc is YardListVC{popToVc = vc;break} |
| | | } |
| | | |
| | | if popToVc != nil{ |
| | | weakSelf.navigationController?.popToViewController(popToVc!, animated: true) |
| | | }else{ |
| | | weakSelf.navigationController?.popViewController() |
| | | } |
| | | } |
| | | } |
| | | |
| | | private func getData(){ |