无故事王国
2023-10-17 77041c81c325c0bc88c94dc28d732f656cc4c885
修复BUG
66个文件已修改
1338 ■■■■■ 已修改文件
WanPai/AppDelegate.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/CalendarPickerView.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/CalendarPickerView.xib 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/CommonBannerView.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/PaymentView.swift 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/PaymentView.xib 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Config/Enums.swift 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Model/CommonModels.swift 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Network/NetworkRequest.swift 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Network/Services.swift 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivityListVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/View/StoresInfoView.swift 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/View/StoresInfoView.xib 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/View/StudentUpdateInfoView.xib 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/AddStudentVC.swift 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/AddStudentVC.xib 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseBookingListVC.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailApplyVC.swift 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailApplyVC.xib 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailVC.swift 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailVC.xib 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseInfoVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseInfoVC.xib 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseVC.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseVC.xib 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseVideoDetailVC.swift 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/StudentExchangeVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/StudentExchangeVC.xib 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/StudentMentalListVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/StudentRemarkListVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Games/GamesVC.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Games/TCell/GamesTCell.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Games/VC/GamesListVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Games/View/GamesPayView.swift 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Games/View/GamesPayView.xib 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Home/VC/HomeVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/View/StudentChooseView.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/View/StudentChooseView.xib 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/CCell/UploadImgCCell.swift 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/CCell/UploadImgCCell.xib 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/TCell/SearchStoreDetail_1_TCell.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/TCell/SearchStoreDetail_1_TCell.xib 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/VC/SearchStoreDetailFeedbackVC.swift 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/VC/SearchStoreDetailFeedbackVC.xib 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/VC/SearchStoreDetailVC.swift 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/VC/SearchVC.swift 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/CCell/CoinStoreCCell.swift 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/TCell/WelfareWeeklyTCell.xib 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/RechargeCenterVC.swift 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/RechargeCenterVC.xib 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/RechargeRecordVC.xib 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareBillListVC.swift 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareExchangeRecordSubListVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.xib 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.swift 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.xib 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/View/CoinStoreHeadView.swift 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/View/CoinStoreHeadView.xib 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/TCell/YardBookingTCell.swift 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardBookingDetailVC.swift 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardBookingDetailVC.xib 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardDetailDateTimeVC.swift 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardDetailVC.swift 530 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/AppDelegate.swift
@@ -88,7 +88,7 @@
        homeNav.tabBarItem = UITabBarItem(title: "加入玩湃", image: UIImage(named: "tabbar_home"), selectedImage: UIImage(named: "tabbar_home_s")!.withRenderingMode(.alwaysOriginal))
        let clouseNav = BaseNav(rootViewController: CourseVC())
        clouseNav.tabBarItem = UITabBarItem(title: "开始上课", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")!.withRenderingMode(.alwaysOriginal))
        clouseNav.tabBarItem = UITabBarItem(title: "玩湃运动营", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")!.withRenderingMode(.alwaysOriginal))
        let welfareVCNav = BaseNav(rootViewController: WelfareVC())
        welfareVCNav.tabBarItem = UITabBarItem(title: "使用福利", image: UIImage(named: "tabbar_welfare"), selectedImage: UIImage(named: "tabbar_welfare_s")!.withRenderingMode(.alwaysOriginal))
WanPai/Common/View/CalendarPickerView.swift
@@ -103,7 +103,7 @@
    }
    func maximumDate(for calendar: FSCalendar) -> Date {
        let date = Date().jq_add(day:10) ?? Date()
        let date = Date().jq_add(day:9) ?? Date()
        return date
    }
}
WanPai/Common/View/CalendarPickerView.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="22154" 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="22130"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -33,14 +33,14 @@
                            </connections>
                        </button>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CfS-BM-BHQ">
                            <rect key="frame" x="0.0" y="20" width="393" height="376"/>
                            <rect key="frame" x="0.0" y="0.0" width="393" height="396"/>
                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                        </view>
                    </subviews>
                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                    <constraints>
                        <constraint firstAttribute="trailingMargin" secondItem="48c-4t-N8C" secondAttribute="trailing" id="1Sv-pC-j0k"/>
                        <constraint firstItem="CfS-BM-BHQ" firstAttribute="top" secondItem="JPl-Id-R2m" secondAttribute="top" constant="20" id="3Lm-pu-xcV"/>
                        <constraint firstItem="CfS-BM-BHQ" firstAttribute="top" secondItem="JPl-Id-R2m" secondAttribute="top" id="3Lm-pu-xcV"/>
                        <constraint firstItem="48c-4t-N8C" firstAttribute="top" secondItem="CfS-BM-BHQ" secondAttribute="bottom" id="5po-o3-gmk"/>
                        <constraint firstAttribute="trailing" secondItem="CfS-BM-BHQ" secondAttribute="trailing" id="9Ie-Ne-8xC"/>
                        <constraint firstAttribute="bottomMargin" secondItem="48c-4t-N8C" secondAttribute="bottom" id="EzT-4o-aoa"/>
WanPai/Common/View/CommonBannerView.swift
@@ -32,7 +32,7 @@
        // 默认⾃动播放 设置为false只能⼿动滑动
    var isAuto = true
        // 轮播间隔时间 默认6秒可以⾃⼰修改
    var interval:Double = 6
    var interval:Double = 3
    private var startOffsetX:CGFloat = 0
WanPai/Common/View/PaymentView.swift
@@ -21,12 +21,14 @@
    @IBOutlet weak var view_alipay: UIView!
    @IBOutlet weak var view_coin: UIView!
    @IBOutlet weak var view_course: UIView!
    @IBOutlet weak var view_integral: UIView!
    @IBOutlet weak var label_wechatMoney: UILabel!
    @IBOutlet weak var label_aliPayMoney: UILabel!
    @IBOutlet weak var label_coinMoney: UILabel!
    @IBOutlet weak var label_courseMoney: UILabel!
    @IBOutlet weak var btn_complete: UIButton!
    @IBOutlet weak var btn_integral: UIButton!
    
@@ -46,7 +48,7 @@
        layoutIfNeeded()
    }
    
    static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?),_ clouse:@escaping (PayType)->Void){
    static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),_ clouse:@escaping (PayType)->Void){
        let paymentView = PaymentView.jq_loadNibView()
        paymentView.frame = sceneDelegate?.window?.frame ?? .zero
        paymentView.clouse = clouse
@@ -54,6 +56,7 @@
        paymentView.view_coin.isHidden = (money.coin == nil || money.coin == 0)
        paymentView.view_course.isHidden = (money.course == nil || money.course == 0)
        paymentView.view_alipay.isHidden = (money.ali == nil || money.ali == 0)
        paymentView.view_integral.isHidden = (money.integral == nil || money.integral == 0)
        paymentView.label_aliPayMoney.text = money.ali?.currency() ?? "0"
        paymentView.label_wechatMoney.text = money.wx?.currency() ?? "0"
        paymentView.label_coinMoney.text = "\(money.coin ?? 0)币"
@@ -95,6 +98,8 @@
                payType = .coin
            case 14:
                payType = .courseNum
            case 15:
                payType = .integral
            default:break
        }
        
@@ -102,6 +107,7 @@
        btn_coin.isSelected = payType == .coin
        btn_wechat.isSelected = payType == .wechat
        btn_course.isSelected = payType == .courseNum
        btn_integral.isSelected = payType == .integral
    }
    
    @IBAction func paymentAction(_ sender: UIButton) {
WanPai/Common/View/PaymentView.xib
@@ -17,10 +17,10 @@
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <subviews>
                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I0g-vn-aAw">
                    <rect key="frame" x="0.0" y="508" width="393" height="344"/>
                    <rect key="frame" x="0.0" y="448" width="393" height="404"/>
                    <subviews>
                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="6oz-tW-MFV">
                            <rect key="frame" x="0.0" y="14" width="393" height="240"/>
                            <rect key="frame" x="0.0" y="14" width="393" height="300"/>
                            <subviews>
                                <view tag="10" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ME6-yW-eFT">
                                    <rect key="frame" x="0.0" y="0.0" width="393" height="60"/>
@@ -242,10 +242,57 @@
                                        <constraint firstItem="MPy-Tz-tz9" firstAttribute="centerY" secondItem="Y7U-1f-hs1" secondAttribute="centerY" id="zae-9i-bla"/>
                                    </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"/>
                                    <subviews>
                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Ok-2i-KOu">
                                            <rect key="frame" x="14" y="59.666666666666629" width="365" height="0.3333333333333357"/>
                                            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.10000000000000001" colorSpace="custom" customColorSpace="sRGB"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="0.40000000000000002" id="5k6-hd-aob"/>
                                            </constraints>
                                        </view>
                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_notice" translatesAutoresizingMaskIntoConstraints="NO" id="cCG-Q7-Q0C">
                                            <rect key="frame" x="15" y="21" width="28" height="29"/>
                                            <constraints>
                                                <constraint firstAttribute="width" constant="28" id="0kD-VT-hw3"/>
                                                <constraint firstAttribute="height" constant="29" id="reH-ST-Yg6"/>
                                            </constraints>
                                        </imageView>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="积分支付" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fiP-vF-ya1">
                                            <rect key="frame" x="55.999999999999993" y="26" width="65.333333333333314" height="19.333333333333329"/>
                                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
                                            <nil key="textColor"/>
                                            <nil key="highlightedColor"/>
                                        </label>
                                        <button opaque="NO" tag="15" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MCE-3F-QM0">
                                            <rect key="frame" x="354" y="23" width="25" height="25"/>
                                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                            <state key="normal" image="btn_choose"/>
                                            <state key="selected" image="btn_choose_s"/>
                                            <connections>
                                                <action selector="tapAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="zbU-Kl-1M1"/>
                                            </connections>
                                        </button>
                                    </subviews>
                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                    <constraints>
                                        <constraint firstItem="fiP-vF-ya1" firstAttribute="leading" secondItem="cCG-Q7-Q0C" secondAttribute="trailing" constant="13" id="2nb-lM-8Gt"/>
                                        <constraint firstItem="cCG-Q7-Q0C" firstAttribute="leading" secondItem="FeB-qF-5jl" secondAttribute="leading" constant="15" id="4bH-F5-4f2"/>
                                        <constraint firstItem="8Ok-2i-KOu" firstAttribute="leading" secondItem="FeB-qF-5jl" secondAttribute="leading" constant="14" id="4iU-uN-cGP"/>
                                        <constraint firstAttribute="bottom" secondItem="cCG-Q7-Q0C" secondAttribute="bottom" constant="10" id="AUE-YW-Syw"/>
                                        <constraint firstItem="fiP-vF-ya1" firstAttribute="centerY" secondItem="cCG-Q7-Q0C" secondAttribute="centerY" id="OqT-Rg-7gu"/>
                                        <constraint firstAttribute="bottom" secondItem="8Ok-2i-KOu" secondAttribute="bottom" id="dBP-Dr-OJf"/>
                                        <constraint firstAttribute="height" constant="60" id="fxz-ZW-vRj"/>
                                        <constraint firstAttribute="trailing" secondItem="8Ok-2i-KOu" secondAttribute="trailing" constant="14" id="rfJ-rg-rg2"/>
                                        <constraint firstAttribute="trailing" secondItem="MCE-3F-QM0" secondAttribute="trailing" constant="14" id="vo5-J6-ioe"/>
                                        <constraint firstItem="MCE-3F-QM0" firstAttribute="centerY" secondItem="cCG-Q7-Q0C" secondAttribute="centerY" id="yWk-BV-nae"/>
                                    </constraints>
                                </view>
                            </subviews>
                        </stackView>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="glt-oZ-fup">
                            <rect key="frame" x="206.66666666666663" y="274" width="145.33333333333337" height="40"/>
                            <rect key="frame" x="206.66666666666663" y="334" width="145.33333333333337" height="40"/>
                            <color key="backgroundColor" name="FE6E0D"/>
                            <constraints>
                                <constraint firstAttribute="height" constant="40" id="JV7-c4-7tD"/>
@@ -264,7 +311,7 @@
                            </connections>
                        </button>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ji4-B6-Ozw">
                            <rect key="frame" x="41" y="274" width="145.66666666666666" height="40"/>
                            <rect key="frame" x="41" y="334" width="145.66666666666666" height="40"/>
                            <constraints>
                                <constraint firstAttribute="height" constant="40" id="Tyg-21-Wcc"/>
                            </constraints>
@@ -316,6 +363,7 @@
                <outlet property="btn_coin" destination="fBI-qy-chO" id="W1f-WZ-xIJ"/>
                <outlet property="btn_complete" destination="glt-oZ-fup" id="pHD-CI-P8j"/>
                <outlet property="btn_course" destination="SXc-6d-61u" id="zd6-Ee-k8H"/>
                <outlet property="btn_integral" destination="MCE-3F-QM0" id="h8Q-qr-ZAD"/>
                <outlet property="btn_wechat" destination="iQH-s2-Sm4" id="pDO-q6-Iek"/>
                <outlet property="cons_bottom" destination="9AD-6H-0r8" id="9hQ-qM-ZMJ"/>
                <outlet property="label_aliPayMoney" destination="uCD-UF-eto" id="1BE-9I-1Dh"/>
@@ -326,6 +374,7 @@
                <outlet property="view_coin" destination="S7h-OF-RAr" id="0wr-zD-dLr"/>
                <outlet property="view_container" destination="I0g-vn-aAw" id="i7z-aB-Zfq"/>
                <outlet property="view_course" destination="zmh-9K-6Xt" id="JZe-co-2IU"/>
                <outlet property="view_integral" destination="FeB-qF-5jl" id="hfJ-V4-0oP"/>
                <outlet property="view_wechat" destination="ME6-yW-eFT" id="rKw-i7-02q"/>
            </connections>
            <point key="canvasLocation" x="139.69465648854961" y="20.422535211267608"/>
WanPai/Config/Enums.swift
@@ -30,6 +30,7 @@
    case aliPay = 2
    case coin = 3
    case courseNum = 4
    case integral = 5
}
enum PayStateType:Int,HandyJSONEnum{
@@ -199,7 +200,7 @@
        switch self {
            case .allUser:return "全部用户参与"
            case .vip:return "仅限年度会员参与"
            case .student:return "仅限学员参与"
            case .student:return "仅限运动营成员参与"
        }
    }
}
WanPai/Model/CommonModels.swift
@@ -305,9 +305,11 @@
struct SiteDetailModel:HandyJSON{
    var cashPrice: Double = 0
    var cashPriceOne:Double = 0
    var id: Int = 0
    var name: String = ""
    var playPaiCoin: Int = 0
    var playPaiCoinOne:Int = 0
    var siteTypeName: String = ""
    var storeAddress: String = ""
    var storeLat: String = ""
@@ -321,6 +323,7 @@
    var halfName = [String]() //半场名
    var ishalf = 0 // 是否半场  1:是 2:否
    var introduce = ""
    var typeName = ""
}
@@ -411,6 +414,7 @@
    var latitude:Double = 0
    var longitude:Double = 0
    var index:Int?
    var annotation:MAPointAnnotation?
    required init(){}
@@ -751,6 +755,7 @@
    var city: String = ""
    var cityCode: String = ""
    var endTime: Int = 0
    //0:默认,1:手环
    var goType: Int = 0
    var halfName: String = ""
    var id: Int = 0
@@ -770,12 +775,12 @@
    var remark: String = ""
    var siteId: Int = 0
    var startTime: Int = 0
    var state: YardBookingType = .cancel
    var status: Int = 0
    var status: YardBookingType = .cancel
    var storeId: Int = 0
    var times: String = ""
    var userCouponId: String = ""
    var voucher: String = ""
    var typeName = ""
}
struct GameListModel:HandyJSON {
WanPai/Network/NetworkRequest.swift
@@ -173,7 +173,7 @@
        return Alamofire.Session(configuration: configuration)
    }()
    enum NetRequestError: Error {
        case Other(String)
        case Other(Int,String)
        case URLNotFound
        case DownloadFailed
        case InvaildSession
@@ -238,7 +238,9 @@
                                ob.onError(NetRequestError.InvaildSession)
                            case 600:alertError(msg: "登录失效,请重新登录");ob.onError(NetRequestError.InvaildSession)
                                app.needLogin()
                            default:alertError(msg: "\(next.msg)");ob.onError(NetRequestError.Other(next.msg))
                            default:
                                alertError(msg: "\(next.msg)")
                                ob.onError(NetRequestError.Other(next.code,next.msg))
                        }
                    }
                }
