WanPai/Common/View/PaymentCourseView.swift
@@ -71,18 +71,15 @@ self.models = models self.tableView.reloadData() } }) { [weak self] error in guard let weakSelf = self else { return } }) { error in if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(_,let string): let vc = PaymentResultVC(result: .fail(string), objType: .yard,handleVC: nil) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) case .Other(let code,let string): let vc = PaymentResultVC(result: .fail(string,code), objType: .yard,handleVC: nil) JQ_currentViewController().jq_push(vc: vc) default: let vc = PaymentResultVC(result: .fail("支付失败"), objType: .yard,handleVC: nil) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .yard,handleVC: nil) JQ_currentViewController().jq_push(vc: vc) } } }.disposed(by: disposeBag) WanPai/Common/View/PaymentView.swift
@@ -38,6 +38,10 @@ override func awakeFromNib() { super.awakeFromNib() btn_alipay.isSelected = true payType = .aliPay cons_bottom.constant = -(225 + UIDevice.jq_safeEdges.bottom) view_wechat.isHidden = true view_coin.isHidden = true WanPai/Common/View/PaymentView.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="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"/> @@ -17,13 +17,13 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I0g-vn-aAw"> <rect key="frame" x="0.0" y="448" width="393" height="404"/> <rect key="frame" x="0.0" y="508" width="393" height="344"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="6oz-tW-MFV"> <rect key="frame" x="0.0" y="14" width="393" height="300"/> <rect key="frame" x="0.0" y="14" width="393" height="240"/> <subviews> <view tag="10" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ME6-yW-eFT"> <rect key="frame" x="0.0" y="0.0" width="393" height="60"/> <view hidden="YES" tag="10" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ME6-yW-eFT"> <rect key="frame" x="0.0" y="-60" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="85J-Gs-279"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -78,7 +78,7 @@ </constraints> </view> <view tag="11" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Ft-AC-zgU"> <rect key="frame" x="0.0" y="60" width="393" height="60"/> <rect key="frame" x="0.0" y="0.0" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HtX-dv-eVh"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -133,7 +133,7 @@ </constraints> </view> <view tag="11" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S7h-OF-RAr"> <rect key="frame" x="0.0" y="120" width="393" height="60"/> <rect key="frame" x="0.0" y="60" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BOu-gk-wSG"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -188,7 +188,7 @@ </constraints> </view> <view tag="11" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zmh-9K-6Xt"> <rect key="frame" x="0.0" y="180" width="393" height="60"/> <rect key="frame" x="0.0" y="120" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kUh-Iu-yW9"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -243,7 +243,7 @@ </constraints> </view> <view tag="11" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FeB-qF-5jl"> <rect key="frame" x="0.0" y="240" width="393" height="60"/> <rect key="frame" x="0.0" y="180" width="393" height="60"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Ok-2i-KOu"> <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/> @@ -300,7 +300,7 @@ </subviews> </stackView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="glt-oZ-fup"> <rect key="frame" x="206.66666666666663" y="334" width="145.33333333333337" height="40"/> <rect key="frame" x="206.66666666666663" y="274" width="145.33333333333337" height="40"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="40" id="JV7-c4-7tD"/> @@ -319,7 +319,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ji4-B6-Ozw"> <rect key="frame" x="41" y="334" width="145.66666666666666" height="40"/> <rect key="frame" x="41" y="274" width="145.66666666666666" height="40"/> <constraints> <constraint firstAttribute="height" constant="40" id="Tyg-21-Wcc"/> </constraints> WanPai/Model/CommonModels.swift
@@ -15,7 +15,7 @@ var classStartTime = [String]() var applicantsNumber = 0 var payType:PaymentType = .cash var originalPrice:Double? var originalPrice:Double = 0 var vipPrice:Double = 0 var paymentPrice:Double = 0 var playPaiCoin:Int = 0 WanPai/Network/Services.swift
@@ -12,7 +12,7 @@ import JQTools #if DEBUG let All_Url = "http://f0uc18f73ou5.guyubao.com" let All_Url = "https://ds867zleb4ow.xiaomiqiu.com" let Game_Url = "https://try.daowepark.com" //let All_Url = "https://console-mock.apipost.cn/mock/b5b2dee0-5564-40ae-f082-a352d502a153" //let All_Url = "http://192.168.110.165:10393/mock/b5b2dee0-5564-40ae-f082-a352d502a153" @@ -881,11 +881,13 @@ /// 获取场地详情-时间表 /// - Parameters: /// - day: YYYY-MM-dd static func querySiteTimes(id:Int,day:String)->Observable<BaseResponse<[SiteDetailDateTimeModel]>>{ static func querySiteTimes(id:Int,day:String,halfName:String?,siteName:String?)->Observable<BaseResponse<[SiteDetailDateTimeModel]>>{ let params = ParamsAppender.build(url: All_Url) .interface(url: "/other/base/site/querySiteTimes") .append(key: "id", value: id) .append(key: "day", value: day) .append(key: "halfName", value: halfName) .append(key: "siteName", value: siteName) return NetworkRequest.request(params: params, method: .post, progress: false) } WanPai/Root/Activity/TCell/ActivityInfoTCell.swift
@@ -53,6 +53,6 @@ override func layoutSubviews() { super.layoutSubviews() label_state.jq_cornerPartWithNib(byRoundingCorners: [.topLeft,.bottomRight], radii: 26.5, size: CGSize(width: 47, height: 26.5)) label_state.jq_cornerPartWithNib(byRoundingCorners: [.topLeft,.bottomRight], radii: 8, size: CGSize(width: 47, height: 26.5)) } } WanPai/Root/Activity/TCell/ActivityInfoTCell.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"/> @@ -12,15 +12,15 @@ <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="_ActivityInfoTCell" rowHeight="169" id="KGk-i7-Jjw" customClass="ActivityInfoTCell" customModule="WanPai" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="489" height="169"/> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="_ActivityInfoTCell" rowHeight="217" id="KGk-i7-Jjw" customClass="ActivityInfoTCell" customModule="WanPai" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="489" height="217"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <rect key="frame" x="0.0" y="0.0" width="489" height="169"/> <rect key="frame" x="0.0" y="0.0" width="489" height="217"/> <autoresizingMask key="autoresizingMask"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="lCa-en-qcl"> <rect key="frame" x="15" y="21" width="105" height="140"/> <rect key="frame" x="15" y="20" width="105" height="140"/> <color key="backgroundColor" systemColor="systemGray6Color"/> <constraints> <constraint firstAttribute="height" constant="140" id="61H-nQ-MaO"/> @@ -34,7 +34,7 @@ </userDefinedRuntimeAttributes> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="750" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rom-jP-xgQ"> <rect key="frame" x="130.99999999999997" y="21" width="303.33333333333326" height="22"/> <rect key="frame" x="130.99999999999997" y="20" width="303.33333333333326" height="22"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="22" id="AOB-7s-rct"/> </constraints> @@ -43,7 +43,7 @@ <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="Pj9-n0-bRl"> <rect key="frame" x="131" y="48" width="110.33333333333331" height="17"/> <rect key="frame" x="131" y="47" width="110.33333333333331" height="17"/> <constraints> <constraint firstAttribute="height" constant="17" id="pxp-GL-K0p"/> </constraints> @@ -52,13 +52,13 @@ <nil key="highlightedColor"/> </label> <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="6i5-yn-dMM"> <rect key="frame" x="131" y="69" width="347" height="13.333333333333329"/> <rect key="frame" x="131" y="68" width="347" height="13.333333333333329"/> <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="9O5-p4-WaJ"> <rect key="frame" x="131" y="86.333333333333329" width="327" height="17"/> <rect key="frame" x="131" y="85.333333333333329" width="327" height="17"/> <constraints> <constraint firstAttribute="height" constant="17" id="Vuo-G8-hUQ"/> </constraints> @@ -67,7 +67,7 @@ <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0-0岁" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ymb-ff-rLX"> <rect key="frame" x="131" y="107.33333333333333" width="33.333333333333343" height="17"/> <rect key="frame" x="131" y="106.33333333333333" width="33.333333333333343" height="17"/> <constraints> <constraint firstAttribute="height" constant="17" id="0Vw-lb-wrS"/> </constraints> @@ -76,14 +76,14 @@ <nil key="highlightedColor"/> </label> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kwa-Xn-64L"> <rect key="frame" x="14" y="167.33333333333334" width="461" height="0.33333333333334281"/> <rect key="frame" x="14" y="185" width="461" height="0.33333333333334281"/> <color key="backgroundColor" red="0.59215686274509804" green="0.59215686274509804" blue="0.59215686274509804" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.40000000000000002" id="bBX-ct-nwS"/> </constraints> </view> <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sdT-Zi-Mxo"> <rect key="frame" x="390" y="111.33333333333333" width="86" height="30.999999999999986"/> <rect key="frame" x="390" y="129" width="86" height="31"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="31" id="FIY-uM-c4A"/> @@ -100,20 +100,20 @@ </userDefinedRuntimeAttributes> </button> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="0" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dC6-S9-Yzg"> <rect key="frame" x="465.33333333333331" y="21.666666666666671" width="11.666666666666686" height="21"/> <rect key="frame" x="465.33333333333331" y="20.666666666666668" width="11.666666666666686" height="21.000000000000004"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/> <color key="textColor" red="0.89411764705882346" green="0.10980392156862745" blue="0.10980392156862745" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" image="icon_hot" translatesAutoresizingMaskIntoConstraints="NO" id="aDx-6g-Fwl"> <rect key="frame" x="445.33333333333331" y="22.666666666666671" width="15" height="19"/> <rect key="frame" x="445.33333333333331" y="21.666666666666668" width="15" height="19.000000000000004"/> <constraints> <constraint firstAttribute="height" constant="19" id="Qxp-GM-F7m"/> <constraint firstAttribute="width" constant="15" id="Xhm-f6-Zz3"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dDz-PN-B0q"> <rect key="frame" x="15" y="21" width="47" height="26.666666666666671"/> <rect key="frame" x="14.666666666666664" y="19.666666666666671" width="47" height="26.333333333333329"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="26.5" id="fiT-QF-fQD"/> @@ -125,9 +125,8 @@ </label> </subviews> <constraints> <constraint firstItem="kwa-Xn-64L" firstAttribute="top" secondItem="sdT-Zi-Mxo" secondAttribute="bottom" constant="25" id="2OB-8g-bsb"/> <constraint firstItem="dC6-S9-Yzg" firstAttribute="leading" secondItem="aDx-6g-Fwl" secondAttribute="trailing" constant="5" id="49l-cA-GUT"/> <constraint firstItem="lCa-en-qcl" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="21" id="4g6-br-OY3"/> <constraint firstItem="lCa-en-qcl" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="20" id="4g6-br-OY3"/> <constraint firstItem="6i5-yn-dMM" firstAttribute="top" secondItem="Pj9-n0-bRl" secondAttribute="bottom" constant="4" id="7ej-b0-vBO"/> <constraint firstItem="rom-jP-xgQ" firstAttribute="leading" secondItem="lCa-en-qcl" secondAttribute="trailing" constant="11" id="88c-FP-Ox9"/> <constraint firstItem="ymb-ff-rLX" firstAttribute="top" secondItem="9O5-p4-WaJ" secondAttribute="bottom" constant="4" id="93j-rN-wOR"/> @@ -135,20 +134,21 @@ <constraint firstAttribute="trailing" secondItem="kwa-Xn-64L" secondAttribute="trailing" constant="14" id="9hY-ie-aoz"/> <constraint firstItem="kwa-Xn-64L" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="FW7-kP-lHi"/> <constraint firstAttribute="trailingMargin" secondItem="9O5-p4-WaJ" secondAttribute="trailing" constant="11" id="LU8-oF-vfP"/> <constraint firstItem="sdT-Zi-Mxo" firstAttribute="bottom" secondItem="lCa-en-qcl" secondAttribute="bottom" id="NFN-go-6Wb"/> <constraint firstItem="dC6-S9-Yzg" firstAttribute="centerY" secondItem="rom-jP-xgQ" secondAttribute="centerY" id="OIo-0u-Hwn"/> <constraint firstItem="Pj9-n0-bRl" firstAttribute="top" secondItem="rom-jP-xgQ" secondAttribute="bottom" constant="5" id="QWi-tj-XVf"/> <constraint firstItem="kwa-Xn-64L" firstAttribute="top" secondItem="lCa-en-qcl" secondAttribute="bottom" constant="25" id="Qo3-3o-Vv9"/> <constraint firstAttribute="trailing" secondItem="dC6-S9-Yzg" secondAttribute="trailing" constant="12" id="SLq-Dk-htR"/> <constraint firstAttribute="bottom" secondItem="kwa-Xn-64L" secondAttribute="bottom" priority="250" id="YVS-p4-IkB"/> <constraint firstItem="sdT-Zi-Mxo" firstAttribute="top" secondItem="9O5-p4-WaJ" secondAttribute="bottom" constant="8" id="Ytl-BS-4pD"/> <constraint firstAttribute="trailing" secondItem="6i5-yn-dMM" secondAttribute="trailing" constant="11" id="ZnT-0m-CmR"/> <constraint firstAttribute="trailing" secondItem="sdT-Zi-Mxo" secondAttribute="trailing" constant="13" id="bHK-4G-2Fj"/> <constraint firstItem="lCa-en-qcl" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="grf-S5-jdp"/> <constraint firstItem="dDz-PN-B0q" firstAttribute="top" secondItem="lCa-en-qcl" secondAttribute="top" id="iGi-57-VJl"/> <constraint firstItem="dDz-PN-B0q" firstAttribute="top" secondItem="lCa-en-qcl" secondAttribute="top" constant="-0.5" id="iGi-57-VJl"/> <constraint firstItem="Pj9-n0-bRl" firstAttribute="leading" secondItem="rom-jP-xgQ" secondAttribute="leading" id="kEB-9C-sEM"/> <constraint firstItem="ymb-ff-rLX" firstAttribute="leading" secondItem="rom-jP-xgQ" secondAttribute="leading" id="kO8-ov-OWD"/> <constraint firstItem="aDx-6g-Fwl" firstAttribute="centerY" secondItem="rom-jP-xgQ" secondAttribute="centerY" id="kdM-Vq-Jlz"/> <constraint firstItem="9O5-p4-WaJ" firstAttribute="leading" secondItem="6i5-yn-dMM" secondAttribute="leading" id="lAg-Y0-FLs"/> <constraint firstItem="dDz-PN-B0q" firstAttribute="leading" secondItem="lCa-en-qcl" secondAttribute="leading" id="nQH-fU-x7b"/> <constraint firstItem="dDz-PN-B0q" firstAttribute="leading" secondItem="lCa-en-qcl" secondAttribute="leading" constant="-0.5" id="nQH-fU-x7b"/> <constraint firstItem="9O5-p4-WaJ" firstAttribute="top" secondItem="6i5-yn-dMM" secondAttribute="bottom" constant="4" id="rNR-EU-0EI"/> <constraint firstItem="6i5-yn-dMM" firstAttribute="leading" secondItem="rom-jP-xgQ" secondAttribute="leading" id="wv7-BV-JSf"/> <constraint firstItem="rom-jP-xgQ" firstAttribute="top" secondItem="lCa-en-qcl" secondAttribute="top" id="xDW-fU-NYJ"/> @@ -165,7 +165,7 @@ <outlet property="label_state" destination="dDz-PN-B0q" id="MxD-ut-Nvh"/> <outlet property="label_title" destination="rom-jP-xgQ" id="9sb-b0-rvH"/> </connections> <point key="canvasLocation" x="168.70229007633588" y="63.028169014084511"/> <point key="canvasLocation" x="168.70229007633588" y="79.929577464788736"/> </tableViewCell> </objects> <resources> WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
@@ -34,6 +34,10 @@ @IBOutlet weak var label_matchStore: UILabel! @IBOutlet weak var btn_moreMatchStore: UIButton! @IBOutlet weak var view_money: UIView! @IBOutlet weak var view_coin: UIView! @IBOutlet weak var view_courseNum: UIView! private lazy var bannerView:CommonBannerView = { let v = CommonBannerView() return v @@ -72,6 +76,10 @@ label_money.text = String(format: "%@/人", activityDetailModel.cashPrice.currency()) label_coin.text = String(format: "%ld币/人", activityDetailModel.playPaiCoin) label_courseNum.text = String(format: "%ld课时/人", activityDetailModel.classPrice) view_money.isHidden = activityDetailModel.cashPrice == 0 view_courseNum.isHidden = activityDetailModel.classPrice == 0 view_coin.isHidden = activityDetailModel.playPaiCoin == 0 students.append(contentsOf: activityDetailModel.participant) cons_tableHei.constant = Double(students.count) * 100 @@ -155,40 +163,33 @@ switch result { case .success: let vc = PaymentResultVC(result: .success, objType: .activityApply) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) // weakSelf.btn_enroll.setTitle("已报名", for: .normal) // weakSelf.btn_enroll.backgroundColor = UIColor.gray.withAlphaComponent(0.5) self?.push(vc: vc) case .cancel: alert(msg: "已取消") case .failure(let error): let vc = PaymentResultVC(result: .fail(error.localizedDescription), objType: .activityApply) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) case .failure(_): let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .activityApply) self?.push(vc: vc) } } case .wechat:break case .coin: let vc = PaymentResultVC(result: .success, objType: .activityApply) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) // weakSelf.btn_enroll.setTitle("已报名", for: .normal) // weakSelf.btn_enroll.backgroundColor = UIColor.gray.withAlphaComponent(0.5) self?.push(vc: vc) case .courseNum: let vc = PaymentResultVC(result: .success, objType: .activityApply) self?.push(vc: vc) default:break } } },onError: {[weak self] error in guard let weakSelf = self else { return } if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(_,let string): let vc = PaymentResultVC(result: .fail(string), objType: .yard,handleVC: nil) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) case .Other(let code,let string): let vc = PaymentResultVC(result: .fail(string,code), objType: .yard,handleVC: nil) self?.push(vc: vc) default: let vc = PaymentResultVC(result: .fail("支付失败"), objType: .yard,handleVC: nil) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .yard,handleVC: nil) self?.push(vc: vc) } } }).disposed(by: disposeBag) WanPai/Root/Activity/VC/ActivityDetailApplyVC.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"/> @@ -19,20 +19,23 @@ <outlet property="label_address" destination="w7l-Hs-7EQ" id="LdO-Sd-ibK"/> <outlet property="label_ageScope" destination="RkB-65-NBj" id="v0f-KQ-KRu"/> <outlet property="label_city" destination="gQe-UF-wHC" id="wu9-wX-bZd"/> <outlet property="label_coin" destination="D5t-1x-WAG" id="Op0-h9-O57"/> <outlet property="label_courseNum" destination="G8f-PQ-0Pj" id="lno-Ng-8JU"/> <outlet property="label_coin" destination="yh8-W6-odm" id="Hn4-Cv-8Gr"/> <outlet property="label_courseNum" destination="xTl-3Q-LFe" id="CKQ-cw-oVz"/> <outlet property="label_duetime" destination="yFh-cd-Oew" id="jnZ-cU-xIo"/> <outlet property="label_endtime" destination="WG0-AL-bqm" id="8RG-ZV-h3p"/> <outlet property="label_introducion" destination="zOi-jz-xW4" id="yYQ-Lg-HWl"/> <outlet property="label_joinCondition" destination="2Bd-9P-C67" id="WUY-Bk-NuQ"/> <outlet property="label_matchStore" destination="aqQ-TW-QWs" id="KaK-JL-O1g"/> <outlet property="label_money" destination="eU8-vW-wfW" id="mZ1-dy-Jx6"/> <outlet property="label_money" destination="wwV-CJ-42v" id="P9A-Ln-q5K"/> <outlet property="label_starttime" destination="HVZ-gK-GRY" id="PVB-dL-Xli"/> <outlet property="label_storeNames" destination="aqQ-TW-QWs" id="6fd-yo-4DE"/> <outlet property="label_title" destination="Mnc-lb-0cc" id="1SY-Nz-XIn"/> <outlet property="tableView" destination="UEA-WV-jZV" id="exc-tP-CQA"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view_banner" destination="YbN-ld-elv" id="thH-Vk-HMA"/> <outlet property="view_coin" destination="5p6-ML-xXH" id="F78-zm-Ksw"/> <outlet property="view_courseNum" destination="zuc-0X-wxE" id="vWn-tr-Skf"/> <outlet property="view_money" destination="jSb-Ox-2fF" id="yIW-uH-iUJ"/> </connections> </placeholder> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> @@ -400,43 +403,31 @@ </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="赛事/活动费用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ym3-ZD-GoB"> <rect key="frame" x="14" y="14.999999999999998" width="365" height="19.333333333333329"/> <rect key="frame" x="14" y="15" width="365" height="21"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <nil key="textColor"/> <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="cL1-bJ-t61"> <rect key="frame" x="14" y="46.333333333333371" width="43" height="17"/> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="gUo-qf-Nrb"> <rect key="frame" x="14" y="48" width="365" height="52"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="dcL-VF-1xd"> <rect key="frame" x="0.0" y="0.0" width="365" height="20"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jSb-Ox-2fF"> <rect key="frame" x="0.0" y="0.0" width="182.66666666666666" height="20"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jze-hL-TGV"> <rect key="frame" x="0.0" y="0.0" width="43" height="20"/> <constraints> <constraint firstAttribute="width" constant="43" id="zz6-ZP-nGe"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="eU8-vW-wfW"> <rect key="frame" x="57" y="46.333333333333371" width="36.666666666666657" 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.80000000000000004" 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="Mf2-Mt-gru"> <rect key="frame" x="175" y="46.333333333333371" width="57.333333333333343" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="D5t-1x-WAG"> <rect key="frame" x="232.33333333333334" y="46.333333333333371" width="42.000000000000028" 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.80000000000000004" 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="nV5-6O-VmB"> <rect key="frame" x="14" y="75.333333333333371" width="43" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="G8f-PQ-0Pj"> <rect key="frame" x="57" y="75.333333333333371" width="56.333333333333343" height="17"/> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥0/人" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wwV-CJ-42v"> <rect key="frame" x="43" y="0.0" width="139.66666666666666" height="20"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -444,28 +435,96 @@ </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="eU8-vW-wfW" firstAttribute="centerY" secondItem="cL1-bJ-t61" secondAttribute="centerY" id="17h-Fm-fbM"/> <constraint firstItem="nV5-6O-VmB" firstAttribute="leading" secondItem="cL1-bJ-t61" secondAttribute="leading" id="2S7-XH-bjT"/> <constraint firstItem="nV5-6O-VmB" firstAttribute="top" secondItem="cL1-bJ-t61" secondAttribute="bottom" constant="12" id="5zc-6B-XNe"/> <constraint firstItem="cL1-bJ-t61" firstAttribute="leading" secondItem="oxi-DH-KVR" secondAttribute="leading" constant="14" id="DIZ-eJ-hBb"/> <constraint firstItem="D5t-1x-WAG" firstAttribute="leading" secondItem="Mf2-Mt-gru" secondAttribute="trailing" id="HFt-sb-gyX"/> <constraint firstItem="Mf2-Mt-gru" firstAttribute="leading" secondItem="oxi-DH-KVR" secondAttribute="leading" constant="175" id="L6P-gO-Ixx"/> <constraint firstItem="D5t-1x-WAG" firstAttribute="centerY" secondItem="cL1-bJ-t61" secondAttribute="centerY" id="RsL-zw-dgy"/> <constraint firstAttribute="trailing" secondItem="wwV-CJ-42v" secondAttribute="trailing" id="HD9-gj-KVI"/> <constraint firstItem="wwV-CJ-42v" firstAttribute="centerY" secondItem="Jze-hL-TGV" secondAttribute="centerY" id="Ifp-0C-OEq"/> <constraint firstItem="Jze-hL-TGV" firstAttribute="top" secondItem="jSb-Ox-2fF" secondAttribute="top" id="K9x-oA-hPF"/> <constraint firstAttribute="bottom" secondItem="Jze-hL-TGV" secondAttribute="bottom" id="M6J-Bb-hCL"/> <constraint firstAttribute="height" constant="20" id="Rir-tG-TOn"/> <constraint firstItem="wwV-CJ-42v" firstAttribute="top" secondItem="jSb-Ox-2fF" secondAttribute="top" id="XeW-YM-tAf"/> <constraint firstAttribute="bottom" secondItem="wwV-CJ-42v" secondAttribute="bottom" id="Xow-UC-0iB"/> <constraint firstItem="wwV-CJ-42v" firstAttribute="leading" secondItem="Jze-hL-TGV" secondAttribute="trailing" id="evz-83-EQV"/> <constraint firstItem="Jze-hL-TGV" firstAttribute="leading" secondItem="jSb-Ox-2fF" secondAttribute="leading" id="qmH-zc-99T"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5p6-ML-xXH"> <rect key="frame" x="182.66666666666663" y="0.0" width="182.33333333333337" height="20"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="玩湃币:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sXT-xi-Vwh"> <rect key="frame" x="0.0" y="1.6666666666666288" width="57.333333333333336" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="yh8-W6-odm"> <rect key="frame" x="57.333333333333343" y="1.6666666666666288" width="42" 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.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="yh8-W6-odm" firstAttribute="centerY" secondItem="sXT-xi-Vwh" secondAttribute="centerY" id="LZV-1U-0zi"/> <constraint firstAttribute="height" constant="20" id="MS7-fA-tKa"/> <constraint firstItem="yh8-W6-odm" firstAttribute="leading" secondItem="sXT-xi-Vwh" secondAttribute="trailing" id="oXm-6y-lGa"/> <constraint firstItem="sXT-xi-Vwh" firstAttribute="leading" secondItem="5p6-ML-xXH" secondAttribute="leading" id="wDq-LK-QGk"/> <constraint firstItem="sXT-xi-Vwh" firstAttribute="centerY" secondItem="5p6-ML-xXH" secondAttribute="centerY" id="wEH-3u-yo8"/> </constraints> </view> </subviews> </stackView> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="4vc-Lf-HrI"> <rect key="frame" x="0.0" y="32" width="365" height="20"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zuc-0X-wxE"> <rect key="frame" x="0.0" y="0.0" width="365" height="20"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="课时:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xap-dS-eoo"> <rect key="frame" x="0.0" y="1.6666666666666288" width="43" height="17"/> <constraints> <constraint firstAttribute="width" constant="43" id="ZpL-Oj-9pR"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="xTl-3Q-LFe"> <rect key="frame" x="43" y="1.6666666666666288" width="322" 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.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="Xap-dS-eoo" firstAttribute="centerY" secondItem="zuc-0X-wxE" secondAttribute="centerY" id="6wb-PW-1mV"/> <constraint firstAttribute="height" constant="20" id="IwA-dg-GfC"/> <constraint firstItem="xTl-3Q-LFe" firstAttribute="leading" secondItem="Xap-dS-eoo" secondAttribute="trailing" id="Smk-vS-fiN"/> <constraint firstItem="xTl-3Q-LFe" firstAttribute="centerY" secondItem="Xap-dS-eoo" secondAttribute="centerY" id="T3f-Ri-YLn"/> <constraint firstAttribute="trailing" secondItem="xTl-3Q-LFe" secondAttribute="trailing" id="pR2-gp-55w"/> <constraint firstItem="Xap-dS-eoo" firstAttribute="leading" secondItem="zuc-0X-wxE" secondAttribute="leading" id="pkF-2y-DgW"/> </constraints> </view> </subviews> </stackView> </subviews> </stackView> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="gUo-qf-Nrb" firstAttribute="top" secondItem="Ym3-ZD-GoB" secondAttribute="bottom" constant="12" id="16W-Ao-bby"/> <constraint firstAttribute="trailing" secondItem="gUo-qf-Nrb" secondAttribute="trailing" constant="14" id="Fvc-CD-Bh9"/> <constraint firstItem="Ym3-ZD-GoB" firstAttribute="leading" secondItem="oxi-DH-KVR" secondAttribute="leading" constant="14" id="SIk-qW-SSp"/> <constraint firstAttribute="bottom" secondItem="ib7-am-lAe" secondAttribute="bottom" id="Ugq-ec-3WN"/> <constraint firstItem="G8f-PQ-0Pj" firstAttribute="centerY" secondItem="nV5-6O-VmB" secondAttribute="centerY" id="W8L-LG-sYw"/> <constraint firstAttribute="height" constant="115" id="YcI-3l-9Qg"/> <constraint firstItem="8N9-5a-Lyf" firstAttribute="leading" secondItem="oxi-DH-KVR" secondAttribute="leading" constant="13" id="Z4V-KU-Y0l"/> <constraint firstItem="Mf2-Mt-gru" firstAttribute="centerY" secondItem="cL1-bJ-t61" secondAttribute="centerY" id="ZUt-Sj-5dR"/> <constraint firstAttribute="trailing" secondItem="ib7-am-lAe" secondAttribute="trailing" id="bGc-6m-rqX"/> <constraint firstItem="G8f-PQ-0Pj" firstAttribute="leading" secondItem="nV5-6O-VmB" secondAttribute="trailing" id="c32-Z4-fbt"/> <constraint firstItem="cL1-bJ-t61" firstAttribute="top" secondItem="Ym3-ZD-GoB" secondAttribute="bottom" constant="12" id="eHj-U0-XIg"/> <constraint firstItem="ib7-am-lAe" firstAttribute="top" secondItem="gUo-qf-Nrb" secondAttribute="bottom" constant="14" id="kLf-Kr-C5r"/> <constraint firstItem="gUo-qf-Nrb" firstAttribute="leading" secondItem="oxi-DH-KVR" secondAttribute="leading" constant="14" id="kLi-2x-DEd"/> <constraint firstItem="8N9-5a-Lyf" firstAttribute="top" secondItem="oxi-DH-KVR" secondAttribute="top" id="mDs-DD-glb"/> <constraint firstItem="eU8-vW-wfW" firstAttribute="leading" secondItem="cL1-bJ-t61" secondAttribute="trailing" id="nE1-7H-Rou"/> <constraint firstItem="Ym3-ZD-GoB" firstAttribute="top" secondItem="8N9-5a-Lyf" secondAttribute="bottom" constant="14" id="roT-xy-M8V"/> <constraint firstAttribute="trailing" secondItem="Ym3-ZD-GoB" secondAttribute="trailing" constant="14" id="tTA-ah-fbR"/> <constraint firstItem="ib7-am-lAe" firstAttribute="leading" secondItem="oxi-DH-KVR" secondAttribute="leading" constant="13" id="wYy-GU-BBX"/> <constraint firstItem="D5t-1x-WAG" firstAttribute="centerY" secondItem="Mf2-Mt-gru" secondAttribute="centerY" id="yHc-a7-bDl"/> <constraint firstAttribute="trailing" secondItem="8N9-5a-Lyf" secondAttribute="trailing" id="yuz-pO-tHs"/> </constraints> </view> WanPai/Root/Activity/VC/ActivityDetailVC.swift
@@ -32,6 +32,10 @@ @IBOutlet weak var label_matchStore: UILabel! @IBOutlet weak var btn_moreMatchStore: UIButton! @IBOutlet weak var view_money: UIView! @IBOutlet weak var view_coin: UIView! @IBOutlet weak var view_courseNum: UIView! private lazy var bannerView:CommonBannerView = { let v = CommonBannerView() return v @@ -61,6 +65,10 @@ self?.img_enrollRequired.image = img } view_money.isHidden = activityDetailModel.cashPrice == 0 view_courseNum.isHidden = activityDetailModel.classPrice == 0 view_coin.isHidden = activityDetailModel.playPaiCoin == 0 label_money.text = String(format: "%@/人", activityDetailModel.cashPrice.currency()) label_coin.text = String(format: "%ld币/人", activityDetailModel.playPaiCoin) label_courseNum.text = String(format: "%ld课时/人", activityDetailModel.classPrice) WanPai/Root/Activity/VC/ActivityDetailVC.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"/> @@ -19,8 +19,8 @@ <outlet property="label_address" destination="bbY-Kb-C5z" id="WcD-uY-098"/> <outlet property="label_ageScope" destination="qcG-AF-9Uh" id="1hS-Wj-Jym"/> <outlet property="label_city" destination="NBi-eH-iIS" id="NtM-vD-ivy"/> <outlet property="label_coin" destination="PY6-ve-vcQ" id="odv-df-2Os"/> <outlet property="label_courseNum" destination="RUi-U1-Ge0" id="qHg-ZV-law"/> <outlet property="label_coin" destination="WNN-4l-MNx" id="6Zq-zB-xrN"/> <outlet property="label_courseNum" destination="vk2-TF-vv5" id="2hR-42-r0b"/> <outlet property="label_duetime" destination="nPn-v2-ONf" id="ttv-gw-KKD"/> <outlet property="label_endtime" destination="kah-57-uD0" id="Cd8-8B-6hA"/> <outlet property="label_introducion" destination="BXI-8J-fD0" id="2sv-GS-XdT"/> @@ -32,6 +32,9 @@ <outlet property="label_title" destination="uIe-np-Pwt" id="MHn-gz-rST"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view_banner" destination="Heq-PT-PV0" id="9Jk-WR-odn"/> <outlet property="view_coin" destination="Vfw-Pb-XP3" id="Tde-ui-P5R"/> <outlet property="view_courseNum" destination="hw6-bI-MbA" id="7pk-SH-ZIT"/> <outlet property="view_money" destination="kV2-0Q-Tbt" id="fEH-mQ-KVt"/> </connections> </placeholder> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> @@ -399,43 +402,31 @@ </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="赛事/活动费用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EPl-lk-9fQ"> <rect key="frame" x="14" y="14.999999999999998" width="365" height="19.333333333333329"/> <rect key="frame" x="14" y="15" width="365" height="21"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="L8O-Jl-vFy"> <rect key="frame" x="14" y="48" width="365" height="52"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="ZcH-XV-lhJ"> <rect key="frame" x="0.0" y="0.0" width="365" height="20"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kV2-0Q-Tbt"> <rect key="frame" x="0.0" y="0.0" width="182.66666666666666" height="20"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jnK-YU-DfV"> <rect key="frame" x="14" y="46.333333333333371" width="43" height="17"/> <rect key="frame" x="0.0" y="0.0" width="43" height="20"/> <constraints> <constraint firstAttribute="width" constant="43" id="tG3-PN-KU2"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="Jlz-7i-loh"> <rect key="frame" x="57" y="46.333333333333371" width="36.666666666666657" 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.80000000000000004" 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="RJH-lZ-4jx"> <rect key="frame" x="175" y="46.333333333333371" width="57.333333333333343" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="PY6-ve-vcQ"> <rect key="frame" x="232.33333333333334" y="46.333333333333371" width="42.000000000000028" 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.80000000000000004" 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="Il8-7z-4OU"> <rect key="frame" x="14" y="75.333333333333371" width="43" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="RUi-U1-Ge0"> <rect key="frame" x="57" y="75.333333333333371" width="56.333333333333343" height="17"/> <rect key="frame" x="43" y="0.0" width="139.66666666666666" height="20"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -443,29 +434,97 @@ </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="RUi-U1-Ge0" firstAttribute="centerY" secondItem="Il8-7z-4OU" secondAttribute="centerY" id="108-Gg-Z5C"/> <constraint firstItem="Jlz-7i-loh" firstAttribute="leading" secondItem="jnK-YU-DfV" secondAttribute="trailing" id="5xK-yn-aQl"/> <constraint firstAttribute="height" constant="20" id="bBE-cB-Tcu"/> <constraint firstAttribute="trailing" secondItem="Jlz-7i-loh" secondAttribute="trailing" id="fZX-A8-9GR"/> <constraint firstItem="jnK-YU-DfV" firstAttribute="top" secondItem="kV2-0Q-Tbt" secondAttribute="top" id="g5l-7w-4j5"/> <constraint firstAttribute="bottom" secondItem="jnK-YU-DfV" secondAttribute="bottom" id="jJD-Bp-dgr"/> <constraint firstItem="jnK-YU-DfV" firstAttribute="leading" secondItem="kV2-0Q-Tbt" secondAttribute="leading" id="lB2-Rb-tEf"/> <constraint firstAttribute="bottom" secondItem="Jlz-7i-loh" secondAttribute="bottom" id="rLO-qn-WUZ"/> <constraint firstItem="Jlz-7i-loh" firstAttribute="top" secondItem="kV2-0Q-Tbt" secondAttribute="top" id="vCC-Ft-l2O"/> <constraint firstItem="Jlz-7i-loh" firstAttribute="centerY" secondItem="jnK-YU-DfV" secondAttribute="centerY" id="vGM-4d-ntc"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vfw-Pb-XP3"> <rect key="frame" x="182.66666666666663" y="0.0" width="182.33333333333337" height="20"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="玩湃币:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5EI-G5-lfZ"> <rect key="frame" x="0.0" y="1.6666666666666288" width="57.333333333333336" height="17"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="WNN-4l-MNx"> <rect key="frame" x="57.333333333333343" y="1.6666666666666288" width="42" 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.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="height" constant="20" id="5Xh-uJ-8Gy"/> <constraint firstItem="5EI-G5-lfZ" firstAttribute="leading" secondItem="Vfw-Pb-XP3" secondAttribute="leading" id="U0V-fj-ugH"/> <constraint firstItem="WNN-4l-MNx" firstAttribute="centerY" secondItem="5EI-G5-lfZ" secondAttribute="centerY" id="VQt-0d-CQl"/> <constraint firstItem="5EI-G5-lfZ" firstAttribute="centerY" secondItem="Vfw-Pb-XP3" secondAttribute="centerY" id="tp0-iu-ymf"/> <constraint firstItem="WNN-4l-MNx" firstAttribute="leading" secondItem="5EI-G5-lfZ" secondAttribute="trailing" id="xFY-z2-elK"/> </constraints> </view> </subviews> </stackView> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="yXA-F3-gQp"> <rect key="frame" x="0.0" y="32" width="365" height="20"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hw6-bI-MbA"> <rect key="frame" x="0.0" y="0.0" width="365" height="20"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="课时:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0eV-XX-8x7"> <rect key="frame" x="0.0" y="1.6666666666666288" width="43" height="17"/> <constraints> <constraint firstAttribute="width" constant="43" id="BXy-tV-kDn"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" 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="vk2-TF-vv5"> <rect key="frame" x="43" y="1.6666666666666288" width="322" 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.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="vk2-TF-vv5" firstAttribute="centerY" secondItem="0eV-XX-8x7" secondAttribute="centerY" id="9C5-bL-O1L"/> <constraint firstItem="0eV-XX-8x7" firstAttribute="leading" secondItem="hw6-bI-MbA" secondAttribute="leading" id="OHX-kg-Cb6"/> <constraint firstAttribute="trailing" secondItem="vk2-TF-vv5" secondAttribute="trailing" id="Oze-fb-Y3k"/> <constraint firstAttribute="height" constant="20" id="Rja-rp-VWE"/> <constraint firstItem="vk2-TF-vv5" firstAttribute="leading" secondItem="0eV-XX-8x7" secondAttribute="trailing" id="dZx-qm-aBC"/> <constraint firstItem="0eV-XX-8x7" firstAttribute="centerY" secondItem="hw6-bI-MbA" secondAttribute="centerY" id="lYe-xa-anU"/> </constraints> </view> </subviews> </stackView> </subviews> </stackView> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="EPl-lk-9fQ" firstAttribute="top" secondItem="vfd-ih-YL5" secondAttribute="bottom" constant="14" id="1cy-tp-WTw"/> <constraint firstItem="vfd-ih-YL5" firstAttribute="top" secondItem="U3c-u6-JHg" secondAttribute="top" id="5pk-TH-5TX"/> <constraint firstItem="RUi-U1-Ge0" firstAttribute="leading" secondItem="Il8-7z-4OU" secondAttribute="trailing" id="6Qn-I9-dNa"/> <constraint firstItem="jnK-YU-DfV" firstAttribute="leading" secondItem="U3c-u6-JHg" secondAttribute="leading" constant="14" id="6Xs-2D-Ufa"/> <constraint firstItem="vfd-ih-YL5" firstAttribute="leading" secondItem="U3c-u6-JHg" secondAttribute="leading" constant="13" id="82t-M9-D9u"/> <constraint firstItem="RJH-lZ-4jx" firstAttribute="leading" secondItem="U3c-u6-JHg" secondAttribute="leading" constant="175" id="84C-3W-Xbf"/> <constraint firstItem="odb-aZ-MOh" firstAttribute="leading" secondItem="U3c-u6-JHg" secondAttribute="leading" constant="13" id="8g5-WS-Ydh"/> <constraint firstItem="odb-aZ-MOh" firstAttribute="top" secondItem="L8O-Jl-vFy" secondAttribute="bottom" constant="14" id="HXC-46-Dha"/> <constraint firstAttribute="trailing" secondItem="odb-aZ-MOh" secondAttribute="trailing" id="JpY-1B-Jco"/> <constraint firstAttribute="trailing" secondItem="EPl-lk-9fQ" secondAttribute="trailing" constant="14" id="KaA-uL-TmM"/> <constraint firstItem="PY6-ve-vcQ" firstAttribute="leading" secondItem="RJH-lZ-4jx" secondAttribute="trailing" id="Lgm-af-iCa"/> <constraint firstItem="PY6-ve-vcQ" firstAttribute="centerY" secondItem="RJH-lZ-4jx" secondAttribute="centerY" id="N8k-rL-Uei"/> <constraint firstItem="jnK-YU-DfV" firstAttribute="top" secondItem="EPl-lk-9fQ" secondAttribute="bottom" constant="12" id="OB8-Fv-hbP"/> <constraint firstItem="L8O-Jl-vFy" firstAttribute="leading" secondItem="U3c-u6-JHg" secondAttribute="leading" constant="14" id="MtQ-Ta-bxa"/> <constraint firstAttribute="bottom" secondItem="odb-aZ-MOh" secondAttribute="bottom" id="SXR-Yh-oAb"/> <constraint firstItem="Jlz-7i-loh" firstAttribute="centerY" secondItem="jnK-YU-DfV" secondAttribute="centerY" id="T5T-NY-BxK"/> <constraint firstItem="PY6-ve-vcQ" firstAttribute="centerY" secondItem="jnK-YU-DfV" secondAttribute="centerY" id="Ta6-Pk-9xZ"/> <constraint firstItem="Il8-7z-4OU" firstAttribute="leading" secondItem="jnK-YU-DfV" secondAttribute="leading" id="Trp-CY-9Cs"/> <constraint firstItem="EPl-lk-9fQ" firstAttribute="leading" secondItem="U3c-u6-JHg" secondAttribute="leading" constant="14" id="eLg-Fk-EY8"/> <constraint firstItem="Il8-7z-4OU" firstAttribute="top" secondItem="jnK-YU-DfV" secondAttribute="bottom" constant="12" id="riS-pC-g2x"/> <constraint firstItem="L8O-Jl-vFy" firstAttribute="top" secondItem="EPl-lk-9fQ" secondAttribute="bottom" constant="12" id="gms-jE-ERU"/> <constraint firstAttribute="trailing" secondItem="L8O-Jl-vFy" secondAttribute="trailing" constant="14" id="mE5-fM-SeE"/> <constraint firstAttribute="height" constant="115" id="rni-SZ-xvZ"/> <constraint firstItem="RJH-lZ-4jx" firstAttribute="centerY" secondItem="jnK-YU-DfV" secondAttribute="centerY" id="tND-k7-cd2"/> <constraint firstAttribute="trailing" secondItem="vfd-ih-YL5" secondAttribute="trailing" id="uQw-En-5QG"/> <constraint firstItem="Jlz-7i-loh" firstAttribute="leading" secondItem="jnK-YU-DfV" secondAttribute="trailing" id="whq-IJ-0PB"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jja-qF-gfn"> WanPai/Root/Activity/VC/ActivitySignupDetailVC.swift
@@ -14,8 +14,9 @@ class ActivitySignupDetailVC: BaseVC { private var id:Int! @IBOutlet weak var img_profile: UIImageView! @IBOutlet weak var label_storeNames: UILabel! @IBOutlet weak var view_banner: CommonBannerView! // @IBOutlet weak var img_profile: UIImageView! // @IBOutlet weak var label_storeNames: UILabel! @IBOutlet weak var label_title: UILabel! @IBOutlet weak var label_joinCondition: UILabel! @IBOutlet weak var label_address: UILabel! @@ -40,9 +41,10 @@ guard let m = activityDetailModel else {return} img_profile.sd_setImage(with: URL(string: m.storeCoverDrawing)) label_storeNames.text = m.storeInfos.map({$0.name}).joined(separator: ",") btn_moreMatchStore.isHidden = (label_storeNames.text?.count ?? 0) < 50 view_banner.setImages(images: m.imgs.components(separatedBy: ","), type: .URL) { index in } label_title.text = m.name label_joinCondition.text = m.registerCondition.strTitle + "参与" label_address.text = m.address @@ -52,6 +54,8 @@ label_ageScope.text = m.age + "岁" label_introducion.text = m.introduction 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 img_enrollRequired.sd_setImage(with: URL(string: m.registrationNotes)) {[weak self] image, error, type, url in guard let img = image else { @@ -62,19 +66,19 @@ self?.cons_imgEnrollHei.constant = JQ_ScreenW / radio } if m.cashPrice != 0 { switch m.payType { case .wechat,.aliPay: label_money.text = String(format: "%@/人", m.cashPrice.currency()) label_totalMoney.text = String(format: "合计:%@", (m.cashPrice * Double(m.participant.count)).currency()) } if m.playPaiCoin != 0{ case .coin: label_money.text = String(format: "%ld币/人", m.playPaiCoin) label_totalMoney.text = String(format: "合计:%ld币", (m.playPaiCoin * m.participant.count)) } if m.classPrice != 0{ case .courseNum: label_money.text = String(format: "%ld课时/人", m.classPrice) label_totalMoney.text = String(format: "合计:%ld课时", (m.classPrice * m.participant.count)) default: label_money.text = "未知" label_totalMoney.text = "未知" } cons_tableHei.constant = Double(m.participant.count) * 100 WanPai/Root/Activity/VC/ActivitySignupDetailVC.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"/> @@ -17,7 +17,6 @@ <outlet property="cons_imgEnrollHei" destination="mAy-Ng-8UL" id="Aer-Cm-sMm"/> <outlet property="cons_tableHei" destination="yGd-8d-HGD" id="OTf-Vx-aXz"/> <outlet property="img_enrollRequired" destination="SpQ-0k-1EN" id="cRI-V5-kV6"/> <outlet property="img_profile" destination="eXP-qo-kfo" id="eWb-zf-u07"/> <outlet property="label_address" destination="XP0-t1-ig8" id="ofm-w5-G0F"/> <outlet property="label_ageScope" destination="kmf-XM-osN" id="RKf-8t-nz7"/> <outlet property="label_city" destination="lA2-Dx-e7N" id="zB2-4f-uaC"/> @@ -28,11 +27,11 @@ <outlet property="label_matchStore" destination="x5d-6B-3R9" id="RGE-TV-9yx"/> <outlet property="label_money" destination="VtB-Xx-cFv" id="9r8-XO-jvy"/> <outlet property="label_starttime" destination="JzL-bl-dVo" id="g1B-EF-6lO"/> <outlet property="label_storeNames" destination="x5d-6B-3R9" id="nC3-a0-iSF"/> <outlet property="label_title" destination="UMG-EM-0dd" id="4pY-yN-O3m"/> <outlet property="label_totalMoney" destination="ZUy-X0-BNd" id="Np0-sJ-5qT"/> <outlet property="tableView" destination="m6W-zh-Mvj" id="Trt-2g-HX6"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view_banner" destination="z86-Ui-1p2" id="UIn-nf-JJM"/> </connections> </placeholder> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> @@ -46,20 +45,13 @@ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u6Z-PS-k1D"> <rect key="frame" x="0.0" y="0.0" width="393" height="1167.6666666666667"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="eXP-qo-kfo"> <rect key="frame" x="0.0" y="0.0" width="393" height="220"/> <color key="backgroundColor" systemColor="systemGray6Color"/> <constraints> <constraint firstAttribute="width" secondItem="eXP-qo-kfo" secondAttribute="height" multiplier="1:0.56" id="OiP-Ee-oqZ"/> </constraints> </imageView> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="TUv-Fz-UHV"> <rect key="frame" x="0.0" y="219.99999999999994" width="393" height="899.66666666666652"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="edY-He-yWT"> <rect key="frame" x="0.0" y="0.0" width="393" height="51"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UMG-EM-0dd"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" text="--" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UMG-EM-0dd"> <rect key="frame" x="14" y="14" width="329.66666666666669" height="27"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="25" id="bDX-fp-jFg"/> @@ -566,16 +558,23 @@ </view> </subviews> </stackView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="z86-Ui-1p2" customClass="CommonBannerView" customModule="WanPai" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="393" height="220"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="width" secondItem="z86-Ui-1p2" secondAttribute="height" multiplier="1:0.56" id="A5e-HI-sUp"/> </constraints> </view> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="eXP-qo-kfo" secondAttribute="trailing" id="TYO-oI-a3N"/> <constraint firstItem="TUv-Fz-UHV" firstAttribute="top" secondItem="eXP-qo-kfo" secondAttribute="bottom" id="bB5-yo-dCB"/> <constraint firstItem="z86-Ui-1p2" firstAttribute="leading" secondItem="u6Z-PS-k1D" secondAttribute="leading" id="4hz-hF-vOz"/> <constraint firstAttribute="trailing" secondItem="z86-Ui-1p2" secondAttribute="trailing" id="E47-72-YNp"/> <constraint firstItem="z86-Ui-1p2" firstAttribute="top" secondItem="u6Z-PS-k1D" secondAttribute="top" id="RNs-c0-IqE"/> <constraint firstItem="TUv-Fz-UHV" firstAttribute="top" secondItem="z86-Ui-1p2" secondAttribute="bottom" id="YjV-KO-dQx"/> <constraint firstAttribute="trailing" secondItem="TUv-Fz-UHV" secondAttribute="trailing" id="hP4-ew-7eb"/> <constraint firstAttribute="bottom" secondItem="TUv-Fz-UHV" secondAttribute="bottom" constant="48" id="kMo-Am-NZm"/> <constraint firstItem="eXP-qo-kfo" firstAttribute="leading" secondItem="u6Z-PS-k1D" secondAttribute="leading" id="mLP-nR-S4H"/> <constraint firstItem="TUv-Fz-UHV" firstAttribute="leading" secondItem="u6Z-PS-k1D" secondAttribute="leading" id="n5r-oF-pt8"/> <constraint firstItem="eXP-qo-kfo" firstAttribute="top" secondItem="u6Z-PS-k1D" secondAttribute="top" id="xl5-mh-sQP"/> </constraints> </view> </subviews> @@ -621,9 +620,6 @@ </namedColor> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> <systemColor name="systemGray6Color"> <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </systemColor> </resources> </document> WanPai/Root/Activity/VC/ActivitySignupListSubVC.swift
@@ -74,6 +74,7 @@ let model = viewModel.dataSource.value[indexPath.row] let cell = tableView.dequeueReusableCell(withIdentifier: "_ActivityInfoTCell") as! ActivityInfoTCell cell.activityListModel = model cell.label_ageScope.isHidden = true return cell } WanPai/Root/Activity/VC/ActivitySignupListVC.swift
@@ -59,7 +59,7 @@ } override func setUI() { pageMenu.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 9, width: JQ_ScreenW, height: 45) pageMenu.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight, width: JQ_ScreenW, height: 50) pageMenu.layer.shadowColor = UIColor(hexStr: "#EFEEEE").withAlphaComponent(0.5).cgColor pageMenu.layer.shadowOffset = CGSize(width: 0, height: 2) pageMenu.layer.shadowOpacity = 1 @@ -70,7 +70,7 @@ view.insertSubview(pageViewController.view, at: 0) pageViewController.didMove(toParent: self) pageViewController.view.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 9 + 45, width: JQ_ScreenW, height: JQ_ScreenH - view.safeAreaInsets.top - JQ_NavBarHeight - 9 - 45) pageViewController.view.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 50, width: JQ_ScreenW, height: JQ_ScreenH - view.safeAreaInsets.top - JQ_NavBarHeight - 9 - 45) } } @@ -92,7 +92,16 @@ } func pageViewController(_ pageViewConteoller: FFPageViewController, controllerForPage page: Int) -> UIViewController { let vc = ActivitySignupListSubVC(type:SignupType(rawValue: page)!) var type:SignupType = .all switch page{ case 1:type = .ongoing case 2:type = .over case 3:type = .prepare case 4:type = .cancel default:type = .all } let vc = ActivitySignupListSubVC(type:type) return vc } WanPai/Root/Course/TCell/CourseTCell.swift
@@ -23,9 +23,6 @@ var courseItemModel:CourseItemModel!{ didSet{ label_originPrice.isHidden = courseItemModel.originalPrice == nil label_vipPrice.text = "会员价:\(courseItemModel.vipPrice.currency())" stackView_vipPrice.isHidden = courseItemModel.vipPrice == 0 img_cover.sd_setImage(with: URL(string: courseItemModel.coverDrawing),placeholderImage: UIImage(named: "placeholder_1")) label_title.text = String(format: "%@(%@)", courseItemModel.name,courseItemModel.storeName) label_teachTime.text = String(format: "上课时间:%@", courseItemModel.classStartTime.jq_max(size: 2).joined(separator: "|")) @@ -33,15 +30,29 @@ label_distance.text = String(format: "%.2lfkm", courseItemModel.distance) stack_teachTime.isHidden = courseItemModel.classStartTime.count == 0 if courseItemModel.paymentPrice != 0{ label_price.text = courseItemModel.paymentPrice.currency() }else{ if courseItemModel.payType == .coin || (courseItemModel.originalPrice == 0 && courseItemModel.paymentPrice == 0 && courseItemModel.vipPrice == 0){ label_price.text = "玩湃币 " + "\(courseItemModel.playPaiCoin)" stackView_vipPrice.isHidden = true label_originPrice.isHidden = true }else{ if UserInfoModel.get()?.isVip == 1{ stackView_vipPrice.isHidden = true label_price.text = courseItemModel.vipPrice.currency() label_originPrice.attributedText = AttributedStringbuilder.build().add(string: courseItemModel.paymentPrice.currency() , withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")).delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString label_originPrice.isHidden = courseItemModel.paymentPrice == 0 }else{ stackView_vipPrice.isHidden = courseItemModel.vipPrice == 0 || (courseItemModel.paymentPrice == courseItemModel.vipPrice) label_price.text = courseItemModel.paymentPrice.currency() label_vipPrice.text = "会员价:\(courseItemModel.vipPrice.currency())" label_originPrice.attributedText = AttributedStringbuilder.build().add(string: courseItemModel.paymentPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")).delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString //容错:原价 == 支付价 | 原价 == 0 -> 原价隐藏 label_originPrice.isHidden = courseItemModel.originalPrice == 0 || courseItemModel.paymentPrice <= courseItemModel.originalPrice } label_originPrice.attributedText = AttributedStringbuilder.build().add(string: courseItemModel.originalPrice?.currency() ?? "", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")).delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString } } } @@ -49,6 +60,4 @@ super.awakeFromNib() selectionStyle = .none } } WanPai/Root/Course/VC/AddStudentVC.swift
@@ -75,10 +75,10 @@ view_profile.isHidden = true title = "添加人员" tf_name.placeholder = "请输入人员姓名" tf_height.placeholder = "请输入人员身高" tf_weight.placeholder = "请输入人员体重" tf_phone.placeholder = "请输入人员联系方式" tf_idCard.placeholder = "请输入人员身份证号" tf_height.placeholder = "请输入身高" tf_weight.placeholder = "请输入体重" tf_phone.placeholder = "请输入联系方式" tf_idCard.placeholder = "请输入身份证号" if let m = activityDetailPartModel{ title = "编辑人员" tf_name.text = m.name WanPai/Root/Course/VC/AddStudentVC.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"/> @@ -33,7 +33,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="d3m-we-29R"> <rect key="frame" x="0.0" y="59.000000000000028" width="393" height="503.66666666666674"/> <rect key="frame" x="0.0" y="59" width="393" height="501"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jtt-Cf-G95"> <rect key="frame" x="0.0" y="0.0" width="393" height="151"/> @@ -60,13 +60,13 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sgk-Rq-GPl"> <rect key="frame" x="0.0" y="151" width="393" height="50.333333333333343"/> <rect key="frame" x="0.0" y="151" width="393" height="50"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_item_p" translatesAutoresizingMaskIntoConstraints="NO" id="3Gg-cy-Mrj"> <rect key="frame" x="15" y="19.333333333333343" width="12" height="12"/> <rect key="frame" x="15" y="19" width="12" height="12"/> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c4u-do-3kU"> <rect key="frame" x="14" y="50" width="365" height="0.3333333333333357"/> <rect key="frame" x="14" y="49.666666666666686" width="365" height="0.3333333333333357"/> <color key="backgroundColor" red="0.83137254901960778" green="0.83137254901960778" blue="0.83137254901960778" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.40000000000000002" id="Dih-NZ-D9t"/> @@ -79,7 +79,7 @@ <nil key="highlightedColor"/> </label> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入运动营成员姓名" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="C9O-Cu-rp7" customClass="QMUITextField"> <rect key="frame" x="120" y="0.0" width="263" height="50"/> <rect key="frame" x="120" y="0.0" width="263" height="49.666666666666664"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits"/> <userDefinedRuntimeAttributes> @@ -95,7 +95,7 @@ <constraint firstItem="C9O-Cu-rp7" firstAttribute="top" secondItem="sgk-Rq-GPl" secondAttribute="top" id="7V0-Vg-iyf"/> <constraint firstAttribute="trailing" secondItem="c4u-do-3kU" secondAttribute="trailing" constant="14" id="88a-R9-GKh"/> <constraint firstItem="Hd9-3e-EE2" firstAttribute="centerY" secondItem="3Gg-cy-Mrj" secondAttribute="centerY" id="8MP-Cl-e7e"/> <constraint firstAttribute="height" constant="50.399999999999999" id="CwJ-if-dUJ"/> <constraint firstAttribute="height" constant="50" id="CwJ-if-dUJ"/> <constraint firstItem="3Gg-cy-Mrj" firstAttribute="leading" secondItem="sgk-Rq-GPl" secondAttribute="leading" constant="15" id="Rsv-ys-ul7"/> <constraint firstItem="c4u-do-3kU" firstAttribute="leading" secondItem="sgk-Rq-GPl" secondAttribute="leading" constant="14" id="c6L-Gc-0MA"/> <constraint firstAttribute="trailing" secondItem="C9O-Cu-rp7" secondAttribute="trailing" constant="10" id="dx6-qf-3AW"/> @@ -106,13 +106,13 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PXO-vA-az9"> <rect key="frame" x="0.0" y="201.33333333333331" width="393" height="50.333333333333343"/> <rect key="frame" x="0.0" y="201" width="393" height="50"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_item_p" translatesAutoresizingMaskIntoConstraints="NO" id="waQ-bZ-tyt"> <rect key="frame" x="15" y="19.333333333333371" width="12" height="12"/> <rect key="frame" x="15" y="19" width="12" height="12"/> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c21-81-tiw"> <rect key="frame" x="14" y="50" width="365" height="0.3333333333333357"/> <rect key="frame" x="14" y="49.666666666666686" width="365" height="0.3333333333333357"/> <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.40000000000000002" id="yBJ-iI-HbF"/> @@ -125,12 +125,12 @@ <nil key="highlightedColor"/> </label> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请选择" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Gwh-N7-mRQ"> <rect key="frame" x="120" y="0.0" width="173" height="50"/> <rect key="frame" x="120" y="0.0" width="173" height="49.666666666666664"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits"/> </textField> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_calendar" translatesAutoresizingMaskIntoConstraints="NO" id="BoR-bb-Uqf"> <rect key="frame" x="361" y="16.333333333333371" width="18" height="18"/> <rect key="frame" x="361" y="16" width="18" height="18"/> </imageView> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> @@ -140,7 +140,7 @@ <constraint firstItem="waQ-bZ-tyt" firstAttribute="leading" secondItem="PXO-vA-az9" secondAttribute="leading" constant="15" id="Hk9-W5-bIW"/> <constraint firstItem="Gwh-N7-mRQ" firstAttribute="leading" secondItem="PXO-vA-az9" secondAttribute="leading" constant="120" id="JeT-c0-HwR"/> <constraint firstItem="BoR-bb-Uqf" firstAttribute="centerY" secondItem="PXO-vA-az9" secondAttribute="centerY" id="KeI-YC-x8G"/> <constraint firstAttribute="height" constant="50.399999999999999" id="MEQ-hH-rG7"/> <constraint firstAttribute="height" constant="50" id="MEQ-hH-rG7"/> <constraint firstItem="waQ-bZ-tyt" firstAttribute="centerY" secondItem="PXO-vA-az9" secondAttribute="centerY" id="O6K-3i-Egv"/> <constraint firstAttribute="bottom" secondItem="c21-81-tiw" secondAttribute="bottom" id="UXu-Ei-eiU"/> <constraint firstItem="Fjk-Kb-cDF" firstAttribute="leading" secondItem="waQ-bZ-tyt" secondAttribute="trailing" constant="3" id="h2e-8E-Cmx"/> @@ -152,31 +152,31 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Fst-1Q-XPB"> <rect key="frame" x="0.0" y="251.66666666666666" width="393" height="50.666666666666657"/> <rect key="frame" x="0.0" y="251" width="393" height="50"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_item_p" translatesAutoresizingMaskIntoConstraints="NO" id="Gbp-P5-iwf"> <rect key="frame" x="15" y="19.333333333333314" width="12" height="12"/> <rect key="frame" x="15" y="19" width="12" height="12"/> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YO8-is-7dG"> <rect key="frame" x="14" y="50" width="365" height="0.6666666666666643"/> <rect key="frame" x="14" y="49.666666666666686" width="365" height="0.3333333333333357"/> <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.40000000000000002" id="Kkp-JD-DCr"/> </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="性别" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bPG-2j-6aP"> <rect key="frame" x="30" y="17" width="28.666666666666671" height="17"/> <rect key="frame" x="30" y="16.666666666666686" width="28.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.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请选择" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="5l9-vJ-vil"> <rect key="frame" x="120" y="0.0" width="233" height="50"/> <rect key="frame" x="120" y="0.0" width="233" height="49.666666666666664"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits"/> </textField> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_down_arrow" translatesAutoresizingMaskIntoConstraints="NO" id="E8L-i6-F22"> <rect key="frame" x="366" y="21.333333333333314" width="13" height="8"/> <rect key="frame" x="366" y="21" width="13" height="8"/> </imageView> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> @@ -192,22 +192,22 @@ <constraint firstItem="YO8-is-7dG" firstAttribute="top" secondItem="5l9-vJ-vil" secondAttribute="bottom" id="a9E-8d-YV5"/> <constraint firstItem="bPG-2j-6aP" firstAttribute="centerY" secondItem="Gbp-P5-iwf" secondAttribute="centerY" id="bWY-A2-1Sr"/> <constraint firstItem="bPG-2j-6aP" firstAttribute="leading" secondItem="Gbp-P5-iwf" secondAttribute="trailing" constant="3" id="fLM-OZ-0Cv"/> <constraint firstAttribute="height" constant="50.399999999999999" id="lej-8g-JiS"/> <constraint firstAttribute="height" constant="50" id="lej-8g-JiS"/> <constraint firstItem="Gbp-P5-iwf" firstAttribute="leading" secondItem="Fst-1Q-XPB" secondAttribute="leading" constant="15" id="w3N-6X-E43"/> <constraint firstItem="YO8-is-7dG" firstAttribute="leading" secondItem="Fst-1Q-XPB" secondAttribute="leading" constant="14" id="yZF-NA-ZVR"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R0d-XL-DhI"> <rect key="frame" x="0.0" y="302.33333333333331" width="393" height="50.333333333333314"/> <rect key="frame" x="0.0" y="301" width="393" height="50"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_item_p" translatesAutoresizingMaskIntoConstraints="NO" id="3dp-Mn-mBX"> <rect key="frame" x="15" y="19" width="12" height="12"/> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iGJ-Lp-h7F"> <rect key="frame" x="14" y="50" width="365" height="0.3333333333333357"/> <rect key="frame" x="14" y="49.666666666666686" width="365" height="0.3333333333333357"/> <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.40000000000000002" id="r3C-n0-1ch"/> <constraint firstAttribute="height" constant="0.34999999999999998" id="r3C-n0-1ch"/> </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="身高" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ADA-uT-2gD"> @@ -217,7 +217,7 @@ <nil key="highlightedColor"/> </label> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入运动营成员身高" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Oj3-XX-8wG" customClass="QMUITextField"> <rect key="frame" x="120" y="0.0" width="233" height="50"/> <rect key="frame" x="120" y="0.0" width="233" height="49.666666666666664"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits" keyboardType="numberPad"/> <userDefinedRuntimeAttributes> @@ -244,7 +244,7 @@ <constraint firstAttribute="bottom" secondItem="iGJ-Lp-h7F" secondAttribute="bottom" id="Zsj-HO-3T1"/> <constraint firstItem="Oj3-XX-8wG" firstAttribute="leading" secondItem="R0d-XL-DhI" secondAttribute="leading" constant="120" id="cKW-FS-At0"/> <constraint firstItem="3dp-Mn-mBX" firstAttribute="centerY" secondItem="R0d-XL-DhI" secondAttribute="centerY" id="gNV-67-8Bu"/> <constraint firstAttribute="height" constant="50.399999999999999" id="mrE-mE-ylE"/> <constraint firstAttribute="height" constant="50" id="mrE-mE-ylE"/> <constraint firstItem="QN7-D8-hdg" firstAttribute="centerY" secondItem="3dp-Mn-mBX" secondAttribute="centerY" id="shY-Hs-NTu"/> <constraint firstItem="ADA-uT-2gD" firstAttribute="leading" secondItem="3dp-Mn-mBX" secondAttribute="trailing" constant="3" id="svG-KD-r17"/> <constraint firstAttribute="trailing" secondItem="iGJ-Lp-h7F" secondAttribute="trailing" constant="14" id="zh0-U8-JRH"/> @@ -252,26 +252,26 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iPl-pJ-Ftu"> <rect key="frame" x="0.0" y="352.66666666666669" width="393" height="50.333333333333314"/> <rect key="frame" x="0.0" y="351" width="393" height="50"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_item_p" translatesAutoresizingMaskIntoConstraints="NO" id="tDX-uz-7Lt"> <rect key="frame" x="15" y="19" width="12" height="12"/> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qfz-6T-07R"> <rect key="frame" x="14" y="50" width="365" height="0.3333333333333357"/> <rect key="frame" x="14" y="49.666666666666686" width="365" height="0.3333333333333357"/> <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.40000000000000002" id="QTF-VW-2cq"/> </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="体重" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GPK-rF-DJy"> <rect key="frame" x="30" y="16.666666666666629" width="28.666666666666671" height="17"/> <rect key="frame" x="30" y="16.666666666666686" width="28.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.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入运动营成员体重" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="XDz-T3-HBc" customClass="QMUITextField"> <rect key="frame" x="120" y="0.0" width="233" height="50"/> <rect key="frame" x="120" y="0.0" width="233" height="49.666666666666664"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits" keyboardType="numberPad"/> <userDefinedRuntimeAttributes> @@ -281,7 +281,7 @@ </userDefinedRuntimeAttributes> </textField> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="kg" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EoT-if-iYA"> <rect key="frame" x="363" y="16.666666666666629" width="16" height="17"/> <rect key="frame" x="363" y="16.666666666666686" width="16" 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.40000000000000002" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -291,7 +291,7 @@ <constraints> <constraint firstItem="GPK-rF-DJy" firstAttribute="centerY" secondItem="tDX-uz-7Lt" secondAttribute="centerY" id="3au-AZ-mvb"/> <constraint firstAttribute="trailing" secondItem="EoT-if-iYA" secondAttribute="trailing" constant="14" id="Bre-lf-vlI"/> <constraint firstAttribute="height" constant="50.399999999999999" id="DF1-mV-OHz"/> <constraint firstAttribute="height" constant="50" id="DF1-mV-OHz"/> <constraint firstItem="XDz-T3-HBc" firstAttribute="top" secondItem="iPl-pJ-Ftu" secondAttribute="top" id="O2y-Wk-xsx"/> <constraint firstItem="Qfz-6T-07R" firstAttribute="leading" secondItem="iPl-pJ-Ftu" secondAttribute="leading" constant="14" id="Pef-kp-a3d"/> <constraint firstAttribute="trailing" secondItem="XDz-T3-HBc" secondAttribute="trailing" constant="40" id="R51-96-FIj"/> @@ -306,10 +306,10 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2nU-pk-phu"> <rect key="frame" x="0.0" y="403" width="393" height="50.333333333333314"/> <rect key="frame" x="0.0" y="401" width="393" height="50"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c6a-Ai-3Np"> <rect key="frame" x="14" y="50" width="365" height="0.3333333333333357"/> <rect key="frame" x="14" y="49.666666666666686" width="365" height="0.3333333333333357"/> <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.40000000000000002" id="2yI-f5-96H"/> @@ -322,7 +322,7 @@ <nil key="highlightedColor"/> </label> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入运动营成员联系方式" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="eT7-mO-3I8" customClass="QMUITextField"> <rect key="frame" x="120" y="0.0" width="233" height="50"/> <rect key="frame" x="120" y="0.0" width="233" height="49.666666666666664"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits" keyboardType="numberPad"/> <userDefinedRuntimeAttributes> @@ -342,15 +342,15 @@ <constraint firstAttribute="trailing" secondItem="c6a-Ai-3Np" secondAttribute="trailing" constant="14" id="Jew-PT-4Tk"/> <constraint firstItem="DPg-zi-req" firstAttribute="centerY" secondItem="2nU-pk-phu" secondAttribute="centerY" id="amO-dK-CUg"/> <constraint firstAttribute="bottom" secondItem="c6a-Ai-3Np" secondAttribute="bottom" id="btp-Pj-qXe"/> <constraint firstAttribute="height" constant="50.399999999999999" id="dxG-vK-Tf9"/> <constraint firstAttribute="height" constant="50" id="dxG-vK-Tf9"/> <constraint firstItem="c6a-Ai-3Np" firstAttribute="leading" secondItem="2nU-pk-phu" secondAttribute="leading" constant="14" id="j7Q-C8-u2p"/> </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eXg-lM-iFa"> <rect key="frame" x="0.0" y="453.33333333333337" width="393" height="50.333333333333314"/> <rect key="frame" x="0.0" y="451" width="393" height="50"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NlW-dD-gIp"> <rect key="frame" x="14" y="50" width="365" height="0.3333333333333357"/> <rect key="frame" x="14" y="49.666666666666629" width="365" height="0.3333333333333357"/> <color key="backgroundColor" red="0.83137254900000002" green="0.83137254900000002" blue="0.83137254900000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="0.40000000000000002" id="i2J-rI-rHl"/> @@ -363,7 +363,7 @@ <nil key="highlightedColor"/> </label> <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入运动营成员身份证号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="LD0-ej-DmH"> <rect key="frame" x="120" y="0.0" width="233" height="50"/> <rect key="frame" x="120" y="0.0" width="233" height="49.666666666666664"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <textInputTraits key="textInputTraits" keyboardType="numberPad"/> </textField> @@ -378,14 +378,14 @@ <constraint firstItem="NlW-dD-gIp" firstAttribute="leading" secondItem="eXg-lM-iFa" secondAttribute="leading" constant="14" id="Qir-9y-1mQ"/> <constraint firstAttribute="trailing" secondItem="NlW-dD-gIp" secondAttribute="trailing" constant="14" id="jSc-75-egP"/> <constraint firstItem="NlW-dD-gIp" firstAttribute="top" secondItem="LD0-ej-DmH" secondAttribute="bottom" id="mxF-BK-Axi"/> <constraint firstAttribute="height" constant="50.399999999999999" id="ngz-MT-wKh"/> <constraint firstAttribute="height" constant="50" id="ngz-MT-wKh"/> <constraint firstItem="JjF-jS-GPH" firstAttribute="centerY" secondItem="eXg-lM-iFa" secondAttribute="centerY" id="xph-Ep-7kc"/> </constraints> </view> </subviews> </stackView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KyK-7A-Oi3"> <rect key="frame" x="100" y="601.66666666666663" width="193" height="40"/> <rect key="frame" x="100" y="599" width="193" height="40"/> <color key="backgroundColor" name="FE6E0D"/> <constraints> <constraint firstAttribute="height" constant="40" id="ftL-wZ-RWw"/> WanPai/Root/Course/VC/CourseDetailApplyVC.swift
@@ -207,15 +207,13 @@ YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: data.data!.orderString)) { [weak self] result in switch result { case .success: // self?.navigationController?.popViewController(animated: false) let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id) vc.modalPresentationStyle = .fullScreen self?.present(vc, animated: true) self?.push(vc: vc) case .cancel: alert(msg: "已取消") case .failure(let error): let vc = PaymentResultVC(result: .fail(error.localizedDescription), objType: .courseApply) self?.present(vc, animated: true) case .failure(_): let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .courseApply) self?.push(vc: vc) } } case .wechat: @@ -224,8 +222,7 @@ case .coin: // self?.navigationController?.popViewController(animated: false) let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id) vc.modalPresentationStyle = .fullScreen self?.present(vc, animated: true) self?.push(vc: vc) case .courseNum,.integral:break } }else{ @@ -234,14 +231,12 @@ },onError: { error in if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(_,let string): let vc = PaymentResultVC(result: .fail(string), objType: .courseApply,handleVC: nil) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) case .Other(let code,let string): let vc = PaymentResultVC(result: .fail(string,code), objType: .courseApply,handleVC: nil) self?.push(vc: vc) default: let vc = PaymentResultVC(result: .fail("支付失败"), objType: .courseApply,handleVC: nil) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .courseApply,handleVC: nil) self?.push(vc: vc) } } WanPai/Root/Games/TCell/GamesTCell.swift
@@ -42,7 +42,6 @@ PaymentView.show(money: (ali: weakSelf.gameListModel.cash, wx: weakSelf.gameListModel.cash, coin: weakSelf.gameListModel.playCoin, course: nil,integral:weakSelf.gameListModel.integral)) { [weak self] payType in guard let weakSelf = self else { return } Services.payGame(configId: weakSelf.gameListModel.id, gameId: weakSelf.gameListModel.gameId, spaceId: weakSelf.spaceId, sutuId: weakSelf.sutuId, type: payType).subscribe(onNext: {data in if data.code == 200{ switch payType { case .wechat:break case .aliPay: @@ -50,35 +49,26 @@ switch result { case .success: let vc = PaymentResultVC(result: .success, objType: .games) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) JQ_currentViewController().jq_push(vc: vc) case .cancel:alert(msg: "支付已取消") case .failure(let error): alert(msg: error.localizedDescription) case .failure(_): let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .games) JQ_currentViewController().jq_push(vc: vc) } } default: let vc = PaymentResultVC(result: .success, objType: .games) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) } }else{ let vc = PaymentResultVC(result: .fail(data.msg), objType: .games) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) JQ_currentViewController().jq_push(vc: vc) } }) { error in if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(_,let string): let vc = PaymentResultVC(result: .fail(string), objType: .games) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) case .Other(let code,let string): let vc = PaymentResultVC(result: .fail(string,code), objType: .games) JQ_currentViewController().jq_push(vc: vc) default: let vc = PaymentResultVC(result: .fail("支付失败"), objType: .games) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .games) JQ_currentViewController().jq_push(vc: vc) } } }.disposed(by: weakSelf.disposeBag) WanPai/Root/Home/VC/HomeVC.swift
@@ -255,7 +255,7 @@ vc.title = "线上课得积分" push(vc: vc) case .ticket: let vc = CoinStoreCenterVC(selectStore: simpleModel) let vc = CoinStoreCenterVC(selectStore: simpleModel,type: .ticket) push(vc: vc) case .wisdomCourt: WanPai/Root/Other/TCell/CouponTCell.swift
@@ -14,8 +14,8 @@ if let m = couponInfoModel{ label_info.text = m.useCondition label_price.text = m.favorable.currency() label_duetime.text = "有效期至:" + m.effectiveTime label_title.text = m.type.rawTitle label_duetime.text = "有效期至" + m.effectiveTime label_title.text = m.name } } } WanPai/Root/Other/VC/PaymentResultVC.swift
@@ -12,7 +12,7 @@ enum PaymentResult:Equatable{ case success case fail(String) case fail(String,Int) } enum PaymentObjType{ case member //会员 @@ -37,22 +37,33 @@ private var handleVC:UIViewController? private var models = [CourseCouponModel]() required init(result:PaymentResult,objType:PaymentObjType,handleVC:UIViewController? = nil,courseConfigId:Int? = nil) { private var againClouse:(()->Void)? required init(result:PaymentResult,objType:PaymentObjType,handleVC:UIViewController? = nil,courseConfigId:Int? = nil,againClouse:(()->Void)? = nil) { super.init(nibName: nil, bundle: nil) self.result = result self.objType = objType self.handleVC = handleVC self.againClouse = againClouse self.courseConfigId = courseConfigId } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() title = "成为会员" if result == .success{ title = "支付成功" img_paymentState.image = UIImage(named: "icon_success") NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil, userInfo: nil) }else{ title = "支付失败" img_paymentState.image = UIImage(named: "icon_fail") } switch objType{ case .member: @@ -62,10 +73,8 @@ collectionView.isHidden = result != .success switch result { case .fail: img_paymentState.image = UIImage(named: "icon_fail") label_content.text = "支付失败,这是失败原因!" case .success: img_paymentState.image = UIImage(named: "icon_success") label_content.text = "支付成功,恭喜您成为玩湃会员!并获得优惠券!" case .none:break } @@ -83,17 +92,13 @@ }.disposed(by: disposeBag) } switch result { case .fail(let str): label_title.text = "支付失败" case .fail(let str,let code): btn_again.setTitle("再次支付", for: .normal) btn_back.setTitle("返回", for: .normal) img_paymentState.image = UIImage(named: "icon_fail") label_content.text = str case .success: label_title.text = "支付成功" btn_again.setTitle("立即预约", for: .normal) btn_back.setTitle("返回首页", for: .normal) img_paymentState.image = UIImage(named: "icon_success") label_content.text = "报名成功,请及时预约课程上课!" case .none:break } @@ -103,14 +108,11 @@ collectionView.isHidden = true switch result { case .fail: btn_again.setTitle("再次支付", for: .normal) btn_back.setTitle("返回", for: .normal) img_paymentState.image = UIImage(named: "icon_fail") label_content.text = "报名失败,这是失败原因!" case .success: btn_again.setTitle("查看报名", for: .normal) btn_back.setTitle("返回首页", for: .normal) img_paymentState.image = UIImage(named: "icon_success") label_content.text = "报名成功,请注意赛事开始时间!" case .none:break } @@ -119,15 +121,13 @@ btn_backHome.isHidden = true collectionView.isHidden = true switch result { case .fail(let str): case .fail(let str,let code): btn_again.setTitle("再次支付", for: .normal) btn_back.setTitle("返回", for: .normal) img_paymentState.image = UIImage(named: "icon_fail") label_content.text = str case .success: btn_again.setTitle("查看预约", for: .normal) btn_back.setTitle("返回首页", for: .normal) img_paymentState.image = UIImage(named: "icon_success") label_content.text = "报名成功,请注意预约开始时间!" case .none:break } @@ -136,19 +136,15 @@ btn_backHome.isHidden = true collectionView.isHidden = true switch result { case .fail(let str): label_title.text = "支付失败" case .fail(let str,let code): btn_again.setTitle("再次支付", for: .normal) btn_back.setTitle("返回", for: .normal) img_paymentState.image = UIImage(named: "icon_fail") label_content.text = str case .success: label_title.text = "支付成功" btn_again.isHidden = true btn_back.setTitleColor(.white, for: .normal) btn_back.backgroundColor = Def_ThemeColor btn_back.setTitle("我的数据", for: .normal) img_paymentState.image = UIImage(named: "icon_success") label_content.text = "支付成功" case .none:break } @@ -173,29 +169,33 @@ self?.handleVC?.navigationController?.pushViewController(vc) } case "立即预约": handleVC?.navigationController?.tabBarController?.selectedIndex = 1 handleVC?.navigationController?.popToRootViewController(animated: true) dismiss(animated:true) navigationController?.popToRootViewController(animated: true) case "查看报名": dismiss(animated:true){ [weak self] in let vc = ActivitySignupListVC() self?.handleVC?.navigationController?.pushViewController(vc) } case "再次支付": navigationController?.popViewController(animated: true, {[weak self] in self?.againClouse?() }) default:break } } @IBAction func backAction(_ sender: UIButton) { if let handleVC{ handleVC.navigationController?.popToRootViewController(animated: true) } dismiss(animated: true) { navigationController?.popViewController(animated: true, { if sender.titleLabel?.text == "我的数据"{ JQ_currentViewController().jq_push(vc: GamesDataSourceVC()) } }) } override var preferredStatusBarStyle: UIStatusBarStyle{ return .default } } WanPai/Root/Other/VC/PaymentResultVC.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="retina5_9" 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"/> @@ -18,7 +18,6 @@ <outlet property="collectionView" destination="6ci-0V-ZT4" id="BTE-zu-4xN"/> <outlet property="img_paymentState" destination="Fv7-HV-ioC" id="kvE-hr-cVH"/> <outlet property="label_content" destination="RK0-X7-xSS" id="lD8-Jd-A6o"/> <outlet property="label_title" destination="tQo-2S-36p" id="bfD-w2-Kel"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> </connections> </placeholder> @@ -127,12 +126,6 @@ </button> </subviews> </stackView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付成功" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tQo-2S-36p"> <rect key="frame" x="150.66666666666666" y="50" width="73.666666666666657" height="21.666666666666671"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> </subviews> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> @@ -145,12 +138,10 @@ <constraint firstItem="6ci-0V-ZT4" firstAttribute="top" secondItem="c1t-oI-xet" secondAttribute="bottom" constant="44" id="LuL-yl-IA1"/> <constraint firstItem="c1t-oI-xet" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="Pm4-Fl-Wha"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="meY-wl-nNE" secondAttribute="bottom" constant="71" id="UnI-Ey-Pc1"/> <constraint firstItem="tQo-2S-36p" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="topMargin" id="Vb5-4t-kwB"/> <constraint firstItem="RK0-X7-xSS" firstAttribute="centerX" secondItem="Fv7-HV-ioC" secondAttribute="centerX" id="XBX-DI-MSD"/> <constraint firstItem="Fv7-HV-ioC" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="aaQ-gG-s1W"/> <constraint firstItem="6ci-0V-ZT4" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="gBF-6S-2xb"/> <constraint firstItem="c1t-oI-xet" firstAttribute="top" secondItem="RK0-X7-xSS" secondAttribute="bottom" constant="54" id="ike-m8-wcL"/> <constraint firstItem="tQo-2S-36p" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="qcZ-jj-pkX"/> </constraints> <point key="canvasLocation" x="103.05343511450381" y="20.422535211267608"/> </view> WanPai/Root/Other/VC/ProfileVC.swift
@@ -45,7 +45,6 @@ if status{ UserViewModel.clearToken() app.needLogin() } } } @@ -55,8 +54,9 @@ self.profileImg = image self.btn_userProfile.setImage(image, for: .normal) image.uploadImgToService().subscribe { text in Services.updateUserProfile(text).subscribe(onNext: {_ in Services.updateUserProfile(text).subscribe(onNext: {[weak self] _ in 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) }) { error in alertError(msg: error.localizedDescription) WanPai/Root/Other/View/CouponChooseView.xib
@@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" 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="21679"/> <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"/> @@ -53,7 +53,7 @@ </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="确定"> <state key="normal" title="确认"> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </state> <userDefinedRuntimeAttributes> WanPai/Root/Welfare/VC/CoinStoreCenterVC.swift
@@ -54,9 +54,10 @@ private var selectStore:NormalSimpleModel? init(selectStore:NormalSimpleModel? = nil) { init(selectStore:NormalSimpleModel? = nil,type:ExchangeType? = nil) { super.init(nibName: nil, bundle: nil) self.selectStore = selectStore self.viewModel.goodsType.accept(type) } required init?(coder: NSCoder) { @@ -78,13 +79,23 @@ // collectionView.jq_setEmptyView() viewModel.beginRefresh() headView.btn_type.setTitle(viewModel.goodsType.value?.strTitle ?? "商品类型", for: .normal) if let model = benefitHomeModel{ headView.label_coin.text = "\(model.userIntegral)积分" headView.label_username.text = model.userName headView.img_cover.sd_setImage(with: URL(string: model.userHeadImg)) headView.integral = model.userIntegral }else{ // if let model = benefitHomeModel{ // headView.label_coin.text = "\(model.userIntegral)积分" // headView.label_username.text = model.userName // headView.img_cover.sd_setImage(with: URL(string: model.userHeadImg)) // headView.integral = model.userIntegral // }else{ // // } getBenefitData() } private func getBenefitData(){ Services.benefitHome().subscribe(onNext: {[weak self] data in if let model = data.data{ self?.headView.label_coin.text = "\(model.userIntegral)积分" @@ -96,20 +107,19 @@ }.disposed(by: disposeBag) } } override func setRx() { headView.tf_search.rx.text.orEmpty.bind(to: viewModel.search).disposed(by: disposeBag) NotificationCenter.default.rx.notification(UpdateWelfare_Noti, object: nil).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] noti in self?.getBenefitData() }) { error in }.disposed(by: disposeBag) } override func setUI() { view.addSubview(headView) headView.frame = CGRect(x: 0, y:UIDevice.jq_safeEdges.top + (navigationController?.navigationBar.height)! , width: view.size.width, height: view.size.width * 0.5564) // headView.snp.makeConstraints { make in // make.top.equalTo(self.view.snp.top) // make.left.right.equalToSuperview() // make.height.equalTo(JQ_ScreenW * 0.5564) // } view.addSubview(collectionView) collectionView.snp.makeConstraints { make in make.top.equalTo(headView.snp.bottom) WanPai/Root/Welfare/VC/RechargeCenterVC.swift
@@ -98,12 +98,10 @@ switch type { case .aliPay: YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) {[weak self] result in guard let weakSelf = self else { return } switch result { case .success: let vc = PaymentResultVC(result: .success, objType: .activityApply) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) self?.push(vc: vc) case .cancel: alert(msg: "交易已取消") case .failure(let error): WanPai/Root/Yard/TCell/YardBookingTCell.swift
@@ -92,21 +92,18 @@ switch result { case .success: let vc = PaymentResultVC(result: .success, objType: .activityApply) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) JQ_currentViewController().jq_push(vc: vc) case .cancel: alert(msg: "交易取消") case .failure(let error): let vc = PaymentResultVC(result: .fail(error.localizedDescription), objType: .activityApply) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) case .failure(_): let vc = PaymentResultVC(result: .fail("交易失败",0), objType: .activityApply) JQ_currentViewController().jq_push(vc: vc) } } case .wechat,.integral:break case .coin: let vc = PaymentResultVC(result: .success, objType: .activityApply) vc.modalPresentationStyle = .fullScreen JQ_currentViewController().present(vc, animated: true) JQ_currentViewController().jq_push(vc: vc) case .courseNum:break } } WanPai/Root/Yard/VC/YardBookingDetailVC.swift
@@ -133,7 +133,7 @@ if let m = yardBookingDetailDataModel{ let t = OpenDoorTimeModel(start_time: TimeInterval(model.startTime / 1000), end_time: TimeInterval(model.endTime / 1000)) let openDoorModel = OpenDoorModel(sid: [m.siteId], rid: ids, uid: m.appUserId, time: [t], type: 2) let openDoorModel = OpenDoorModel(sid: [m.siteId], rid: [m.storeId], uid: m.appUserId, time: [t], type: 2) if let modelStr = openDoorModel.toJSONString(){ img_QRCode.image = QRCodeImage(string: modelStr, size: 132 * sceneDelegate!.window!.screen.scale) } @@ -172,29 +172,34 @@ switch result { case .success: let vc = PaymentResultVC(result: .success, objType: .activityApply) vc.modalPresentationStyle = .fullScreen self?.present(vc, animated: true) self?.push(vc: vc) case .cancel: alert(msg: "交易取消") case .failure(let error): let vc = PaymentResultVC(result: .fail(error.localizedDescription), objType: .activityApply) vc.modalPresentationStyle = .fullScreen self?.present(vc, animated: true) case .failure(_): let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .activityApply) self?.push(vc: vc) } } case .wechat:break case .coin: let vc = PaymentResultVC(result: .success, objType: .activityApply) vc.modalPresentationStyle = .fullScreen self?.present(vc, animated: true) self?.push(vc: vc) case .courseNum:break case .integral:break } } }) { error in let vc = PaymentResultVC(result: .fail(error.localizedDescription), objType: .activityApply) vc.modalPresentationStyle = .fullScreen self?.present(vc, animated: true) guard let weakSelf = self else { return } if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(let code,let string): let vc = PaymentResultVC(result: .fail(string,code), objType: .activityApply) self?.push(vc: vc) default: let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .activityApply) self?.push(vc: vc) } } }.disposed(by: weakSelf.disposeBag) } } WanPai/Root/Yard/VC/YardBookingListVC.swift
@@ -49,6 +49,18 @@ return pageVC }() private var toPage:Int? init(page:Int? = nil) { super.init(nibName: nil, bundle: nil) self.toPage = page } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() title = "我的预约" @@ -56,6 +68,12 @@ pageMenu.delegate = self pageViewController.delegate = self if let page = toPage{ DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { self.pageMenu.selectedItemIndex = page self.pageViewController.scroll(toPage: page, animation: true) } } } override func setUI() { WanPai/Root/Yard/VC/YardDetailDateTimeVC.swift
@@ -22,15 +22,22 @@ var drop1:Int? var drop2:Int? var selects = [SiteDetailDateTimeModel]() private let cellW = (JQ_ScreenW - 32.0) / 3.0 private let cellH = (JQ_ScreenW - 32.0) / 3.0 * 0.3167 private var halfName:String? private var siteName:String? /// 缓存高度 private(set) var innerHeight:Double = 0 required init(id:Int,date:Date,currentPage:Int) { required init(id:Int,date:Date,currentPage:Int,halfName:String?,siteName:String?) { super.init(nibName: nil, bundle: nil) self.date = date self.id = id self.currentPage = currentPage self.halfName = halfName self.siteName = siteName } required init?(coder: NSCoder) { @@ -41,8 +48,6 @@ override func viewDidLoad() { super.viewDidLoad() let cellW = (JQ_ScreenW - 32.0) / 3.0 let cellH = cellW * 0.3167 let layout = UICollectionViewFlowLayout() layout.itemSize = CGSize(width: cellW, height: cellH) layout.minimumLineSpacing = 1 @@ -58,7 +63,21 @@ make.edges.equalToSuperview() } Services.querySiteTimes(id: id, day: date.string(withFormat: "yyyy-MM-dd")).subscribe(onNext: { [weak self] data in querySiteTimes(halfName: halfName, siteName: siteName) } //清除水 public func clearALL(){ drop1 = nil drop2 = nil selects.removeAll() collectionView.reloadData() } public func querySiteTimes(halfName:String?,siteName:String?){ self.halfName = halfName self.siteName = siteName Services.querySiteTimes(id: id, day: date.string(withFormat: "yyyy-MM-dd"),halfName: halfName,siteName:siteName).subscribe(onNext: { [weak self] data in if let models = data.data{ guard let weakSelf = self else { return } weakSelf.items = models @@ -70,22 +89,11 @@ item.selectable = canSelect ? 1:0 } } weakSelf.collectionView.reloadData() weakSelf.innerHeight = ceil(Double(models.count) / 3.0) * cellH + floor(Double(models.count) / 3.0) * 1.0 weakSelf.innerHeight = ceil(Double(models.count) / 3.0) * weakSelf.cellH + floor(Double(models.count) / 3.0) * 1.0 weakSelf.clouse?(weakSelf.innerHeight,weakSelf.currentPage) } }).disposed(by: disposeBag) } //清除水 public func clearALL(){ drop1 = nil drop2 = nil selects.removeAll() collectionView.reloadData() } WanPai/Root/Yard/VC/YardDetailVC.swift
@@ -67,6 +67,7 @@ @IBOutlet weak var view_selectYardType: UIView! @IBOutlet weak var web_introduce: WKWebView! @IBOutlet weak var cons_webHei: NSLayoutConstraint! @IBOutlet weak var btn_booking: UIButton! private var coupons = [CouponInfoModel]() private var selectCouponModel:CouponInfoModel? @@ -142,6 +143,12 @@ } weakSelf.view_yardType.isHidden = model.nextName.filter({!$0.isEmpty}).count == 0 DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { weakSelf.pageViewController.reloadData() if let currentVC = weakSelf.pageViewController.currentController as? YardDetailDateTimeVC{ currentVC.querySiteTimes(halfName: nil, siteName: nil) } } } }).disposed(by: disposeBag) } @@ -164,7 +171,7 @@ } let key = dict.keys.first! weakSelf.label_price.text = String(format: "%@/%ld币", (Double(a.count) * cashPrice).currency(),a.count * coinPrice) weakSelf.label_price.text = String(format: "%@/%ld币", (Double(a.count) * cashPrice - (weakSelf.selectCouponModel?.favorable ?? 0)).currency(),a.count * coinPrice) let prefix = a.first?.time.components(separatedBy: "-").first let suffix = a.last?.time.components(separatedBy: "-").last weakSelf.label_selectTimes.text = String(format: "%@ %@-%@",key,prefix ?? "",suffix ?? "") @@ -204,7 +211,6 @@ view_pages.insertSubview(pageViewController.view, at: 0) pageViewController.didMove(toParent: self) // pageViewController.view.frame = CGRect(x: 0, y: 0, width: view_pages.jq_width, height: view_pages.jq_height) pageViewController.view.snp.makeConstraints { make in make.edges.equalToSuperview() } @@ -264,10 +270,8 @@ if btn_fullYard.isSelected{ halfIndex = nil // changePrice(cashPrice: siteDetailModel.cashPrice, coin: siteDetailModel.playPaiCoin, typeName: siteDetailModel.typeName) }else{ halfIndex = 0 // changePrice(cashPrice: siteDetailModel.cashPriceOne, coin: siteDetailModel.playPaiCoinOne, typeName: siteDetailModel.typeName) } collection_halfYard.reloadData() @@ -281,9 +285,23 @@ var val = YardDetailDateManager.shared().dates.value val.removeAll() YardDetailDateManager.shared().dates.accept(val) clearAll() } private func clearAll(){ if let currentVC = pageViewController.currentController as? YardDetailDateTimeVC{ currentVC.clearALL() var halfName:String? var nextName:String? if halfIndex != nil{ halfName = siteDetailModel.halfName[halfIndex!] } if siteDetailModel.nextName.count > 0{ nextName = siteDetailModel.nextName[yardIndex] } currentVC.querySiteTimes(halfName: halfName, siteName: nextName) } } @@ -297,6 +315,8 @@ self?.selectCouponModel = m let string = m == nil ? "去选择":"-\(m!.favorable.currency())" self?.btn_coupon.setTitle(string, for: .normal) let temp = YardDetailDateManager.shared().dates.value YardDetailDateManager.shared().dates.accept(temp) } } @@ -339,7 +359,7 @@ guard let weakSelf = self else { return } if status{ let a = YardDetailDateManager.shared().dates.value.values.first! let price = Double(a.count) * weakSelf.siteDetailModel.cashPrice let price = Double(a.count) * weakSelf.siteDetailModel.cashPrice - (weakSelf.selectCouponModel?.favorable ?? 0) let coin = a.count * weakSelf.siteDetailModel.playPaiCoin var datetimes = [String]() @@ -359,36 +379,37 @@ switch result { case .success: let vc = PaymentResultVC(result: .success, objType: .yard,handleVC: nil) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) weakSelf.push(vc: vc) case .cancel: alert(msg: "交易取消") case .failure(let error): let vc = PaymentResultVC(result: .fail(error.localizedDescription), objType: .yard,handleVC: nil) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) case .failure(_): let vc = PaymentResultVC(result: .fail("交易失败",0), objType: .yard,handleVC: nil) weakSelf.push(vc: vc) } } case .wechat,.integral:break case .coin: let vc = PaymentResultVC(result: .success, objType: .yard,handleVC: nil) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) weakSelf.push(vc: vc) case .courseNum:break } } },onError: { error in if let er = error as? NetworkRequest.NetRequestError{ switch er { case .Other(_,let string): let vc = PaymentResultVC(result: .fail(string), objType: .yard,handleVC: nil) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) case .Other(let code,let string): 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: let vc = PaymentResultVC(result: .fail("支付失败"), objType: .yard,handleVC: nil) vc.modalPresentationStyle = .fullScreen weakSelf.present(vc, animated: true) let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .yard){[weak self] in let vc1 = YardBookingListVC(page: 5) self?.push(vc: vc1) } self?.push(vc: vc) } } }).disposed(by: weakSelf.disposeBag) @@ -398,6 +419,10 @@ NotificationCenter.default.post(name: ChooseHomeStore_Noti, object: nil) } } } private func showPaymentView(){ } deinit{ @@ -419,12 +444,24 @@ } func totalPagesOfpageViewController(_ pageViewConteoller: FFPageViewController) -> UInt { guard siteDetailModel != nil else {return 0} return 11 } func pageViewController(_ pageViewConteoller: FFPageViewController, controllerForPage page: Int) -> UIViewController { let date = Date().jq_add(day: page) let vc = YardDetailDateTimeVC(id:id,date: date!,currentPage: page) var halfName:String? var nextName:String? if halfIndex != nil{ halfName = siteDetailModel.halfName[halfIndex!] } if (siteDetailModel?.nextName.count ?? 0) > 0{ nextName = siteDetailModel.nextName[yardIndex] } let vc = YardDetailDateTimeVC(id:id,date: date!,currentPage: page,halfName: halfName,siteName: nextName) vc.updateInnerHeight { [weak self] (height, currentPage) in if currentPage == self?.pageViewController.currentPage{ self?.cons_pagesHei.constant = height @@ -516,20 +553,15 @@ } if self.collection_yardType == collectionView{ if let currentVC = pageViewController.currentController as? YardDetailDateTimeVC{ currentVC.clearALL() } yardIndex = indexPath.row collectionView.reloadData() clearAll() } if self.collection_halfYard == collectionView{ if let currentVC = pageViewController.currentController as? YardDetailDateTimeVC{ currentVC.clearALL() } halfIndex = indexPath.row collectionView.reloadData() clearAll() } } } WanPai/Root/Yard/VC/YardDetailVC.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"/> @@ -12,6 +12,7 @@ <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="YardDetailVC" customModule="WanPai" customModuleProvider="target"> <connections> <outlet property="btn_booking" destination="k7c-4b-MaI" id="hL1-A0-TbI"/> <outlet property="btn_calendar" destination="d9H-Uw-QBh" id="EpT-Ur-gWZ"/> <outlet property="btn_coupon" destination="MMe-xz-jIA" id="b8y-1m-jkf"/> <outlet property="btn_fullYard" destination="yCT-Dn-CGT" id="Imd-Bg-OIw"/> @@ -51,7 +52,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aCz-js-83k"> <rect key="frame" x="0.0" y="59" width="393" height="758.99999999999977"/> <rect key="frame" x="0.0" y="59" width="393" height="759"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9j6-1C-tRQ"> <rect key="frame" x="0.0" y="0.0" width="393" height="1432.6666666666667"/>