WanPai/Assets.xcassets/Bg/.DS_StoreBinary files differ
WanPai/Assets.xcassets/Bg/bg_long.imageset/bg_long@2x.pngWanPai/Assets.xcassets/Bg/bg_long.imageset/bg_long@3x.pngWanPai/Assets.xcassets/Icons/.DS_StoreBinary files differ
WanPai/Assets.xcassets/Icons/icon_coupon_7.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "Ô½Õ½Ô½ÓÂ@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "Ô½Õ½Ô½ÓÂ@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } WanPai/Assets.xcassets/Icons/icon_coupon_7.imageset/Ô½Õ½Ô½ÓÂ@2x.png
WanPai/Assets.xcassets/Icons/icon_coupon_7.imageset/Ô½Õ½Ô½ÓÂ@3x.png
WanPai/Assets.xcassets/Icons/icon_coupon_8.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "³£Ê¤½«¾ü@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "³£Ê¤½«¾ü@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } WanPai/Assets.xcassets/Icons/icon_coupon_8.imageset/³£Ê¤½«¾ü@2x.png
WanPai/Assets.xcassets/Icons/icon_coupon_8.imageset/³£Ê¤½«¾ü@3x.png
WanPai/Assets.xcassets/Icons/icon_lose.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "icon_lose@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "icon_lose@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } WanPai/Assets.xcassets/Icons/icon_lose.imageset/icon_lose@2x.png
WanPai/Assets.xcassets/Icons/icon_lose.imageset/icon_lose@3x.png
WanPai/Common/VC/CommonWebVC.swift
@@ -16,11 +16,13 @@ @IBOutlet weak var webView: WKWebView! @IBOutlet weak var cons_webHeight: NSLayoutConstraint! @IBOutlet weak var view_btns: UIView! private var needBackBtn:Bool? init(type:AgreentType,customTitle:String? = nil,content:String? = nil) { init(type:AgreentType,customTitle:String? = nil,content:String? = nil,needBackBtn:Bool? = nil) { super.init(nibName: nil, bundle: nil) self.type = type self.content = content self.needBackBtn = needBackBtn } required init?(coder: NSCoder) { @@ -98,7 +100,9 @@ switch type { case .user,.safe,.privacy: view_btns.isHidden = false if needBackBtn == false{ navigationItem.leftBarButtonItem = UIBarButtonItem() } default: view_btns.isHidden = true } WanPai/Common/View/PaymentView.swift
@@ -65,7 +65,7 @@ paymentView.frame = sceneDelegate?.window?.frame ?? .zero paymentView.clouse = clouse paymentView.paymentEnumType = enumType // paymentView.view_wechat.isHidden = (money.wx == nil || money.wx == 0) paymentView.view_wechat.isHidden = (money.wx == nil || money.wx == 0) || !WXApi.isWXAppInstalled() paymentView.view_coin.isHidden = (money.coin == nil || money.coin == 0) paymentView.view_course.isHidden = (money.course == nil || money.course == 0) paymentView.view_alipay.isHidden = (money.ali == nil || money.ali == 0) WanPai/Common/View/PaymentView.xib
@@ -1,9 +1,9 @@ <?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"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" 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"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/> <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"/> @@ -17,13 +17,13 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I0g-vn-aAw"> <rect key="frame" x="0.0" y="508" width="393" height="344"/> <rect key="frame" x="0.0" y="448" width="393" height="404"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="6oz-tW-MFV"> <rect key="frame" x="0.0" y="14" width="393" height="240"/> <rect key="frame" x="0.0" y="14" width="393" height="300"/> <subviews> <view hidden="YES" tag="10" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ME6-yW-eFT"> <rect key="frame" x="0.0" y="-60" width="393" height="60"/> <view tag="10" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ME6-yW-eFT"> <rect key="frame" x="0.0" y="0.0" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="85J-Gs-279"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -78,7 +78,7 @@ </constraints> </view> <view tag="11" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Ft-AC-zgU"> <rect key="frame" x="0.0" y="0.0" width="393" height="60"/> <rect key="frame" x="0.0" y="60" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HtX-dv-eVh"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -133,7 +133,7 @@ </constraints> </view> <view tag="11" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S7h-OF-RAr"> <rect key="frame" x="0.0" y="60" width="393" height="60"/> <rect key="frame" x="0.0" y="120" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BOu-gk-wSG"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -188,7 +188,7 @@ </constraints> </view> <view tag="11" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zmh-9K-6Xt"> <rect key="frame" x="0.0" y="120" width="393" height="60"/> <rect key="frame" x="0.0" y="180" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kUh-Iu-yW9"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -243,7 +243,7 @@ </constraints> </view> <view tag="11" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FeB-qF-5jl"> <rect key="frame" x="0.0" y="180" width="393" height="60"/> <rect key="frame" x="0.0" y="240" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Ok-2i-KOu"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -275,7 +275,7 @@ </connections> </button> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0积分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U8u-9j-U4a"> <rect key="frame" x="132.33333333333334" y="26" width="43" height="19.333333333333329"/> <rect key="frame" x="132.33333333333334" y="26" width="45" height="19.333333333333329"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> <color key="textColor" red="0.93333333330000001" green="0.043137254899999998" blue="0.043137254899999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -300,7 +300,7 @@ </subviews> </stackView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="glt-oZ-fup"> <rect key="frame" x="206.66666666666663" y="274" width="145.33333333333337" height="40"/> <rect key="frame" x="206.66666666666663" y="334" width="145.33333333333337" height="40"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="40" id="JV7-c4-7tD"/> @@ -319,7 +319,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ji4-B6-Ozw"> <rect key="frame" x="41" y="274" width="145.66666666666666" height="40"/> <rect key="frame" x="41" y="334" width="145.66666666666666" height="40"/> <constraints> <constraint firstAttribute="height" constant="40" id="Tyg-21-Wcc"/> </constraints> WanPai/Config/Enums.swift
@@ -387,8 +387,8 @@ 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 .winner:return UIImage(named: "icon_coupon_4")! case .counter:return UIImage(named: "icon_coupon_4")! case .winner:return UIImage(named: "icon_coupon_8")! case .counter:return UIImage(named: "icon_coupon_7")! case .more:return UIImage(named: "icon_coupon_6")! } } @@ -399,8 +399,8 @@ case .sport:return "EVENTS" case .communtiy:return "ON_LINE" case .deepPlayer:return "APPOINTMENT" case .winner:return "WINNER" case .counter:return "COUNTER" case .winner:return "TRIUMPH" case .counter:return "FIGHTING" case .more:return "MORE" } } WanPai/Model/CommonModels.swift
@@ -244,6 +244,7 @@ var height:Double = 0 var weight:Double = 0 var isStudent = 0 // 1:是学员, 0:否 var avatar = "" } WanPai/Network/Services.swift
@@ -412,6 +412,7 @@ .append(key: "id", value: id) .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string) .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string) .append(key: "stuId", value:UserDefaults.standard.value(forKey: "currentStuId") as? Int) .append(key: "payId", value: payId) return NetworkRequest.request(params: params, method: .post, progress: true) } WanPai/Root/Activity/TCell/ActivityInfoTCell.swift
@@ -22,7 +22,7 @@ label_limit.text = temp.joined(separator: "|") label_info.text = m.introduction label_duetime.text = "截止报名:" + m.registerEndTime label_duetime.text = "截止报名:" + m.registerEndTime label_ageScope.text = m.age + "岁" label_hot.text = "\(m.heat)" WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
@@ -201,8 +201,11 @@ } private func payment(type:PayType,paymentId:Int? = nil){ let ids = students.map({"\($0.id)"}).joined(separator: ";") Services.paymentCompetition(id: activityDetailModel.id, userIds: ids, payType: type,coursePaymentId: paymentId).subscribe(onNext: {[weak self] data in let students = students.map { m in return ["id":m.id,"isStudent":m.isStudent] }.jq_toJson1() Services.paymentCompetition(id: activityDetailModel.id, userIds: students, payType: type,coursePaymentId: paymentId).subscribe(onNext: {[weak self] data in NotificationCenter.default.post(name: StudentRefresh_Nofi, object: nil) if let m = data.data{ switch type { WanPai/Root/Course/VC/AddStudentVC.swift
@@ -140,12 +140,10 @@ guard !tf_birthday.text!.isEmpty else {alertError(msg: "请选择生日");return} guard !tf_gender.text!.isEmpty else {alertError(msg: "请选择性别");return} if type == .course{ guard !tf_height.text!.isEmpty else {alertError(msg: tf_height.placeholder!);return} guard !tf_weight.text!.isEmpty else {alertError(msg: tf_weight.placeholder!);return} guard tf_height.text != "0" else {alertError(msg: "请输入正确的身高");return} guard tf_weight.text != "0" else {alertError(msg: "请输入正确的体重");return} } if !tf_phone.isEmpty{ guard tf_phone.text!.jq_isPhone else {alertError(msg: "请输入正确的手机号");return} WanPai/Root/Course/VC/CourseInfoVC.swift
WanPai/Root/Course/VC/CourseVC.swift
WanPai/Root/Course/VC/SignUpCourseVC.swift
WanPai/Root/Course/VC/StudentCourseDetailVC.swift
@@ -84,22 +84,7 @@ }) { error in }.disposed(by: weakSelf.disposeBag) /** Services.queryCourseInfo(id: model.courseId).subscribe(onNext: {[weak self] data in guard let weakSelf = self else { return } if let m = data.data{ Services.registeredData(coursePayId: model.coursePayId ?? 0,orderId: model.orderId).subscribe(onNext: {data in if let m1 = data.data{ let vc = CourseDetailVC(id: model.courseId, signUpCourseModel: m1) weakSelf.push(vc: vc) } }) { error in }.disposed(by: weakSelf.disposeBag) } }).disposed(by: weakSelf.disposeBag) **/ } viewModel.startTime.accept(Date()) WanPai/Root/Course/VC/StudentMentalListVC.swift
@@ -63,6 +63,11 @@ 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,isTopLevel: model.isTopLevel)) case .winner: self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_8"), l1: "TRIUMPH", l2: model.medalName, level: model.levelNum, info: String(format: "社区世界杯再胜利%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去查看",medalType: model.medalType,isTopLevel: model.isTopLevel)) case .counter: self?.items.append(MentalInfo(icon: UIImage(named: "icon_coupon_7"), l1: "FIGHTING", l2: model.medalName, level: model.levelNum, info: String(format: "社区世界杯再参与%@次可升级LV%ld", model.upgradeConditions,model.nextLevel), btnName: "去查看",medalType: model.medalType,isTopLevel: model.isTopLevel)) default:break } } @@ -93,6 +98,9 @@ case .deepPlayer: let vc = CourseExerciseSubListVC() push(vc: vc) case .counter,.winner: let vc = WorldCupVC() push(vc: vc) default:break } } WanPai/Root/Course/View/CourseSubTypeView.swift
@@ -91,7 +91,7 @@ let item = items[indexPath.row] cell.label_content.text = item.name if selectModel == nil{ cell.isSelected = indexPath.row == 0 cell.isSelected = false }else{ cell.isSelected = selectModel?.name == item.name } WanPai/Root/Home/Model/WorldCupModel.swift
@@ -19,6 +19,7 @@ var matchNumber: Int = 0 var name: String = "" var registrationClosingTime:String? var endTime:String = "" var worldCupId:Int = 0 } WanPai/Root/Home/VC/WorldCupListVC.swift
@@ -14,21 +14,13 @@ class WorldCupListViewModel:RefreshModel<WorldCupListModel>{ var search = BehaviorRelay<String?>(value:nil) var gender = BehaviorRelay<NormalSimpleModel>(value:NormalSimpleModel(id: 0, name: "全部")) var gender = BehaviorRelay<NormalSimpleModel?>(value:nil) var sort = BehaviorRelay<Int?>(value:nil) var storeId = BehaviorRelay<NormalSimpleModel?>(value: nil) override func api() -> (Observable<BaseResponse<[WorldCupListModel]>>)? { let deserModel = HomeStoreModel.deserialize(from: UserDefaults.standard.object(forKey: "CurrentStore") as? String) var genderID:Int? if gender.value.id == 0{ genderID = nil }else{ genderID = gender.value.id } return Services.worldCupList(id: deserModel!.storeId, content: search.value, gender:genderID, sort: sort.value, storeId: storeId.value?.id) return Services.worldCupList(id: deserModel!.storeId, content: search.value, gender:gender.value?.id, sort: sort.value, storeId: storeId.value?.id) } } @@ -211,7 +203,7 @@ pointView?.removeFromSuperview() conditionView?.removeFromSuperview() btn.isSelected = !btn.isSelected let sortType = btn.isSelected ? SortType.desc:SortType.asc let sortType = btn.isSelected ? SortType.asc:SortType.desc btn.setImage(sortType.img, for: .normal) viewModel.sort.accept(btn.isSelected ? 1:2) viewModel.beginRefresh() WanPai/Root/Other/VC/PaymentResultVC.swift
@@ -272,7 +272,7 @@ jumpAndRemoveSelfVC(vc) case "查看预约": let vc = YardBookingListVC() jumpAndRemoveSelfVC(vc) case "立即预约": navigationController?.qmui_popToRootViewController(animated: true, completion: { () in JQ_currentViewController().tabBarController?.selectedIndex = 1 @@ -288,7 +288,7 @@ jumpAndRemoveSelfVC(vc) } case "再次支付": if objType == .courseApply{ if objType == .courseApply || objType == .worldCup{ navigationController?.popViewController(animated: true, {[weak self] in self?.againClouse?() }) WanPai/Root/Other/VC/ProfileVC.swift
@@ -39,6 +39,11 @@ self?.label_vipDutime.text = model.memberLifespan self?.btn_userProfile.sd_setImage(with: URL(string: model.userImage), for: .normal,placeholderImage: UIImage(named: "btn_userProfile")) self?.view_vipExpired.isHidden = model.isVip == 0 self?.tf_username.isEnabled = model.userName.isEmpty self?.tf_gender.isEnabled = model.sex.isEmpty self?.tf_birthday.isEnabled = model.birthday.isEmpty } }).disposed(by: disposeBag) @@ -113,11 +118,11 @@ } @IBAction func userAgreementAction(_ sender: Any) { push(vc: CommonWebVC(type: .user)) push(vc: CommonWebVC(type: .user,needBackBtn: true)) } @IBAction func privacyAgreementAction(_ sender: Any) { push(vc: CommonWebVC(type: .privacy)) push(vc: CommonWebVC(type: .privacy,needBackBtn: true)) } WanPai/Root/Other/VC/ProfileVC.xib
@@ -28,8 +28,14 @@ <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xeS-ed-nBY"> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BX3-7g-nap"> <rect key="frame" x="0.0" y="0.0" width="393" height="753"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DAK-PF-zJB"> <rect key="frame" x="140.66666666666666" y="111" width="112" height="112"/> <rect key="frame" x="140.66666666666666" y="52" width="112" height="112"/> <color key="backgroundColor" systemColor="systemGroupedBackgroundColor"/> <constraints> <constraint firstAttribute="width" constant="112" id="E73-rD-eBI"/> @@ -48,13 +54,13 @@ </connections> </button> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="R9B-6k-bGu"> <rect key="frame" x="0.0" y="253" width="393" height="459"/> <rect key="frame" x="0.0" y="194" width="393" height="459"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="b2k-2V-k9C"> <rect key="frame" x="0.0" y="0.0" width="393" height="51"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vAy-G7-z7P"> <rect key="frame" x="14" y="50.666666666666686" width="365" height="0.3333333333333357"/> <rect key="frame" x="14" y="50.666666666666657" width="365" height="0.3333333333333357"/> <color key="backgroundColor" red="0.83137254901960778" green="0.83137254901960778" blue="0.83137254901960778" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.5" id="rhn-Yh-6ix"/> @@ -67,7 +73,7 @@ <nil key="highlightedColor"/> </label> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="--" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Hv3-2p-Y2p"> <rect key="frame" x="81.333333333333343" y="16.333333333333314" width="294.66666666666663" height="18.666666666666671"/> <rect key="frame" x="81.333333333333343" y="16.333333333333343" width="294.66666666666663" height="18.666666666666671"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits"/> </textField> @@ -229,7 +235,7 @@ <rect key="frame" x="0.0" y="255" width="393" height="51"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ZK-ib-Om9"> <rect key="frame" x="14" y="50.666666666666629" width="365" height="0.3333333333333357"/> <rect key="frame" x="14" y="50.666666666666686" width="365" height="0.3333333333333357"/> <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.5" id="uM9-Am-vue"/> @@ -334,7 +340,7 @@ <rect key="frame" x="0.0" y="408" width="393" height="51"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9AA-Gm-jhb"> <rect key="frame" x="14" y="50.666666666666629" width="365" height="0.3333333333333357"/> <rect key="frame" x="14" y="50.666666666666629" width="365" height="0.33333333333334281"/> <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.5" id="Xkf-ds-Ako"/> @@ -362,32 +368,13 @@ <constraint firstAttribute="height" constant="51" id="ytx-zO-bvu"/> </constraints> <connections> <action selector="privacyAgreementAction:" destination="-1" eventType="valueChanged" id="ise-7d-JPs"/> <action selector="privacyAgreementAction:" destination="-1" eventType="touchUpInside" id="hHw-z6-VRl"/> </connections> </view> </subviews> </stackView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Bn-Ou-0kZ"> <rect key="frame" x="206.66666666666663" y="764" width="145.33333333333337" height="40"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="40" id="5al-Qy-joB"/> </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="logoutAction:" destination="-1" eventType="touchUpInside" id="4VC-G0-dpn"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="s12-1B-Lxb"> <rect key="frame" x="41" y="764" width="145.66666666666666" height="40"/> <rect key="frame" x="41" y="699" width="145.66666666666666" height="40"/> <constraints> <constraint firstAttribute="height" constant="40" id="oiT-GM-y4C"/> </constraints> @@ -413,23 +400,61 @@ <action selector="logOffAction:" destination="-1" eventType="touchUpInside" id="vzg-QJ-4Yu"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Bn-Ou-0kZ"> <rect key="frame" x="206.66666666666663" y="699" width="145.33333333333337" height="40"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="40" id="5al-Qy-joB"/> </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="logoutAction:" destination="-1" eventType="touchUpInside" id="4VC-G0-dpn"/> </connections> </button> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="DAK-PF-zJB" firstAttribute="top" secondItem="BX3-7g-nap" secondAttribute="top" constant="52" id="08p-ad-dXd"/> <constraint firstItem="5Bn-Ou-0kZ" firstAttribute="leading" secondItem="s12-1B-Lxb" secondAttribute="trailing" constant="20" id="1w7-Yb-3e2"/> <constraint firstItem="DAK-PF-zJB" firstAttribute="centerX" secondItem="BX3-7g-nap" secondAttribute="centerX" id="7d7-gf-Qcy"/> <constraint firstAttribute="bottom" secondItem="s12-1B-Lxb" secondAttribute="bottom" constant="14" id="IoO-zy-rDM"/> <constraint firstAttribute="trailing" secondItem="5Bn-Ou-0kZ" secondAttribute="trailing" constant="41" id="LO0-Wm-R96"/> <constraint firstItem="R9B-6k-bGu" firstAttribute="leading" secondItem="BX3-7g-nap" secondAttribute="leading" id="Wqj-cT-bwr"/> <constraint firstAttribute="trailing" secondItem="R9B-6k-bGu" secondAttribute="trailing" id="alK-GB-5Bt"/> <constraint firstItem="s12-1B-Lxb" firstAttribute="width" secondItem="5Bn-Ou-0kZ" secondAttribute="width" id="cFf-fs-uT6"/> <constraint firstItem="R9B-6k-bGu" firstAttribute="top" secondItem="DAK-PF-zJB" secondAttribute="bottom" constant="30" id="gOP-T5-KJq"/> <constraint firstItem="s12-1B-Lxb" firstAttribute="top" secondItem="R9B-6k-bGu" secondAttribute="bottom" constant="46" id="oCl-do-Ayr"/> <constraint firstItem="s12-1B-Lxb" firstAttribute="leading" secondItem="BX3-7g-nap" secondAttribute="leading" constant="41" id="oeH-ip-gbn"/> <constraint firstItem="s12-1B-Lxb" firstAttribute="centerY" secondItem="5Bn-Ou-0kZ" secondAttribute="centerY" id="qrj-cx-BlZ"/> </constraints> </view> </subviews> <constraints> <constraint firstItem="BX3-7g-nap" firstAttribute="leading" secondItem="xeS-ed-nBY" secondAttribute="leading" id="HJR-Dm-jYh"/> <constraint firstItem="BX3-7g-nap" firstAttribute="top" secondItem="xeS-ed-nBY" secondAttribute="top" id="OpI-rf-M1D"/> <constraint firstAttribute="trailing" secondItem="BX3-7g-nap" secondAttribute="trailing" id="gnf-dC-Wvs"/> <constraint firstAttribute="bottom" secondItem="BX3-7g-nap" secondAttribute="bottom" id="pKC-uu-SHy"/> <constraint firstItem="BX3-7g-nap" firstAttribute="centerX" secondItem="xeS-ed-nBY" secondAttribute="centerX" id="weR-yt-0ES"/> </constraints> </scrollView> </subviews> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="DAK-PF-zJB" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="52" id="1FR-zh-UKo"/> <constraint firstItem="R9B-6k-bGu" firstAttribute="top" secondItem="DAK-PF-zJB" secondAttribute="bottom" constant="30" id="5Mk-Vl-rUN"/> <constraint firstItem="5Bn-Ou-0kZ" firstAttribute="width" secondItem="s12-1B-Lxb" secondAttribute="width" id="8Ge-n4-jc5"/> <constraint firstItem="R9B-6k-bGu" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="8qt-Ti-aWv"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="R9B-6k-bGu" secondAttribute="trailing" id="EvA-Ni-NVV"/> <constraint firstItem="DAK-PF-zJB" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="IiC-2V-4AK"/> <constraint firstItem="5Bn-Ou-0kZ" firstAttribute="leading" secondItem="s12-1B-Lxb" secondAttribute="trailing" constant="20" id="Ypn-90-5iS"/> <constraint firstItem="s12-1B-Lxb" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="41" id="aHO-aI-WfL"/> <constraint firstItem="5Bn-Ou-0kZ" firstAttribute="bottom" secondItem="s12-1B-Lxb" secondAttribute="bottom" id="ePh-NT-gLh"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="5Bn-Ou-0kZ" secondAttribute="bottom" constant="14" id="equ-tY-b44"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="5Bn-Ou-0kZ" secondAttribute="trailing" constant="41" id="mjx-71-n9m"/> <constraint firstItem="xeS-ed-nBY" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="039-XF-pCl"/> <constraint firstAttribute="bottom" secondItem="xeS-ed-nBY" secondAttribute="bottom" id="f2a-49-k7m"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="xeS-ed-nBY" secondAttribute="trailing" id="qVM-IS-Won"/> <constraint firstItem="xeS-ed-nBY" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="zsz-Ji-Jpt"/> </constraints> <point key="canvasLocation" x="63" y="21"/> <point key="canvasLocation" x="61.832061068702288" y="20.422535211267608"/> </view> </objects> <resources> @@ -442,7 +467,7 @@ <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> <systemColor name="systemGroupedBackgroundColor"> <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </systemColor> </resources> </document> WanPai/Root/Other/View/StudentChoose2View.swift
@@ -128,6 +128,14 @@ cell.btn_edit.isHidden = true cell.img_radio.image = UIImage(named: selectStudents?.id == viewModel.dataSource.value[indexPath.row].id ? "btn_select" : "btn_select_u") if selectStudents?.id == viewModel.dataSource.value[indexPath.row].id{ cell.view_container.borderColor = UIColor(hexString: "#FD7902")?.withAlphaComponent(0.28) cell.img_radio.isHidden = false }else{ cell.view_container.borderColor = UIColor(hexString: "#ADADAD")?.withAlphaComponent(0.28) cell.img_radio.isHidden = true } return cell } } WanPai/Root/Other/View/StudentChooseView.swift
@@ -219,9 +219,11 @@ if self.selectStudents.contains(where: {($0 as! ActivityDetailPartModel).id == item.id}){ cell.img_radio.image = UIImage(named: "btn_choose_s") cell.view_container.borderColor = UIColor(hexStr: "#FD7902").withAlphaComponent(0.28) cell.img_radio.isHidden = false }else{ cell.img_radio.image = UIImage(named: "") cell.view_container.borderColor = UIColor(hexStr: "#ADADAD").withAlphaComponent(0.28) cell.img_radio.isHidden = true } return cell } WanPai/Root/Search/TCell/WorldCupTCell.swift
@@ -29,9 +29,9 @@ label_desc.text = model.content img_cover.sd_setImage(with: URL(string: model.coverImg)) if model.registrationClosingTime == nil{ label_dealTime.text = "截止报名:无截止时间" label_dealTime.text = "截止报名:\(model.endTime)" }else{ label_dealTime.text = "截止报名:\(model.registrationClosingTime!)" label_dealTime.text = "截止报名:\(model.registrationClosingTime!)" } label_age.text = model.age + "岁" WanPai/Root/Search/TCell/WorldCupTCell.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" 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="22504"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -65,16 +65,20 @@ </imageView> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_time_1" translatesAutoresizingMaskIntoConstraints="NO" id="e7G-ry-OMa"> <rect key="frame" x="143" y="154" width="22" height="22"/> <constraints> <constraint firstAttribute="height" constant="22" id="29y-0l-ijM"/> <constraint firstAttribute="width" constant="22" id="GOr-bi-5qp"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OGN-Ix-gGZ"> <rect key="frame" x="180.33333333333334" y="193.66666666666666" width="14" height="18"/> <fontDescription key="fontDescription" type="system" pointSize="15"/> <rect key="frame" x="174.66666666666666" y="194.33333333333334" width="13" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.62352941176470589" green="0.62745098039215685" blue="0.62745098039215685" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SpG-d6-Mry"> <rect key="frame" x="180.33333333333334" y="156" width="14" height="18"/> <fontDescription key="fontDescription" type="system" pointSize="15"/> <rect key="frame" x="174.66666666666666" y="156.33333333333334" width="13" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.62352941179999999" green="0.62745098040000002" blue="0.62745098040000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> @@ -104,7 +108,7 @@ <constraint firstItem="SpG-d6-Mry" firstAttribute="centerY" secondItem="e7G-ry-OMa" secondAttribute="centerY" id="F6s-bY-LKk"/> <constraint firstItem="Aw5-DE-ZTd" firstAttribute="leading" secondItem="NAy-P9-bIs" secondAttribute="trailing" constant="14" id="JBj-Uz-DN6"/> <constraint firstItem="y0L-La-CTe" firstAttribute="bottom" secondItem="oFc-5H-7bu" secondAttribute="bottom" id="Jhb-q7-a96"/> <constraint firstItem="OGN-Ix-gGZ" firstAttribute="leading" secondItem="bT7-Y5-qoi" secondAttribute="trailing" constant="17.5" id="RO1-4l-siK"/> <constraint firstItem="OGN-Ix-gGZ" firstAttribute="leading" secondItem="bT7-Y5-qoi" secondAttribute="trailing" constant="12" id="RO1-4l-siK"/> <constraint firstItem="bT7-Y5-qoi" firstAttribute="centerX" secondItem="e7G-ry-OMa" secondAttribute="centerX" id="S2R-pm-p9d"/> <constraint firstItem="INC-Mr-eUQ" firstAttribute="leading" secondItem="idI-Bn-7t7" secondAttribute="trailing" constant="3.5" id="SiA-Z0-Kmo"/> <constraint firstItem="y0L-La-CTe" firstAttribute="leading" secondItem="INC-Mr-eUQ" secondAttribute="trailing" constant="9.5" id="Txg-fh-c2e"/> WanPai/Root/Search/VC/MatchDetailVC.swift
@@ -37,6 +37,7 @@ private var redTeamItems = [WorldCupPeopleModel]() private var blueTeamItems = [WorldCupPeopleModel]() private var model:WorldCupJudgeModel! private var deviceModel:ActivityDetailStoreModel? private var deviceQRCode:String? required init(model:WorldCupJudgeModel) { @@ -124,6 +125,8 @@ if index > redTeamItems.count{ redTeamItems.removeLast() }else if redTeamItems.count == 1{ redTeamItems.removeAll() }else{ redTeamItems.remove(at: index) } @@ -143,6 +146,8 @@ let index = sender.tag - 20 if index > blueTeamItems.count{ blueTeamItems.removeLast() }else if redTeamItems.count == 1{ blueTeamItems.removeAll() }else{ blueTeamItems.remove(at: index) } @@ -197,6 +202,8 @@ view_blue3Img.sd_setImage(with: URL(string: item.avatar)) } } btn_handle.isSelected = deviceModel != nil } private func checkMutable(model:WorldCupPeopleModel)->Bool{ @@ -217,7 +224,7 @@ @IBAction func handleAction(_ sender: UIButton) { if sender.isSelected{ if deviceModel != nil{ guard redTeamItems.count == 3 else{alert(msg: "红队人数不足");return} guard blueTeamItems.count == 3 else{alert(msg: "蓝队人数不足");return} guard let devCode = deviceQRCode else{alert(msg: "请扫描设备二维码");return} @@ -243,8 +250,8 @@ if status{ Services.startWorldCup(code: devCode, people: tempArray.jq_toJson1(), worldCupId: weakSelf.model.id).subscribe(onNext: {data in if let _ = data.data{ weakSelf.btn_handle.isEnabled = false alert(msg: "比赛开始") sender.isSelected = true weakSelf.redTeamItems.removeAll() weakSelf.blueTeamItems.removeAll() weakSelf.updateUserView() @@ -267,6 +274,7 @@ weakSelf.label_mathYard.isHidden = false weakSelf.label_matchPoint.text = "所属赛点:" + model.name weakSelf.label_mathYard.text = "所属场地:" + model.address weakSelf.deviceModel = model } }).disposed(by: weakSelf.disposeBag) } WanPai/Root/Search/VC/SearchVC.swift
@@ -18,6 +18,7 @@ @IBOutlet weak var img_vipMedal: UIImageView! @IBOutlet weak var label_wpCoin: UILabel! @IBOutlet weak var label_coin: UILabel! @IBOutlet weak var btn_becomeVIP: UIButton! var benefitHomeModel:BenefitHomeModel? private var models = [StartClouseExploreModel]() @@ -68,10 +69,17 @@ self?.benefitHomeModel = model self?.user_avarImg.sd_setImage(with: URL(string: model.userHeadImg)) self?.label_userName.text = model.userName.isEmpty ? "未命名":model.userName if model.isMember != "年度会员"{ self?.label_vip.text = "成为会员" }else{ self?.label_vip.text = model.isMember } self?.label_wpCoin.text = model.wpCoin.currencyNotPrefix() self?.label_coin.text = "\(model.userIntegral)" self?.img_vipMedal.isHidden = model.isMember != "年度会员" self?.btn_becomeVIP.isEnabled = model.isMember != "年度会员" if model.referee == 1{ self?.items.append("裁判入口") self?.func_collectionView.reloadData() @@ -80,6 +88,12 @@ }) { error in }.disposed(by: disposeBag) } @IBAction func becomeVIPAction(_ sender: Any) { let vc = JoinMemberIntroduceVC() push(vc: vc) } @IBAction func customerAction(_ sender: Any) { @@ -148,7 +162,7 @@ let vc = ActivitySignupListVC() push(vc: vc) case "我的运动营": self.tabBarController?.selectedIndex = 1 push(vc: SignUpCourseVC()) case "人员管理": let vc = StudentsManagerListVC() push(vc: vc) WanPai/Root/Search/VC/SearchVC.xib
@@ -13,6 +13,7 @@ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SearchVC" customModule="WanPai" customModuleProvider="target"> <connections> <outlet property="banner_collectionView" destination="GVG-mQ-5A4" id="keS-lx-iWt"/> <outlet property="btn_becomeVIP" destination="ISP-Cr-8RW" id="vl4-vq-GSF"/> <outlet property="func_collectionView" destination="pyk-ne-JeM" id="eQ5-10-Hci"/> <outlet property="img_vipMedal" destination="reN-LL-PRO" id="WIl-zY-wuj"/> <outlet property="label_coin" destination="TBO-dZ-vzH" id="aHo-fb-qUS"/> @@ -157,6 +158,13 @@ <action selector="coinDetailAction:" destination="-1" eventType="touchUpInside" id="VQC-F2-UZo"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ISP-Cr-8RW"> <rect key="frame" x="138.66666666666666" y="86.333333333333343" width="48.333333333333343" height="34"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <connections> <action selector="becomeVIPAction:" destination="-1" eventType="touchUpInside" id="HMh-UX-cau"/> </connections> </button> </subviews> <color key="backgroundColor" red="0.10588235294117647" green="0.22745098039215686" blue="0.52941176470588236" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> @@ -175,6 +183,8 @@ <constraint firstItem="reN-LL-PRO" firstAttribute="leading" secondItem="qIB-bn-Xg1" secondAttribute="trailing" constant="13.5" id="RG9-2c-y1p"/> <constraint firstItem="qIB-bn-Xg1" firstAttribute="top" secondItem="Iaq-eP-lJ7" secondAttribute="bottom" constant="11" id="S1p-gw-G8F"/> <constraint firstItem="hBG-jc-I1P" firstAttribute="centerX" secondItem="ywf-si-kai" secondAttribute="centerX" id="SKj-6E-fFA"/> <constraint firstItem="ISP-Cr-8RW" firstAttribute="leading" secondItem="qIB-bn-Xg1" secondAttribute="leading" id="UMN-jk-7va"/> <constraint firstItem="ISP-Cr-8RW" firstAttribute="centerY" secondItem="qIB-bn-Xg1" secondAttribute="centerY" id="XaT-uF-Irt"/> <constraint firstItem="hBG-jc-I1P" firstAttribute="top" secondItem="ywf-si-kai" secondAttribute="bottom" constant="6" id="ZRW-iT-ity"/> <constraint firstItem="ywf-si-kai" firstAttribute="leading" secondItem="1Yu-z5-de2" secondAttribute="leading" constant="41.5" id="dy9-73-RcY"/> <constraint firstItem="IFx-3f-1QD" firstAttribute="leading" secondItem="1Yu-z5-de2" secondAttribute="leading" constant="26" id="hAd-UM-xF3"/> @@ -183,6 +193,7 @@ <constraint firstItem="xGl-Vo-Gjm" firstAttribute="centerY" secondItem="IFx-3f-1QD" secondAttribute="centerY" id="tX3-fg-Fqb"/> <constraint firstAttribute="trailing" secondItem="xGl-Vo-Gjm" secondAttribute="trailing" constant="34" id="uEs-l3-zLr"/> <constraint firstItem="Iaq-eP-lJ7" firstAttribute="leading" secondItem="IFx-3f-1QD" secondAttribute="trailing" constant="14" id="x9S-au-83K"/> <constraint firstItem="reN-LL-PRO" firstAttribute="trailing" secondItem="ISP-Cr-8RW" secondAttribute="trailing" id="zk3-fl-xGo"/> </constraints> </view> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="W2A-PE-Zq8"> WanPai/Root/Search/VC/WorldCupContentApplyInputVC.swift
@@ -92,7 +92,7 @@ if detailModel.registrationClosingTime != nil{ label_duetime.text = detailModel.registrationClosingTime }else{ label_duetime.text = "无截止时间" label_duetime.text = detailModel.endTime } @@ -156,12 +156,28 @@ alert(msg: "请选择参赛人员");return } if detailModel.storeInfos.count == 1{ StoresInfoView.show(detailModel.storeInfos.first ?? ActivityDetailStoreModel(),type: .worldCup) {[weak self] status in guard let weakSelf = self else { return } if status{ self?.showPaymentView() }else{ self?.navigationController?.popToRootViewController(animated: true) NotificationCenter.default.post(name: ChooseHomeStore_Noti, object: nil) } } }else{ let stores = detailModel.storeInfos.map({$0.name}) StoresInfo_2_View.show(stores) {[weak self] status in if status{ self?.showPaymentView() } } } } private func showPaymentView(){ var result = [Dictionary<String,Int>]() for v in weakSelf.students{ for v in students{ result.append(["id":v.id,"isStudent":v.isStudent]) } @@ -169,21 +185,19 @@ var paiCoin:Int = 0 var classHour:Int = 0 money = weakSelf.detailModel.cash * Double(weakSelf.students.count) paiCoin = weakSelf.detailModel.paiCoin * weakSelf.students.count classHour = weakSelf.detailModel.classHour * weakSelf.students.count //选中有非学员,显示课时支付灰色 let hasNotStudent = students.filter({$0.isStudent == 0}).count > 0 money = detailModel.cash * Double(students.count) paiCoin = detailModel.paiCoin * students.count classHour = detailModel.classHour * students.count if money == 0 && paiCoin == 0 && classHour == 0{ weakSelf.payment(payType: .free, result: result) payment(payType: .free, result: result) }else{ PaymentView.show(enumType: .worldCup, money: (ali: money, wx: money, coin: paiCoin, course:classHour, integral: nil)) {[weak self] payType in PaymentView.show(enumType: .worldCup, money: (ali: money, wx: money, coin: paiCoin, course:classHour, integral: nil),hasNotStudent: hasNotStudent) {[weak self] payType in guard let weakSelf = self else { return } weakSelf.payment(payType: payType, result: result) } } }else{ weakSelf.navigationController?.popToRootViewController(animated: true) NotificationCenter.default.post(name: ChooseHomeStore_Noti, object: nil) } } } @@ -201,7 +215,9 @@ case .cancel: alert(msg: "交易取消") case .failure(_): let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .worldCup) let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .worldCup){[weak self] () in self?.showPaymentView() } self?.push(vc: vc) } } @@ -218,10 +234,14 @@ if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(let code,let string): let vc = PaymentResultVC(result: .fail(string,code), objType: .worldCup) let vc = PaymentResultVC(result: .fail(string,code), objType: .worldCup) {[weak self] () in self?.showPaymentView() } JQ_currentViewController().jq_push(vc: vc) default: let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .worldCup) let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .worldCup){[weak self] () in self?.showPaymentView() } JQ_currentViewController().jq_push(vc: vc) } } WanPai/Root/Search/VC/WorldCupContentApplyVC.swift
@@ -73,7 +73,7 @@ self?.label_title.text = model.name self?.label_hot.text = "\(model.heat)" if model.registrationClosingTime == nil{ self?.label_duetime.text = "无截止时间" self?.label_duetime.text = model.endTime }else{ self?.label_duetime.text = model.registrationClosingTime } WanPai/Root/Search/VC/WorldCupContentDetailVC.swift
@@ -69,7 +69,7 @@ self?.label_title.text = model.name self?.label_hot.text = "\(model.heat)" if model.registrationClosingTime == nil{ self?.label_duetime.text = "无截止时间" self?.label_duetime.text = model.endTime }else{ self?.label_duetime.text = model.registrationClosingTime } WanPai/Root/Search/VC/WorldCupContentVC.swift
@@ -55,14 +55,6 @@ } viewModel.configure(tableView) // if let m = currentPartModel{ // viewModel.studentID.accept(m.id) // viewModel.isStudent.accept(m.isStudent) // viewModel.beginRefresh() // } // tableView.panGestureRecognizer.delegate = self } override func setRx() { WanPai/Root/Search/VC/WorldCupHeaderVC.swift
@@ -13,6 +13,7 @@ class WorldCupHeaderVC: BaseVC { @IBOutlet weak var btn_exchange: QMUIButton! @IBOutlet weak var headerImg: UIImageView! @IBOutlet weak var label_name: UILabel! @IBOutlet weak var img_QR: UIImageView! @IBOutlet weak var label_provinceRank: UILabel! @@ -21,19 +22,6 @@ @IBOutlet weak var label_winNum: UILabel! @IBOutlet weak var label_loseNum: UILabel! @IBOutlet weak var label_winRate: UILabel! // var currentPartModel:ActivityDetailPartModel?{ // didSet{ // if let m = currentPartModel{ // label_name.text = m.name // if let qrCode = WorldCupUserInfoQRCodel(id: m.id, isStudent: m.isStudent).toJSONString(){ // img_QR.image = UIImage.jq_GenerateQRCode(with: "\(qrCode)", width: 76) // } // getData(id: m.id, isStudent: m.isStudent) // } // // } // } var partModel:BehaviorRelay<ActivityDetailPartModel?>? @@ -61,6 +49,7 @@ partModel?.subscribe(onNext: {[weak self]model in if let m = model{ self?.label_name.text = m.name self?.headerImg.sd_setImage(with: URL(string: m.avatar)) if let qrCode = WorldCupUserInfoQRCodel(id: m.id, isStudent: m.isStudent).toJSONString(){ self?.img_QR.image = UIImage.jq_GenerateQRCode(with: "\(qrCode)", width: 76) } @@ -92,7 +81,7 @@ @IBAction func exchangeAction(_ sender: Any) { StudentChoose2View.show {[weak self] item in StudentChoose2View.show(defaultStu: partModel?.value) {[weak self] item in self?.partModel?.accept(item) } } WanPai/Root/Search/VC/WorldCupHeaderVC.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" 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="22504"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/> <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"/> @@ -13,6 +13,7 @@ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WorldCupHeaderVC" customModule="WanPai" customModuleProvider="target"> <connections> <outlet property="btn_exchange" destination="3bk-Zw-hOl" id="guG-Au-EeP"/> <outlet property="headerImg" destination="rC1-GG-uHG" id="aVL-4B-C5W"/> <outlet property="img_QR" destination="kqK-MA-Vfm" id="4cP-wE-jEN"/> <outlet property="label_cityRank" destination="qXP-LB-xCU" id="XyU-KX-35J"/> <outlet property="label_loseNum" destination="lO3-VT-LVU" id="Abh-Hg-KXQ"/> @@ -270,7 +271,7 @@ <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> <systemColor name="systemGray4Color"> <color red="0.81960784313725488" green="0.81960784313725488" blue="0.83921568627450982" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.81960784310000001" green="0.81960784310000001" blue="0.83921568629999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </systemColor> </resources> </document> WanPai/Root/Search/VC/WorldCupRankVC.swift
@@ -16,7 +16,7 @@ var id = BehaviorRelay<Int>(value: 0) var isStudent = BehaviorRelay<Int>(value: 0) var radius = BehaviorRelay<Int>(value: 2) var sort = BehaviorRelay<Int>(value: 1) var sort = BehaviorRelay<Int>(value: 2) var year = BehaviorRelay<Int?>(value: nil) override func api() -> (Observable<BaseResponse<[WorldCupMatchRankModel]>>)? { @@ -33,8 +33,8 @@ private let yearBtn = QMUIButton(type: .custom) private let ratioRankBtn = QMUIButton(type: .custom) private let provinceBtn = UIButton(type: .custom) private var tableView:UITableView! var superScrollView:UIScrollView? override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .clear @@ -151,7 +151,6 @@ provinceBtn.setTitleColor(UIColor(hexString: "#FE7E03"), for: .normal) provinceBtn.backgroundColor = .white provinceBtn.jq_borderWidth = 1 viewModel.radius.accept(1) viewModel.radius.accept(2) } viewModel.beginRefresh() @@ -174,8 +173,16 @@ @objc func rateAction(sender:UIButton){ sender.isSelected = !sender.isSelected viewModel.sort.accept(sender.isSelected ? 2 : 1) ratioRankBtn.setTitle(viewModel.sort.value == 1 ? "按胜率排名":"按场次排名", for: .normal) ratioRankBtn.setTitle(viewModel.sort.value == 1 ? "按场次排名":"按胜率排名", for: .normal) viewModel.beginRefresh() } } extension WorldCupRankVC:UIScrollViewDelegate{ func scrollViewDidScroll(_ scrollView: UIScrollView) { let off = superScrollView!.contentOffset.y + scrollView.contentOffset.y superScrollView!.contentOffset.y = max(0,min(350,off)) } } @@ -315,7 +322,7 @@ } ratioRankBtn.setTitle("按胜率排名", for: .normal) ratioRankBtn.setTitle(viewModel.sort.value == 1 ? "按胜率排名":"按场次排名", for: .normal) ratioRankBtn.setTitle(viewModel.sort.value == 1 ? "按场次排名":"按胜率排名", for: .normal) ratioRankBtn.setTitleColor(UIColor(hexString: "#3876F2"), for: .normal) ratioRankBtn.titleLabel?.font = UIFont.systemFont(ofSize: 16,weight: .medium) ratioRankBtn.setImage(UIImage(named: "icon_reset"), for: .normal) WanPai/Root/Search/VC/WorldCupRecordVC.swift
@@ -25,6 +25,7 @@ private(set) var tableView:UITableView! private var viewModel = WorldCupRecordViewModel() var partModel:BehaviorRelay<ActivityDetailPartModel?>? var superScrollView:UIScrollView? override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .clear @@ -59,6 +60,13 @@ }).disposed(by: disposeBag) } } extension WorldCupRecordVC:UIScrollViewDelegate{ func scrollViewDidScroll(_ scrollView: UIScrollView) { let off = superScrollView!.contentOffset.y + scrollView.contentOffset.y superScrollView!.contentOffset.y = max(0,min(350,off)) } } extension WorldCupRecordVC:UITableViewDelegate,UITableViewDataSource{ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { @@ -68,6 +76,7 @@ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "_WorldCupRecordTCell") as! WorldCupRecordTCell cell.backgroundColor = .clear cell.model = viewModel.dataSource.value!.list[indexPath.row] return cell } WanPai/Root/Search/VC/WorldCupVC.swift
@@ -19,7 +19,7 @@ private var partModels = [ActivityDetailPartModel]() private var partModel = BehaviorRelay<ActivityDetailPartModel?>(value:nil) private var toPage:Int? lazy var headerVC:WorldCupHeaderVC = { let vc = WorldCupHeaderVC() vc.partModel = partModel @@ -51,18 +51,26 @@ return pageViewController }() init(toPage:Int? = nil){ super.init(nibName: nil, bundle: nil) self.toPage = toPage } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() title = "我的报名" view.backgroundColor = .white let bgImg = UIImageView(image: UIImage(named: "bg_long")) bgImg.contentMode = .scaleAspectFill bgImg.contentMode = .top view.addSubview(bgImg) bgImg.snp.makeConstraints { make in make.top.equalTo(200) make.top.equalTo(100) make.left.right.bottom.equalToSuperview() } addChild(adapterVC) adapterVC.view.backgroundColor = .clear @@ -83,6 +91,11 @@ }).disposed(by: disposeBag) headerVC.partModel = partModel DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { self.pageVC.scroll(toPage: self.toPage ?? 0, animation: false) } } override func setUI() { @@ -114,17 +127,19 @@ return contentVC }else if page == 2{ let vc = WorldCupRecordVC() vc.superScrollView = adapterVC.scrollview vc.partModel = partModel return vc }else{ let vc = WorldCupRankVC() vc.superScrollView = adapterVC.scrollview vc.partModel = partModel return vc } } func pageViewController(_ pageViewController: FFPageViewController, didScrollTo index: Int) { func pageViewController(_ pageViewController: FFPageViewController, currentPageChanged currentPage: Int) { menuVC.pageMenu.selectedItemIndex = currentPage } } WanPai/Root/Welfare/TCell/BillInfoTCell.swift
@@ -24,9 +24,7 @@ label_price.text = billingModel.consumeAmount label_price.textColor = UIColor(hexStr: "#2AA60B") } } if billingModel.detailsType != nil{ }else if billingModel.detailsType != nil{ if billingModel.detailsType == .positive{ label_price.text = billingModel.consumeAmount label_price.textColor = UIColor(hexStr: "#FD7302") @@ -34,6 +32,14 @@ label_price.text = billingModel.consumeAmount label_price.textColor = UIColor(hexStr: "#FD2A02") } }else{ if billingModel.consumeAmount.contains("-"){ label_price.text = billingModel.consumeAmount label_price.textColor = UIColor(hexStr: "#FD2A02") }else{ label_price.text = billingModel.consumeAmount label_price.textColor = UIColor(hexStr: "#FD7302") } } } } WanPai/Root/Welfare/VC/RechargeRecordVC.swift
@@ -72,6 +72,7 @@ tableView.delegate = self tableView.dataSource = self tableView.separatorStyle = .none tableView.showsVerticalScrollIndicator = false tableView.register(UINib(nibName: "BillInfoTCell", bundle: nil), forCellReuseIdentifier:"_BillInfoTCell") // tableView.jq_setEmptyView() WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.swift
WanPai/Root/Welfare/VC/WorldCupIntroVC.swift
@@ -24,8 +24,7 @@ self.btn.imageView?.contentMode = .scaleAspectFit self.btn.titleLabel?.font = UIFont.systemFont(ofSize: 15, weight: .medium) self.webView.loadHTMLString(data.content.jq_wrapHtml(), baseURL: nil) self.btn.isHidden = data.turnId == 0 self.btn.isHidden = data.model == "不跳转" self.model = data } }).disposed(by: disposeBag) @@ -58,6 +57,5 @@ if let m = model{ jumpPage(model: m.model, page: m.page, type: m.type, id: m.turnId) } } }