WanPai.xcodeproj/project.pbxproj
@@ -134,6 +134,7 @@ 138D8B8F2A3FFE36009DCA9E /* YardListVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 138D8B8D2A3FFE36009DCA9E /* YardListVC.xib */; }; 138D8B932A4000D2009DCA9E /* YardTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138D8B912A4000D2009DCA9E /* YardTCell.swift */; }; 138D8B942A4000D2009DCA9E /* YardTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 138D8B922A4000D2009DCA9E /* YardTCell.xib */; }; 138ED7982AF3A5BE0001F2EF /* CustomPointAnnotationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138ED7972AF3A5BE0001F2EF /* CustomPointAnnotationView.swift */; }; 1393B3922A4ACDB200B73072 /* CourseExerciseSubListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1393B3902A4ACDB200B73072 /* CourseExerciseSubListVC.swift */; }; 1393B3932A4ACDB200B73072 /* CourseExerciseSubListVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1393B3912A4ACDB200B73072 /* CourseExerciseSubListVC.xib */; }; 1393B3962A4AD03A00B73072 /* CourseExerciseTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1393B3942A4AD03A00B73072 /* CourseExerciseTCell.swift */; }; @@ -173,7 +174,6 @@ 13BEEAEB2A4D92A200685667 /* ExchangeRecordTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13BEEAE92A4D92A200685667 /* ExchangeRecordTCell.xib */; }; 13CCC4BB2A4A81F900DEDF19 /* StudentCourseDetailHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13CCC4BA2A4A81F900DEDF19 /* StudentCourseDetailHeadView.swift */; }; 13CCC4BD2A4A820100DEDF19 /* StudentCourseDetailHeadView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13CCC4BC2A4A820100DEDF19 /* StudentCourseDetailHeadView.xib */; }; 13CE11CE2AF1F23300F6ACA4 /* CommmonBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13CE11CD2AF1F23300F6ACA4 /* CommmonBannerView.swift */; }; 13CE11D02AF203E000F6ACA4 /* JJPageControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13CE11CF2AF203E000F6ACA4 /* JJPageControl.swift */; }; 13CE11D22AF2595100F6ACA4 /* FlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13CE11D12AF2595100F6ACA4 /* FlowLayout.swift */; }; 13CE11D42AF25C6400F6ACA4 /* UCCateDecorationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13CE11D32AF25C6400F6ACA4 /* UCCateDecorationView.swift */; }; @@ -433,6 +433,7 @@ 138D8B8D2A3FFE36009DCA9E /* YardListVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = YardListVC.xib; sourceTree = "<group>"; }; 138D8B912A4000D2009DCA9E /* YardTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YardTCell.swift; sourceTree = "<group>"; }; 138D8B922A4000D2009DCA9E /* YardTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = YardTCell.xib; sourceTree = "<group>"; }; 138ED7972AF3A5BE0001F2EF /* CustomPointAnnotationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomPointAnnotationView.swift; sourceTree = "<group>"; }; 1393B3902A4ACDB200B73072 /* CourseExerciseSubListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseExerciseSubListVC.swift; sourceTree = "<group>"; }; 1393B3912A4ACDB200B73072 /* CourseExerciseSubListVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CourseExerciseSubListVC.xib; sourceTree = "<group>"; }; 1393B3942A4AD03A00B73072 /* CourseExerciseTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseExerciseTCell.swift; sourceTree = "<group>"; }; @@ -472,7 +473,6 @@ 13BEEAE92A4D92A200685667 /* ExchangeRecordTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ExchangeRecordTCell.xib; sourceTree = "<group>"; }; 13CCC4BA2A4A81F900DEDF19 /* StudentCourseDetailHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudentCourseDetailHeadView.swift; sourceTree = "<group>"; }; 13CCC4BC2A4A820100DEDF19 /* StudentCourseDetailHeadView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StudentCourseDetailHeadView.xib; sourceTree = "<group>"; }; 13CE11CD2AF1F23300F6ACA4 /* CommmonBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommmonBannerView.swift; sourceTree = "<group>"; }; 13CE11CF2AF203E000F6ACA4 /* JJPageControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JJPageControl.swift; sourceTree = "<group>"; }; 13CE11D12AF2595100F6ACA4 /* FlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlowLayout.swift; sourceTree = "<group>"; }; 13CE11D32AF25C6400F6ACA4 /* UCCateDecorationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UCCateDecorationView.swift; sourceTree = "<group>"; }; @@ -640,6 +640,7 @@ children = ( 130E40292A4EC33C003A3D75 /* SearchStoreDetailHeadView.swift */, 130E402B2A4EC342003A3D75 /* SearchStoreDetailHeadView.xib */, 138ED7972AF3A5BE0001F2EF /* CustomPointAnnotationView.swift */, ); path = View; sourceTree = "<group>"; @@ -950,7 +951,6 @@ 130EC17F2AD3F6AF003CA9BA /* CommonAlertSheetView.swift */, 130EC1812AD3F6C0003CA9BA /* CommonAlertSheetView.xib */, 1350BF162ADFD1D9007FC49F /* RatingBar.swift */, 13CE11CD2AF1F23300F6ACA4 /* CommmonBannerView.swift */, ); path = View; sourceTree = "<group>"; @@ -1749,12 +1749,12 @@ 8D8400E92A2F14A3003AF6A2 /* LoginVC.swift in Sources */, 1376A6992A4A7B7B00D4C851 /* StudentCourseDetailVC.swift in Sources */, 133A61862A4E78340066C4E6 /* CustomerListVC.swift in Sources */, 13CE11CE2AF1F23300F6ACA4 /* CommmonBannerView.swift in Sources */, 13A7F72C2AB7E0EC000B3436 /* CourseEXPVC.swift in Sources */, 136B63982A4ECDD900E594F9 /* SearchStoreDetail_1_TCell.swift in Sources */, 8D4905A92A31A6EC00E38513 /* HomeCCell.swift in Sources */, 8D6D58CF2A3972A80003CFE6 /* ActivitySignupListVC.swift in Sources */, 13EAF3872AB442A4000A6F07 /* GamesDataSourceTCell.swift in Sources */, 138ED7982AF3A5BE0001F2EF /* CustomPointAnnotationView.swift in Sources */, 8D79A5972A3967910029874B /* StudentUpdateInfoView.swift in Sources */, 13FBD7812A4AD62100037156 /* StudentMentalListVC.swift in Sources */, 133A61832A4E6FF70066C4E6 /* WelfareExchangeRecordDetailVC.swift in Sources */, WanPai/Assets.xcassets/Bg/bg_game_bottom.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "bg_game_bottom@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "bg_game_bottom@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } WanPai/Assets.xcassets/Bg/bg_game_bottom.imageset/bg_game_bottom@2x.png
WanPai/Assets.xcassets/Bg/bg_game_bottom.imageset/bg_game_bottom@3x.png
WanPai/Assets.xcassets/Bg/bg_game_top.imageset/2ab36743e136ed8e285f863eecce8d0b 1.jpg
WanPai/Assets.xcassets/Bg/bg_game_top.imageset/2ab36743e136ed8e285f863eecce8d0b.jpg
WanPai/Assets.xcassets/Bg/bg_game_top.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "2ab36743e136ed8e285f863eecce8d0b.jpg", "idiom" : "universal", "scale" : "2x" }, { "filename" : "2ab36743e136ed8e285f863eecce8d0b 1.jpg", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } WanPai/Assets.xcassets/Btns/btn_games_scan.imageset/Contents.json
@@ -5,12 +5,12 @@ "scale" : "1x" }, { "filename" : "btn_games_scan@2x.png", "filename" : "扫码@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "btn_games_scan@3x.png", "filename" : "扫码@3x.png", "idiom" : "universal", "scale" : "3x" } WanPai/Assets.xcassets/Btns/btn_games_scan.imageset/btn_games_scan@2x.pngBinary files differ
WanPai/Assets.xcassets/Btns/btn_games_scan.imageset/btn_games_scan@3x.pngBinary files differ
WanPai/Assets.xcassets/Btns/btn_games_scan.imageset/扫码@2x.png
WanPai/Assets.xcassets/Btns/btn_games_scan.imageset/扫码@3x.png
WanPai/Assets.xcassets/Icons/icon_point.imageset/Contents.json
@@ -5,12 +5,12 @@ "scale" : "1x" }, { "filename" : "icon_local@2x.png", "filename" : "dingwei备份@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "icon_local@3x.png", "filename" : "dingwei备份@3x.png", "idiom" : "universal", "scale" : "3x" } WanPai/Assets.xcassets/Icons/icon_point.imageset/dingwei备份@2x.png
WanPai/Assets.xcassets/Icons/icon_point.imageset/dingwei备份@3x.png
WanPai/Assets.xcassets/Icons/icon_point.imageset/icon_local@2x.pngBinary files differ
WanPai/Assets.xcassets/Icons/icon_point.imageset/icon_local@3x.pngBinary files differ
WanPai/Base/BaseNav.swift
@@ -14,7 +14,7 @@ /// 需要透明Nav的VC private var lucencyVCs = [RechargeRecordVC.self,RechargeCenterVC.self,GamesVC.self] private var lucencyVCs = [RechargeRecordVC.self,RechargeCenterVC.self] private let img = UIImage.jq_gradient([UIColor(hexStr: "#FD8C02"),UIColor(hexStr: "#FD7202")], size: CGSize(width: JQ_ScreenW, height: JQ_NavBarHeight), radius: 0, locations: [0,1], direction: .vertical) WanPai/Common/View/CommmonBannerView.swift
File was deleted WanPai/Common/View/CommonBannerView.swift
@@ -182,7 +182,7 @@ lazy var imgView:UIImageView = { let img = UIImageView() img.contentMode = .scaleAspectFit img.contentMode = .scaleToFill return img }() WanPai/Config/Def.swift
@@ -242,7 +242,7 @@ JQ_currentViewController().jq_push(vc: CoinStoreCenterVC()) } if type == "指定商品"{ JQ_currentViewController().jq_push(vc: WelfareRedeemGoodsDetailVC(commodityId: id ?? 0, goodsType: .goods)) JQ_currentViewController().jq_push(vc: WelfareRedeemGoodsDetailVC(commodityId: id ?? 0, goodsType:nil)) } } WanPai/Config/Enums.swift
@@ -304,11 +304,13 @@ enum UseStateType:Int,HandyJSONEnum{ case used = 1 case unUsed = 2 case expired = 3 var strTitle:String{ switch self{ case .used:return "已使用" case .unUsed:return "待使用" case .expired:return "已过期" } } } WanPai/Model/CommonModels.swift
@@ -144,6 +144,7 @@ struct PaymentModel:HandyJSON{ var orderString = "" var returnId = 0 } struct StoreWalfareModel:HandyJSON{ @@ -607,7 +608,7 @@ var endTime: String = "" var goodName: String = "" var goodType: ExchangeType = .goods var requiredType: ExchangePaymentType = .coin var exchangeType: ExchangePaymentType = .coin var integral: Int = 0 var cash: Double = 0 var startTime: String = "" WanPai/Network/NetworkRequest.swift
@@ -181,7 +181,7 @@ case DataAnalysis(String) } class func request<T: HandyJSON>(params: ParamsAppender, method: HTTPMethod, encoding: ParameterEncoding? = nil, progress: Bool = true) -> Observable<BaseResponse<T>>{ class func request<T: HandyJSON>(params: ParamsAppender, method: HTTPMethod, encoding: ParameterEncoding? = nil, progress: Bool = true,ignoreAlert:Bool = false) -> Observable<BaseResponse<T>>{ return Observable<BaseResponse<T>>.create{ ob in guard NetworkReachabilityManager.init(host: All_Url)!.isReachable else { @@ -236,10 +236,15 @@ } ob.onError(NetRequestError.InvaildSession) case 600:alertError(msg: "登录失效,请重新登录");ob.onError(NetRequestError.InvaildSession) case 600: if !ignoreAlert{ alertError(msg: "登录失效,请重新登录");ob.onError(NetRequestError.InvaildSession) } app.needLogin() default: alertError(msg: "\(next.msg)") if !ignoreAlert{ alertError(msg: "\(next.msg)") } ob.onError(NetRequestError.Other(next.code,next.msg)) } } WanPai/Network/Services.swift
@@ -12,15 +12,18 @@ import JQTools #if DEBUG //let All_Url = "http://192.168.110.27:56666" //罗易胜 //let Socket_Url = "192.168.110.22" let All_Url = "http://8.137.22.229:56666" //正式地址 let All_Url = "http://192.168.110.27:56666" //罗易胜 //let All_Url = "http://8.137.22.229:56666" //正式地址 let Game_Url = "https://try.daowepark.com" //let Socket_Url = "192.168.110.22" #else let All_Url = "http://8.137.22.229:56666" //正式地址 //let Socket_Url = "192.168.110.22" //let Game_Url = "https://port.daowepark.com"//正式地址 let Game_Url = "https://try.daowepark.com" //测试地址 //let Socket_Url = "192.168.110.22" #endif class Services: NSObject { @@ -791,6 +794,14 @@ return NetworkRequest.request(params: params, method: .post, progress: true) } /// 积分商城-商品详情 static func UseBenefitDetailOne(goodsId:Int)->Observable<BaseResponse<ExchangeGoodsModel>>{ let params = ParamsAppender.build(url: All_Url) .interface(url: "/account/api/useBenefit/goodsDetailsOne") .append(key: "goodId", value: goodsId) return NetworkRequest.request(params: params, method: .post, progress: true) } /// 兑换门店 static func exchangeStoreIds(id:Int,type:ExchangeType)->Observable<BaseResponse<[StoreSimpleModel]>>{ let params = ParamsAppender.build(url: All_Url) @@ -932,7 +943,7 @@ .append(key: "halfName", value: halfName) .append(key: "isHalf", value: isHalf) .append(key: "nextName", value: nextName) return NetworkRequest.request(params: params, method: .post, progress: true) return NetworkRequest.request(params: params, method: .post, progress: true,ignoreAlert: true) } /// 获取优惠券列表 WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
@@ -72,6 +72,7 @@ label_endtime.text = activityDetailModel.endTime label_ageScope.text = activityDetailModel.age + "岁" label_introducion.text = activityDetailModel.introduction label_city.isHidden = activityDetailModel.province.isEmpty || activityDetailModel.city.isEmpty label_city.text = activityDetailModel.province + "|" + activityDetailModel.city label_money.text = String(format: "%@/人", activityDetailModel.cashPrice.currency()) label_coin.text = String(format: "%ld币/人", activityDetailModel.playPaiCoin) WanPai/Root/Activity/VC/ActivityDetailVC.swift
@@ -54,6 +54,7 @@ label_endtime.text = activityDetailModel.endTime label_ageScope.text = activityDetailModel.age + "岁" label_introducion.text = activityDetailModel.introduction label_city.isHidden = activityDetailModel.province.isEmpty || activityDetailModel.city.isEmpty label_city.text = activityDetailModel.province + "|" + activityDetailModel.city SDWebImageDownloader.shared.downloadImage(with: URL(string: activityDetailModel.registrationNotes)!) {[weak self] image, data, error, status in guard let img = image else { WanPai/Root/Activity/VC/ActivitySignupDetailVC.swift
@@ -57,6 +57,7 @@ label_endtime.text = m.endTime label_ageScope.text = m.age + "岁" label_introducion.text = m.introduction label_city.isHidden = m.province.isEmpty || m.city.isEmpty label_city.text = m.province + "|" + m.city label_matchStore.text = m.storeInfos.map({$0.name}).joined(separator: ",") btn_moreMatchStore.isHidden = (label_matchStore.text?.count ?? 0) < 50 WanPai/Root/Course/TCell/CourseOnlineTCell.xib
@@ -12,17 +12,17 @@ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="_CourseOnlineTCell" rowHeight="139" id="KGk-i7-Jjw" customClass="CourseOnlineTCell" customModule="WanPai" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="468" height="139"/> <rect key="frame" x="0.0" y="0.0" width="361" height="139"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <rect key="frame" x="0.0" y="0.0" width="468" height="139"/> <rect key="frame" x="0.0" y="0.0" width="361" height="139"/> <autoresizingMask key="autoresizingMask"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="PxT-nX-Lp5"> <rect key="frame" x="15" y="13" width="110" height="110"/> <rect key="frame" x="15" y="13" width="147.33333333333334" height="110"/> <constraints> <constraint firstAttribute="height" constant="110" id="9WP-U5-R0w"/> <constraint firstAttribute="width" secondItem="PxT-nX-Lp5" secondAttribute="height" multiplier="1:1" id="Q8s-UL-90I"/> <constraint firstAttribute="width" secondItem="PxT-nX-Lp5" secondAttribute="height" multiplier="1:0.747" id="Q8s-UL-90I"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> @@ -32,7 +32,7 @@ </userDefinedRuntimeAttributes> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sRF-Wi-a0T"> <rect key="frame" x="131" y="13" width="327" height="22"/> <rect key="frame" x="168.33333333333337" y="13" width="182.66666666666663" height="22"/> <constraints> <constraint firstAttribute="height" constant="22" id="gPU-fc-SVT"/> </constraints> @@ -41,29 +41,29 @@ <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ipR-Qm-467"> <rect key="frame" x="131" y="39" width="298" height="13.333333333333336"/> <rect key="frame" x="168.33333333333337" y="39" width="153.66666666666663" height="13.333333333333336"/> <fontDescription key="fontDescription" type="system" pointSize="11"/> <color key="textColor" red="0.23921568627450979" green="0.24313725490196078" blue="0.27058823529411763" alpha="0.69999999999999996" 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="R4u-Yo-mQ2"> <rect key="frame" x="131" y="110.66666666666667" width="61.333333333333343" height="14.333333333333329"/> <rect key="frame" x="168.33333333333334" y="110.66666666666667" width="61.333333333333343" height="14.333333333333329"/> <fontDescription key="fontDescription" type="system" pointSize="12"/> <color key="textColor" red="0.23921568627450979" green="0.24313725490196078" blue="0.27058823529411763" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0积分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zTl-3I-CmB"> <rect key="frame" x="192.33333333333334" y="109.33333333333333" width="37.666666666666657" height="17"/> <rect key="frame" x="229.66666666666666" y="109.33333333333333" width="37.666666666666657" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.93333333333333335" green="0.043137254901960784" blue="0.043137254901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BbO-Ve-6Ru"> <rect key="frame" x="369" y="92" width="86" height="31"/> <rect key="frame" x="279" y="92" width="69" height="31"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="31" id="p4L-x6-V7a"/> <constraint firstAttribute="width" constant="86" id="xsH-eN-X0Z"/> <constraint firstAttribute="width" constant="69" id="xsH-eN-X0Z"/> </constraints> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> @@ -76,7 +76,7 @@ </userDefinedRuntimeAttributes> </button> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FLy-JX-VOh"> <rect key="frame" x="14" y="136" width="442" height="1"/> <rect key="frame" x="14" y="136" width="335" height="1"/> <color key="backgroundColor" red="0.59215686274509804" green="0.59215686274509804" blue="0.59215686274509804" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="1" id="TwZ-5G-QDh"/> @@ -113,7 +113,7 @@ <outlet property="label_content" destination="ipR-Qm-467" id="KWD-d7-Zl8"/> <outlet property="label_title" destination="sRF-Wi-a0T" id="slv-mF-Ww5"/> </connections> <point key="canvasLocation" x="68.702290076335871" y="53.169014084507047"/> <point key="canvasLocation" x="-12.977099236641221" y="53.169014084507047"/> </tableViewCell> </objects> <resources> WanPai/Root/Course/VC/CourseInfoVC.swift
@@ -405,6 +405,9 @@ let cell = tableView.dequeueReusableCell(withIdentifier: "_CourseBookingTCell") as! CourseBookingTCell cell.view_corner.jq_addShadows(shadowColor: UIColor(hexStr: "#DADADA").withAlphaComponent(0.5), corner: 16, radius: 3.5, offset: CGSize(width: 0, height: 2), opacity: 1) guard indexPath.row < weeklyCourseModel?.data.count ?? 0 else { return cell } cell.weeklyCourseItemModel = weeklyCourseModel?.data[indexPath.row] cell.clickClouse = {[weak self] m in WanPai/Root/Course/VC/CourseVideoDetailVC.xib
@@ -53,7 +53,7 @@ <rect key="frame" x="13.999999999999998" y="14" width="16.333333333333329" height="25"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="25" id="Pn3-Ra-oZL"/> <constraint firstAttribute="width" relation="lessThanOrEqual" constant="260" id="YL6-Yk-eQr"/> <constraint firstAttribute="width" relation="lessThanOrEqual" constant="240" id="YL6-Yk-eQr"/> </constraints> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/> <nil key="textColor"/> WanPai/Root/Games/GamesVC.swift
@@ -28,7 +28,7 @@ } override func setUI() { view.backgroundColor = Def_ThemeColor view.backgroundColor = .white } @@ -92,17 +92,17 @@ push(vc: vc) } @IBAction func introAction(_ sender: UIButton) { Services.game_intro().subscribe(onNext: {data in let vc = CommonWebVC(type: .other, content: data.data) vc.title = "步骤说明" self.push(vc: vc) }) { error in }.disposed(by: disposeBag) } // @IBAction func introAction(_ sender: UIButton) { // Services.game_intro().subscribe(onNext: {data in // let vc = CommonWebVC(type: .other, content: data.data) // vc.title = "步骤说明" // self.push(vc: vc) // // }) { error in // // }.disposed(by: disposeBag) // // } } WanPai/Root/Games/GamesVC.xib
@@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <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="22130"/> <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> @@ -19,106 +20,98 @@ <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cM8-5D-cyf"> <rect key="frame" x="14" y="168" width="365" height="638"/> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kLx-vS-toC"> <rect key="frame" x="0.0" y="59" width="393" height="759"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="扫码开启智慧球场" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tp0-6c-JD1"> <rect key="frame" x="109" y="70" width="147" height="21"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yS9-4B-8S6"> <rect key="frame" x="132.66666666666666" y="106" width="100" height="100"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" image="btn_games_scan"/> <connections> <action selector="scanAction:" destination="-1" eventType="touchUpInside" id="d5h-bR-B0N"/> </connections> </button> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1r6-Nh-mqK"> <rect key="frame" x="82.666666666666686" y="226" width="200" height="33.666666666666686"/> <string key="text">请扫码智慧球门上的启动二维码 然后在后续界面选择游戏模式</string> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.40000000000000002" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ihL-1F-PrU"> <rect key="frame" x="153.66666666666666" y="289.66666666666669" width="58" height="29"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="步骤说明"> <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> </state> <connections> <action selector="introAction:" destination="-1" eventType="touchUpInside" id="hv2-Fc-4kE"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qbM-g9-Y9Z"> <rect key="frame" x="153.66666666666666" y="509" width="58" height="29"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="我的数据"> <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> </state> <connections> <action selector="myDatasourceAction:" destination="-1" eventType="touchUpInside" id="eTL-xQ-pS5"/> </connections> </button> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7iJ-56-xgU"> <rect key="frame" x="0.0" y="0.0" width="393" height="737.66666666666663"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_game_top" translatesAutoresizingMaskIntoConstraints="NO" id="e8W-n1-jfp"> <rect key="frame" x="0.0" y="0.0" width="393" height="227.66666666666666"/> <constraints> <constraint firstAttribute="width" secondItem="e8W-n1-jfp" secondAttribute="height" multiplier="1:0.579" id="uH1-1J-Dyf"/> </constraints> </imageView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kzx-Ub-ZrZ"> <rect key="frame" x="126.66666666666669" y="260.66666666666669" width="140" height="140"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" image="btn_games_scan"/> <connections> <action selector="scanAction:" destination="-1" eventType="touchUpInside" id="iiu-VS-SZy"/> </connections> </button> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_game_bottom" translatesAutoresizingMaskIntoConstraints="NO" id="5kb-2A-If7"> <rect key="frame" x="0.0" y="433.66666666666674" width="393" height="177"/> <constraints> <constraint firstAttribute="width" secondItem="5kb-2A-If7" secondAttribute="height" multiplier="1:0.451" id="LLX-sL-p61"/> </constraints> </imageView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SRV-Vo-cNh"> <rect key="frame" x="64" y="666.66666666666663" width="265" height="40"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="40" id="IfY-6r-uay"/> </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="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="20"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> </userDefinedRuntimeAttributes> <connections> <action selector="myDatasourceAction:" destination="-1" eventType="touchUpInside" id="ioB-OM-ct3"/> </connections> </button> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="SRV-Vo-cNh" firstAttribute="top" secondItem="5kb-2A-If7" secondAttribute="bottom" constant="56" id="03x-pb-JQd"/> <constraint firstItem="e8W-n1-jfp" firstAttribute="leading" secondItem="7iJ-56-xgU" secondAttribute="leading" id="0hK-OA-n02"/> <constraint firstItem="kzx-Ub-ZrZ" firstAttribute="centerX" secondItem="7iJ-56-xgU" secondAttribute="centerX" id="2zQ-NA-zwO"/> <constraint firstAttribute="bottomMargin" secondItem="SRV-Vo-cNh" secondAttribute="bottom" constant="23" id="Bbj-Bx-8mo"/> <constraint firstItem="5kb-2A-If7" firstAttribute="top" secondItem="kzx-Ub-ZrZ" secondAttribute="bottom" constant="33" id="DzR-gC-OB3"/> <constraint firstItem="SRV-Vo-cNh" firstAttribute="leading" secondItem="7iJ-56-xgU" secondAttribute="leading" constant="64" id="Iny-jp-Ve2"/> <constraint firstItem="e8W-n1-jfp" firstAttribute="top" secondItem="7iJ-56-xgU" secondAttribute="top" id="KY4-c1-TVb"/> <constraint firstAttribute="trailing" secondItem="e8W-n1-jfp" secondAttribute="trailing" id="UQ3-Wc-KSS"/> <constraint firstItem="5kb-2A-If7" firstAttribute="leading" secondItem="7iJ-56-xgU" secondAttribute="leading" id="c0r-Ep-uEy"/> <constraint firstAttribute="trailing" secondItem="5kb-2A-If7" secondAttribute="trailing" id="i4F-0F-4is"/> <constraint firstItem="kzx-Ub-ZrZ" firstAttribute="top" secondItem="e8W-n1-jfp" secondAttribute="bottom" constant="33" id="sOb-dE-pRw"/> <constraint firstAttribute="trailing" secondItem="SRV-Vo-cNh" secondAttribute="trailing" constant="64" id="uBf-5i-YMg"/> </constraints> </view> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="ihL-1F-PrU" firstAttribute="centerX" secondItem="cM8-5D-cyf" secondAttribute="centerX" id="Acq-uO-lGa"/> <constraint firstAttribute="bottom" secondItem="qbM-g9-Y9Z" secondAttribute="bottom" constant="100" id="HjQ-fS-gia"/> <constraint firstItem="ihL-1F-PrU" firstAttribute="top" secondItem="1r6-Nh-mqK" secondAttribute="bottom" constant="30" id="Is3-sr-s8J"/> <constraint firstItem="qbM-g9-Y9Z" firstAttribute="centerX" secondItem="cM8-5D-cyf" secondAttribute="centerX" id="Q3D-33-YFv"/> <constraint firstItem="tp0-6c-JD1" firstAttribute="top" secondItem="cM8-5D-cyf" secondAttribute="top" constant="70" id="VCo-nS-c6G"/> <constraint firstItem="tp0-6c-JD1" firstAttribute="centerX" secondItem="cM8-5D-cyf" secondAttribute="centerX" id="Z3K-uG-O2A"/> <constraint firstItem="yS9-4B-8S6" firstAttribute="centerX" secondItem="cM8-5D-cyf" secondAttribute="centerX" id="ZMV-Zx-Suc"/> <constraint firstItem="yS9-4B-8S6" firstAttribute="top" secondItem="tp0-6c-JD1" secondAttribute="bottom" constant="15" id="dBw-6z-fBF"/> <constraint firstItem="1r6-Nh-mqK" firstAttribute="top" secondItem="yS9-4B-8S6" secondAttribute="bottom" constant="20" id="x3s-lR-2ls"/> <constraint firstItem="1r6-Nh-mqK" firstAttribute="centerX" secondItem="cM8-5D-cyf" secondAttribute="centerX" id="zsl-RH-Zc1"/> <constraint firstAttribute="bottom" secondItem="7iJ-56-xgU" secondAttribute="bottom" id="QvZ-yc-lLD"/> <constraint firstAttribute="trailing" secondItem="7iJ-56-xgU" secondAttribute="trailing" id="Vah-n9-TdW"/> <constraint firstItem="7iJ-56-xgU" firstAttribute="centerX" secondItem="kLx-vS-toC" secondAttribute="centerX" id="XzM-NR-aof"/> <constraint firstItem="7iJ-56-xgU" firstAttribute="top" secondItem="kLx-vS-toC" secondAttribute="top" id="dZT-BV-sDM"/> <constraint firstItem="7iJ-56-xgU" firstAttribute="leading" secondItem="kLx-vS-toC" secondAttribute="leading" id="kPD-Sf-IVS"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="10"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </view> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Q9Q-ad-ecH"> <rect key="frame" x="136.66666666666666" y="108" width="119.99999999999997" height="120"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="height" constant="120" id="YlS-IC-3tH"/> <constraint firstAttribute="width" constant="120" id="Zqf-yu-11C"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="60"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </imageView> </scrollView> </subviews> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <color key="backgroundColor" name="FE6E0D"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstItem="cM8-5D-cyf" firstAttribute="top" secondItem="Q9Q-ad-ecH" secondAttribute="bottom" constant="-60" id="c8o-DD-5NU"/> <constraint firstItem="Q9Q-ad-ecH" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="49" id="cFo-ag-aSh"/> <constraint firstItem="Q9Q-ad-ecH" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="fyb-71-LM8"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="cM8-5D-cyf" secondAttribute="bottom" constant="12" id="guh-1r-A4c"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="cM8-5D-cyf" secondAttribute="trailing" constant="14" id="sIc-04-lu3"/> <constraint firstItem="cM8-5D-cyf" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="xfG-cr-naI"/> <constraint firstItem="kLx-vS-toC" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="1lI-9R-WQ2"/> <constraint firstItem="kLx-vS-toC" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="3C4-uy-iR9"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="kLx-vS-toC" secondAttribute="bottom" id="FAa-nA-O9I"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="kLx-vS-toC" secondAttribute="trailing" id="f2j-lI-BlV"/> </constraints> <point key="canvasLocation" x="138" y="21"/> </view> </objects> <resources> <image name="btn_games_scan" width="100" height="100"/> <image name="bg_game_bottom" width="390" height="176"/> <image name="bg_game_top" width="390" height="226"/> <image name="btn_games_scan" width="140" height="140"/> <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> WanPai/Root/Home/VC/HomeVC.swift
@@ -34,6 +34,12 @@ super.viewDidLoad() startLocation() // let vc = PaymentResultVC(result: .success, objType: .member) // push(vc: vc) Services.startCourseHome().subscribe(onNext: {[weak self] data in if let model = data.data{ if model.isThere == 1{ @@ -110,70 +116,77 @@ private func getStoreItemList(){ showHUD() // showHUD() items.removeAll() Services.homeStoreConfig(storeId: storeId!).subscribe(onNext: {[weak self] data in guard let weakSelf = self else { return } self?.items.append(contentsOf: (data.data ?? []).filter({$0.isOpen == 1})) Services.homeStoreConfig2(storeId: weakSelf.storeId!).subscribe(onNext: {[weak self] data in self?.items.append(contentsOf: (data.data ?? [])) self?.downloadImgs() }) { error in }.disposed(by: weakSelf.disposeBag) }) { error in }.disposed(by: disposeBag) } //图片下载 private func downloadImgs(){ let group = DispatchGroup() let queue = DispatchQueue(label: "imgRadio") queue.async(group: group){[weak self] () in guard let weakSelf = self else { return } group.enter() Services.homeStoreConfig(storeId: weakSelf.storeId!).subscribe(onNext: {[weak self] data in self?.items.append(contentsOf: (data.data ?? []).filter({$0.isOpen == 1})) Services.homeStoreConfig2(storeId: weakSelf.storeId!).subscribe(onNext: {[weak self] data in self?.items.append(contentsOf: (data.data ?? [])) group.leave() }) { error in group.leave() }.disposed(by: weakSelf.disposeBag) }) { error in group.leave() }.disposed(by: weakSelf.disposeBag) } group.notify(queue: .main){[weak self] () in guard let weakSelf = self else { return } var i = 0 showHUD() let w = (weakSelf.view.frame.width - 78.0) / 2.0 for (_,model) in weakSelf.items.enumerated(){ if let m = model as? HomeStoreConfigModel{ SDWebImageDownloader.shared.downloadImage(with: URL(string: m.backgroundImage), options: .useNSURLCache) { _, _,_ in } completed: {[weak self] image, data, error, status in if let img = image{ m.cellHeight = w / (img.size.width / img.size.height) }else{ m.cellHeight = w / (m.type.defaultImg.size.width / m.type.defaultImg.size.height) let w = (view.frame.width - 78.0) / 2.0 for item in items{ if let m = item as? HomeStoreConfigModel{ queue.async(group: group){ () in group.enter() guard SDImageCache.shared.diskImageDataExists(withKey: m.backgroundImage) else { SDWebImageDownloader.shared.downloadImage(with: URL(string: m.backgroundImage), options: .useNSURLCache) { _, _,_ in } completed: { image, data, error, status in if let img = image{ m.cellHeight = w / (img.size.width / img.size.height) }else{ m.cellHeight = w / (m.type.defaultImg.size.width / m.type.defaultImg.size.height) } group.leave() } i += 1 if i == weakSelf.items.count{ self?.updateUI() } return } if let data = SDImageCache.shared.diskCache.data(forKey: m.backgroundImage),let img = UIImage(data: data){ m.cellHeight = w / (img.size.width / img.size.height) group.leave() } } } if let m = model as? HomeStoreTopBannerModel{ SDWebImageDownloader.shared.downloadImage(with: URL(string: m.backgroundImage), options: .useNSURLCache) { _, _,_ in } completed: {[weak self] image, data, error, status in if let img = image{ m.cellHeight = w / (img.size.width / img.size.height) i += 1 if i == weakSelf.items.count{ self?.updateUI() if let m = item as? HomeStoreTopBannerModel{ queue.async(group: group){() in group.enter() guard SDImageCache.shared.diskImageDataExists(withKey: m.backgroundImage) else { SDWebImageDownloader.shared.downloadImage(with: URL(string: m.backgroundImage), options: .useNSURLCache) { _, _,_ in } completed: { image, data, error, status in if let img = image{ m.cellHeight = w / (img.size.width / img.size.height) } group.leave() } return } if let data = SDImageCache.shared.diskCache.data(forKey: m.backgroundImage),let img = UIImage(data: data){ m.cellHeight = w / (img.size.width / img.size.height) group.leave() } } } } } private func updateUI(){ //重置Layout,不然不更新 self.collectionView.collectionViewLayout = self.layout self.collectionView.reloadData() hiddenHUD() group.notify(queue: .main) { self.layout.collectionView?.reloadData() self.collectionView.reloadData() } } private func startLocation(){ @@ -311,6 +324,7 @@ extension HomeVC:UICollectionViewDataSource{ func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_HomeCCell", for: indexPath) as! HomeCCell guard indexPath.row < items.count else {return cell} let item = items[indexPath.row] if let m = item as? HomeStoreConfigModel{ @@ -326,23 +340,6 @@ func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return items.count } } extension HomeVC: WaterFallLayoutDelegate{ func waterFlowLayout(_ waterFlowLayout: WaterFallFlowLayout, itemHeight indexPath: IndexPath) -> CGFloat { let item = items[indexPath.row] if let m = item as? HomeStoreConfigModel{ return m.cellHeight } if let m = item as? HomeStoreTopBannerModel{ return m.cellHeight } return 0 } } WanPai/Root/Other/CCell/CouponCCell.swift
@@ -46,6 +46,27 @@ } } var couponInfoModel:CouponInfoModel!{ didSet{ if let m = couponInfoModel{ label_name.text = m.name switch m.type { case .discount: //满减券 label_fullMinus.isHidden = true case .voucher: //代金券 label_fullMinus.isHidden = true label_money.text = "\(m.favorable)元" label_useCity.isHidden = true case .experience: //体验券 label_fullMinus.isHidden = true case .none: label_fullMinus.isHidden = true } label_vaildTime.text = String(format: "有效期至%@", couponInfoModel.effectiveTime) } } } override func awakeFromNib() { super.awakeFromNib() WanPai/Root/Other/VC/PaymentResultVC.swift
@@ -20,7 +20,8 @@ case courseSUPApply //运动营报名[体验] case activityApply //活动报名 case yard //场地预约 case games //邮箱 case games //游戏 case exchange //替换 } @@ -35,10 +36,11 @@ private var objType:PaymentObjType! private var courseConfigId:Int? private var handleVC:UIViewController? private var models = [CourseCouponModel]() private var models = [Any]() //CouponInfoModel ,CourseCouponModel private var againClouse:(()->Void)? var isExtend:Bool = false var otherInfo:Dictionary<String,Any>? required init(result:PaymentResult,objType:PaymentObjType,handleVC:UIViewController? = nil,courseConfigId:Int? = nil,againClouse:(()->Void)? = nil) { super.init(nibName: nil, bundle: nil) @@ -79,11 +81,14 @@ label_content.text = "支付成功,恭喜您成为玩湃会员!" case .none:break } // Services.queryMemberCoupon(menthod: 1).subscribe(onNext: { data in // // }) { error in // // }.disposed(by: disposeBag) Services.queryMemberCoupon(menthod: 2).subscribe(onNext: {[weak self] data in if let models = data.data{ self?.models = models self?.collectionView.reloadData() } }) { error in }.disposed(by: disposeBag) case .courseApply: //课时购买 @@ -181,6 +186,19 @@ case .none:break } case .exchange: switch result { case .success: label_content.text = "兑换成功" btn_again.setTitle("查看详情", for: .normal) btn_back.setTitle("返回首页", for: .normal) btn_backHome.isHidden = true case .fail(let msg, let code): btn_again.setTitle("再次支付", for: .normal) btn_back.setTitle("返回", for: .normal) case .none:break } case .none:break } @@ -197,7 +215,7 @@ switch str{ case "查看预约": let vc = YardBookingListVC() JQ_currentViewController().jq_push(vc: vc) jumpAndRemoveSelfVC(vc) case "立即预约": navigationController?.qmui_popToRootViewController(animated: true, completion: { () in JQ_currentViewController().tabBarController?.selectedIndex = 1 @@ -206,24 +224,42 @@ NotificationCenter.default.post(name: StudentRefresh_Nofi, object: nil) case "查看报名": let vc = ActivitySignupListVC() JQ_currentViewController().jq_push(vc: vc) jumpAndRemoveSelfVC(vc) case "再次支付": navigationController?.popViewController(animated: true, {[weak self] in self?.againClouse?() }) case "去充值": navigationController?.popViewController(animated: true, {() in let vc = RechargeCenterVC() JQ_currentViewController().jq_push(vc: vc) }) let vc = RechargeCenterVC() jumpAndRemoveSelfVC(vc) case "返回": navigationController?.popViewController(animated: true, {() in }) case "查看详情": // guard let info = otherInfo else {return} // let id = info["id"] as! Int // let type = ExchangeType(rawValue: info["goodsType"] as! Int) // let vc = WelfareExchangeRecordDetailVC(id: id, goodsType: type!) let vc = WelfareExchangeRecordListVC(pageIndex: 1) jumpAndRemoveSelfVC(vc) default:break } } private func jumpAndRemoveSelfVC(_ vc:UIViewController){ JQ_currentViewController().navigationController?.pushViewController(vc, completion: { for (index,subVC) in (JQ_currentViewController().navigationController?.viewControllers ?? []).enumerated(){ if subVC is PaymentResultVC{ JQ_currentViewController().navigationController?.viewControllers.remove(at: index) } } }) } @IBAction func backAction(_ sender: UIButton) { @@ -233,10 +269,15 @@ }) } if sender.titleLabel?.text == "我的数据"{ navigationController?.popViewController(animated: true, { JQ_currentViewController().jq_push(vc: GamesDataSourceVC()) if sender.titleLabel?.text == "返回"{ navigationController?.popViewController(animated: true, {() in }) } if sender.titleLabel?.text == "我的数据"{ let vc = GamesDataSourceVC() jumpAndRemoveSelfVC(vc) } } @@ -263,7 +304,15 @@ func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_CouponCCell", for: indexPath) as! CouponCCell let model = models[indexPath.row] cell.courseCouponModel = model if let m = model as? CourseCouponModel{ cell.courseCouponModel = m } if let m = model as? CouponInfoModel{ cell.couponInfoModel = m } cell.showDetailClouse = {[weak self] () in self?.dismiss(animated:true){ [weak self] in let vc = WelfareCouponsListVC() WanPai/Root/Other/VC/ProfileVC.swift
@@ -82,9 +82,16 @@ self.btn_userProfile.setImage(image, for: .normal) image.uploadImgToService().subscribe { text in Services.updateUserProfile(text).subscribe(onNext: {[weak self] _ in guard let weakSelf = self else { return } alertSuccess(msg: "修改成功") self?.btn_userProfile.sd_setImage(with: URL(string: text), for: .normal,placeholderImage: UIImage(named: "btn_userProfile")) NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) Services.userDetails().subscribe(onNext: {data in if let m = data.data{m.save()} alertSuccess(msg: "修改成功") NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) }) { error in }.disposed(by: weakSelf.disposeBag) }) { error in alertError(msg: error.localizedDescription) }.disposed(by: self.disposeBag) WanPai/Root/Other/View/StoresChooseView.swift
@@ -174,10 +174,6 @@ alertError(msg: "请先选择省份");return } // guard cityModel != nil else { // alertError(msg: "请先选城市");return // } guard storeModel != nil else { alertError(msg: "请选择门店名称");return WanPai/Root/Search/View/CustomPointAnnotationView.swift
New file @@ -0,0 +1,38 @@ // // CustomPointAnnotationView.swift // WanPai // // Created by 无故事王国 on 2023/11/2. // import UIKit class CustomPointAnnotationView: MAAnnotationView { var label:UILabel! override init!(annotation: MAAnnotation!, reuseIdentifier: String!) { super.init(annotation: annotation, reuseIdentifier: reuseIdentifier) setUI() } private func setUI(){ label = UILabel(text: "123") label.textColor = .black addSubview(label) label.snp.makeConstraints { make in make.center.equalToSuperview() } } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } WanPai/Root/Welfare/TCell/ExchangeRecordTCell.swift
@@ -16,22 +16,34 @@ label_state.text = recordsModel.useStatus.strTitle label_duetime.text = String(format: "有效期:%@-%@", recordsModel.startTime,recordsModel.endTime) label_type.text = recordsModel.goodType.strTitle label_state.textColor = recordsModel.useStatus == .used ? UIColor(hexStr: "#7A7A7A"):Def_ThemeColor switch recordsModel.goodType { case .ticket: btn_qrCode.isHidden = recordsModel.useStatus == .used default: switch recordsModel.useStatus { case .unUsed: label_state.textColor = Def_ThemeColor switch recordsModel.goodType { case .ticket: btn_qrCode.isHidden = false default: btn_qrCode.isHidden = true } case .expired,.used: label_state.textColor = UIColor(hexStr: "#7A7A7A") btn_qrCode.isHidden = true } switch recordsModel.requiredType{ switch recordsModel.exchangeType{ case.coin: label_price.attributedText = AttributedStringbuilder.build().add(string: "\(recordsModel.integral)", withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: Def_ThemeColor) .add(string: "积分", withFont: UIFont.systemFont(ofSize: 12, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString case .cashAndCoin: label_price.attributedText = AttributedStringbuilder.build().add(string: "\(recordsModel.integral)", withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: Def_ThemeColor).add(string: "积分+", withFont: UIFont.systemFont(ofSize: 12, weight: .medium), withColor: Def_ThemeColor).add(string: recordsModel.cash.currency(), withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString var attribute = AttributedStringbuilder.build() if recordsModel.integral != 0{ attribute = attribute.add(string: "\(recordsModel.integral)", withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: Def_ThemeColor) attribute = attribute.add(string: "积分+", withFont: UIFont.systemFont(ofSize: 12, weight: .medium), withColor: Def_ThemeColor) } attribute = attribute.add(string: recordsModel.cash.currency(), withFont: UIFont.systemFont(ofSize: 12, weight: .medium), withColor: Def_ThemeColor) label_price.attributedText = attribute.mutableAttributedString case .cash: label_price.attributedText = AttributedStringbuilder.build().add(string: recordsModel.cash.currency(), withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString } @@ -53,8 +65,8 @@ @IBAction func QRCodeAction(_ sender: UIButton) { var time = OpenDoorTimeModel() time.start_time = Date.jq_StringToTimeInterval((recordsModel.startTime + " 00:00"), "yyyy-MM-dd HH:mm") time.end_time = Date.jq_StringToTimeInterval((recordsModel.endTime + " 00:00"), "yyyy-MM-dd HH:mm") time.start_time = Date.jq_StringToTimeInterval((recordsModel.startTime + " 00:00:00"), "yyyy-MM-dd HH:mm:ss") time.end_time = Date.jq_StringToTimeInterval((recordsModel.endTime + " 23:59:59"), "yyyy-MM-dd HH:mm:ss") let model = OpenDoorModel(sid: recordsModel.sid, rid: recordsModel.rid, uid: recordsModel.userId, time: [time], type: 2) if let string = model.toJSONString(){ QRPreview.show(string) WanPai/Root/Welfare/VC/WelfareExchangeRecordDetailVC.swift
@@ -33,7 +33,8 @@ @IBOutlet weak var img_state1: UIImageView! @IBOutlet weak var webView: WKWebView! @IBOutlet weak var cons_webHeight: NSLayoutConstraint! @IBOutlet weak var view_ticket: UIView! private let bannerView = CommonBannerView() private var recordsDetailModel:RecordsDetailModel? @@ -82,13 +83,14 @@ case .goods: self?.view_course.isHidden = true case .ticket: self?.view_ticket.isHidden = false self?.view_course.isHidden = true } self?.view_verifiStore.isHidden = model.writeOffName.isEmpty self?.view_verifitime.isHidden = model.writeOffName.isEmpty self?.view_verifitime.isHidden = model.writeOffTime.isEmpty self?.view_ordertime.isHidden = model.orderTime.isEmpty self?.view_assignStore.isHidden = model.exchangeAddrType != .store && model.useType != .used self?.view_assignStore.isHidden = model.exchangeAddrType != .store if model.contents.isEmpty{ self?.webView.loadHTMLString("暂无说明".jq_wrapHtml(), baseURL: nil) }else{ @@ -108,6 +110,7 @@ override func setUI() { view_banner.addSubview(bannerView) bannerView.frame = CGRect(x: 0, y: 0, width: JQ_ScreenW, height: JQ_ScreenW * 0.56) view_ticket.isHidden = true } WanPai/Root/Welfare/VC/WelfareExchangeRecordDetailVC.xib
@@ -29,6 +29,7 @@ <outlet property="view_course" destination="KvQ-WX-Vd0" id="dfU-fv-EZv"/> <outlet property="view_duetime" destination="3eJ-y4-YbI" id="CJe-3K-lhb"/> <outlet property="view_ordertime" destination="d94-pa-Vdg" id="OkZ-YO-9KM"/> <outlet property="view_ticket" destination="O3d-z2-wX6" id="nsv-gv-ZCA"/> <outlet property="view_verifiStore" destination="9r1-c4-fXB" id="HIJ-Gp-07w"/> <outlet property="view_verifitime" destination="33s-C4-vPx" id="dGv-tN-cs8"/> <outlet property="webView" destination="NpA-0b-6wX" id="Tz4-db-T57"/> WanPai/Root/Welfare/VC/WelfareExchangeRecordListVC.swift
@@ -52,6 +52,8 @@ private var selectTypeModel:NormalSimpleModel? private var pageIndex:Int? private lazy var funcView:UIView = { let v = UIView() v.backgroundColor = .white @@ -78,6 +80,15 @@ return v }() init(pageIndex:Int? = nil) { super.init(nibName: nil, bundle: nil) self.pageIndex = pageIndex } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() @@ -86,6 +97,14 @@ pageMenu.delegate = self pageViewController.delegate = self edgesForExtendedLayout = .top if pageIndex != nil{ DispatchQueue.main.asyncAfter(deadline: .now()+0.4) {[weak self] () in guard let weakSelf = self else { return } weakSelf.pageMenu.selectedItemIndex = weakSelf.pageIndex! weakSelf.pageViewController.scroll(toPage: weakSelf.pageIndex!, animation: true) } } } override func setUI() { WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift
@@ -46,13 +46,13 @@ // private var model:BenefitHomeCommonditiesModel! private var id:Int! private var goodsType:ExchangeType! private var goodsType:ExchangeType? private var exchangeGoodsModel:ExchangeGoodsModel? private var storeModels = [StoreSimpleModel]() private var selectStoreModel:StoreSimpleModel? private var studentModels = [CourseDetailStudentModel]() init(commodityId:Int,goodsType:ExchangeType) { init(commodityId:Int,goodsType:ExchangeType?) { super.init(nibName: nil, bundle: nil) self.id = commodityId self.goodsType = goodsType @@ -72,63 +72,20 @@ view_selectStore.isHidden = true view_selectStoreHei.constant = 0 Services.UseBenefitDetail(goodsId: id, goodsType: goodsType).subscribe(onNext: {[weak self] data in guard let weakSelf = self else { return } if let model = data.data{ self?.exchangeGoodsModel = model self?.label_title.text = model.goodName self?.label_limit.text = String(format: "%@|%@", model.belongsScope.strTitle,model.exchangeAddrType.titleRaw) self?.label_cost.isHidden = model.cost == 0 self?.label_cost.text = String(format: "价值:%@", model.cost.currency()) self?.label_redeemedNum.text = "\(model.redeemedNum)" self?.label_residueNum.text = "\(model.residueNum)" self?.label_perLimit.text = "\(model.perLimit)" self?.label_startTime.text = "\(model.startTime)-\(model.endTime)" self?.label_courseHours.text = "\(model.courseHours)课时" self?.view_courseHours.isHidden = model.courseHours == 0 // self?.view_exchangeStore.isHidden = model.exchangeAddrType != .store self?.view_students.isHidden = model.goodType != .course self?.view_ticketType.isHidden = model.goodType != .ticket self?.label_ticketType.text = model.cardType.strTitle switch model.exchangeType{ case .coin: self?.label_exchange.text = String(format: "%ld积分", model.integral) case .cashAndCoin: self?.label_exchange.text = String(format: "%ld积分+%@", model.integral,model.cash.currency()) case .cash: self?.label_exchange.text = model.cash.currency() } //加载门店 if model.exchangeAddrType == .store{ Services.exchangeStoreIds(id: model.goodId, type: model.goodType).subscribe(onNext: {[weak self] data in if let models = data.data{ self?.storeModels = models // self?.selectStoreModel = models.first // self?.label_storeName.text = models.first?.storeName ?? "未知门店" } }).disposed(by: weakSelf.disposeBag) } if model.contents.isEmpty{ self?.webView.loadHTMLString("暂无说明".jq_wrapHtml(), baseURL: nil) }else{ self?.webView.loadHTMLString(model.contents.jq_wrapHtml(), baseURL: nil) } let imgs = model.pics var items = [CommonBannerModel]() for (index,img) in imgs.enumerated(){ items.append(CommonBannerModel(index: index,resource: img,mediaType: .imageUrl)) if let type = goodsType{ Services.UseBenefitDetail(goodsId: id, goodsType: type).subscribe(onNext: {[weak self] data in if let model = data.data{ self?.updateData(model) } self?.bannerView.setItems(items: items) } }).disposed(by: disposeBag) }).disposed(by: disposeBag) }else{ Services.UseBenefitDetailOne(goodsId: id).subscribe(onNext: {[weak self] data in if let model = data.data{ self?.updateData(model) } }).disposed(by: disposeBag) } updateStudenTable() } @@ -169,6 +126,55 @@ cons_tableHei.constant = Double(studentModels.count) * 100 tableView.reloadData() } private func updateData(_ model:ExchangeGoodsModel){ exchangeGoodsModel = model label_title.text = model.goodName label_limit.text = String(format: "%@|%@", model.belongsScope.strTitle,model.exchangeAddrType.titleRaw) label_cost.isHidden = model.cost == 0 label_cost.text = String(format: "价值:%@", model.cost.currency()) label_redeemedNum.text = "\(model.redeemedNum)" label_residueNum.text = "\(model.residueNum)" label_perLimit.text = "\(model.perLimit)" label_startTime.text = "\(model.startTime)-\(model.endTime)" label_courseHours.text = "\(model.courseHours)课时" view_courseHours.isHidden = model.courseHours == 0 // self?.view_exchangeStore.isHidden = model.exchangeAddrType != .store view_students.isHidden = model.goodType != .course view_ticketType.isHidden = model.goodType != .ticket label_ticketType.text = model.cardType.strTitle switch model.exchangeType{ case .coin: label_exchange.text = String(format: "%ld积分", model.integral) case .cashAndCoin: label_exchange.text = String(format: "%ld积分+%@", model.integral,model.cash.currency()) case .cash: label_exchange.text = model.cash.currency() } //加载门店 if model.exchangeAddrType == .store{ Services.exchangeStoreIds(id: model.goodId, type: model.goodType).subscribe(onNext: {[weak self] data in if let models = data.data{ self?.storeModels = models } }).disposed(by: disposeBag) } if model.contents.isEmpty{ webView.loadHTMLString("暂无说明".jq_wrapHtml(), baseURL: nil) }else{ webView.loadHTMLString(model.contents.jq_wrapHtml(), baseURL: nil) } let imgs = model.pics var items = [CommonBannerModel]() for (index,img) in imgs.enumerated(){ items.append(CommonBannerModel(index: index,resource: img,mediaType: .imageUrl)) } bannerView.setItems(items: items) } @IBAction func chooseAction(_ sender: QMUIButton) { guard exchangeGoodsModel != nil else {return} @@ -239,10 +245,12 @@ if weakSelf.exchangeGoodsModel!.exchangeType == .coin{ Services.exchangeOperation(exchangeType: .coin, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: num, payType: nil, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","),storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in CommonAlertView.show(title: "提示", content: "兑换成功!") {[weak self] _ in self?.exchangeSuccessUI() NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) } guard let weakSelf = self else { return } let vc = PaymentResultVC(result: .success, objType: .exchange) vc.otherInfo = ["id":data.data?.returnId ?? 0,"goodsType":weakSelf.exchangeGoodsModel!.goodType.rawValue] self?.push(vc: vc) self?.exchangeSuccessUI() NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) },onError: { error in if let er = error as? NetworkRequest.NetRequestError{ switch er { @@ -265,17 +273,30 @@ if let m = data.data{ switch payType { case .aliPay: YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { result in YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) {[weak self] result in guard let weakSelf = self else { return } switch result { case .success: CommonAlertView.show(title: "提示", content: "兑换成功!") {[weak self] _ in self?.exchangeSuccessUI() NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) } let vc = PaymentResultVC(result: .success, objType: .exchange) vc.otherInfo = ["id":m.returnId,"goodsType":weakSelf.exchangeGoodsModel!.goodType.rawValue] self?.push(vc: vc) self?.exchangeSuccessUI() NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) case .cancel: alert(msg: "已取消兑换") case .failure(let error): alertError(msg: error.localizedDescription) if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(let code,let string): let vc = PaymentResultVC(result: .fail(string,code), objType: .exchange) weakSelf.push(vc: vc) default: let vc = PaymentResultVC(result: .fail("兑换失败",0), objType: .exchange) weakSelf.push(vc: vc) } } self?.exchangeSuccessUI() NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil) } } case .wechat:break @@ -287,14 +308,12 @@ },onError: { error in if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(_,let string): CommonAlertView.show(title: "兑换商品", content: string) { _ in } case .Other(let code,let string): let vc = PaymentResultVC(result: .fail(string,code), objType: .exchange) weakSelf.push(vc: vc) default: CommonAlertView.show(title: "兑换商品", content: "兑换失败") { _ in } let vc = PaymentResultVC(result: .fail("兑换失败",0), objType: .exchange) weakSelf.push(vc: vc) } } }).disposed(by: weakSelf.disposeBag) WanPai/Root/Welfare/View/CoinStoreHeadView.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <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="22130"/> <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"/> @@ -153,7 +153,7 @@ <rect key="frame" x="0.0" y="164" width="457" height="52"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="19" translatesAutoresizingMaskIntoConstraints="NO" id="yJz-Nm-kJx"> <rect key="frame" x="14" y="0.0" width="275" height="52"/> <rect key="frame" x="14" y="0.0" width="429" height="52"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tGC-9B-kBe" customClass="QMUIButton"> <rect key="frame" x="0.0" y="0.0" width="79" height="52"/> @@ -170,7 +170,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CSW-RY-Hpe" customClass="QMUIButton"> <rect key="frame" x="98" y="0.0" width="79" height="52"/> <rect key="frame" x="175" y="0.0" width="79" height="52"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="商品类型" image="icon_down_arrow"> @@ -184,7 +184,10 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UwS-hX-I6m" customClass="QMUIButton"> <rect key="frame" x="196" y="0.0" width="79" height="52"/> <rect key="frame" x="350" y="0.0" width="79" height="52"/> <constraints> <constraint firstAttribute="width" relation="lessThanOrEqual" constant="150" id="9PI-GD-scb"/> </constraints> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="适用门店" image="icon_down_arrow"> @@ -204,6 +207,7 @@ <constraints> <constraint firstAttribute="height" constant="52" id="1Co-fD-4AD"/> <constraint firstItem="yJz-Nm-kJx" firstAttribute="leading" secondItem="8CB-nR-iEe" secondAttribute="leading" constant="14" id="9hc-im-Sub"/> <constraint firstAttribute="trailing" secondItem="yJz-Nm-kJx" secondAttribute="trailing" constant="14" id="AIh-NA-n4a"/> <constraint firstItem="yJz-Nm-kJx" firstAttribute="top" secondItem="8CB-nR-iEe" secondAttribute="top" id="NVE-6F-bmA"/> <constraint firstAttribute="bottom" secondItem="yJz-Nm-kJx" secondAttribute="bottom" id="eLa-V0-hfY"/> </constraints> WanPai/Root/Yard/VC/YardBookingDetailVC.swift
@@ -69,6 +69,7 @@ if let model = data.data?.data{ self?.yardBookingDetailDataModel = model self?.label_yardName.text = model.nextName self?.label_yardName.isHidden = model.nextName.isEmpty self?.label_bookingType.text = model.isHalf == 1 ? "半场":"全场" self?.view_halfYard.isHidden = model.isHalf != 1 self?.label_halfYardName.text = model.halfName WanPai/Root/Yard/VC/YardBookingDetailVC.xib
@@ -42,23 +42,24 @@ <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="cvy-7v-Fan"> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cvy-7v-Fan"> <rect key="frame" x="0.0" y="59" width="393" height="759"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xpg-cx-Jxe"> <rect key="frame" x="0.0" y="0.0" width="393" height="89"/> <rect key="frame" x="0.0" y="0.0" width="393" height="90.666666666666671"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="02s-YH-Vmf"> <rect key="frame" x="13.999999999999998" y="14" width="16.333333333333329" height="18"/> <rect key="frame" x="14" y="14.000000000000002" width="260" height="21.666666666666671"/> <constraints> <constraint firstAttribute="height" constant="18" id="lX0-Aw-6vq"/> <constraint firstAttribute="width" constant="260" id="59w-Wk-ord"/> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="lX0-Aw-6vq"/> </constraints> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dtc-xv-Gmh"> <rect key="frame" x="38.333333333333336" y="13.666666666666671" width="40.000000000000007" height="19"/> <rect key="frame" x="282" y="15.333333333333329" width="40" height="19"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aO5-bJ-0tv"> <rect key="frame" x="5" y="2" width="30" height="15"/> @@ -84,7 +85,7 @@ </userDefinedRuntimeAttributes> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hZb-3a-H8Y"> <rect key="frame" x="338" y="19.666666666666671" width="50" height="50"/> <rect key="frame" x="338" y="20.333333333333329" width="50" height="50"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" image="btn_call"/> <connections> @@ -92,14 +93,14 @@ </connections> </button> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_local_mini_gray" translatesAutoresizingMaskIntoConstraints="NO" id="n3f-YT-qUk"> <rect key="frame" x="16" y="48.666666666666671" width="11" height="16"/> <rect key="frame" x="16" y="50.333333333333329" width="11" height="16"/> <constraints> <constraint firstAttribute="height" constant="16" id="gCS-Vo-zvV"/> <constraint firstAttribute="width" constant="11" id="wtm-Cg-Teu"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JkO-ZN-GKx"> <rect key="frame" x="34" y="49.333333333333329" width="299" height="14.333333333333336"/> <rect key="frame" x="34" y="51.333333333333329" width="299" height="14.333333333333329"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -110,12 +111,13 @@ <constraint firstItem="Dtc-xv-Gmh" firstAttribute="centerY" secondItem="02s-YH-Vmf" secondAttribute="centerY" id="ADt-Sz-r5Z"/> <constraint firstAttribute="trailing" secondItem="hZb-3a-H8Y" secondAttribute="trailing" constant="5" id="HQa-LT-Odn"/> <constraint firstAttribute="trailing" secondItem="JkO-ZN-GKx" secondAttribute="trailing" constant="60" id="IFR-NL-cP1"/> <constraint firstAttribute="height" constant="89" id="Iex-jg-RFk"/> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="89" id="Iex-jg-RFk"/> <constraint firstItem="n3f-YT-qUk" firstAttribute="top" secondItem="Dtc-xv-Gmh" secondAttribute="bottom" constant="16" id="JSh-wn-KeP"/> <constraint firstItem="hZb-3a-H8Y" firstAttribute="centerY" secondItem="xpg-cx-Jxe" secondAttribute="centerY" id="LLh-b4-keS"/> <constraint firstItem="n3f-YT-qUk" firstAttribute="leading" secondItem="xpg-cx-Jxe" secondAttribute="leading" constant="16" id="MgX-Yl-8No"/> <constraint firstItem="Dtc-xv-Gmh" firstAttribute="leading" secondItem="02s-YH-Vmf" secondAttribute="trailing" constant="8" id="OjE-yT-UtC"/> <constraint firstItem="02s-YH-Vmf" firstAttribute="leading" secondItem="xpg-cx-Jxe" secondAttribute="leading" constant="14" id="Rp2-qh-tMk"/> <constraint firstAttribute="bottom" secondItem="n3f-YT-qUk" secondAttribute="bottom" constant="24.329999999999998" id="XlI-xy-Xdw"/> <constraint firstItem="JkO-ZN-GKx" firstAttribute="leading" secondItem="n3f-YT-qUk" secondAttribute="trailing" constant="7" id="amy-qb-aBo"/> <constraint firstItem="JkO-ZN-GKx" firstAttribute="centerY" secondItem="n3f-YT-qUk" secondAttribute="centerY" id="qFb-1b-tYd"/> <constraint firstItem="02s-YH-Vmf" firstAttribute="top" secondItem="xpg-cx-Jxe" secondAttribute="top" constant="14" id="qL9-1o-ehj"/> @@ -136,19 +138,19 @@ </userDefinedRuntimeAttributes> </view> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="APi-0y-Lwg"> <rect key="frame" x="0.0" y="99" width="393" height="601.33333333333337"/> <rect key="frame" x="0.0" y="100.66666666666669" width="393" height="601.33333333333326"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7th-09-VZ3"> <rect key="frame" x="0.0" y="0.0" width="393" height="36"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="场地名称:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FTZ-VW-8Y4"> <rect key="frame" x="14" y="9.6666666666666572" width="71.666666666666671" height="17"/> <rect key="frame" x="14" y="9.3333333333333428" width="71.666666666666671" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7h1-Dw-eHi"> <rect key="frame" x="365.66666666666669" y="9.6666666666666572" width="13.333333333333314" height="17"/> <rect key="frame" x="365.66666666666669" y="9.3333333333333428" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -166,13 +168,13 @@ <rect key="frame" x="0.0" y="36" width="393" height="36"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="预约类型:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n2c-5u-5u3"> <rect key="frame" x="14" y="9.6666666666666572" width="71.666666666666671" height="17"/> <rect key="frame" x="14" y="9.3333333333333428" width="71.666666666666671" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tax-DA-fLa"> <rect key="frame" x="365.66666666666669" y="9.6666666666666572" width="13.333333333333314" height="17"/> <rect key="frame" x="365.66666666666669" y="9.3333333333333428" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -190,13 +192,13 @@ <rect key="frame" x="0.0" y="72" width="393" height="36"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="半场名称:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MDR-Bl-xpc"> <rect key="frame" x="14" y="9.6666666666666572" width="71.666666666666671" height="17"/> <rect key="frame" x="14" y="9.3333333333333428" width="71.666666666666671" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yc7-sN-J8Y"> <rect key="frame" x="365.66666666666669" y="9.6666666666666572" width="13.333333333333314" height="17"/> <rect key="frame" x="365.66666666666669" y="9.3333333333333428" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -211,16 +213,16 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mCF-Zv-Uz7"> <rect key="frame" x="0.0" y="108" width="393" height="36"/> <rect key="frame" x="0.0" y="108.00000000000003" width="393" height="36"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="预约人:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WEa-Fe-jjL"> <rect key="frame" x="14.000000000000004" y="9.6666666666666856" width="57.333333333333343" height="17"/> <rect key="frame" x="14.000000000000004" y="9.3333333333333144" width="57.333333333333343" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TjH-kW-XLP"> <rect key="frame" x="365.66666666666669" y="9.6666666666666856" width="13.333333333333314" height="17"/> <rect key="frame" x="365.66666666666669" y="9.3333333333333144" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -235,16 +237,16 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gZ2-Hg-Lze"> <rect key="frame" x="0.0" y="144" width="393" height="36"/> <rect key="frame" x="0.0" y="144.00000000000003" width="393" height="36"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="联系方式:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tZJ-w7-Rk5"> <rect key="frame" x="14" y="9.6666666666666856" width="71.666666666666671" height="17"/> <rect key="frame" x="14" y="9.3333333333333144" width="71.666666666666671" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UEJ-0E-4LG"> <rect key="frame" x="365.66666666666669" y="9.6666666666666856" width="13.333333333333314" height="17"/> <rect key="frame" x="365.66666666666669" y="9.3333333333333144" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -259,16 +261,16 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5uD-Hq-hdB"> <rect key="frame" x="0.0" y="180" width="393" height="36"/> <rect key="frame" x="0.0" y="180.00000000000003" width="393" height="36"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付价格:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BkC-g1-ALf"> <rect key="frame" x="14" y="9.6666666666666856" width="71.666666666666671" height="17"/> <rect key="frame" x="14" y="9.3333333333333144" width="71.666666666666671" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bhs-Kk-wqY"> <rect key="frame" x="365.66666666666669" y="9.6666666666666856" width="13.333333333333314" height="17"/> <rect key="frame" x="365.66666666666669" y="9.3333333333333144" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -283,16 +285,16 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1um-i0-ebp"> <rect key="frame" x="0.0" y="216" width="393" height="36"/> <rect key="frame" x="0.0" y="216.00000000000003" width="393" height="36"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="预约时间:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LdA-R6-bgF"> <rect key="frame" x="14" y="9.6666666666666856" width="71.666666666666671" height="17"/> <rect key="frame" x="14" y="9.3333333333333144" width="71.666666666666671" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aED-6E-ahn"> <rect key="frame" x="365.66666666666669" y="9.6666666666666856" width="13.333333333333314" height="17"/> <rect key="frame" x="365.66666666666669" y="9.3333333333333144" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -310,13 +312,13 @@ <rect key="frame" x="0.0" y="252" width="393" height="36"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付时间:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A31-ts-d37"> <rect key="frame" x="14" y="9.6666666666666856" width="71.666666666666671" height="17"/> <rect key="frame" x="14" y="9.3333333333333144" width="71.666666666666671" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nvO-eE-GmQ"> <rect key="frame" x="365.66666666666669" y="9.6666666666666856" width="13.333333333333314" height="17"/> <rect key="frame" x="365.66666666666669" y="9.3333333333333144" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -334,13 +336,13 @@ <rect key="frame" x="0.0" y="288" width="393" height="36"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="使用状态:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mZW-ep-qju"> <rect key="frame" x="14" y="9.6666666666666856" width="71.666666666666671" height="17"/> <rect key="frame" x="14" y="9.3333333333333144" width="71.666666666666671" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sQU-vw-kAC"> <rect key="frame" x="365.66666666666669" y="9.6666666666666856" width="13.333333333333314" height="17"/> <rect key="frame" x="365.66666666666669" y="9.3333333333333144" width="13.333333333333314" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -358,27 +360,27 @@ <rect key="frame" x="0.0" y="324" width="393" height="277.33333333333326"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="二维码:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Aqc-YZ-cGf"> <rect key="frame" x="14" y="9.6666666666666856" width="365" height="49"/> <rect key="frame" x="14" y="9.6666666666666288" width="365" height="49"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81000000000000005" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="wXP-uX-2IS"> <rect key="frame" x="130.66666666666666" y="67.666666666666629" width="131.99999999999997" height="132"/> <rect key="frame" x="130.66666666666666" y="67.666666666666686" width="131.99999999999997" height="132"/> <constraints> <constraint firstAttribute="width" constant="132" id="MbL-wn-fcX"/> <constraint firstAttribute="height" constant="132" id="gNu-15-mek"/> </constraints> </imageView> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_warning" translatesAutoresizingMaskIntoConstraints="NO" id="rsN-wi-9X2"> <rect key="frame" x="9" y="231.66666666666663" width="24" height="24"/> <rect key="frame" x="9" y="231.66666666666669" width="24" height="24"/> <constraints> <constraint firstAttribute="height" constant="24" id="kv8-0l-CIL"/> <constraint firstAttribute="width" constant="24" id="osm-5P-MFM"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="headTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bxh-OX-GPj"> <rect key="frame" x="36" y="231.66666666666663" width="354" height="28.666666666666686"/> <rect key="frame" x="36" y="231.66666666666669" width="354" height="28.666666666666686"/> <string key="text">您已经预约成功,请在预约时段扫码此二维码入场。您可以在“预 约场地-已预约场地-详情”页面找到此二维码。</string> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/> @@ -386,7 +388,7 @@ <nil key="highlightedColor"/> </label> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="cX9-gN-ngz"> <rect key="frame" x="140" y="206.66666666666663" width="113" height="18"/> <rect key="frame" x="140" y="206.66666666666669" width="113" height="18"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="距可入场时间:--" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CBH-nG-pZC"> <rect key="frame" x="0.0" y="0.0" width="113" height="18"/> @@ -433,59 +435,10 @@ </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </stackView> <stackView opaque="NO" contentMode="scaleToFill" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="w3D-k7-De5"> <rect key="frame" x="42.666666666666657" y="738.33333333333337" width="308" height="40"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0fI-TF-CeW"> <rect key="frame" x="0.0" y="0.0" width="144" height="40"/> <color key="backgroundColor" red="0.95686274509803915" green="0.26666666666666666" blue="0.26666666666666666" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="144" id="fsB-D3-nPL"/> </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="qXt-mw-vdN"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1rP-aH-JyB"> <rect key="frame" x="164" y="0.0" width="144" height="40"/> <color key="backgroundColor" red="0.99215686274509807" green="0.53333333333333333" blue="0.0078431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="144" id="H7X-XL-CLs"/> </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="paymentAction:" destination="-1" eventType="touchUpInside" id="Xes-Qq-svn"/> </connections> </button> </subviews> <constraints> <constraint firstAttribute="height" constant="40" id="hQf-xi-mRv"/> </constraints> </stackView> </subviews> <constraints> <constraint firstAttribute="bottom" secondItem="w3D-k7-De5" secondAttribute="bottom" constant="23" id="2ni-qF-oEe"/> <constraint firstItem="APi-0y-Lwg" firstAttribute="centerX" secondItem="cvy-7v-Fan" secondAttribute="centerX" id="2rR-Ir-GEQ"/> <constraint firstAttribute="trailing" secondItem="APi-0y-Lwg" secondAttribute="trailing" id="3y5-zZ-B0q"/> <constraint firstItem="w3D-k7-De5" firstAttribute="centerX" secondItem="cvy-7v-Fan" secondAttribute="centerX" id="JXm-8Z-Wff"/> <constraint firstItem="w3D-k7-De5" firstAttribute="top" secondItem="APi-0y-Lwg" secondAttribute="bottom" priority="250" constant="38" id="RYo-h1-Thz"/> <constraint firstItem="xpg-cx-Jxe" firstAttribute="top" secondItem="cvy-7v-Fan" secondAttribute="top" id="UT5-qv-0qV"/> <constraint firstItem="APi-0y-Lwg" firstAttribute="top" secondItem="xpg-cx-Jxe" secondAttribute="bottom" constant="10" id="XDw-Zp-pOd"/> <constraint firstAttribute="trailing" secondItem="xpg-cx-Jxe" secondAttribute="trailing" id="alm-nO-JSD"/> @@ -493,6 +446,52 @@ <constraint firstItem="xpg-cx-Jxe" firstAttribute="leading" secondItem="cvy-7v-Fan" secondAttribute="leading" id="zQP-Ij-H58"/> </constraints> </scrollView> <stackView opaque="NO" contentMode="scaleToFill" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="w3D-k7-De5"> <rect key="frame" x="41" y="755" width="311" height="40"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0fI-TF-CeW"> <rect key="frame" x="0.0" y="0.0" width="144" height="40"/> <color key="backgroundColor" red="0.95686274509803915" green="0.26666666666666666" blue="0.26666666666666666" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="144" id="fsB-D3-nPL"/> </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="qXt-mw-vdN"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1rP-aH-JyB"> <rect key="frame" x="164" y="0.0" width="147" height="40"/> <color key="backgroundColor" red="0.99215686274509807" green="0.53333333333333333" blue="0.0078431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="144" id="H7X-XL-CLs"/> </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="paymentAction:" destination="-1" eventType="touchUpInside" id="Xes-Qq-svn"/> </connections> </button> </subviews> <constraints> <constraint firstAttribute="height" constant="40" id="hQf-xi-mRv"/> </constraints> </stackView> </subviews> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> @@ -500,6 +499,9 @@ <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="cvy-7v-Fan" secondAttribute="trailing" id="6hA-s0-lff"/> <constraint firstItem="cvy-7v-Fan" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="IJP-vp-WFM"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="cvy-7v-Fan" secondAttribute="bottom" id="Qg6-gS-jSK"/> <constraint firstItem="w3D-k7-De5" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="41" id="aOA-AO-kXD"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="w3D-k7-De5" secondAttribute="bottom" constant="23" id="dK7-S9-KBv"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="w3D-k7-De5" secondAttribute="trailing" constant="41" id="lrg-OX-0OX"/> <constraint firstItem="cvy-7v-Fan" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="vrv-NA-5Yu"/> </constraints> <point key="canvasLocation" x="52.671755725190835" y="20.422535211267608"/> WanPai/Root/Yard/VC/YardDetailVC.swift
@@ -288,6 +288,12 @@ self.view_halfYard.alpha = (self.view_halfYard.isHidden ? 0:1) } if btn_halfYard.isSelected{ changePrice(cashPrice: siteDetailModel.cashPriceOne, coin: siteDetailModel.playPaiCoinOne, typeName: siteDetailModel.typeName) }else{ changePrice(cashPrice: siteDetailModel.cashPrice, coin: siteDetailModel.playPaiCoin, typeName: siteDetailModel.typeName) } //为了计算价格 【半场/全场】切换 var val = YardDetailDateManager.shared().dates.value val.removeAll() @@ -386,8 +392,7 @@ switch result { case .success: NotificationCenter.default.post(name: UpdateDetailDate_Noti, object: nil) let vc = PaymentResultVC(result: .success, objType: .yard,handleVC: nil) weakSelf.push(vc: vc) //todo case .cancel: alert(msg: "交易取消") let vc = YardBookingListVC(page: 5) @@ -402,8 +407,7 @@ case .wechat,.integral:break case .coin: NotificationCenter.default.post(name: UpdateDetailDate_Noti, object: nil) let vc = PaymentResultVC(result: .success, objType: .yard,handleVC: nil) weakSelf.push(vc: vc) //todo case .courseNum:break } } @@ -411,14 +415,14 @@ if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(let code,let string): NotificationCenter.default.post(name: UpdateDetailDate_Noti, object: nil) // NotificationCenter.default.post(name: UpdateDetailDate_Noti, object: nil) let vc = PaymentResultVC(result: .fail(string,code), objType: .yard){[weak self] in let vc1 = YardBookingListVC(page: 5) self?.push(vc: vc1) } self?.push(vc: vc) default: NotificationCenter.default.post(name: UpdateDetailDate_Noti, object: nil) // NotificationCenter.default.post(name: UpdateDetailDate_Noti, object: nil) let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .yard){[weak self] in let vc1 = YardBookingListVC(page: 5) self?.push(vc: vc1)