WanPai/Network/Services.swift
@@ -17,7 +17,7 @@
//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"
#else
let All_Url = "http://192.168.110.80:5209"
let All_Url = "http://8.137.22.229"
let Game_Url = "https://port.daowepark.com"
#endif
@@ -799,11 +799,13 @@
        /// 积分商城-兑换记录
    class func exchangeRecords(goodType:ExchangeType? = nil,useType:UseStateType? = nil)->Observable<BaseResponse<[RecordsModel]>>{
    class func exchangeRecords(page:Int,goodType:ExchangeType? = nil,useType:UseStateType? = nil)->Observable<BaseResponse<[RecordsModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/account/api/useBenefit/exchangeRecords")
            .append(key: "goodType", value: goodType?.rawValue)
            .append(key: "useType", value: useType?.rawValue)
            .append(key: "page", value:page)
            .append(key: "size", value: 20)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
@@ -127,7 +127,7 @@
            let course = weakSelf.activityDetailModel.classPrice * weakSelf.students.count
            if status{
                PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course)) { [weak self] type in
                PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course,integral:nil)) { [weak self] type in
                    guard let weakSelf = self else { return }
                    if type == .courseNum{
                        PaymentCourseView.show(id: weakSelf.activityDetailModel.id,number:course) { id in
WanPai/Root/Activity/VC/ActivityListVC.swift
@@ -95,7 +95,7 @@
        var items = Array<NormalSimpleModel>()
        items.append(NormalSimpleModel(id: 1, name: "全部用户"))
        items.append(NormalSimpleModel(id: 2, name: "仅限年度会员参与"))
        items.append(NormalSimpleModel(id: 3, name: "仅限学员参与"))
        items.append(NormalSimpleModel(id: 3, name: "仅限运动营成员参与"))
        courseSubTypeView = CourseSubTypeView.show(inView: self.view, afterView: btn_joinCondition, items: items,selectModel: selectSignupConditionModel) { [weak self] m in
            sender.setTitle(m.name, for: .normal)
            sender.isSelected = false
WanPai/Root/Activity/View/StoresInfoView.swift
@@ -10,7 +10,8 @@
import QMUIKit
class StoresInfoView: UIView,JQNibView{
    @IBOutlet weak var view_container: UIView!
    @IBOutlet weak var label_topTitle: UILabel!
    @IBOutlet weak var view_container: UIView!
    @IBOutlet weak var img_logo: UIImageView!
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var label_address: UILabel!
@@ -31,10 +32,10 @@
    static func show(_ detailModel:CourseDetailModel,clouse:@escaping (Bool)->Void){
        let storesView = StoresInfoView.jq_loadNibView()
        storesView.frame = sceneDelegate?.window?.frame ?? .zero
        storesView.label_topTitle.text = "请报名预约门店"
        storesView.img_logo.sd_setImage(with: URL(string: detailModel.storeCoverDrawing))
        storesView.label_title.text = detailModel.name
        storesView.label_address.text = detailModel.storeName
        storesView.label_title.text = detailModel.storeName
        storesView.label_address.text = detailModel.storeAddress
        storesView.label_distance.text = String(format: "距你%.2lfkm", detailModel.distance)
        storesView.clouse = clouse
        sceneDelegate?.window?.addSubview(storesView)
@@ -48,10 +49,10 @@
    static func show(_ activityModel:ActivityDetailModel,clouse:@escaping (Bool)->Void){
        let storesView = StoresInfoView.jq_loadNibView()
        storesView.frame = sceneDelegate?.window?.frame ?? .zero
        storesView.label_topTitle.text = "请确认预约门店"
        storesView.img_logo.sd_setImage(with: URL(string: activityModel.storeCoverDrawing))
        storesView.label_title.text = activityModel.name
        storesView.label_address.text = activityModel.storeName
        storesView.label_title.text = activityModel.storeName
        storesView.label_address.text = activityModel.storeAddress
        storesView.label_distance.text = String(format: "距你%.2lfkm", activityModel.distance)
        storesView.clouse = clouse
        sceneDelegate?.window?.addSubview(storesView)
@@ -67,8 +68,8 @@
        storesView.frame = sceneDelegate?.window?.frame ?? .zero
        storesView.img_logo.sd_setImage(with: URL(string: siteDetailModel.storeCoverDrawing))
        storesView.label_title.text = siteDetailModel.siteTypeName
        storesView.label_address.text = siteDetailModel.storeName
        storesView.label_title.text = siteDetailModel.storeName
        storesView.label_address.text = siteDetailModel.storeAddress
        storesView.label_distance.text = String(format: "距你%.2lfkm", siteDetailModel.distance)
        storesView.clouse = clouse
        sceneDelegate?.window?.addSubview(storesView)
WanPai/Root/Activity/View/StoresInfoView.xib
@@ -167,6 +167,7 @@
                <outlet property="label_address" destination="0wv-DE-XuG" id="s3a-3G-Ijd"/>
                <outlet property="label_distance" destination="ZUc-jP-D3A" id="EKG-km-ayN"/>
                <outlet property="label_title" destination="Uxo-kQ-Zqa" id="wZQ-eZ-uoP"/>
                <outlet property="label_topTitle" destination="OBY-uG-jKE" id="o9a-cg-30u"/>
                <outlet property="view_container" destination="YPc-hT-wLG" id="9n8-u0-HGJ"/>
            </connections>
            <point key="canvasLocation" x="38.931297709923662" y="20.422535211267608"/>
WanPai/Root/Activity/View/StudentUpdateInfoView.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="22154" 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="22130"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -40,7 +40,7 @@
                                            <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="Zec-I5-pJT" customClass="QMUITextField">
                                        <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入运动营成员身高" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Zec-I5-pJT" customClass="QMUITextField">
                                            <rect key="frame" x="120" y="0.0" width="233" height="50"/>
                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                            <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
@@ -94,7 +94,7 @@
                                            <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="U4X-od-m4c" customClass="QMUITextField">
                                        <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入运动营成员体重" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="U4X-od-m4c" customClass="QMUITextField">
                                            <rect key="frame" x="120" y="0.0" width="233" height="50"/>
                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                            <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
@@ -145,7 +145,7 @@
                                            <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="Cui-v0-oxz" customClass="QMUITextField">
                                        <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入运动营成员联系方式" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Cui-v0-oxz" customClass="QMUITextField">
                                            <rect key="frame" x="120" y="0.0" width="233" height="50"/>
                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                            <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
WanPai/Root/Course/VC/AddStudentVC.swift
@@ -41,9 +41,9 @@
    override func viewDidLoad() {
        super.viewDidLoad()
        if type == .course{
            title = "添加学员"
            title = "添加运动营成员"
            if studentInfo != nil{
                title = "编辑学员"
                title = "编辑运动营成员"
                tf_name.text = studentInfo!.stuName
                tf_idCard.text = studentInfo!.idCard
                tf_height.text = String(format: "%.0lf", studentInfo!.stuHeight)
@@ -84,7 +84,7 @@
    @IBAction func completeAction(_ sender: UIButton) {
        if studentInfo == nil{
            guard profileImg != nil else {alertError(msg: "请上传学员头像");return}
            guard profileImg != nil else {alertError(msg: "请上传运动营成员头像");return}
        }
        guard !tf_name.text!.isEmpty else {alertError(msg: tf_name.placeholder!);return}
WanPai/Root/Course/VC/AddStudentVC.xib
@@ -63,7 +63,7 @@
                                    <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="C9O-Cu-rp7" customClass="QMUITextField">
                                <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"/>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                    <textInputTraits key="textInputTraits"/>
@@ -201,7 +201,7 @@
                                    <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="Oj3-XX-8wG" customClass="QMUITextField">
                                <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"/>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                    <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
@@ -255,7 +255,7 @@
                                    <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">
                                <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"/>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                    <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
@@ -306,7 +306,7 @@
                                    <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="eT7-mO-3I8" customClass="QMUITextField">
                                <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"/>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                    <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
@@ -347,7 +347,7 @@
                                    <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="LD0-ej-DmH">
                                <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"/>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                    <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
WanPai/Root/Course/VC/CourseBookingListVC.swift
@@ -60,7 +60,7 @@
    private lazy var label_student:UILabel = {
        let label = UILabel()
        label.text = "当前学员:"
        label.text = "当前运动营成员:"
        label.font = UIFont.systemFont(ofSize: 18, weight: .medium)
        label.textColor = UIColor(hexStr: "#335667")
        return label
@@ -86,7 +86,7 @@
        funcView.btn_search.addTarget(self, action: #selector(searchAction), for: .touchUpInside)
        funcView.tf_search.delegate = self
        label_student.text = "当前学员:\(startClouseHomeModel.stuName)"
        label_student.text = "当前运动营成员:\(startClouseHomeModel.stuName)"
    }
    override func setUI() {
WanPai/Root/Course/VC/CourseDetailApplyVC.swift
@@ -19,8 +19,8 @@
    @IBOutlet weak var cons_tableHei: NSLayoutConstraint!
    @IBOutlet weak var btn_coupon: TapBtn!
    @IBOutlet weak var img_cover: UIImageView!
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var view_banner: CommonBannerView!
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var label_listenWeek: UILabel!
    @IBOutlet weak var label_listenTime: UILabel!
    @IBOutlet weak var label_store: UILabel!
@@ -55,7 +55,10 @@
        title = "课程详情"
        if let m = detailModel{
            img_cover.sd_setImage(with: URL(string: m.detailDrawing))
            view_banner.setImages(images: m.detailDrawing.components(separatedBy: ","), type: .URL) { index in
            }
            label_title.text = m.name
            label_listenWeek.text = "每" + m.weeks.joined(separator: "、")
            label_listenTime.text = m.times.joined(separator: "|")
@@ -89,6 +92,8 @@
            changePrice(selectClassIndex)
        }
        btn_addStudent.isHidden = isExtend
        if isExtend{
            btn_handleBtn.setTitle("续课", for: .normal)
        }else{
@@ -161,7 +166,7 @@
    
    @IBAction func paymentAction(_ sender: UIButton) {
        guard detailModel != nil else {return}
        guard studentModels.count != 0 else {alertError(msg: "请选择学员");return}
        guard studentModels.count != 0 else {alertError(msg: "请选择运动营成员");return}
        StoresInfoView.show(detailModel!) { [weak self] status in
            guard let weakSelf = self else { return }
            if status{
@@ -183,7 +188,7 @@
                    let coin = (model.playPaiCoin ?? 0) * weakSelf.studentModels.count
                    PaymentView.show(money: (ali:discountPrice,wx:discountPrice,coin:coin,course:nil)) { [weak self] payType in
                    PaymentView.show(money: (ali:discountPrice,wx:discountPrice,coin:coin,course:nil,integral:nil)) { [weak self] payType in
                        guard let weakSelf = self else { return }
                        var paymentPrice:Double = 0
@@ -192,7 +197,7 @@
                                paymentPrice = discountPrice
                            case .coin:
                                paymentPrice = Double(coin)
                            case .courseNum:break
                            case .courseNum,.integral:break
                        }
                        Services.courcePayment(conponId: weakSelf.selectCouponModel?.id, courseConfigId: model.id, id: weakSelf.detailModel!.id, price: paymentPrice, payType: payType, stuId: weakSelf.studentModels.map({$0.id})).subscribe(onNext: { data in
@@ -221,12 +226,26 @@
                                        let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id)
                                        vc.modalPresentationStyle = .fullScreen
                                        self?.present(vc, animated: true)
                                    case .courseNum:break
                                    case .courseNum,.integral:break
                                }
                            }else{
                                alertError(msg: data.msg)
                            }
                        }).disposed(by: weakSelf.disposeBag)
                        },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)
                                    default:
                                        let vc = PaymentResultVC(result: .fail("支付失败"), objType: .courseApply,handleVC: nil)
                                        vc.modalPresentationStyle = .fullScreen
                                        weakSelf.present(vc, animated: true)
                                }
                            }
                        }).disposed(by: weakSelf.disposeBag)
                    }
                }
            }else{
@@ -327,7 +346,6 @@
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_Common_1_CCell", for: indexPath) as! Common_1_CCell
        cell.isSelected = indexPath.row == selectClassIndex
        cell.courseDetailListModel = m
        return cell
    }
    
@@ -371,10 +389,10 @@
                tableView.reloadData()
                weakSelf.changePrice(weakSelf.selectClassIndex)
            }else{
                alert(msg: "至少选择一位学员")
                alert(msg: "至少选择一位运动营成员")
            }
        }
        cell.btn_handle.isHidden = isExtend
        return cell
    }
}
WanPai/Root/Course/VC/CourseDetailApplyVC.xib
@@ -21,7 +21,6 @@
                <outlet property="cons_collHei" destination="wOm-8j-9fG" id="gZo-vk-a95"/>
                <outlet property="cons_collectHei" destination="wOm-8j-9fG" id="ycB-BH-9OQ"/>
                <outlet property="cons_tableHei" destination="YrT-fE-DXP" id="wAi-wu-Afa"/>
                <outlet property="img_cover" destination="SMj-2r-hml" id="eCI-j3-X6o"/>
                <outlet property="label_address" destination="dq4-Ry-HOa" id="TTi-yc-w1v"/>
                <outlet property="label_coin" destination="AuS-Gc-geQ" id="rBY-uI-jPU"/>
                <outlet property="label_courseType" destination="Ohr-7c-UGL" id="MYu-9q-mGS"/>
@@ -36,6 +35,7 @@
                <outlet property="studentTableView" destination="CMD-gX-7vo" id="Xu0-eU-5SD"/>
                <outlet property="tableView" destination="CMD-gX-7vo" id="dC7-Q4-Es3"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_banner" destination="Syh-EN-qAE" id="Tdd-SB-85t"/>
                <outlet property="view_packageList" destination="sWT-Ul-ugp" id="4A5-gn-RWL"/>
                <outlet property="view_teach" destination="0ER-xO-h01" id="Zjg-kH-h95"/>
                <outlet property="view_vaildTime" destination="ksP-qe-iRQ" id="yAF-1L-6L1"/>
@@ -52,20 +52,11 @@
                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="mgu-kI-bYh">
                            <rect key="frame" x="0.0" y="0.0" width="393" height="808.66666666666663"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Syh-EN-qAE">
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Syh-EN-qAE" customClass="CommonBannerView" customModule="WanPai" customModuleProvider="target">
                                    <rect key="frame" x="0.0" y="0.0" width="393" height="221.66666666666666"/>
                                    <subviews>
                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="SMj-2r-hml">
                                            <rect key="frame" x="0.0" y="0.0" width="393" height="221.66666666666666"/>
                                        </imageView>
                                    </subviews>
                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                    <constraints>
                                        <constraint firstItem="SMj-2r-hml" firstAttribute="leading" secondItem="Syh-EN-qAE" secondAttribute="leading" id="1ck-Uh-sVN"/>
                                        <constraint firstAttribute="trailing" secondItem="SMj-2r-hml" secondAttribute="trailing" id="5qy-dC-kn1"/>
                                        <constraint firstAttribute="bottom" secondItem="SMj-2r-hml" secondAttribute="bottom" id="FkG-Bg-K2A"/>
                                        <constraint firstAttribute="width" secondItem="Syh-EN-qAE" secondAttribute="height" multiplier="1:0.564" id="SIT-6h-dXZ"/>
                                        <constraint firstItem="SMj-2r-hml" firstAttribute="top" secondItem="Syh-EN-qAE" secondAttribute="top" id="bHo-48-gkz"/>
                                    </constraints>
                                </view>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rzE-lm-roO">
@@ -343,8 +334,8 @@
                                                <constraint firstAttribute="height" constant="1" id="Pch-cU-oGU"/>
                                            </constraints>
                                        </view>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="学员:" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ahH-c9-ZOs">
                                            <rect key="frame" x="14" y="14" width="43" height="20"/>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="运动营成员:" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ahH-c9-ZOs">
                                            <rect key="frame" x="14" y="14" width="86" height="20"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="20" id="707-U9-aHf"/>
                                            </constraints>
@@ -353,13 +344,13 @@
                                            <nil key="highlightedColor"/>
                                        </label>
                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kv0-E8-XGD" customClass="QMUIButton">
                                            <rect key="frame" x="305" y="14" width="74" height="20"/>
                                            <rect key="frame" x="263" y="14" width="116" height="20"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="20" id="KLF-n4-ae3"/>
                                            </constraints>
                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                            <state key="normal" title="选择学员" image="btn_add_1">
                                            <state key="normal" title="选择运动营成员" image="btn_add_1">
                                                <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.56999999999999995" colorSpace="custom" customColorSpace="sRGB"/>
                                            </state>
                                            <connections>
WanPai/Root/Course/VC/CourseDetailVC.swift
@@ -11,7 +11,8 @@
class CourseDetailVC: BaseVC {
    @IBOutlet weak var img_cover: UIImageView!
    @IBOutlet weak var view_banner: CommonBannerView!
        //    @IBOutlet weak var img_cover: UIImageView!
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var label_local: UILabel!
    @IBOutlet weak var label_distance: UILabel!
@@ -42,7 +43,6 @@
        didSet{
            if let m = detailModel{
                img_cover.sd_setImage(with: URL(string: m.detailDrawing))
                label_title.text = m.name
                label_distance.text = String(format: "距离我%.2lfkm", m.distance)
                label_local.text = String(format: "%@(%@)", m.storeName,m.storeAddress)
@@ -61,13 +61,11 @@
                img_1.sd_setImage(with: URL(string: m.introduceDrawing)) { image, error, type, url in
                    let radio = image!.size.width / image!.size.height
                    self.cons_img1Height.constant = JQ_ScreenW / radio
                }
//                img_2.sd_setImage(with: URL(string: m.storeCoverDrawing)) { image, error, type, url in
//                    let radio = image!.size.width / image!.size.height
//                    self.cons_img2Height.constant = JQ_ScreenW / radio
//                }
                view_banner.setImages(images: m.detailDrawing.components(separatedBy: ","), type: .URL) { index in
                }
                label_price.text = m.list.first!.paymentPrice.currency()
                if let subM = m.list.first {
@@ -80,7 +78,6 @@
                        let attribute = AttributedStringbuilder.build().add(string: originPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58))
                        label_originPrice.attributedText = attribute.mutableAttributedString
                    }
                        //玩湃币
                    if let paiCoin = subM.playPaiCoin{
@@ -113,18 +110,6 @@
                    view_handle.isHidden = true
                    cons_handleHei.constant = 0
                }
//                if let m = signUpCourseModel{
//                    label_originPrice.isHidden = true
////                    label_vipPrice.isHidden = true
//
//                    let coinAttribute = AttributedStringbuilder.build()
//                        .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
//                        .add(string: "\(m.wpGold)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
//                    label_coin.attributedText = coinAttribute.mutableAttributedString
//                    label_price.text = m.paymentPrice.currency()
//                    label_coin.alpha = m.wpGold == 0 ? 0:1
//                }
            }
        }
    }
@@ -177,7 +162,7 @@
        if let m = detailModel{
            let vc = CourseDetailApplyVC(detailModel: m)
            let vc = CourseDetailApplyVC(detailModel: m,isExtend: true)
           push(vc: vc)
        }
    }
WanPai/Root/Course/VC/CourseDetailVC.xib
@@ -16,7 +16,6 @@
                <outlet property="cons_handleHei" destination="mg0-k1-0Lc" id="P6Q-xo-9Jz"/>
                <outlet property="cons_img1Height" destination="ra0-2L-YY8" id="zQn-ar-ffC"/>
                <outlet property="img_1" destination="OTP-xt-gbB" id="ndO-dv-UDx"/>
                <outlet property="img_cover" destination="Z8w-gF-Zqx" id="8kq-hZ-b27"/>
                <outlet property="label_coin" destination="ldz-Xc-RZY" id="jPO-eU-nzM"/>
                <outlet property="label_courseType" destination="9Kl-Ol-UVv" id="zMk-G4-rfa"/>
                <outlet property="label_distance" destination="IzD-lg-sfB" id="NyX-OW-yyz"/>
@@ -29,6 +28,7 @@
                <outlet property="label_vaildTime" destination="ggM-zF-PfG" id="36J-8M-TPM"/>
                <outlet property="label_vipPrice" destination="Dqe-kc-hu1" id="eWc-K6-43L"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_banner" destination="dyh-ku-yPw" id="bTl-fB-qvI"/>
                <outlet property="view_handle" destination="wnC-bp-nci" id="udT-Ld-nz5"/>
                <outlet property="view_listen" destination="C7D-PZ-6fb" id="FjT-rY-bBt"/>
                <outlet property="view_tag" destination="oog-Pm-lN5" id="aRC-N1-zxe"/>
@@ -46,20 +46,11 @@
                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="4lq-ly-hwP">
                            <rect key="frame" x="0.0" y="0.0" width="393" height="546.66666666666663"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dyh-ku-yPw">
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dyh-ku-yPw" customClass="CommonBannerView" customModule="WanPai" customModuleProvider="target">
                                    <rect key="frame" x="0.0" y="0.0" width="393" height="221.66666666666666"/>
                                    <subviews>
                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Z8w-gF-Zqx">
                                            <rect key="frame" x="0.0" y="0.0" width="393" height="221.66666666666666"/>
                                        </imageView>
                                    </subviews>
                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                    <constraints>
                                        <constraint firstAttribute="width" secondItem="dyh-ku-yPw" secondAttribute="height" multiplier="1:0.564" id="3MG-Oh-ffb"/>
                                        <constraint firstItem="Z8w-gF-Zqx" firstAttribute="leading" secondItem="dyh-ku-yPw" secondAttribute="leading" id="EaW-i6-Edn"/>
                                        <constraint firstItem="Z8w-gF-Zqx" firstAttribute="top" secondItem="dyh-ku-yPw" secondAttribute="top" id="R6U-0b-YFH"/>
                                        <constraint firstAttribute="bottom" secondItem="Z8w-gF-Zqx" secondAttribute="bottom" id="hra-0U-nuw"/>
                                        <constraint firstAttribute="trailing" secondItem="Z8w-gF-Zqx" secondAttribute="trailing" id="rwS-RS-vv3"/>
                                    </constraints>
                                </view>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g0x-NL-sDy">
WanPai/Root/Course/VC/CourseInfoVC.swift
@@ -226,7 +226,7 @@
                        let courseInfoVC = CourseInfoVC()
                        courseInfoVC.startClouseHomeModel = model
                        let clouseNav = BaseNav(rootViewController: courseInfoVC)
                        clouseNav.tabBarItem = UITabBarItem(title: "开始上课", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")!.withRenderingMode(.alwaysOriginal))
                        clouseNav.tabBarItem = UITabBarItem(title: "玩湃运动营", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")!.withRenderingMode(.alwaysOriginal))
                        self?.tabBarController?.viewControllers![1] = clouseNav
                    }else {
                        if let vc = (self?.tabBarController?.viewControllers?[1] as? BaseNav)?.topViewController as? CourseVC{
WanPai/Root/Course/VC/CourseInfoVC.xib
@@ -51,10 +51,10 @@
                            <rect key="frame" x="0.0" y="0.0" width="393" height="267"/>
                        </imageView>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fQO-ad-jiD" customClass="QMUIButton">
                            <rect key="frame" x="15" y="37" width="126" height="61"/>
                            <rect key="frame" x="15" y="37" width="175" height="61"/>
                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                            <state key="normal" title="添加学员" image="btn_add_shadow"/>
                            <state key="normal" title="添加运动营成员" image="btn_add_shadow"/>
                            <connections>
                                <action selector="addStudentAction:" destination="-1" eventType="touchUpInside" id="elM-42-hKw"/>
                            </connections>
@@ -102,8 +102,8 @@
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dM8-7c-aXP">
                            <rect key="frame" x="0.0" y="0.0" width="393" height="1085.3333333333333"/>
                            <subviews>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="学员名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="egC-eg-thJ">
                                    <rect key="frame" x="27" y="37" width="64.333333333333329" height="29"/>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="运动营成员名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="egC-eg-thJ">
                                    <rect key="frame" x="27" y="37" width="128.33333333333334" height="29"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="29" id="ynp-eh-gKc"/>
                                    </constraints>
@@ -257,10 +257,10 @@
                                    </constraints>
                                </view>
                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hpJ-2G-ATO">
                                    <rect key="frame" x="135" y="216" width="123" height="27"/>
                                    <rect key="frame" x="116.66666666666669" y="216" width="160" height="27"/>
                                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                    <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" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                    </state>
                                    <connections>
@@ -448,8 +448,8 @@
                                        <constraint firstAttribute="width" constant="22" id="VaN-Xb-9IW"/>
                                    </constraints>
                                </imageView>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="学员勋章" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ioo-oF-wME">
                                    <rect key="frame" x="52.999999999999993" y="625.33333333333337" width="65.333333333333314" height="19.333333333333371"/>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="运动营成员勋章" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ioo-oF-wME">
                                    <rect key="frame" x="52.999999999999993" y="625.33333333333337" width="114.33333333333331" height="19.333333333333371"/>
                                    <fontDescription key="fontDescription" type="system" pointSize="16"/>
                                    <color key="textColor" red="0.17254901960784313" green="0.30980392156862746" blue="0.38823529411764707" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                    <nil key="highlightedColor"/>
@@ -475,7 +475,7 @@
                                    </constraints>
                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                    <state key="normal" title="学员评语"/>
                                    <state key="normal" title="运动营成员评语"/>
                                    <userDefinedRuntimeAttributes>
                                        <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/>
                                        <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB">
WanPai/Root/Course/VC/CourseVC.swift
@@ -50,13 +50,13 @@
                        let courseInfoVC = CourseInfoVC()
                        courseInfoVC.startClouseHomeModel = model
                        let clouseNav = BaseNav(rootViewController: courseInfoVC)
                        clouseNav.tabBarItem = UITabBarItem(title: "开始上课", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")!.withRenderingMode(.alwaysOriginal))
                        clouseNav.tabBarItem = UITabBarItem(title: "玩湃运动营", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")!.withRenderingMode(.alwaysOriginal))
                        self?.tabBarController?.viewControllers![1] = clouseNav
                    }else{
                        let courseVC = CourseVC()
                        courseVC.startClouseHomeModel = model
                        let clouseNav = BaseNav(rootViewController: courseVC)
                        clouseNav.tabBarItem = UITabBarItem(title: "开始上课", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")!.withRenderingMode(.alwaysOriginal))
                        clouseNav.tabBarItem = UITabBarItem(title: "玩湃运动营", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")!.withRenderingMode(.alwaysOriginal))
                        self?.tabBarController?.viewControllers![1] = clouseNav
                    }
                }
WanPai/Root/Course/VC/CourseVC.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="22154" 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="22130"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
@@ -36,10 +36,10 @@
                            </constraints>
                        </imageView>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="phT-6H-ZdB" customClass="QMUIButton">
                            <rect key="frame" x="166" y="116" width="147" height="35"/>
                            <rect key="frame" x="166" y="103" width="226" height="61"/>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                            <state key="normal" title="立即创建学员" image="btn_add_shadow"/>
                            <state key="normal" title="立即创建运动营成员" image="btn_add_shadow"/>
                            <connections>
                                <action selector="addStudentAction:" destination="-1" eventType="touchUpInside" id="QEp-me-456"/>
                            </connections>
@@ -104,7 +104,7 @@
    <resources>
        <image name="bg_home_1" width="390" height="265"/>
        <image name="bg_home_2" width="390" height="678"/>
        <image name="btn_add_shadow" width="36" height="35"/>
        <image name="btn_add_shadow" width="60" height="61"/>
        <image name="icon_user_large" width="92" height="94"/>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
WanPai/Root/Course/VC/CourseVideoDetailVC.swift
@@ -144,6 +144,7 @@
                    self?.label_studyState.backgroundColor = UIColor(hexStr: "#318C10").withAlphaComponent(0.29)
                    self?.label_studyState.textColor = UIColor(hexStr: "#318C10")
                    self?.timeDuration = 0
                    NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil)
                }).disposed(by: disposeBag)
            }
        }
@@ -158,6 +159,7 @@
                    self?.label_studyState.backgroundColor = UIColor(hexStr: "#318C10").withAlphaComponent(0.29)
                    self?.label_studyState.textColor = UIColor(hexStr: "#318C10")
                    self?.timeDuration = 0
                    NotificationCenter.default.post(name: UpdateWelfare_Noti, object: nil)
                }).disposed(by: disposeBag)
            }
        }
WanPai/Root/Course/VC/StudentExchangeVC.swift
@@ -24,7 +24,7 @@
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "切换学员"
        title = "切换运动营成员"
        viewModel.configure(tableView,needMore: false)
        viewModel.beginRefresh()
WanPai/Root/Course/VC/StudentExchangeVC.xib
@@ -23,13 +23,13 @@
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <subviews>
                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="m2J-0U-jyB" customClass="QMUIButton">
                    <rect key="frame" x="305" y="84" width="74" height="20"/>
                    <rect key="frame" x="263" y="84" width="116" height="20"/>
                    <constraints>
                        <constraint firstAttribute="height" constant="20" id="nhL-S6-3Ft"/>
                    </constraints>
                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                    <state key="normal" title="添加学员" image="btn_add_1">
                    <state key="normal" title="添加运动营成员" image="btn_add_1">
                        <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.56999999999999995" colorSpace="custom" customColorSpace="sRGB"/>
                    </state>
                    <connections>
WanPai/Root/Course/VC/StudentMentalListVC.swift
@@ -41,7 +41,7 @@
    
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "学员勋章"
        title = "运动营成员勋章"
        view.addSubview(tableView)
        tableView.snp.makeConstraints { make in
WanPai/Root/Course/VC/StudentRemarkListVC.swift
@@ -41,7 +41,7 @@
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "学员评语"
        title = "运动营成员评语"
        viewModel.configure(tableView)
        viewModel.beginRefresh()
    }
WanPai/Root/Games/GamesVC.swift
@@ -63,6 +63,7 @@
            if status{
                if let model = QRCodeModel.deserialize(from: text){
                    print("--->\(model.toJSON())")
                    self.codeModel = model
                    self.checkUnPayGame(model)
                }else{
WanPai/Root/Games/TCell/GamesTCell.swift
@@ -36,9 +36,9 @@
    }
    @IBAction func launchGameAction(_ sender: UIButton) {
        GamesPayView.show(price: gameListModel.cash, coin: gameListModel.integral) {[weak self] () in
        GamesPayView.show(price: gameListModel.cash, coin: gameListModel.playCoin,integral: gameListModel.integral) {[weak self] () in
            guard let weakSelf = self else { return }
            PaymentView.show(money: (ali: weakSelf.gameListModel.cash, wx: weakSelf.gameListModel.cash, coin: weakSelf.gameListModel.integral, course: nil)) { [weak self] payType in
            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{
WanPai/Root/Games/VC/GamesListVC.swift
@@ -32,7 +32,7 @@
        pageMenu.permutationWay = .scrollAdaptContent
            // 字体
        pageMenu.selectedItemTitleFont = UIFont.systemFont(ofSize: 18, weight: .medium)
        pageMenu.selectedItemTitleFont = UIFont.systemFont(ofSize: 21, weight: .medium)
        pageMenu.unSelectedItemTitleFont = UIFont.systemFont(ofSize: 18,weight: .medium)
            // 颜色
        pageMenu.selectedItemTitleColor = UIColor(hexStr: "#6CC366")
WanPai/Root/Games/View/GamesPayView.swift
@@ -13,33 +13,48 @@
    @IBOutlet weak var view_container: UIView!
    @IBOutlet weak var label_price: UILabel!
    @IBOutlet weak var label_coin: UILabel!
    @IBOutlet weak var label_integral: UILabel!
    private var price:Double = 0
    private var coin:Int?
    private var integral:Int?
    private var needPay:(()->Void)!
    override func awakeFromNib() {
        super.awakeFromNib()
        label_coin.isHidden = true
        label_integral.isHidden = true
        label_price.isHidden = true
        view_container.transform = CGAffineTransform(scaleX: 0.1, y: 0.1)
        alpha = 0
        layoutIfNeeded()
    }
    static func show(price:Double,coin:Int?,needPay: @escaping ()->Void){
    static func show(price:Double,coin:Int?,integral:Int? = nil,needPay: @escaping ()->Void){
        let gamesPayView = GamesPayView.jq_loadNibView()
        gamesPayView.frame = sceneDelegate?.window?.frame ?? .zero
        gamesPayView.price = price
        gamesPayView.coin = coin
        gamesPayView.integral = integral
        gamesPayView.needPay = needPay
        gamesPayView.label_price.attributedText    = AttributedStringbuilder.build().add(string: "游玩价格:", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.8)).add(string: price.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString
        if price != 0{
            gamesPayView.label_price.isHidden = false
            gamesPayView.label_price.attributedText    = AttributedStringbuilder.build().add(string: "游玩价格:", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.8)).add(string: price.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString
        }
        if coin != nil{
            gamesPayView.label_coin.isHidden = false
            gamesPayView.label_coin.attributedText    = AttributedStringbuilder.build().add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.8)).add(string: "\(coin!)币", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString
        }
        if integral != nil{
            gamesPayView.label_integral.isHidden = false
            gamesPayView.label_integral.attributedText    = AttributedStringbuilder.build().add(string: "积分:", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.8)).add(string: "\(integral!)", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: Def_ThemeColor).mutableAttributedString
        }
        sceneDelegate?.window?.addSubview(gamesPayView)
        UIView.animate(withDuration: 0.5) {
            gamesPayView.view_container.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
WanPai/Root/Games/View/GamesPayView.xib
@@ -3,7 +3,7 @@
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <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,34 +17,22 @@
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <subviews>
                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NhD-L8-tag">
                    <rect key="frame" x="45" y="313.66666666666669" width="303" height="250.00000000000006"/>
                    <rect key="frame" x="45" y="286.66666666666669" width="303" height="304.00000000000006"/>
                    <subviews>
                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rrk-nd-S2C">
                            <rect key="frame" x="133" y="24" width="37" height="21"/>
                            <rect key="frame" x="133" y="24" width="37" height="21.666666666666671"/>
                            <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
                            <nil key="textColor"/>
                            <nil key="highlightedColor"/>
                        </label>
                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="说明:支付后可进行游戏" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7bY-nF-3cy">
                            <rect key="frame" x="10" y="74" width="283" height="19.333333333333329"/>
                            <rect key="frame" x="10" y="74.666666666666629" width="283" height="19.333333333333329"/>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                            <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.60999999999999999" 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="Agf-Eq-DTG">
                            <rect key="frame" x="103.33333333333334" y="114.33333333333331" width="96.333333333333343" height="19.333333333333343"/>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                            <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="nBP-kJ-Im2">
                            <rect key="frame" x="111.66666666666666" y="147.66666666666663" width="80" height="19.333333333333343"/>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                            <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
                            <nil key="highlightedColor"/>
                        </label>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ClC-PT-9qa">
                            <rect key="frame" x="161.66666666666666" y="188" width="121.33333333333334" height="40"/>
                            <rect key="frame" x="161.66666666666666" y="241.99999999999994" width="121.33333333333334" height="40"/>
                            <color key="backgroundColor" name="FE6E0D"/>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
@@ -54,7 +42,7 @@
                            </connections>
                        </button>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YwI-CF-a9z">
                            <rect key="frame" x="20.000000000000007" y="188" width="121.66666666666669" height="40"/>
                            <rect key="frame" x="20.000000000000007" y="241.99999999999994" width="121.66666666666669" height="40"/>
                            <color key="backgroundColor" red="0.75294117647058822" green="0.75294117647058822" blue="0.75294117647058822" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                            <constraints>
                                <constraint firstAttribute="height" constant="40" id="sib-43-x2L"/>
@@ -66,25 +54,55 @@
                                <action selector="closeAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Wld-yq-U5m"/>
                            </connections>
                        </button>
                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="lN2-O5-10B">
                            <rect key="frame" x="103.33333333333334" y="115" width="96.333333333333343" height="88"/>
                            <subviews>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="游玩价格:--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Agf-Eq-DTG">
                                    <rect key="frame" x="0.0" y="0.0" width="96.333333333333329" height="20"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="20" id="fCb-0J-fLu"/>
                                    </constraints>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                    <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="nBP-kJ-Im2">
                                    <rect key="frame" x="0.0" y="34" width="96.333333333333329" height="20"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="20" id="L9R-yl-fbg"/>
                                    </constraints>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                    <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="moK-Bb-P3e">
                                    <rect key="frame" x="0.0" y="68" width="96.333333333333329" height="20"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="20" id="uQS-gN-NLQ"/>
                                    </constraints>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                    <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
                                    <nil key="highlightedColor"/>
                                </label>
                            </subviews>
                        </stackView>
                    </subviews>
                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                    <constraints>
                        <constraint firstItem="lN2-O5-10B" firstAttribute="centerX" secondItem="NhD-L8-tag" secondAttribute="centerX" id="0BM-C0-Ezw"/>
                        <constraint firstItem="ClC-PT-9qa" firstAttribute="top" secondItem="YwI-CF-a9z" secondAttribute="top" id="3FI-04-Mlp"/>
                        <constraint firstItem="7bY-nF-3cy" firstAttribute="top" secondItem="Rrk-nd-S2C" secondAttribute="bottom" constant="29" id="5j9-8o-6SV"/>
                        <constraint firstItem="ClC-PT-9qa" firstAttribute="bottom" secondItem="YwI-CF-a9z" secondAttribute="bottom" id="88v-YW-eT5"/>
                        <constraint firstItem="YwI-CF-a9z" firstAttribute="leading" secondItem="NhD-L8-tag" secondAttribute="leading" constant="20" id="8ph-7h-4AS"/>
                        <constraint firstAttribute="height" constant="250" id="BTh-16-7lD"/>
                        <constraint firstItem="nBP-kJ-Im2" firstAttribute="top" secondItem="Agf-Eq-DTG" secondAttribute="bottom" constant="14" id="DNY-ry-wn0"/>
                        <constraint firstItem="7bY-nF-3cy" firstAttribute="leading" secondItem="NhD-L8-tag" secondAttribute="leading" constant="10" id="Nlz-ab-NU5"/>
                        <constraint firstAttribute="trailing" secondItem="ClC-PT-9qa" secondAttribute="trailing" constant="20" id="Vl9-gr-4nR"/>
                        <constraint firstItem="Agf-Eq-DTG" firstAttribute="centerX" secondItem="NhD-L8-tag" secondAttribute="centerX" id="bmJ-b1-jSo"/>
                        <constraint firstItem="nBP-kJ-Im2" firstAttribute="centerX" secondItem="Agf-Eq-DTG" secondAttribute="centerX" id="iP3-lB-TcN"/>
                        <constraint firstItem="lN2-O5-10B" firstAttribute="top" secondItem="7bY-nF-3cy" secondAttribute="bottom" constant="21" id="Xn6-hP-Q0F"/>
                        <constraint firstItem="ClC-PT-9qa" firstAttribute="width" secondItem="YwI-CF-a9z" secondAttribute="width" id="iQ6-Yq-ZjR"/>
                        <constraint firstAttribute="bottom" secondItem="YwI-CF-a9z" secondAttribute="bottom" constant="22" id="mE7-fb-YhZ"/>
                        <constraint firstItem="ClC-PT-9qa" firstAttribute="leading" secondItem="YwI-CF-a9z" secondAttribute="trailing" constant="20" id="nmA-Re-CJK"/>
                        <constraint firstItem="Agf-Eq-DTG" firstAttribute="top" secondItem="7bY-nF-3cy" secondAttribute="bottom" constant="21" id="oE1-hg-oFH"/>
                        <constraint firstItem="Rrk-nd-S2C" firstAttribute="top" secondItem="NhD-L8-tag" secondAttribute="top" constant="24" id="qLN-gi-Xjs"/>
                        <constraint firstItem="Rrk-nd-S2C" firstAttribute="centerX" secondItem="NhD-L8-tag" secondAttribute="centerX" id="rfH-q2-ja9"/>
                        <constraint firstItem="ClC-PT-9qa" firstAttribute="top" secondItem="lN2-O5-10B" secondAttribute="bottom" constant="39" id="wSO-yK-hPk"/>
                        <constraint firstAttribute="trailing" secondItem="7bY-nF-3cy" secondAttribute="trailing" constant="10" id="y64-Dz-ibo"/>
                    </constraints>
                    <userDefinedRuntimeAttributes>
@@ -105,10 +123,11 @@
            </constraints>
            <connections>
                <outlet property="label_coin" destination="nBP-kJ-Im2" id="XP6-rj-wWi"/>
                <outlet property="label_integral" destination="moK-Bb-P3e" id="34w-ka-gYx"/>
                <outlet property="label_price" destination="Agf-Eq-DTG" id="oIN-cS-sUV"/>
                <outlet property="view_container" destination="NhD-L8-tag" id="oKf-tU-PKg"/>
            </connections>
            <point key="canvasLocation" x="54" y="21"/>
            <point key="canvasLocation" x="52.671755725190835" y="20.422535211267608"/>
        </view>
    </objects>
    <resources>
WanPai/Root/Home/VC/HomeVC.swift
@@ -39,7 +39,7 @@
                    let courseInfoVC = CourseInfoVC()
                    courseInfoVC.startClouseHomeModel = model
                    let clouseNav = BaseNav(rootViewController: courseInfoVC)
                    clouseNav.tabBarItem = UITabBarItem(title: "开始上课", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")?.withRenderingMode(.alwaysOriginal))
                    clouseNav.tabBarItem = UITabBarItem(title: "玩湃运动营", image: UIImage(named: "tabbar_course"), selectedImage: UIImage(named: "tabbar_course_s")?.withRenderingMode(.alwaysOriginal))
                    self?.tabBarController?.viewControllers![1] = clouseNav
                }else {
                    if let vc = (self?.tabBarController?.viewControllers?[1] as? BaseNav)?.topViewController as? CourseVC{
WanPai/Root/Home/VC/JoinMemberIntroduceVC.swift
@@ -35,7 +35,7 @@
    
    
    @IBAction func joinAction(_ sender: QMUIButton) {
        PaymentView.show(money: (ali:199,wx:199,coin:nil,course:nil)) { type in
        PaymentView.show(money: (ali:199,wx:199,coin:nil,course:nil,integral:nil)) { type in
            Services.enrollMember(paytype: type).subscribe(onNext: {data in
                switch type {
                    case .aliPay:
WanPai/Root/Other/View/StudentChooseView.swift
@@ -153,7 +153,7 @@
            let item = stuViewModel.dataSource.value[indexPath.row]
           if self.selectStudents.contains(where: {($0 as! CourseDetailStudentModel).id == item.id}){
               if self.selectStudents.count == 1{
                   alert(msg: "至少选择一位学员");return
                   alert(msg: "至少选择一位运动营成员");return
               }
               if let index = self.selectStudents.firstIndex(where: {($0 as! CourseDetailStudentModel).id == item.id}){
                   self.selectStudents.remove(at: index)
@@ -165,7 +165,7 @@
            let item = actViewModel.dataSource.value[indexPath.row]
           if self.selectStudents.contains(where: {($0 as! ActivityDetailPartModel).id == item.id}){
               if self.selectStudents.count == 1{
                   alert(msg: "至少选择一位参赛学员");return
                   alert(msg: "至少选择一位参赛运动营成员");return
               }
               if let index = self.selectStudents.firstIndex(where: {($0 as! ActivityDetailPartModel).id == item.id}){
                   self.selectStudents.remove(at: index)
WanPai/Root/Other/View/StudentChooseView.xib
@@ -26,13 +26,13 @@
                            </constraints>
                        </tableView>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yxv-pI-vBX" customClass="QMUIButton">
                            <rect key="frame" x="304" y="23" width="74" height="20"/>
                            <rect key="frame" x="262" y="23" width="116" height="20"/>
                            <constraints>
                                <constraint firstAttribute="height" constant="20" id="gav-fT-6pI"/>
                            </constraints>
                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                            <state key="normal" title="添加学员" image="btn_add_1">
                            <state key="normal" title="添加运动营成员" image="btn_add_1">
                                <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.56999999999999995" colorSpace="custom" customColorSpace="sRGB"/>
                            </state>
                            <connections>
WanPai/Root/Search/CCell/UploadImgCCell.swift
@@ -10,9 +10,14 @@
class UploadImgCCell: UICollectionViewCell {
    @IBOutlet weak var btn_del: UIButton!
    @IBOutlet weak var img_cover: UIImageView!
    var clouse:((IndexPath)->Void)!
    var indexPath:IndexPath!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    @IBAction func delAction(_ sender: UIButton) {
        clouse(indexPath)
    }
}
WanPai/Root/Search/CCell/UploadImgCCell.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="22154" 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="22130"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
@@ -18,23 +18,26 @@
                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                <subviews>
                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="btn_evaluate_add" translatesAutoresizingMaskIntoConstraints="NO" id="v5Q-qM-hTv">
                        <rect key="frame" x="2.6666666666666643" y="2.6666666666666643" width="80" height="85"/>
                        <rect key="frame" x="5" y="8" width="75" height="74"/>
                    </imageView>
                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fFK-k3-YIh">
                        <rect key="frame" x="67" y="0.0" width="18" height="22"/>
                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                        <state key="normal" image="btn_evaluate_delete"/>
                        <connections>
                            <action selector="delAction:" destination="gTV-IL-0wX" eventType="touchUpInside" id="bit-8V-LRw"/>
                        </connections>
                    </button>
                </subviews>
            </view>
            <viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
            <constraints>
                <constraint firstAttribute="trailing" secondItem="fFK-k3-YIh" secondAttribute="trailing" id="0i7-sV-Rz4"/>
                <constraint firstItem="v5Q-qM-hTv" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="2.5" id="2Ms-oS-QmO"/>
                <constraint firstItem="v5Q-qM-hTv" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="5" id="2Ms-oS-QmO"/>
                <constraint firstItem="fFK-k3-YIh" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="6Vv-Pq-ZCc"/>
                <constraint firstItem="v5Q-qM-hTv" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="2.5" id="UeD-Ig-O1o"/>
                <constraint firstAttribute="trailing" secondItem="v5Q-qM-hTv" secondAttribute="trailing" constant="2.5" id="VMu-1e-pVO"/>
                <constraint firstAttribute="bottom" secondItem="v5Q-qM-hTv" secondAttribute="bottom" constant="2.5" id="zmu-OG-hSq"/>
                <constraint firstItem="v5Q-qM-hTv" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="8" id="UeD-Ig-O1o"/>
                <constraint firstAttribute="trailing" secondItem="v5Q-qM-hTv" secondAttribute="trailing" constant="5" id="VMu-1e-pVO"/>
                <constraint firstAttribute="bottom" secondItem="v5Q-qM-hTv" secondAttribute="bottom" constant="8" id="zmu-OG-hSq"/>
            </constraints>
            <size key="customSize" width="85" height="90"/>
            <connections>
WanPai/Root/Search/TCell/SearchStoreDetail_1_TCell.swift
@@ -34,5 +34,6 @@
    override func awakeFromNib() {
        super.awakeFromNib()
        selectionStyle = .none
        btn_price.isUserInteractionEnabled = false
    }
}
WanPai/Root/Search/TCell/SearchStoreDetail_1_TCell.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="22154" 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="22130"/>
        <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"/>
@@ -41,46 +41,51 @@
                        </constraints>
                    </view>
                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oRx-lW-o8z">
                        <rect key="frame" x="129" y="15.999999999999998" width="284" height="19.333333333333329"/>
                        <rect key="frame" x="129" y="16" width="284" height="20"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="20" id="2Dx-Io-eu4"/>
                        </constraints>
                        <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                        <color key="textColor" red="0.23921568627450979" green="0.24313725490196078" blue="0.27058823529411763" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <nil key="highlightedColor"/>
                    </label>
                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="9" translatesAutoresizingMaskIntoConstraints="NO" id="WUX-ft-Swl">
                        <rect key="frame" x="129" y="44.333333333333343" width="105" height="49"/>
                        <rect key="frame" x="129" y="45" width="284" height="49"/>
                        <subviews>
                            <stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="sg8-2M-iFr">
                                <rect key="frame" x="0.0" y="0.0" width="105" height="20"/>
                                <rect key="frame" x="0.0" y="0.0" width="284" height="20"/>
                                <subviews>
                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_time" translatesAutoresizingMaskIntoConstraints="NO" id="Lhx-v0-dC4">
                                        <rect key="frame" x="0.0" y="0.0" width="16" height="16"/>
                                        <rect key="frame" x="0.0" y="0.0" width="16" height="20"/>
                                        <constraints>
                                            <constraint firstAttribute="height" constant="16" id="5FH-VN-267"/>
                                            <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="16" id="5FH-VN-267"/>
                                            <constraint firstAttribute="width" constant="16" id="kUt-G7-Oaq"/>
                                        </constraints>
                                    </imageView>
                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上课时间:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cOf-iE-VAe">
                                        <rect key="frame" x="19" y="0.0" width="86" height="16"/>
                                    <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="cOf-iE-VAe">
                                        <rect key="frame" x="19" y="0.0" width="265" height="20"/>
                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                        <color key="textColor" red="0.45098039220000002" green="0.45098039220000002" blue="0.45098039220000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                        <nil key="highlightedColor"/>
                                    </label>
                                </subviews>
                                <constraints>
                                    <constraint firstAttribute="height" constant="20" id="2YG-UM-5Qa"/>
                                    <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="2YG-UM-5Qa"/>
                                </constraints>
                            </stackView>
                            <stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="y0n-rD-lkk">
                                <rect key="frame" x="0.0" y="28.999999999999993" width="105" height="20"/>
                                <rect key="frame" x="0.0" y="29" width="284" height="20"/>
                                <subviews>
                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_ks" translatesAutoresizingMaskIntoConstraints="NO" id="tUV-yr-W58">
                                        <rect key="frame" x="0.0" y="0.0" width="16" height="20"/>
                                        <rect key="frame" x="0.0" y="0.0" width="16" height="15"/>
                                        <constraints>
                                            <constraint firstAttribute="height" constant="15" id="IzN-t3-x15"/>
                                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="14" id="QvA-Xv-OwN"/>
                                            <constraint firstAttribute="width" constant="16" id="vkE-Vg-HjA"/>
                                        </constraints>
                                    </imageView>
                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="包含课时数:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pVH-xx-Gth">
                                        <rect key="frame" x="19" y="0.0" width="86" height="20"/>
                                        <rect key="frame" x="19" y="0.0" width="265" height="15"/>
                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                        <color key="textColor" red="0.45098039220000002" green="0.45098039220000002" blue="0.45098039220000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                        <nil key="highlightedColor"/>
@@ -121,6 +126,7 @@
                    <constraint firstAttribute="trailing" secondItem="c5W-VK-cgw" secondAttribute="trailing" constant="14" id="4Zc-ki-oJS"/>
                    <constraint firstItem="CAi-dQ-dUx" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="13" id="5cJ-wK-A3R"/>
                    <constraint firstAttribute="bottom" secondItem="CAi-dQ-dUx" secondAttribute="bottom" id="BU2-Rl-isQ"/>
                    <constraint firstAttribute="trailing" secondItem="WUX-ft-Swl" secondAttribute="trailing" constant="10" id="CqD-sq-Hhr"/>
                    <constraint firstAttribute="trailing" secondItem="oRx-lW-o8z" secondAttribute="trailing" constant="10" id="OMN-fd-GoN"/>
                    <constraint firstItem="oRx-lW-o8z" firstAttribute="leading" secondItem="QGN-0u-B5r" secondAttribute="trailing" constant="10" id="RG1-gY-bjk"/>
                    <constraint firstItem="oRx-lW-o8z" firstAttribute="top" secondItem="QGN-0u-B5r" secondAttribute="top" id="RHR-ZR-Um8"/>
@@ -153,7 +159,7 @@
            <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
        <systemColor name="systemGroupedBackgroundColor">
            <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
            <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </systemColor>
    </resources>
</document>
WanPai/Root/Search/VC/SearchStoreDetailFeedbackVC.swift
@@ -97,6 +97,7 @@
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
         let item = items[indexPath.row]
       let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_UploadImgCCell", for: indexPath) as! UploadImgCCell
        cell.indexPath = indexPath
        if item is String{
            cell.btn_del.isHidden = true
            cell.img_cover.image = UIImage(named: "btn_evaluate_add")
@@ -104,6 +105,12 @@
            cell.btn_del.isHidden = false
            cell.img_cover.image = (item as? PHAsset)?.toImage()
        }
        cell.clouse = { [weak self] index in
            guard let weakSelf = self else { return }
            weakSelf.items.removeObject(at: index.row)
            collectionView.reloadData()
        }
        return cell
    }
@@ -114,7 +121,7 @@
extension SearchStoreDetailFeedbackVC:UICollectionViewDelegateFlowLayout{
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        return CGSize(width: 60, height: 60)
        return CGSize(width: 70, height: 80)
    }
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
WanPai/Root/Search/VC/SearchStoreDetailFeedbackVC.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="22154" 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="22130"/>
        <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"/>
@@ -89,7 +89,7 @@
                    <rect key="frame" x="14" y="143" width="365" height="228.33333333333337"/>
                    <subviews>
                        <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="DZE-7p-bin" customClass="QMUITextView">
                            <rect key="frame" x="14" y="14" width="337" height="200.33333333333334"/>
                            <rect key="frame" x="5" y="5" width="346" height="209.33333333333334"/>
                            <color key="textColor" systemColor="labelColor"/>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                            <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
@@ -106,8 +106,8 @@
                    </subviews>
                    <color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                    <constraints>
                        <constraint firstItem="DZE-7p-bin" firstAttribute="top" secondItem="oDM-kN-KPX" secondAttribute="top" constant="14" id="W8t-oC-esF"/>
                        <constraint firstItem="DZE-7p-bin" firstAttribute="leading" secondItem="oDM-kN-KPX" secondAttribute="leading" constant="14" id="WXT-k6-hjX"/>
                        <constraint firstItem="DZE-7p-bin" firstAttribute="top" secondItem="oDM-kN-KPX" secondAttribute="top" constant="5" id="W8t-oC-esF"/>
                        <constraint firstItem="DZE-7p-bin" firstAttribute="leading" secondItem="oDM-kN-KPX" secondAttribute="leading" constant="5" id="WXT-k6-hjX"/>
                        <constraint firstAttribute="bottom" secondItem="DZE-7p-bin" secondAttribute="bottom" constant="14" id="XXU-dW-s3k"/>
                        <constraint firstAttribute="trailing" secondItem="DZE-7p-bin" secondAttribute="trailing" constant="14" id="cyz-ml-8Ro"/>
                        <constraint firstAttribute="width" secondItem="oDM-kN-KPX" secondAttribute="height" multiplier="1:0.6253" id="vWa-RX-ewF"/>
@@ -126,10 +126,10 @@
                    <nil key="highlightedColor"/>
                </label>
                <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="Bdf-BC-sQU">
                    <rect key="frame" x="14" y="416.33333333333331" width="365" height="65"/>
                    <rect key="frame" x="14" y="416.33333333333331" width="365" height="75"/>
                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                    <constraints>
                        <constraint firstAttribute="height" constant="65" id="X5m-a8-WfI"/>
                        <constraint firstAttribute="height" constant="75" id="X5m-a8-WfI"/>
                    </constraints>
                    <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="YLS-E1-VOS">
                        <size key="itemSize" width="128" height="128"/>
@@ -157,13 +157,21 @@
                        <action selector="addAction:" destination="-1" eventType="touchUpInside" id="0oB-8H-awG"/>
                    </connections>
                </button>
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请上传不超过5张图片" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aSi-ik-NOd">
                    <rect key="frame" x="85.666666666666686" y="394.66666666666669" width="118" height="14.333333333333314"/>
                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                    <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.51000000000000001" colorSpace="custom" customColorSpace="calibratedRGB"/>
                    <nil key="highlightedColor"/>
                </label>
            </subviews>
            <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
            <constraints>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="oDM-kN-KPX" secondAttribute="trailing" constant="14" id="2aT-mi-vng"/>
                <constraint firstItem="aSi-ik-NOd" firstAttribute="leading" secondItem="aOL-oD-g8G" secondAttribute="trailing" id="5k5-fa-O8T"/>
                <constraint firstItem="h50-S0-pKG" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="100" id="Cic-ns-RHq"/>
                <constraint firstItem="Bdf-BC-sQU" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="FQn-ws-DNf"/>
                <constraint firstItem="aSi-ik-NOd" firstAttribute="centerY" secondItem="aOL-oD-g8G" secondAttribute="centerY" id="GHJ-Ej-MGt"/>
                <constraint firstItem="Bdf-BC-sQU" firstAttribute="top" secondItem="aOL-oD-g8G" secondAttribute="bottom" constant="6" id="MOi-6C-9JU"/>
                <constraint firstItem="JaJ-JT-dcZ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="PnD-Zo-hhG"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="h50-S0-pKG" secondAttribute="trailing" constant="100" id="S7d-6d-nzt"/>
@@ -189,7 +197,7 @@
            <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
        <systemColor name="labelColor">
            <color red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
            <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
WanPai/Root/Search/VC/SearchStoreDetailVC.swift
@@ -21,7 +21,7 @@
    }
    lazy private var tableView:UITableView = {
        let table = UITableView(frame: .zero, style: .grouped)
        let table = UITableView(frame: .zero, style: .grouped)
        table.separatorStyle = .none
        table.delegate = self
        table.dataSource = self
@@ -57,9 +57,9 @@
            if let model = data.data{
                self?.searchStoreDetailModel = model
                    DispatchQueue.main.asyncAfter(deadline: .now()+1.5){
                        self?.tableView.tableHeaderView?.height = 500
                }
//                    DispatchQueue.main.asyncAfter(deadline: .now()+1.5){
//                        self?.tableView.tableHeaderView?.height = 500
//                }
            }
        }).disposed(by: disposeBag)
@@ -72,15 +72,17 @@
        }
        tableView.layoutIfNeeded()
//        tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: UIDevice.jq_safeEdges.bottom, right: 0)
        tableView.tableHeaderView = headView
    }
    @objc func moreAction(btn:UIButton){
        let selectStore = NormalSimpleModel(id: searchStoreDetailModel!.storeId, name: searchStoreDetailModel!.storeName)
        if btn.tag == 10{
            let vc = YardListVC()
            let vc = YardListVC(selectStore: selectStore)
            push(vc: vc)
        }else{
            let vc = CourseListVC()
            let vc = CourseListVC(selectStore: selectStore)
            push(vc: vc)
        }
    }
@@ -145,7 +147,7 @@
            let morebtn = QMUIButton(type: .custom)
            morebtn.setTitle("查看更多", for: .normal)
            morebtn.tag = 10+section
            morebtn.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .medium)
            morebtn.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .semibold)
            morebtn.setTitleColor(UIColor(hexStr: "#0048FF"), for: .normal)
            morebtn.setImage(UIImage(named: "btn_more"), for: .normal)
            morebtn.imagePosition = .right
@@ -157,8 +159,6 @@
                make.center.equalToSuperview()
            }
        }
        return footView
    }
}
@@ -166,7 +166,7 @@
extension SearchStoreDetailVC:UITableViewDataSource{
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        if section == 0{
            return searchStoreDetailModel?.venueList.count ?? 0
            return min(searchStoreDetailModel?.venueList.count ?? 0,3)
        }else{
            return searchStoreDetailModel?.courseVoList.count ?? 0
        }
WanPai/Root/Search/VC/SearchVC.swift
@@ -60,10 +60,11 @@
        view_container.addSubview(mapView)
        mapView.frame = CGRect(origin: .zero, size: view_container.size)
        for v in models{
        for (index,v) in models.enumerated(){
            let point = MAPointAnnotation()
            point.coordinate = CLLocationCoordinate2D(latitude: v.latitude, longitude:v.longitude)
            point.title = v.storeAddr
            point.title = v.storeName
            v.index = index
            v.annotation = point
        }
WanPai/Root/Welfare/CCell/CoinStoreCCell.swift
@@ -24,9 +24,11 @@
            label_type.text = marketModel.goodsType.strTitle
            if marketModel.condition == .coin{
                label_price.text = "\(marketModel.integral)积分"
            }else{
            }else if marketModel.condition == .cashAndCoin{
                label_price.text = "\(marketModel.integral)积分+\(marketModel.amount.currency())"
            }
            }else{
                label_price.text = marketModel.amount.currency()
            }
        }
    }
WanPai/Root/Welfare/TCell/WelfareWeeklyTCell.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="22154" 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="22130"/>
        <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"/>
@@ -55,7 +55,7 @@
                            <constraint firstAttribute="height" constant="1" id="eiV-ml-qlV"/>
                        </constraints>
                    </view>
                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Tyi-iF-uKa">
                    <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Tyi-iF-uKa">
                        <rect key="frame" x="326" y="132" width="86" height="31"/>
                        <color key="backgroundColor" name="FE6E0D"/>
                        <constraints>
WanPai/Root/Welfare/VC/RechargeCenterVC.swift
@@ -22,7 +22,8 @@
    @IBOutlet weak var view_container: UIView!
    @IBOutlet weak var btn_rechargeInfo: UIButton!
    @IBOutlet weak var collectionView: UICollectionView!
    @IBOutlet weak var cons_collectHei: NSLayoutConstraint!
    private var items = [RechargeItem]()
    private let cellW = (JQ_ScreenW - 88) / 3.0
    private let cellH = ((JQ_ScreenW - 88) / 3.0) * 0.5148
@@ -42,10 +43,14 @@
        view_cion.textColor = .white
        Services.voucherCenter().subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
            for v in data.data ?? []{
                self?.items.append(RechargeItem(coin: v.wpGold, money: v.amount))
                weakSelf.items.append(RechargeItem(coin: v.wpGold, money: v.amount))
            }
            self?.collectionView.reloadData()
            let h = ceil(Double(weakSelf.items.count) / 3.0) * weakSelf.cellH + (floor(Double(weakSelf.items.count) / 3.0) - 1) * 18.0
            weakSelf.cons_collectHei.constant = h
            weakSelf.collectionView.reloadData()
        }).disposed(by: disposeBag)
    }
@@ -86,7 +91,7 @@
    @IBAction func rechargeAction(_ sender: UIButton) {
        let item = items[selectIndex]
        PaymentView.show(money: (ali:item.money,wx:item.money,coin:nil,course:nil)) {[weak self] type in
        PaymentView.show(money: (ali:item.money,wx:item.money,coin:nil,course:nil,integral:nil)) {[weak self] type in
            guard let weakSelf = self else { return }
            Services.useBenefitPayment(amount: item.money, payType:type).subscribe(onNext: {data in
                if let m = data.data{
WanPai/Root/Welfare/VC/RechargeCenterVC.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="22154" 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="22130"/>
        <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"/>
@@ -15,6 +15,7 @@
                <outlet property="btn_rechange" destination="UvJ-Vs-VJ9" id="KZa-eC-NHS"/>
                <outlet property="btn_rechargeInfo" destination="lGL-wI-nEC" id="1bW-rJ-JPo"/>
                <outlet property="collectionView" destination="B8L-Mr-AHI" id="VuO-aq-Ixi"/>
                <outlet property="cons_collectHei" destination="wmy-oP-k65" id="fsx-Kf-F70"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_cion" destination="NK8-Du-e9T" id="RVF-n0-B5U"/>
                <outlet property="view_container" destination="NJG-QQ-aLa" id="ihi-ky-fH3"/>
@@ -56,6 +57,7 @@
                        <constraint firstItem="URX-Wq-XaR" firstAttribute="centerY" secondItem="NK8-Du-e9T" secondAttribute="centerY" constant="5" id="VUE-jJ-Itf"/>
                        <constraint firstItem="3BA-Ds-DAO" firstAttribute="top" secondItem="NK8-Du-e9T" secondAttribute="bottom" constant="9" id="j4d-D1-9LP"/>
                        <constraint firstItem="URX-Wq-XaR" firstAttribute="leading" secondItem="NK8-Du-e9T" secondAttribute="trailing" id="jtb-24-NIg"/>
                        <constraint firstAttribute="width" secondItem="9NF-Ki-9em" secondAttribute="height" multiplier="1:0.5923" id="rDM-7Q-bqx"/>
                    </constraints>
                </view>
                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NJG-QQ-aLa">
@@ -134,7 +136,6 @@
                <constraint firstItem="9NF-Ki-9em" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="K5G-Yj-wBt"/>
                <constraint firstItem="NJG-QQ-aLa" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="14" id="Rtp-yd-5ao"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="NJG-QQ-aLa" secondAttribute="trailing" constant="14" id="pDO-tW-rIA"/>
                <constraint firstItem="9NF-Ki-9em" firstAttribute="width" secondItem="9NF-Ki-9em" secondAttribute="height" multiplier="1:0.5923" id="rDM-7Q-bqx"/>
                <constraint firstAttribute="trailing" secondItem="9NF-Ki-9em" secondAttribute="trailing" id="v5f-as-G0G"/>
                <constraint firstItem="9NF-Ki-9em" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="ydy-8M-se7"/>
            </constraints>
@@ -149,7 +150,7 @@
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
        <systemColor name="tertiarySystemGroupedBackgroundColor">
            <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
            <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </systemColor>
    </resources>
</document>
WanPai/Root/Welfare/VC/RechargeRecordVC.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="22154" 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="22130"/>
        <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"/>
@@ -42,7 +42,7 @@
                            <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                            <nil key="highlightedColor"/>
                        </label>
                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="当前剩余" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MNG-iP-MVp">
                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="可用积分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MNG-iP-MVp">
                            <rect key="frame" x="172" y="144" width="49.333333333333343" height="14.333333333333343"/>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                            <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -189,7 +189,7 @@
        </view>
    </objects>
    <resources>
        <image name="icon_down_arrow" width="20" height="14"/>
        <image name="icon_down_arrow" width="13" height="8"/>
        <namedColor name="FE6E0D">
            <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
WanPai/Root/Welfare/VC/WelfareBillListVC.swift
@@ -37,7 +37,7 @@
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "我的账单"
        title = "账单"
        viewModel.configure(tableView,needMore: false)
        viewModel.yearMonth.accept(Date().jq_format("yyyy-MM"))
        viewModel.beginRefresh()
@@ -84,7 +84,10 @@
    fileprivate var viewModel:BillViewModel?{
        didSet{
            if let m = viewModel{
                btn_datetime.setTitle("\(m.yearMonth.value)>", for: .normal)
                let year = m.yearMonth.value.components(separatedBy: "-").first ?? ""
                let month = m.yearMonth.value.components(separatedBy: "-").last ?? ""
                btn_datetime.setTitle("\(year)年\(month)月>", for: .normal)
                if let  type = m.type.value{
                    btn_filter.setTitle(type == 1 ? "充值":"扣除", for: .normal)
                }else{
@@ -170,7 +173,7 @@
    @objc func datetimePickerAction(){
        CommonDatePickerView.show(before: 2, after: 0, type: .YM) {[weak self] year, month,_,_,_ in
            self?.viewModel?.yearMonth.accept(String(format: "%ld年%ld月", year!,month!))
            self?.viewModel?.yearMonth.accept(String(format: "%ld-%02ld", year!,month!))
            self?.viewModel?.beginRefresh()
        }
    }
WanPai/Root/Welfare/VC/WelfareExchangeRecordSubListVC.swift
@@ -13,7 +13,7 @@
    let goodsType = BehaviorRelay<ExchangeType?>(value: nil)
    let stateType = BehaviorRelay<UseStateType?>(value: nil)
    override func api() -> (Observable<BaseResponse<[RecordsModel]>>)? {
        return Services.exchangeRecords(goodType: goodsType.value, useType: stateType.value)
        return Services.exchangeRecords(page: page,goodType: goodsType.value, useType: stateType.value)
    }
}
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift
@@ -66,6 +66,10 @@
        super.viewDidLoad()
        title = "商品详情"
        //全局隐藏,目前不需要
        view_exchangeStore.isHidden = true
        view_selectStore.isHidden = true
        view_selectStoreHei.constant = 0
        Services.UseBenefitDetail(goodsId: id, goodsType: goodsType).subscribe(onNext: {[weak self] data in
@@ -82,7 +86,7 @@
                self?.label_startTime.text = "\(model.startTime)-\(model.endTime)"
                self?.label_courseHours.text = "\(model.courseHours)课时"
                self?.view_courseHours.isHidden = model.courseHours == 0
                self?.view_exchangeStore.isHidden = model.exchangeAddrType != .store
//                self?.view_exchangeStore.isHidden = model.exchangeAddrType != .store
                self?.view_students.isHidden = model.goodType != .course
                self?.view_ticketType.isHidden = model.goodType != .ticket
                self?.label_ticketType.text = model.cardType.strTitle
@@ -168,7 +172,7 @@
        StudentChooseView.show(itemType: .course, defaultStu: studentModels) {[weak self] studs in
            guard let weakSelf = self else { return }
            if studs.count > weakSelf.exchangeGoodsModel!.perLimit{
                alert(msg: "最多选择\(weakSelf.exchangeGoodsModel!.perLimit)位学员");return
                alert(msg: "最多选择\(weakSelf.exchangeGoodsModel!.perLimit)位运动营成员");return
            }
            self?.studentModels = studs as! [CourseDetailStudentModel]
            self?.updateStudenTable()
@@ -196,8 +200,10 @@
        guard exchangeGoodsModel!.residueNum != 0 else {alert(msg: "已兑换光啦");return}
        if exchangeGoodsModel!.goodType == .course{
            guard studentModels.count != 0 else {alert(msg: "请选择学员");return}
            guard studentModels.count != 0 else {alert(msg: "请选择运动营成员");return}
        }
//        guard selectStoreModel != nil else {alert(msg: "请选择兑换门店");return}
//        var mpower = max(1,studentModels.count) //倍率
@@ -230,7 +236,6 @@
            if weakSelf.exchangeGoodsModel!.exchangeType == .coin{
                Services.exchangeOperation(exchangeType: .coin, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: num, payType: nil, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","),storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in
                    guard let weakSelf = self else { return }
                    if data.code == 200{
                        CommonAlertView.show(title: "提示", content: "兑换成功!") {[weak self] _ in
                            self?.exchangeSuccessUI()
@@ -241,10 +246,9 @@
                }).disposed(by: weakSelf.disposeBag)
            }else {
                    //支付金额
                let cash = weakSelf.exchangeGoodsModel!.cash
                PaymentView.show(money: (ali:cash,wx:cash,coin:nil,course:nil)) { payType in
                let cash = weakSelf.exchangeGoodsModel!.cash * Double(num)
                PaymentView.show(money: (ali:cash,wx:cash,coin:nil,course:nil,integral:nil)) { payType in
                    Services.exchangeOperation(exchangeType: weakSelf.exchangeGoodsModel!.exchangeType, goodsId: weakSelf.exchangeGoodsModel!.goodId, goodsType: weakSelf.exchangeGoodsModel!.goodType, num: num, payType: payType, stuIds: weakSelf.studentModels.map({"\($0.id)"}).joined(separator: ","), storeId: weakSelf.selectStoreModel?.storeId).subscribe(onNext: {[weak self] data in
                        guard let weakSelf = self else { return }
                        if let m = data.data{
                            switch payType {
                                case .aliPay:
@@ -263,6 +267,7 @@
                                case .wechat:break
                                case .coin:break
                                case .courseNum:break
                                case .integral:break
                            }
                        }
                    }).disposed(by: weakSelf.disposeBag)
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.xib
@@ -306,20 +306,20 @@
                                                        <constraint firstAttribute="height" constant="1" id="8NT-ZN-2kD"/>
                                                    </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="a3z-iB-tVP">
                                                    <rect key="frame" x="14.000000000000002" y="14" width="28.666666666666671" height="17"/>
                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="运动营成员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a3z-iB-tVP">
                                                    <rect key="frame" x="14" y="14" width="71.666666666666671" height="17"/>
                                                    <fontDescription key="fontDescription" type="system" weight="semibold" 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>
                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NfN-7G-XM4" customClass="QMUIButton">
                                                    <rect key="frame" x="304" y="14" width="74" height="20"/>
                                                    <rect key="frame" x="262" y="14" width="116" height="20"/>
                                                    <constraints>
                                                        <constraint firstAttribute="height" constant="20" id="67f-ry-4bf"/>
                                                    </constraints>
                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                                    <state key="normal" title="选择学员" image="btn_add_1">
                                                    <state key="normal" title="选择运动营成员" image="btn_add_1">
                                                        <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.56999999999999995" colorSpace="custom" customColorSpace="sRGB"/>
                                                    </state>
                                                    <connections>
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.swift
@@ -11,7 +11,7 @@
import SDWebImage
class WelfareWeeklyDetailVC: BaseVC {
    @IBOutlet weak var img_cover: UIImageView!
    @IBOutlet weak var view_banner: CommonBannerView!
    @IBOutlet weak var label_name: UILabel!
    @IBOutlet weak var label_address: UILabel!
    @IBOutlet weak var label_distance: UILabel!
@@ -52,7 +52,7 @@
            guard let weakSelf = self else { return }
            if let model = data.data{
                weakSelf.weeklyItemDetailModel = model
                weakSelf.img_cover.sd_setImage(with: URL(string: model.detailDrawing))
//                weakSelf.img_cover.sd_setImage(with: URL(string: model.detailDrawing))
                weakSelf.label_name.text = model.coursePackageName
                weakSelf.label_address.text = model.storeNameAddr
                weakSelf.label_courseNum.text = "\(model.classHours)课时"
@@ -85,6 +85,10 @@
                    }
                }
                weakSelf.view_banner.setImages(images: model.detailDrawing.components(separatedBy: ","), type: .URL) { index in
                }
//                weakSelf.img_intro2.sd_setImage(with: URL(string: model.introduceDrawing)) {[weak self] image, error, type, url in
//                    if let img = image{
//                        self?.img_intro2.image = img
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.xib
@@ -14,7 +14,6 @@
            <connections>
                <outlet property="btn_handle" destination="fo2-mD-30Z" id="cWq-FD-kkO"/>
                <outlet property="cons_imgIntroHei" destination="LTT-Lg-ST4" id="ISY-yQ-jZX"/>
                <outlet property="img_cover" destination="N0o-wc-kbY" id="FHX-0M-qxy"/>
                <outlet property="img_intro" destination="9fb-wg-pcf" id="CHi-xu-9ip"/>
                <outlet property="label_address" destination="h4W-X0-Pgw" id="0nc-FT-5XB"/>
                <outlet property="label_attendWeeks" destination="oZw-he-MSe" id="BMD-YM-tz3"/>
@@ -28,6 +27,7 @@
                <outlet property="label_price" destination="Wps-ww-7sF" id="p7d-7a-V6K"/>
                <outlet property="label_vip" destination="7KS-mD-pbb" id="Nhg-8r-gdk"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_banner" destination="9x3-OB-26n" id="jxs-zv-kio"/>
                <outlet property="view_giftCourseNum" destination="He4-gs-Axl" id="8ou-GW-KLc"/>
            </connections>
        </placeholder>
@@ -42,20 +42,11 @@
                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Idk-Wv-zLx">
                            <rect key="frame" x="0.0" y="0.0" width="393" height="596.33333333333337"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9x3-OB-26n">
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9x3-OB-26n" customClass="CommonBannerView" customModule="WanPai" customModuleProvider="target">
                                    <rect key="frame" x="0.0" y="0.0" width="393" height="221.66666666666666"/>
                                    <subviews>
                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="N0o-wc-kbY">
                                            <rect key="frame" x="0.0" y="0.0" width="393" height="221.66666666666666"/>
                                        </imageView>
                                    </subviews>
                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                    <constraints>
                                        <constraint firstItem="N0o-wc-kbY" firstAttribute="leading" secondItem="9x3-OB-26n" secondAttribute="leading" id="DCm-2Y-YLF"/>
                                        <constraint firstAttribute="trailing" secondItem="N0o-wc-kbY" secondAttribute="trailing" id="cdt-fZ-FLL"/>
                                        <constraint firstAttribute="width" secondItem="9x3-OB-26n" secondAttribute="height" multiplier="1:0.564" id="j32-O5-28W"/>
                                        <constraint firstItem="N0o-wc-kbY" firstAttribute="top" secondItem="9x3-OB-26n" secondAttribute="top" id="roC-wf-ItT"/>
                                        <constraint firstAttribute="bottom" secondItem="N0o-wc-kbY" secondAttribute="bottom" id="ywG-ck-ga3"/>
                                    </constraints>
                                </view>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CN3-Y2-aPc">
WanPai/Root/Welfare/View/CoinStoreHeadView.swift
@@ -17,7 +17,8 @@
    @IBOutlet weak var btn_type: QMUIButton!
    @IBOutlet weak var btn_store: QMUIButton!
    
    @IBOutlet weak var shadowView: UIView!
    @IBOutlet weak var view_profile: UIView!
    @IBOutlet weak var shadowView: UIView!
    @IBOutlet weak var img_cover: UIImageView!
    @IBOutlet weak var label_username: UILabel!
    @IBOutlet weak var label_coin: UILabel!
@@ -106,6 +107,11 @@
        resortSubTypeView?.removeFromSuperview()
    }
    override func layoutSubviews() {
        super.layoutSubviews()
        view_profile.jq_addShadows(shadowColor: UIColor(hexStr: "#ACACAC").withAlphaComponent(0.31), corner: 4, radius: 5, offset: CGSize(width: 0, height: 1), opacity: 1)
    }
    @IBAction func storeAction(_ sender: UIButton) {
        StoresChooseView.show { [weak self] storeId,storeName in
            self?.btn_store.setTitle(storeName, for: .normal)
WanPai/Root/Welfare/View/CoinStoreHeadView.xib
@@ -17,7 +17,7 @@
            <autoresizingMask key="autoresizingMask"/>
            <subviews>
                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZP6-sh-vZG">
                    <rect key="frame" x="0.0" y="10" width="457" height="90"/>
                    <rect key="frame" x="14" y="10" width="429" height="90"/>
                    <subviews>
                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ut2-N8-z8a">
                            <rect key="frame" x="8" y="15" width="60" height="60"/>
@@ -58,7 +58,7 @@
                            <nil key="highlightedColor"/>
                        </label>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0qE-4s-YFN">
                            <rect key="frame" x="371" y="15" width="76" height="20"/>
                            <rect key="frame" x="343" y="15" width="76" height="20"/>
                            <constraints>
                                <constraint firstAttribute="height" constant="20" id="LjS-lo-4WT"/>
                            </constraints>
@@ -72,7 +72,7 @@
                            </connections>
                        </button>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kxf-E2-RQe">
                            <rect key="frame" x="369" y="44" width="78" height="27"/>
                            <rect key="frame" x="341" y="44" width="78" height="27"/>
                            <color key="backgroundColor" name="FE6E0D"/>
                            <constraints>
                                <constraint firstAttribute="width" constant="78" id="H76-KR-0ha"/>
@@ -218,8 +218,8 @@
                <constraint firstItem="VXr-Tz-HHm" firstAttribute="trailing" secondItem="pwx-YV-g10" secondAttribute="trailing" constant="53" id="AL2-1N-JTb"/>
                <constraint firstItem="ZP6-sh-vZG" firstAttribute="top" secondItem="U6b-Vx-4bR" secondAttribute="top" constant="10" id="CRO-gU-xgb"/>
                <constraint firstItem="m7l-8u-Pbk" firstAttribute="bottom" secondItem="pwx-YV-g10" secondAttribute="bottom" id="FwB-Vs-A6Q"/>
                <constraint firstItem="VXr-Tz-HHm" firstAttribute="trailing" secondItem="ZP6-sh-vZG" secondAttribute="trailing" id="Gfx-YD-1Wv"/>
                <constraint firstItem="ZP6-sh-vZG" firstAttribute="leading" secondItem="VXr-Tz-HHm" secondAttribute="leading" id="GhD-aS-XZ2"/>
                <constraint firstItem="VXr-Tz-HHm" firstAttribute="trailing" secondItem="ZP6-sh-vZG" secondAttribute="trailing" constant="14" id="Gfx-YD-1Wv"/>
                <constraint firstItem="ZP6-sh-vZG" firstAttribute="leading" secondItem="VXr-Tz-HHm" secondAttribute="leading" constant="14" id="GhD-aS-XZ2"/>
                <constraint firstItem="8CB-nR-iEe" firstAttribute="leading" secondItem="VXr-Tz-HHm" secondAttribute="leading" id="QcT-xp-9Oe"/>
                <constraint firstItem="pwx-YV-g10" firstAttribute="leading" secondItem="VXr-Tz-HHm" secondAttribute="leading" constant="14" id="W4u-cy-2xC"/>
                <constraint firstItem="VXr-Tz-HHm" firstAttribute="trailing" secondItem="m7l-8u-Pbk" secondAttribute="trailing" id="c8E-uS-uOW"/>
@@ -236,6 +236,7 @@
                <outlet property="label_username" destination="E2A-yI-sez" id="nQQ-0t-IaW"/>
                <outlet property="shadowView" destination="8CB-nR-iEe" id="Lhn-LX-roE"/>
                <outlet property="tf_search" destination="kj9-Ot-DUR" id="IBN-9O-U07"/>
                <outlet property="view_profile" destination="ZP6-sh-vZG" id="J2q-1g-8rk"/>
            </connections>
            <point key="canvasLocation" x="167.17557251908397" y="81.690140845070431"/>
        </collectionReusableView>
WanPai/Root/Yard/TCell/YardBookingTCell.swift
@@ -82,7 +82,7 @@
    @IBAction func paymentAction(_ sender: UIButton) {
        Services.continuePaymentPrice(id: yardBookingModel.id).subscribe(onNext: { data in
            if let model = data.data{
                PaymentView.show(money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil)) { [weak self] paytype in
                PaymentView.show(money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in
                    guard let weakSelf = self else { return }
                    Services.continuePayment(id: weakSelf.yardBookingModel.id, payType: paytype).subscribe(onNext: {data in
                        if let m = data.data{
@@ -102,8 +102,11 @@
                                                JQ_currentViewController().present(vc, animated: true)
                                        }
                                    }
                                case .wechat:break
                                case .coin:break
                                case .wechat,.integral:break
                                case .coin:
                                    let vc = PaymentResultVC(result: .success, objType: .activityApply)
                                    vc.modalPresentationStyle = .fullScreen
                                    JQ_currentViewController().present(vc, animated: true)
                                case .courseNum:break
                            }
                        }
WanPai/Root/Yard/VC/YardBookingDetailVC.swift
@@ -29,6 +29,9 @@
    @IBOutlet weak var btn_payment: UIButton!
    @IBOutlet weak var view_halfYard: UIView!
    @IBOutlet weak var btn_call: UIButton!
    @IBOutlet weak var cons_cancelWidth: NSLayoutConstraint!
    @IBOutlet weak var label_descInfo: UILabel!
    @IBOutlet weak var view_yard: UIView!
    
    private var yardBookingModel:YardBookingModel!
    private var yardBookingDetailDataModel:YardBookingDetailDataModel?
@@ -49,6 +52,7 @@
        label_title.text = yardBookingModel.name
        label_address.text = String(format: "%@(%@)", yardBookingModel.storeName,yardBookingModel.storeAddress)
        label_type.text = yardBookingModel.siteTypeName
        view_yard.isHidden = yardBookingModel.siteTypeName.isEmpty
        getData()
    }
@@ -70,11 +74,14 @@
                        self?.label_paymentPrice.text = model.payMoney.string + "课时"
                    case .coin:
                        self?.label_paymentPrice.text = model.payMoney.int.string + "币"
                    case .integral:break
                }
                self?.label_bookingTime.text = Date.jq_format(TimeInterval(model.startTime / 1000), formatter: "yyyy-MM-dd HH:mm")
                self?.label_usedState.text = model.status.titleRaw
                self?.label_paymentTime.text = Date.jq_format(TimeInterval(model.payTime / 1000), formatter: "yyyy-MM-dd HH:mm")
                switch model.state {
                switch model.status {
                    case .waitPayment:
                        self?.label_paymentTime.text = "待支付"
                        self?.label_usedState.text = "待支付"
@@ -83,27 +90,27 @@
                        self?.view_qrCode.isHidden = true
                        self?.btn_payment.isHidden = false
                    case .cancel,.complete:
                        self?.view_qrCode.isHidden = true
                    case .cancel,.complete,.overdue:
                        self?.btn_payment.isHidden = true
                        self?.btn_cancel.isHidden = true
                        self?.view_qrCode.isHidden = true
                    case .inStore:
                        self?.btn_payment.isHidden = true
                        self?.btn_cancel.isHidden = true
                        self?.showQRCode(model, ids: data.data?.ids ?? [])
                    case .pending:
                        if let m = self?.yardBookingDetailDataModel{
                            let t = OpenDoorTimeModel(start_time: TimeInterval(model.startTime / 1000), end_time: TimeInterval(model.endTime / 1000))
                            let openDoorModel = OpenDoorModel(sid: m.siteId, rid: data.data?.ids ?? [], uid: m.appUserId, time: [t], type: 2)
                            if let modelStr = openDoorModel.toJSONString(){
                                self?.img_QRCode.image = QRCodeImage(string: modelStr, size: 132 * sceneDelegate!.window!.screen.scale)
                            }
                        }
                        self?.btn_payment.isHidden = true
                        self?.btn_cancel.isHidden = true
                        self?.showQRCode(model, ids: data.data?.ids ?? [])
                        fallthrough
                    default:
                        self?.view_paymentTime.isHidden = model.payTime == 0
                        self?.label_paymentTime.text = Date.jq_format(TimeInterval(model.payTime / 1000), formatter: "yyyy-MM-dd HH:mm")
                        self?.label_usedState.text = model.state.titleRaw
                        self?.view_qrCode.isHidden = false
                        self?.btn_cancel.isHidden = false
                        self?.btn_payment.isHidden = true
                        break
//                        self?.view_paymentTime.isHidden = true
//                        self?.label_usedState.text = model.status.titleRaw
//                        self?.view_qrCode.isHidden = false
//                        self?.btn_cancel.isHidden = false
//                        self?.btn_payment.isHidden = true
//                        self?.cons_cancelWidth.constant = 189
                }
            }
        }) { error in
@@ -111,9 +118,31 @@
        }.disposed(by: disposeBag)
    }
    override func setUI() {
        let text = "您已经预约成功,请在预约时段扫码此二维码入场。您可以在“预约场地-已预约场地-详情”页面找到此二维码。"
        let attribute = AttributedStringbuilder.build().add(string: text, withFont: UIFont.systemFont(ofSize: 12, weight: .medium), withColor: .black.withAlphaComponent(0.43),lineSpace: 5).mutableAttributedString
        label_descInfo.attributedText = attribute
    }
    private func showQRCode(_ model:YardBookingDetailDataModel,ids:[Int]){
        guard model.goType == 0 else {
                //入园方式是手环,隐藏Code
            view_qrCode.isHidden = true;return
        }
        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)
            if let modelStr = openDoorModel.toJSONString(){
                img_QRCode.image = QRCodeImage(string: modelStr, size: 132 * sceneDelegate!.window!.screen.scale)
            }
        }
    }
    @IBAction func callAction(_ sender: UIButton) {
        guard let phone = yardBookingDetailDataModel?.phone else {return}
        UIApplication.shared.open(URL(string: "tell://\(phone)")!, options: [:], completionHandler: nil)
        UIApplication.shared.open(URL(string: "tel://\(phone)")!, options: [:], completionHandler: nil)
    }
@@ -131,7 +160,46 @@
    }
    @IBAction func paymentAction(_ sender: UIButton) {
        Services.continuePaymentPrice(id: yardBookingModel.id).subscribe(onNext: {data in
            if let model = data.data{
                PaymentView.show(money: (ali: model.cash, wx: model.cash, coin: model.playPaiCoin, course: nil,integral:nil)) { [weak self] paytype in
                    guard let weakSelf = self else { return }
                    Services.continuePayment(id: weakSelf.yardBookingModel.id, payType: paytype).subscribe(onNext: {data in
                        if let m = data.data{
                            switch paytype {
                                case .aliPay:
                                    YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { result in
                                        switch result {
                                            case .success:
                                                let vc = PaymentResultVC(result: .success, objType: .activityApply)
                                                vc.modalPresentationStyle = .fullScreen
                                                self?.present(vc, animated: true)
                                            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 .wechat:break
                                case .coin:
                                    let vc = PaymentResultVC(result: .success, objType: .activityApply)
                                    vc.modalPresentationStyle = .fullScreen
                                    self?.present(vc, animated: true)
                                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)
                    }.disposed(by: weakSelf.disposeBag)
                }
            }
        }) { error in
        }.disposed(by: disposeBag)
    }
}
WanPai/Root/Yard/VC/YardBookingDetailVC.xib
@@ -14,12 +14,14 @@
                <outlet property="btn_call" destination="hZb-3a-H8Y" id="2yx-Yh-v9v"/>
                <outlet property="btn_cancel" destination="0fI-TF-CeW" id="cs4-XJ-t4n"/>
                <outlet property="btn_payment" destination="1rP-aH-JyB" id="iEd-Ot-uWB"/>
                <outlet property="cons_cancelWidth" destination="fsB-D3-nPL" id="wIE-aE-gFI"/>
                <outlet property="img_QRCode" destination="wXP-uX-2IS" id="DXb-zt-Z0w"/>
                <outlet property="label_address" destination="JkO-ZN-GKx" id="3x1-pp-qW1"/>
                <outlet property="label_bookingPerson" destination="TjH-kW-XLP" id="75W-gZ-ORk"/>
                <outlet property="label_bookingTime" destination="aED-6E-ahn" id="dYf-gb-PMx"/>
                <outlet property="label_bookingType" destination="Tax-DA-fLa" id="IYe-wA-27U"/>
                <outlet property="label_contact" destination="UEJ-0E-4LG" id="LD3-gr-6Qf"/>
                <outlet property="label_descInfo" destination="Bxh-OX-GPj" id="T8z-fS-a3a"/>
                <outlet property="label_halfYardName" destination="Yc7-sN-J8Y" id="XkJ-bq-eE0"/>
                <outlet property="label_paymentPrice" destination="Bhs-Kk-wqY" id="Vdc-5S-nCN"/>
                <outlet property="label_paymentTime" destination="nvO-eE-GmQ" id="bRs-Yr-7zP"/>
@@ -31,6 +33,7 @@
                <outlet property="view_halfYard" destination="nqL-6S-ZE7" id="dSS-cN-Fyb"/>
                <outlet property="view_paymentTime" destination="icd-To-U0G" id="Jc6-ml-Idn"/>
                <outlet property="view_qrCode" destination="1hl-Kq-mul" id="8Ro-IP-cgz"/>
                <outlet property="view_yard" destination="7th-09-VZ3" id="lF4-jE-EdM"/>
            </connections>
        </placeholder>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@@ -373,7 +376,7 @@
                                                <constraint firstAttribute="width" constant="24" id="osm-5P-MFM"/>
                                            </constraints>
                                        </imageView>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bxh-OX-GPj">
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="headTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bxh-OX-GPj">
                                            <rect key="frame" x="36" y="227.33333333333337" width="354" height="28.666666666666686"/>
                                            <string key="text">您已经预约成功,请在预约时段扫码此二维码入场。您可以在“预
约场地-已预约场地-详情”页面找到此二维码。</string>
WanPai/Root/Yard/VC/YardDetailDateTimeVC.swift
@@ -70,6 +70,15 @@
    }
    //清除水
    public func clearALL(){
        drop1 = nil
        drop2 = nil
        selects.removeAll()
        collectionView.reloadData()
    }
        /// 获得请求后,更新的高度,来使父更新并缓存,滑动时获取
    func updateInnerHeight(clouse:@escaping (Double,Int)->Void){
        self.clouse = clouse
@@ -147,13 +156,26 @@
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_CalendarDateTimeTCell", for: indexPath) as! CalendarDateTimeTCell
        let m = items[indexPath.row]
        cell.label_content.text = m.time
        if m.selectable == 0{
            cell.contentView.backgroundColor = UIColor(hexStr: "#EC0808").withAlphaComponent(0.16)
            cell.label_content.textColor = UIColor(hexStr: "#EC0808")
        }else if m.selectable == 1{
            cell.contentView.backgroundColor = UIColor.white
            cell.label_content.textColor = UIColor(hexStr: "#323232")
        }
        let d = date.jq_format("yyyy-MM-dd ") + m.time.components(separatedBy: "-").last!
        let interval = Date.jq_StringToTimeInterval(d, "yyyy-MM-dd HH:mm")
        let canSelect = Date().timeIntervalSince1970 < interval
        if canSelect && m.selectable == 1{
            cell.contentView.backgroundColor = UIColor.white
            cell.label_content.textColor = UIColor(hexStr: "#323232")
        }else{
            cell.contentView.backgroundColor = UIColor(hexStr: "#EC0808").withAlphaComponent(0.16)
            cell.label_content.textColor = UIColor(hexStr: "#EC0808")
        }
//        if m.selectable == 0{
//            cell.contentView.backgroundColor = UIColor(hexStr: "#EC0808").withAlphaComponent(0.16)
//            cell.label_content.textColor = UIColor(hexStr: "#EC0808")
//        }else if m.selectable == 1{
//            cell.contentView.backgroundColor = UIColor.white
//            cell.label_content.textColor = UIColor(hexStr: "#323232")
//        }
        if indexPath.row == drop2 || indexPath.row == drop1{
            cell.contentView.backgroundColor = UIColor(hexStr: "#256D0F").withAlphaComponent(0.24)
WanPai/Root/Yard/VC/YardDetailVC.swift
@@ -1,9 +1,9 @@
//
//  YardDetailVC.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/6/19.
//
    //
    //  YardDetailVC.swift
    //  WanPai
    //
    //  Created by 无故事王国 on 2023/6/19.
    //
import UIKit
import QMUIKit
@@ -15,24 +15,24 @@
class YardDetailDateManager {
    private static var _sharedInstance: YardDetailDateManager?
    private static var _sharedInstance: YardDetailDateManager?
    class func shared() -> YardDetailDateManager {
        guard let instance = _sharedInstance else {
            _sharedInstance = YardDetailDateManager()
            return _sharedInstance!
        }
        return instance
    }
    class func shared() -> YardDetailDateManager {
        guard let instance = _sharedInstance else {
            _sharedInstance = YardDetailDateManager()
            return _sharedInstance!
        }
        return instance
    }
    private init() {} // 私有化init方法
    private init() {} // 私有化init方法
    var dates = BehaviorRelay<[String:[SiteDetailDateTimeModel]]>(value: [:])
    var dates = BehaviorRelay<[String:[SiteDetailDateTimeModel]]>(value: [:])
    //销毁单例对象
    class func destroy() {
        _sharedInstance = nil
    }
        //销毁单例对象
    class func destroy() {
        _sharedInstance = nil
    }
}
class YardDetailVC: BaseVC {
@@ -40,22 +40,22 @@
    @IBOutlet weak var scrollView: UIScrollView!
    @IBOutlet weak var view_banner: CommonBannerView!
    @IBOutlet weak var btn_calendar: QMUIButton!
    @IBOutlet weak var collectionView: UICollectionView!
    @IBOutlet weak var view_pages: UIView!
    @IBOutlet weak var cons_pagesHei: NSLayoutConstraint!
    @IBOutlet weak var view_coupon: UIView!
    @IBOutlet weak var label_name: UILabel!
    @IBOutlet weak var label_typeName: UILabel!
    @IBOutlet weak var label_address: UILabel!
    @IBOutlet weak var label_cashPrice: UILabel!
    @IBOutlet weak var label_coinPrice: UILabel!
    @IBOutlet weak var label_datetime: UILabel!
    @IBOutlet weak var tf_person: UITextField!
    @IBOutlet weak var tf_phone: QMUITextField!
    @IBOutlet weak var label_selectTimes: UILabel!
    @IBOutlet weak var label_totalHours: UILabel!
    @IBOutlet weak var label_price: UILabel!
    @IBOutlet weak var btn_coupon: UIButton!
    @IBOutlet weak var collectionView: UICollectionView!
    @IBOutlet weak var view_pages: UIView!
    @IBOutlet weak var cons_pagesHei: NSLayoutConstraint!
    @IBOutlet weak var view_coupon: UIView!
    @IBOutlet weak var label_name: UILabel!
    @IBOutlet weak var label_typeName: UILabel!
    @IBOutlet weak var label_address: UILabel!
    @IBOutlet weak var label_cashPrice: UILabel!
    @IBOutlet weak var label_coinPrice: UILabel!
    @IBOutlet weak var label_datetime: UILabel!
    @IBOutlet weak var tf_person: UITextField!
    @IBOutlet weak var tf_phone: QMUITextField!
    @IBOutlet weak var label_selectTimes: UILabel!
    @IBOutlet weak var label_totalHours: UILabel!
    @IBOutlet weak var label_price: UILabel!
    @IBOutlet weak var btn_coupon: UIButton!
    @IBOutlet weak var btn_fullYard: QMUIButton!
    @IBOutlet weak var btn_halfYard: QMUIButton!
    @IBOutlet weak var collection_halfYard: UICollectionView!
@@ -67,69 +67,61 @@
    @IBOutlet weak var view_selectYardType: UIView!
    @IBOutlet weak var web_introduce: WKWebView!
    @IBOutlet weak var cons_webHei: NSLayoutConstraint!
    private var coupons = [CouponInfoModel]()
    private var selectCouponModel:CouponInfoModel?
    private var coupons = [CouponInfoModel]()
    private var selectCouponModel:CouponInfoModel?
    private let yardCellW = (JQ_ScreenW  - 144) / 3
    private var halfIndex:Int?
    private var yardIndex:Int = 0 //场地
    lazy var pageViewController:FFPageViewController = {
        let pageVC = FFPageViewController()
        pageVC.view.backgroundColor = .clear
        pageVC.scrollview.backgroundColor = .clear
        pageVC.prePages = 2
        pageVC.scrollview.bounces = false
        return pageVC
    }()
    lazy var pageViewController:FFPageViewController = {
        let pageVC = FFPageViewController()
        pageVC.view.backgroundColor = .clear
        pageVC.scrollview.backgroundColor = .clear
        pageVC.prePages = 2
        pageVC.scrollview.bounces = false
        return pageVC
    }()
    private var siteDetailModel:SiteDetailModel!
    private var siteDetailDateTimeModel:SiteDetailDateTimeModel!
    private var siteDetailModel:SiteDetailModel!
    private var siteDetailDateTimeModel:SiteDetailDateTimeModel!
    private let banner = CommonBannerView()
    private var id:Int!
    private var cellW:Double!
    private var selectIndex = 0
    private var weeklys = [Date]()
    private var currentDate:Date?{
        didSet{
            if let d = currentDate{
                selectIndex = currentDate?.jq_nowWeekDay(identifier: .republicOfChina).index ?? 0
                weeklys = d.jq_currentWeekDates
                collectionView.reloadData()
            }
        }
    }
    private var id:Int!
    private var cellW:Double!
    private var selectIndex = 0
    private var weeklys = [Date]()
    private var currentDate:Date?{
        didSet{
            if let d = currentDate{
                selectIndex = currentDate?.jq_nowWeekDay(identifier: .republicOfChina).index ?? 0
                weeklys = d.jq_currentWeekDates
                collectionView.reloadData()
            }
        }
    }
    required init(id:Int){
        super.init(nibName: nil, bundle: nil)
        self.id = id
    }
    required init(id:Int){
        super.init(nibName: nil, bundle: nil)
        self.id = id
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "预约场地"
        Services.querySiteDetail(id: id).subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
            if let model = data.data{
                weakSelf.siteDetailModel = model
                weakSelf.label_name.text = model.name
                weakSelf.label_typeName.text = model.siteTypeName
                weakSelf.label_address.text = String(format: "%@(%@)",model.storeName, model.storeAddress)
                weakSelf.label_cashPrice.attributedText = AttributedStringbuilder.build()
                    .add(string: "\(model.cashPrice.currency())/", withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: UIColor(hexStr: "#EC0808"))
                    .add(string: "半小时", withFont: UIFont.systemFont(ofSize: 14, weight: .medium), withColor: UIColor(hexStr: "#535353")).mutableAttributedString
                weakSelf.label_coinPrice.attributedText = AttributedStringbuilder.build()
                    .add(string: "\(model.playPaiCoin)币/", withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: UIColor(hexStr: "#EC0808"))
                    .add(string: "半小时", withFont: UIFont.systemFont(ofSize: 14, weight: .medium), withColor: UIColor(hexStr: "#535353")).mutableAttributedString
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "预约场地"
        Services.querySiteDetail(id: id).subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
            if let model = data.data{
                weakSelf.siteDetailModel = model
                weakSelf.label_name.text = model.name
                weakSelf.label_typeName.text = model.siteTypeName
                weakSelf.label_address.text = String(format: "%@(%@)",model.storeName, model.storeAddress)
                weakSelf.changePrice(cashPrice: model.cashPrice, coin: model.playPaiCoin, typeName: model.typeName)
                weakSelf.view_yardType.isHidden = model.nextName.count == 0
                weakSelf.view_selectYardType.isHidden = model.ishalf == 2
@@ -150,29 +142,40 @@
                }
                weakSelf.view_yardType.isHidden = model.nextName.filter({!$0.isEmpty}).count == 0
            }
        }).disposed(by: disposeBag)
    }
            }
        }).disposed(by: disposeBag)
    }
    override func setRx() {
        YardDetailDateManager.shared().dates.subscribe(onNext: { [weak self] dict in
            guard let weakSelf = self else { return }
            guard weakSelf.siteDetailModel != nil else {return}
            if let a = dict.values.first,a.count > 0{
                let key = dict.keys.first!
                weakSelf.label_price.text = String(format: "%@/%ld币", (Double(a.count) * weakSelf.siteDetailModel.cashPrice).currency(),a.count * weakSelf.siteDetailModel.playPaiCoin)
                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 ?? "")
                weakSelf.label_totalHours.text = String(format: "(合计%.1lf小时)", Double(a.count) * 0.5)
                weakSelf.queryCoupon(price: (Double(a.count) * weakSelf.siteDetailModel.cashPrice))
            }else{
                weakSelf.label_selectTimes.text = "未选择"
                weakSelf.label_totalHours.text = "(合计0小时)"
                weakSelf.label_price.text = "¥-/-币"
            }
        }).disposed(by: disposeBag)
    override func setRx() {
        YardDetailDateManager.shared().dates.subscribe(onNext: { [weak self] dict in
            guard let weakSelf = self else { return }
            guard weakSelf.siteDetailModel != nil else {return}
            if let a = dict.values.first,a.count > 0{
                var cashPrice:Double = 0
                var coinPrice:Int = 0
                if weakSelf.btn_halfYard.isSelected{
                    cashPrice = weakSelf.siteDetailModel.cashPriceOne
                    coinPrice = weakSelf.siteDetailModel.playPaiCoinOne
                }else{
                    cashPrice = weakSelf.siteDetailModel.cashPrice
                    coinPrice = weakSelf.siteDetailModel.playPaiCoin
                }
                let key = dict.keys.first!
                weakSelf.label_price.text = String(format: "%@/%ld币", (Double(a.count) * cashPrice).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 ?? "")
                weakSelf.label_totalHours.text = String(format: "(合计%.1lf小时)", Double(a.count) * 0.5)
                weakSelf.queryCoupon(price: (Double(a.count) * cashPrice))
            }else{
                weakSelf.label_selectTimes.text = "未选择"
                weakSelf.label_totalHours.text = "(合计0小时)"
                weakSelf.label_price.text = "¥-/-币"
            }
        }).disposed(by: disposeBag)
        web_introduce.scrollView.rx.observe(CGSize.self, "contentSize").map { (size) -> CGFloat? in
            if let size = size{
@@ -184,28 +187,28 @@
                self.cons_webHei.constant = height
            }
        }).disposed(by: disposeBag)
    }
    }
    override func setUI() {
        view_coupon.isHidden = true
        cellW = (JQ_ScreenW - 68.0) / 7.0
        btn_calendar.imagePosition = .top
        btn_calendar.spacingBetweenImageAndTitle = 3
        cons_pagesHei.constant = 150
    override func setUI() {
        view_coupon.isHidden = true
        cellW = (JQ_ScreenW - 68.0) / 7.0
        btn_calendar.imagePosition = .top
        btn_calendar.spacingBetweenImageAndTitle = 3
        cons_pagesHei.constant = 150
        collectionView.register(UINib(nibName: "CalendarItemCCell", bundle: nil), forCellWithReuseIdentifier: "_CalendarItemCCell")
        collectionView.delegate = self
        collectionView.dataSource = self
        collectionView.register(UINib(nibName: "CalendarItemCCell", bundle: nil), forCellWithReuseIdentifier: "_CalendarItemCCell")
        collectionView.delegate = self
        collectionView.dataSource = self
        addChild(pageViewController)
        view_pages.insertSubview(pageViewController.view, at: 0)
        pageViewController.didMove(toParent: self)
        addChild(pageViewController)
        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()
        }
        pageViewController.delegate = 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()
        }
        pageViewController.delegate = self
        btn_fullYard.spacingBetweenImageAndTitle = 13
        btn_halfYard.spacingBetweenImageAndTitle = 13
@@ -223,17 +226,37 @@
        view_selectYardType.isHidden = true
        scrollView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 75, right: 0)
    }
    }
        /// 查询优惠券
    private func queryCoupon(price:Double){
        Services.querySiteCouponList(price: price, siteId: siteDetailModel.id).subscribe(onNext: {[weak self] data in
            if let models = data.data{
                self?.view_coupon.isHidden = models.count == 0
                self?.coupons = models
            }
        }).disposed(by: disposeBag)
    }
        /// 查询优惠券
    private func queryCoupon(price:Double){
        Services.querySiteCouponList(price: price, siteId: siteDetailModel.id).subscribe(onNext: {[weak self] data in
            if let models = data.data{
                self?.view_coupon.isHidden = models.count == 0
                self?.coupons = models
            }
        }).disposed(by: disposeBag)
    }
    private func changePrice(cashPrice:Double,coin:Int,typeName:String){
        let att = AttributedStringbuilder.build()
        att.add(string: "\(cashPrice.currency())/", withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: UIColor(hexStr: "#EC0808"))
        if  typeName == "智慧场地"{
            att.add(string: "15分钟", withFont: UIFont.systemFont(ofSize: 14, weight: .medium), withColor: UIColor(hexStr: "#535353"))
        }else{
            att.add(string: "半小时", withFont: UIFont.systemFont(ofSize: 14, weight: .medium), withColor: UIColor(hexStr: "#535353"))
        }
        label_cashPrice.attributedText = att.mutableAttributedString
        let att1 = AttributedStringbuilder.build()
        att1.add(string: "\(coin)币/", withFont: UIFont.systemFont(ofSize: 18, weight: .medium), withColor: UIColor(hexStr: "#EC0808"))
        if  typeName == "智慧场地"{
            att1.add(string: "15分钟", withFont: UIFont.systemFont(ofSize: 14, weight: .medium), withColor: UIColor(hexStr: "#535353"))
        }else{
            att1.add(string: "半小时", withFont: UIFont.systemFont(ofSize: 14, weight: .medium), withColor: UIColor(hexStr: "#535353"))
        }
        label_coinPrice.attributedText = att1.mutableAttributedString
    }
    @IBAction func halfYardTypeAction(_ sender: QMUIButton) {
        btn_fullYard.isSelected = sender.tag == 200
@@ -241,43 +264,56 @@
        if btn_fullYard.isSelected{
            halfIndex = nil
            collection_halfYard.reloadData()
//            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()
        UIView.animate(withDuration: 0.5) {
            self.view_halfYard.isHidden = self.btn_fullYard.isSelected
            self.view_halfYard.alpha = (self.view_halfYard.isHidden ? 0:1)
        }
        //为了计算价格 【半场/全场】切换
        var val = YardDetailDateManager.shared().dates.value
        val.removeAll()
        YardDetailDateManager.shared().dates.accept(val)
        if let currentVC = pageViewController.currentController as? YardDetailDateTimeVC{
            currentVC.clearALL()
        }
    }
    @IBAction func callPhoneAction(_ sender: UIButton) {
        UIApplication.shared.open(URL(string: "tel://\(siteDetailModel.storePhone)")!)
    }
    @IBAction func couponAction(_ sender: UIButton) {
        CouponChooseView.show(coupons, defaultModel: selectCouponModel) { [weak self] m in
            self?.selectCouponModel = m
    @IBAction func callPhoneAction(_ sender: UIButton) {
        UIApplication.shared.open(URL(string: "tel://\(siteDetailModel.storePhone)")!)
    }
    @IBAction func couponAction(_ sender: UIButton) {
        CouponChooseView.show(coupons, defaultModel: selectCouponModel) { [weak self] m in
            self?.selectCouponModel = m
            let string = m == nil ? "去选择":"-\(m!.favorable.currency())"
            self?.btn_coupon.setTitle(string, for: .normal)
        }
    }
            self?.btn_coupon.setTitle(string, for: .normal)
        }
    }
    @IBAction func calendarAction(_ sender: QMUIButton) {
        CalendarPickerView.show(selectDate: currentDate) { [weak self] date in
            let offsetDay = Date.jq_CalByDays(startDate: Date().jq_clearTimes(), endDate: date)
            self?.pageViewController.scroll(toPage: offsetDay, animation: true)
            self?.collectionView.reloadData()
        }
    }
    @IBAction func calendarAction(_ sender: QMUIButton) {
        CalendarPickerView.show(selectDate: currentDate) { [weak self] date in
            let offsetDay = Date.jq_CalByDays(startDate: Date().jq_clearTimes(), endDate: date)
            self?.pageViewController.scroll(toPage: offsetDay, animation: true)
            self?.collectionView.reloadData()
        }
    }
    @IBAction func bookingAction(_ sender: UIButton) {
    @IBAction func bookingAction(_ sender: UIButton) {
        guard !YardDetailDateManager.shared().dates.value.isEmpty else {alertError(msg: "请选择预约时间");return}
        guard !tf_person.isEmpty else {alertError(msg: "请输入预约人");return}
        guard !tf_phone.isEmpty else {alertError(msg: "请输入联系方式");return}
        guard tf_phone.text!.jq_isPhone else {alertError(msg: "请输入正确的联系方式");return}
        guard !tf_person.isEmpty else {alertError(msg: "请输入预约人");return}
        guard !tf_phone.isEmpty else {alertError(msg: "请输入联系方式");return}
        guard tf_phone.text!.jq_isPhone else {alertError(msg: "请输入正确的联系方式");return}
        if btn_halfYard.isSelected && halfIndex == nil{
            alert(msg: "请选择半场");return
        }
@@ -299,12 +335,12 @@
        }
        StoresInfoView.show(siteDetailModel) { [weak self] status in
            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 coin = a.count * weakSelf.siteDetailModel.playPaiCoin
        StoresInfoView.show(siteDetailModel) { [weak self] status in
            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 coin = a.count * weakSelf.siteDetailModel.playPaiCoin
                var datetimes = [String]()
                let key = YardDetailDateManager.shared().dates.value.keys.first!
@@ -313,84 +349,97 @@
                }
                PaymentView.show(money: (ali:price,wx:price,coin:coin,course:nil)) { [weak self] type in
                    guard let weakSelf = self else { return }
                PaymentView.show(money: (ali:price,wx:price,coin:coin,course:nil,integral:nil)) { [weak self] type in
                    guard let weakSelf = self else { return }
                    Services.reservationSite(booker: weakSelf.tf_person.text!, couponId: weakSelf.selectCouponModel?.id, id: weakSelf.siteDetailModel.id, payType: type, phone: weakSelf.tf_phone.text!, times: datetimes.joined(separator: ";"),halfName:halfName,isHalf:isHalf,nextName:nextName).subscribe(onNext: { data in
                        if let m = data.data{
                            switch type {
                                case .aliPay:
                                    YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { result in
                                        switch result {
                                            case .success:
                                                let vc = PaymentResultVC(result: .success, objType: .yard,handleVC: weakSelf)
                                                vc.modalPresentationStyle = .fullScreen
                                                weakSelf.present(vc, animated: true)
                                            case .cancel:
                                                alert(msg: "交易取消")
                                            case .failure(let error):
                                                let vc = PaymentResultVC(result: .fail(error.localizedDescription), objType: .yard,handleVC: weakSelf)
                                                vc.modalPresentationStyle = .fullScreen
                                                weakSelf.present(vc, animated: true)
                                        }
                                    }
                        if let m = data.data{
                            switch type {
                                case .aliPay:
                                    YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { result in
                                        switch result {
                                            case .success:
                                                let vc = PaymentResultVC(result: .success, objType: .yard,handleVC: nil)
                                                vc.modalPresentationStyle = .fullScreen
                                                weakSelf.present(vc, animated: true)
                                            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 .wechat:break
                                case .coin:
                                    let vc = PaymentResultVC(result: .success, objType: .yard,handleVC: weakSelf)
                                case .wechat,.integral:break
                                case .coin:
                                    let vc = PaymentResultVC(result: .success, objType: .yard,handleVC: nil)
                                    vc.modalPresentationStyle = .fullScreen
                                    weakSelf.present(vc, animated: true)
                                case .courseNum:break
                            }
                        }
                                case .courseNum:break
                            }
                        }
                    }).disposed(by: weakSelf.disposeBag)
                }
                    },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)
                                default:
                                    let vc = PaymentResultVC(result: .fail("支付失败"), objType: .yard,handleVC: nil)
                                    vc.modalPresentationStyle = .fullScreen
                                    weakSelf.present(vc, animated: true)
                            }
                        }
                    }).disposed(by: weakSelf.disposeBag)
                }
            }else{
                weakSelf.navigationController?.popToRootViewController(animated: true)
            }
        }
    }
        }
    }
    deinit{
        YardDetailDateManager.destroy()
    }
    deinit{
        YardDetailDateManager.destroy()
    }
}
extension YardDetailVC:FFPageViewControllerDelegate{
    func pageViewController(_ pageViewController: FFPageViewController, currentPageChanged currentPage: Int) {
        if let vc = pageViewController.currentController as? YardDetailDateTimeVC{
            currentDate = vc.date
            label_datetime.text = vc.date.jq_format("yyyy年MM月dd日")
            cons_pagesHei.constant = vc.innerHeight
            UIView.animate(withDuration: 0.5) {
                self.view.layoutIfNeeded()
            }
        }
    }
    func pageViewController(_ pageViewController: FFPageViewController, currentPageChanged currentPage: Int) {
        if let vc = pageViewController.currentController as? YardDetailDateTimeVC{
            currentDate = vc.date
            label_datetime.text = vc.date.jq_format("yyyy年MM月dd日")
            cons_pagesHei.constant = vc.innerHeight
            UIView.animate(withDuration: 0.5) {
                self.view.layoutIfNeeded()
            }
        }
    }
    func totalPagesOfpageViewController(_ pageViewConteoller: FFPageViewController) -> UInt {
        return 11
    }
    func totalPagesOfpageViewController(_ pageViewConteoller: FFPageViewController) -> UInt {
        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)
        vc.updateInnerHeight { [weak self] (height, currentPage) in
            if currentPage == self?.pageViewController.currentPage{
                self?.cons_pagesHei.constant = height
                UIView.animate(withDuration: 0.3) {
                    self?.view.layoutIfNeeded()
                }
            }
        }
        return vc
    }
    func pageViewController(_ pageViewConteoller: FFPageViewController, controllerForPage page: Int) -> UIViewController {
        let date = Date().jq_add(day: page)
        let vc = YardDetailDateTimeVC(id:id,date: date!,currentPage: page)
        vc.updateInnerHeight { [weak self] (height, currentPage) in
            if currentPage == self?.pageViewController.currentPage{
                self?.cons_pagesHei.constant = height
                UIView.animate(withDuration: 0.3) {
                    self?.view.layoutIfNeeded()
                }
            }
        }
        return vc
    }
}
extension YardDetailVC:UICollectionViewDataSource{
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        if self.collectionView == collectionView{
            let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_CalendarItemCCell", for: indexPath) as! CalendarItemCCell
@@ -419,7 +468,7 @@
            return cell
        }
        //选择半场:
            //选择半场:
        if collection_halfYard == collectionView{
            let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_Common_1_CCell", for: indexPath) as! Common_1_CCell
            cell.label_content.text = siteDetailModel.halfName[indexPath.row]
@@ -429,9 +478,9 @@
            return cell
        }
        return UICollectionViewCell()
    }
    }
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        if self.collectionView == collectionView{
            return weeklys.count
@@ -450,11 +499,11 @@
        }
        return 0
    }
    }
}
extension YardDetailVC:UICollectionViewDelegate{
    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        if self.collectionView == collectionView{
            let date = weeklys[indexPath.row]
@@ -467,38 +516,45 @@
        }
        if self.collection_yardType == collectionView{
            if let currentVC = pageViewController.currentController as? YardDetailDateTimeVC{
                currentVC.clearALL()
            }
            yardIndex = indexPath.row
            collectionView.reloadData()
        }
        if self.collection_halfYard == collectionView{
            if let currentVC = pageViewController.currentController as? YardDetailDateTimeVC{
                currentVC.clearALL()
            }
            halfIndex = indexPath.row
            collectionView.reloadData()
        }
    }
    }
}
extension YardDetailVC:UICollectionViewDelegateFlowLayout{
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        if self.collectionView == collectionView{
            return CGSize(width: cellW, height: 50)
        }
        return CGSize(width: yardCellW, height: yardCellW * 0.439)
    }
    }
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
        if self.collectionView == collectionView{
            return 0
        }
        return 21
    }
    }
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
        if self.collectionView == collectionView{
            return 0
        }
        return 21
    }
    }
}