无故事王国
2023-09-20 2834569133090d46dd3f28a30100fa74661ef1e1
完善
30个文件已修改
10个文件已添加
1745 ■■■■■ 已修改文件
WanPai.xcodeproj/project.pbxproj 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Assets.xcassets/Btns/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Assets.xcassets/Icons/icon_calendar 1.imageset/Contents.json 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Assets.xcassets/Icons/icon_calendar 1.imageset/icon_calendar@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Assets.xcassets/Icons/icon_calendar 1.imageset/icon_calendar@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/Layout/WaterFallFlowLayout.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/PaymentCourseView.swift 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Config/Enums.swift 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Model/CommonModels.swift 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Network/Services.swift 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseBookingTCell.swift 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseBookingTCell.xib 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseBooking_1_TCell.swift 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseBooking_1_TCell.xib 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseSignUpTCell.swift 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseSignUpTCell.xib 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailApplyVC.swift 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailVC.swift 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailVC.xib 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseInfoVC.swift 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseListVC.swift 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseListVC.xib 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/ExperienceCourseVC.swift 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/ExperienceCourseVC.xib 273 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/SignUpCourseVC.swift 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/SignUpCourseVC.xib 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Home/VC/HomeVC.swift 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/CCell/CouponCCell.swift 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/CCell/CouponCCell.xib 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/VC/PaymentResultVC.swift 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/VC/PaymentResultVC.xib 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/TCell/ExchangeRecordTCell.swift 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/TCell/ExchangeRecordTCell.xib 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/CoinStoreCenterVC.swift 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.xib 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/View/CoinStoreHeadView.swift 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/TCell/YardBookingTCell.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardBookingDetailVC.swift 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardBookingDetailVC.xib 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai.xcodeproj/project.pbxproj
@@ -105,6 +105,8 @@
        13801CC52A4D26D90041454D /* CommonSingleTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13801CC32A4D26D90041454D /* CommonSingleTCell.xib */; };
        13801CC72A4D294D0041454D /* ChooseNumberView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13801CC62A4D294D0041454D /* ChooseNumberView.swift */; };
        13801CC92A4D29740041454D /* ChooseNumberView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13801CC82A4D29740041454D /* ChooseNumberView.xib */; };
        1384F6DF2AB97E5700A8B620 /* ExperienceCourseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1384F6DD2AB97E5700A8B620 /* ExperienceCourseVC.swift */; };
        1384F6E02AB97E5700A8B620 /* ExperienceCourseVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1384F6DE2AB97E5700A8B620 /* ExperienceCourseVC.xib */; };
        138667F52A428E4000484FEA /* WelfareWeeklyDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138667F32A428E4000484FEA /* WelfareWeeklyDetailVC.swift */; };
        138667F62A428E4000484FEA /* WelfareWeeklyDetailVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 138667F42A428E4000484FEA /* WelfareWeeklyDetailVC.xib */; };
        1387B6622A4A969700BF2F2E /* CommonDatePickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1387B6612A4A969700BF2F2E /* CommonDatePickerView.swift */; };
@@ -153,6 +155,10 @@
        13AFABC52A4AE492001FEA16 /* StudentRemarkTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13AFABC32A4AE492001FEA16 /* StudentRemarkTCell.xib */; };
        13B640C02A54108B00EA33ED /* UploadImgCCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B640BE2A54108B00EA33ED /* UploadImgCCell.swift */; };
        13B640C12A54108B00EA33ED /* UploadImgCCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B640BF2A54108B00EA33ED /* UploadImgCCell.xib */; };
        13B6BB9D2ABAE000006D0C0E /* SignUpCourseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B6BB9B2ABAE000006D0C0E /* SignUpCourseVC.swift */; };
        13B6BB9E2ABAE000006D0C0E /* SignUpCourseVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B6BB9C2ABAE000006D0C0E /* SignUpCourseVC.xib */; };
        13B6BBA12ABAE44E006D0C0E /* CourseSignUpTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B6BB9F2ABAE44E006D0C0E /* CourseSignUpTCell.swift */; };
        13B6BBA22ABAE44E006D0C0E /* CourseSignUpTCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B6BBA02ABAE44E006D0C0E /* CourseSignUpTCell.xib */; };
        13BEEAE52A4D8DFB00685667 /* WelfareExchangeRecordListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13BEEAE42A4D8DFB00685667 /* WelfareExchangeRecordListVC.swift */; };
        13BEEAE72A4D927100685667 /* WelfareExchangeRecordSubListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13BEEAE62A4D927100685667 /* WelfareExchangeRecordSubListVC.swift */; };
        13BEEAEA2A4D92A200685667 /* ExchangeRecordTCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13BEEAE82A4D92A200685667 /* ExchangeRecordTCell.swift */; };
@@ -385,6 +391,8 @@
        13801CC32A4D26D90041454D /* CommonSingleTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CommonSingleTCell.xib; sourceTree = "<group>"; };
        13801CC62A4D294D0041454D /* ChooseNumberView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChooseNumberView.swift; sourceTree = "<group>"; };
        13801CC82A4D29740041454D /* ChooseNumberView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ChooseNumberView.xib; sourceTree = "<group>"; };
        1384F6DD2AB97E5700A8B620 /* ExperienceCourseVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExperienceCourseVC.swift; sourceTree = "<group>"; };
        1384F6DE2AB97E5700A8B620 /* ExperienceCourseVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ExperienceCourseVC.xib; sourceTree = "<group>"; };
        138667F32A428E4000484FEA /* WelfareWeeklyDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelfareWeeklyDetailVC.swift; sourceTree = "<group>"; };
        138667F42A428E4000484FEA /* WelfareWeeklyDetailVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WelfareWeeklyDetailVC.xib; sourceTree = "<group>"; };
        1387B6612A4A969700BF2F2E /* CommonDatePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonDatePickerView.swift; sourceTree = "<group>"; };
@@ -433,6 +441,10 @@
        13AFABC32A4AE492001FEA16 /* StudentRemarkTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StudentRemarkTCell.xib; sourceTree = "<group>"; };
        13B640BE2A54108B00EA33ED /* UploadImgCCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadImgCCell.swift; sourceTree = "<group>"; };
        13B640BF2A54108B00EA33ED /* UploadImgCCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = UploadImgCCell.xib; sourceTree = "<group>"; };
        13B6BB9B2ABAE000006D0C0E /* SignUpCourseVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpCourseVC.swift; sourceTree = "<group>"; };
        13B6BB9C2ABAE000006D0C0E /* SignUpCourseVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SignUpCourseVC.xib; sourceTree = "<group>"; };
        13B6BB9F2ABAE44E006D0C0E /* CourseSignUpTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseSignUpTCell.swift; sourceTree = "<group>"; };
        13B6BBA02ABAE44E006D0C0E /* CourseSignUpTCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CourseSignUpTCell.xib; sourceTree = "<group>"; };
        13BEEAE42A4D8DFB00685667 /* WelfareExchangeRecordListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelfareExchangeRecordListVC.swift; sourceTree = "<group>"; };
        13BEEAE62A4D927100685667 /* WelfareExchangeRecordSubListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelfareExchangeRecordSubListVC.swift; sourceTree = "<group>"; };
        13BEEAE82A4D92A200685667 /* ExchangeRecordTCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExchangeRecordTCell.swift; sourceTree = "<group>"; };
@@ -1169,6 +1181,8 @@
                13FBD7832A4ADD0600037156 /* StudentMentalTCell.xib */,
                13AFABC22A4AE492001FEA16 /* StudentRemarkTCell.swift */,
                13AFABC32A4AE492001FEA16 /* StudentRemarkTCell.xib */,
                13B6BB9F2ABAE44E006D0C0E /* CourseSignUpTCell.swift */,
                13B6BBA02ABAE44E006D0C0E /* CourseSignUpTCell.xib */,
            );
            path = TCell;
            sourceTree = "<group>";
@@ -1256,6 +1270,10 @@
                13AFABC02A4AE3DC001FEA16 /* StudentRemarkListVC.swift */,
                13A7F72A2AB7E0EC000B3436 /* CourseEXPVC.swift */,
                13A7F72B2AB7E0EC000B3436 /* CourseEXPVC.xib */,
                1384F6DD2AB97E5700A8B620 /* ExperienceCourseVC.swift */,
                1384F6DE2AB97E5700A8B620 /* ExperienceCourseVC.xib */,
                13B6BB9B2ABAE000006D0C0E /* SignUpCourseVC.swift */,
                13B6BB9C2ABAE000006D0C0E /* SignUpCourseVC.xib */,
            );
            path = VC;
            sourceTree = "<group>";
@@ -1407,6 +1425,7 @@
                8DFA9B772A316E9A00E99281 /* LoginRegOrForgotVC.xib in Resources */,
                136B63992A4ECDD900E594F9 /* SearchStoreDetail_1_TCell.xib in Resources */,
                1378019C2A3BF5C000414959 /* CourseOnlineSubListVC.xib in Resources */,
                13B6BBA22ABAE44E006D0C0E /* CourseSignUpTCell.xib in Resources */,
                13EAF3882AB442A4000A6F07 /* GamesDataSourceTCell.xib in Resources */,
                139A39EE2A41349800737AFB /* YardBookingTCell.xib in Resources */,
                8DA51DFC2A32C6D00085F4BA /* StoresChooseView.xib in Resources */,
@@ -1435,6 +1454,7 @@
                138667F62A428E4000484FEA /* WelfareWeeklyDetailVC.xib in Resources */,
                8DC3BE122A3803B500C91B7F /* ActivityListVC.xib in Resources */,
                8D70178E2A330E5700473C40 /* CourseDetailVC.xib in Resources */,
                1384F6E02AB97E5700A8B620 /* ExperienceCourseVC.xib in Resources */,
                1387B6642A4A96A600BF2F2E /* CommonDatePickerView.xib in Resources */,
                137801982A3B188F00414959 /* CourseOnlineSearchView.xib in Resources */,
                8DCF25BC2A3813A400DC6899 /* CityChooseSubTypeView.xib in Resources */,
@@ -1446,6 +1466,7 @@
                13EAF37E2AB42CFD000A6F07 /* GamesTCell.xib in Resources */,
                8D86DE872A3307B700A754EF /* CourseSubTypeView.xib in Resources */,
                130E402C2A4EC342003A3D75 /* SearchStoreDetailHeadView.xib in Resources */,
                13B6BB9E2ABAE000006D0C0E /* SignUpCourseVC.xib in Resources */,
                138D4CFC2A47ECAC005233E7 /* CourseInfoScheduleVC.xib in Resources */,
                1393B3972A4AD03A00B73072 /* CourseExerciseTCell.xib in Resources */,
                13D084572A406672005B05D5 /* CalendarPickerView.xib in Resources */,
@@ -1597,6 +1618,7 @@
                132876622A49A18700FC9122 /* StudentExchangeVC.swift in Sources */,
                13EAF3802AB4364F000A6F07 /* GamesIntruduceView.swift in Sources */,
                8D6810EA2A3710CE004486DE /* StudentChooseView.swift in Sources */,
                1384F6DF2AB97E5700A8B620 /* ExperienceCourseVC.swift in Sources */,
                13CCC4BB2A4A81F900DEDF19 /* StudentCourseDetailHeadView.swift in Sources */,
                13FBB8D62A4ED96C00FF70DB /* SearchStoreDetailFeedbackVC.swift in Sources */,
                8DFA9B8B2A317DAA00E99281 /* CourseVC.swift in Sources */,
@@ -1608,6 +1630,7 @@
                137B866F2AB3F87000C4D01B /* GamesPayView.swift in Sources */,
                1304B8602A4EB59F000D4F2E /* SearchStoreListVC.swift in Sources */,
                8D630BF82A31801300F0B7A8 /* SearchVC.swift in Sources */,
                13B6BBA12ABAE44E006D0C0E /* CourseSignUpTCell.swift in Sources */,
                130CE4572A4925AB00394384 /* StudentVideoCCell.swift in Sources */,
                13EAF3792AB4162A000A6F07 /* GamesSubListVC.swift in Sources */,
                8DC99C882A3701CE00D0F04E /* CouponChooseView.swift in Sources */,
@@ -1630,6 +1653,7 @@
                13BEEAEA2A4D92A200685667 /* ExchangeRecordTCell.swift in Sources */,
                1387B6622A4A969700BF2F2E /* CommonDatePickerView.swift in Sources */,
                8DAEB5522A305B2D00814766 /* Fronts.swift in Sources */,
                13B6BB9D2ABAE000006D0C0E /* SignUpCourseVC.swift in Sources */,
                138D4CFB2A47ECAC005233E7 /* CourseInfoScheduleVC.swift in Sources */,
                13272DD02A4034A300AC6481 /* YardDetailVC.swift in Sources */,
                1347D1BA2AB4457A0052082A /* GamesDataSourceSubListVC.swift in Sources */,
WanPai/Assets.xcassets/Btns/.DS_Store
Binary files differ
WanPai/Assets.xcassets/Icons/icon_calendar 1.imageset/Contents.json
New file
@@ -0,0 +1,22 @@
{
  "images" : [
    {
      "idiom" : "universal",
      "scale" : "1x"
    },
    {
      "filename" : "icon_calendar@2x.png",
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "filename" : "icon_calendar@3x.png",
      "idiom" : "universal",
      "scale" : "3x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
WanPai/Assets.xcassets/Icons/icon_calendar 1.imageset/icon_calendar@2x.png
WanPai/Assets.xcassets/Icons/icon_calendar 1.imageset/icon_calendar@3x.png
WanPai/Common/Layout/WaterFallFlowLayout.swift
@@ -17,7 +17,7 @@
    // 列数
    var cols = 4
    // 布局数组
    fileprivate lazy var layoutAttributeArray: [UICollectionViewLayoutAttributes] = []
    fileprivate var layoutAttributeArray: [UICollectionViewLayoutAttributes] = []
    // 高度数组
    fileprivate lazy var yArray: [CGFloat] = Array(repeating: self.sectionInset.top, count: cols)
    
WanPai/Common/View/PaymentCourseView.swift
@@ -20,6 +20,7 @@
    private var clouse:((Int)->Void)!
    private var id:Int!
    private var storeId:Int!
    override func awakeFromNib() {
        super.awakeFromNib()
        tableView.delegate = self
@@ -48,6 +49,21 @@
        paymentCourseView.queryData()
    }
    static func show(storeId:Int,number:Int,clouse:@escaping (Int)->Void){
        let paymentCourseView = PaymentCourseView.jq_loadNibView()
        paymentCourseView.storeId = storeId
        paymentCourseView.label_num.text = "所需课时数:\(number)"
        paymentCourseView.clouse = clouse
        paymentCourseView.frame = sceneDelegate?.window?.frame ?? .zero
        sceneDelegate?.window?.addSubview(paymentCourseView)
        paymentCourseView.cons_bottom.constant = 0
        UIView.animate(withDuration: 0.4) {
            paymentCourseView.alpha = 1
            paymentCourseView.layoutIfNeeded()
        }
        paymentCourseView.queryStoreData()
    }
    private func queryData(){
        Services.querypaymentCompetitionCourseList(id: id).subscribe(onNext: { data in
@@ -60,6 +76,17 @@
        }.disposed(by: disposeBag)
    }
    private func queryStoreData(){
        Services.getMyCourseList(storeId: storeId).subscribe(onNext: { data in
            if let models = data.data{
                self.models = models
                self.tableView.reloadData()
            }
        }) { error in
        }.disposed(by: disposeBag)
    }
    private func hidden(){
WanPai/Config/Enums.swift
@@ -34,6 +34,11 @@
    case courseNum = 4
}
enum PayStateType:Int,HandyJSONEnum{
    case unPayment = 1
    case paymented = 2
}
enum ItemType{
    case course
    case activity
@@ -320,7 +325,7 @@
    var strTitle:String{
        switch self{
            case .used:return "已使用"
            case .unUsed:return "未使用"
            case .unUsed:return "待使用"
        }
    }
}
@@ -336,6 +341,8 @@
    case begining = 2
    case complete = 3
    case cancel = 4
    case leave = 5
    case truant = 6
    var strTitle:String{
        switch self{
@@ -343,6 +350,8 @@
            case .begining:return "已开始"
            case .complete:return "已完成"
            case .cancel:return "已取消"
            case .leave:return "已请假"
            case .truant:return "旷课"
        }
    }
}
@@ -413,8 +422,22 @@
            case .experience:return "体验班"
            default:return ""
        }
    }
}
enum CardType:Int,HandyJSONEnum{
    case subCard = 1
    case monthCard = 2
    case quarterCard = 3
    case yearCard = 4
    var strTitle:String{
        switch self {
            case .subCard: return "次卡"
            case .monthCard:return "月卡"
            case .quarterCard:return "季卡"
            case .yearCard:return "年卡"
        }
    }
}
WanPai/Model/CommonModels.swift
@@ -22,6 +22,33 @@
    var distance:Double = 0
}
struct SignUpCourseItemModel:HandyJSON{
    var coursePackageId = 0
    var coursePayId = 0
    var packageImg = ""
    var courseNameStore = ""
    var courseTime = ""
    var courseTeacher = ""
    var courseNums = 0
    var payStatus:PayStateType = .unPayment
    var coursePackTypeId = 0
    var type:CourseType = .normal
}
struct SignUpCourseItemDetailModel:HandyJSON{
    var amount: Int = 0
    var coursePackageId: Int = 0
    var coursePackageName: String = ""
    var coursePayId: Int = 0
    var courseTimeFrame: String = ""
    var coverDrawing: String = ""
    var introduceDrawing: String = ""
    var payStatus: Int = 0 // 1:未支付,2:续课
    var vipAmount: Int = 0
    var weeks: String?
    var wpGold: Int = 0
}
struct CourseDetailModel:HandyJSON {
    var coverDrawing: String = ""
    var detailDrawing: String = ""
@@ -303,6 +330,7 @@
    var storeLat: String = ""
    var storeLon: String = ""
    var storeName: String = ""
    var phone:String = ""
    required init() {}
}
@@ -463,8 +491,12 @@
}
struct CouponModelRuleModel:HandyJSON{
        /// 满X元 条件
    var conditionalAmount: Double = 0
        /// 抵扣金额
    var deductionAmount: Double = 0
        /// 名称
    var experienceName: String = ""
}
@@ -493,6 +525,7 @@
    var cash:Double = 0
    var residueNum: Int = 0
    var startTime: String = ""
    var cardType:CardType! = .subCard
}
struct StoreSimpleModel:HandyJSON{
@@ -602,23 +635,34 @@
}
class WeeklyCourseModel:HandyJSON{
    var areaName: String = ""
    var courses = [WeeklyCourseItemModel]()
    var siteDistance: Double = 0
    var lat:Double = 0
    var distance:Double = 0
    var data = [WeeklyCourseItemModel]()
    var name = ""
    var lon:Double = 0
    var storeId: Int = 0
    var lat:Double = 0
    required init(){}
}
class WeeklyCourseItemModel:HandyJSON{
    var courseID: Int = 0
    var courseName: String = ""
    var detail: String = ""
    var timeStr: String = ""
    var id = 0
    var name = ""
    var intro = ""
    var type = 0 // 1:请假 2: 购课
    var time = [String]()
    var num = 0
    var money:Double = 0
    
    required init(){}
}
struct ExperienceCourseModel:HandyJSON {
    var id = 0
    var name = ""
    var num = 0
    var week = ""
    var time = [String]()
    var day = [String]()
}
struct StudentMedalInfoModel:HandyJSON{
@@ -637,3 +681,66 @@
    var name = ""
}
struct CourseCouponModel:HandyJSON{
    var auditRemark: String = ""
    var auditStatus: Int = 0
    var auditUserId: String = ""
    var cash: Float = 0.0
    var city: String = ""
    var cityCode: String = ""
    var content:CouponModelRuleModel?
    var distributionMethod: Int = 0
    var endTime: String = ""
    var id: Int = 0
    var illustrate: String = ""
    var insertTime: String = ""
    var integral: Float = 0.0
    var name: String = ""
    var pickUpQuantity: Int = 0
    var province: String = ""
    var provinceCode: String = ""
    var quantityIssued: Int = 0
    var redemptionMethod: Int = 0
    var startTime: String = ""
    var state: Int = 0
    var status: Int = 0
    var type: CouponType = .discount
    var userPopulation: Int = 0
    var useScope: Int = 0
}
struct YardBookingDetailModel:HandyJSON{
    var appUserId: Int = 0
    var booker: String = ""
    var cancelTime: String = ""
    var cancelUserId: String = ""
    var city: String = ""
    var cityCode: String = ""
    var endTime: Int = 0
    var goType: Int = 0
    var halfName: String = ""
    var id: Int = 0
    var insertTime: Int = 0
    var isHalf: Int = 0
    var nextName: String = ""
    var orderNo: String = ""
    var payMoney: Double = 0.0
    var payOrderNo: String = ""
    var payTime: Int = 0
    var payType: Int = 0
    var payUserId: String = ""
    var phone: String = ""
    var province: String = ""
    var provinceCode: String = ""
    var refundOrderNo: String = ""
    var remark: String = ""
    var siteId: Int = 0
    var startTime: Int = 0
    var state: YardBookingType = .cancel
    var status: Int = 0
    var storeId: Int = 0
    var times: String = ""
    var userCouponId: String = ""
    var voucher: String = ""
}
WanPai/Network/Services.swift
@@ -194,6 +194,15 @@
    // MARK: -- 课程相关
extension Services {
        /// 获取优惠券
    class func paymentCourseCouponList(id:Int)->Observable<BaseResponse<[CourseCouponModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/course/api/course/paymentCourseCouponList")
            .append(key: "coursePackagePaymentConfigId", value: id)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
    class func queryCourseList(typeId:Int? = nil,distanceSort:SortType? = nil,salesRanking:SortType? = nil,search:String? = nil,storeId:Int? = nil)->Observable<BaseResponse<[CourseItemModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/course/api/course/queryCourseList")
@@ -211,6 +220,13 @@
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/competition/api/competition/paymentCompetitionCourseList")
            .append(key: "id", value: id)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
    class func getMyCourseList(storeId:Int)->Observable<BaseResponse<[CourseListSubModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/course/api/startCource/getMyCourseList")
            .append(key: "storeId", value: storeId)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
@@ -318,6 +334,22 @@
extension Services{
        /// 已报名课程-课程列表
    static func registeredCourse(courseTypeId:Int? = nil,search:String? = nil)->Observable<BaseResponse<[SignUpCourseItemModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/course/api/startCource/registeredCourses")
            .append(key: "courseTypeId", value: courseTypeId)
            .append(key: "search", value: search)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
    static func registeredData(coursePayId:Int)->Observable<BaseResponse<SignUpCourseItemDetailModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/course/api/startCource/RegisteredData")
            .append(key: "coursePayId", value: coursePayId)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
        /// 开始上课:学员列表
    static func startCourceStudentList()->Observable<BaseResponse<[StudentProfile1Model]>>{
        let params = ParamsAppender.build(url: All_Url)
@@ -418,13 +450,14 @@
        /// 上课首页-课程列表
    static func weeksOfCourseDetails(stuId:Int,time:Date)->Observable<BaseResponse<[WeeklyCourseModel]>>{
    static func weeksOfCourseDetails(stuId:Int,time:Date,storeId:Int)->Observable<BaseResponse<WeeklyCourseModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/account/api/startCource/weeksOfCourseDetails")
            .interface(url: "/account/api/startCource/weeksOfCourseDetailsList")
            .append(key: "stuId", value: stuId)
            .append(key: "time", value: time.jq_format("yyyy-MM-dd"))
            .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
            .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
            .append(key: "storeId", value: storeId)
            .append(key: "latitude", value: locationTool.currentLocation?.coordinate.latitude.string)
            .append(key: "longitude", value: locationTool.currentLocation?.coordinate.longitude.string)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
@@ -443,16 +476,23 @@
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
        /// 上课主页-预约操作
        /// 上课主页-请假操作
    static func startCourceRreverse(courseId:Int,time:String,stuId:Int)->Observable<BaseResponse<SimpleModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/course/api/startCource/reverse")
            .append(key: "courseId", value: courseId)
            .append(key: "courseID", value: courseId)
            .append(key: "time", value: time)
            .append(key: "stuId", value: stuId)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
        /// 体验购课
    static func payCourseInfo(courseId:Int)->Observable<BaseResponse<ExperienceCourseModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/course/api/startCource/payCourseInfo")
            .append(key: "courseId", value: courseId)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
        /// 学员勋章详情
    static func courseStuMedal(stuId:Int)->Observable<BaseResponse<[StudentMedalInfoModel]>>{
@@ -592,7 +632,7 @@
        /// 商城中心
    class func mallList(page:Int,goodsType:ExchangeType?,rank:Sort2Type?,search:String?)->Observable<BaseResponse<[MarketMdoel]>>{
    class func mallList(page:Int,goodsType:ExchangeType?,rank:Sort2Type?,search:String?,shopId:Int?)->Observable<BaseResponse<[MarketMdoel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/account/api/useBenefit/integralMallList")
            .append(key: "goodsType", value: goodsType?.rawValue)
@@ -601,6 +641,8 @@
            .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
            .append(key: "pageNum", value: page)
            .append(key: "pageSize", value: 20)
            .append(key: "search", value: search)
            .append(key: "shopId", value: shopId)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
@@ -613,7 +655,6 @@
            .append(key: "useType", value: useType?.rawValue)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
        /// 兑换记录-详情
    class  func exchangeRecordDetail(id:Int,goodType:ExchangeType)->Observable<BaseResponse<RecordsDetailModel>>{
@@ -628,6 +669,14 @@
// MARK: -- 预约场地
extension Services{
        /// 场地预约详情
    static func siteDetail(id:Int)->Observable<BaseResponse<YardBookingDetailModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/other/api/site/queryMySiteById")
            .append(key: "id", value: id)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
        /// 获取场地类型
    static func querySiteType()->Observable<BaseResponse<[NormalSimpleModel]>>{
WanPai/Root/Course/TCell/CourseBookingTCell.swift
@@ -11,15 +11,24 @@
    var weeklyCourseItemModel:WeeklyCourseItemModel!{
        didSet{
            label_title.text = weeklyCourseItemModel.courseName
            label_time.text = weeklyCourseItemModel.timeStr
            label_info.text = weeklyCourseItemModel.detail
            label_title.text = weeklyCourseItemModel.name
            label_time.text = weeklyCourseItemModel.time.joined(separator: "|")
            label_info.text = weeklyCourseItemModel.intro
            if weeklyCourseItemModel.type == 1{
                btn_handle.setTitle("请假", for: .normal)
            }
            if weeklyCourseItemModel.type == 2{
                btn_handle.setTitle("购课", for: .normal)
            }
        }
    }
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var label_time: UILabel!
    @IBOutlet weak var label_info: UILabel!
    @IBOutlet weak var btn_handle: UIButton!
    var clickClouse:((WeeklyCourseItemModel)->Void)?
    
    override func awakeFromNib() {
WanPai/Root/Course/TCell/CourseBookingTCell.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="22129"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <objects>
@@ -23,10 +23,10 @@
                        <nil key="highlightedColor"/>
                    </label>
                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="nxc-Xp-QTZ">
                        <rect key="frame" x="124" y="32.666666666666664" width="108" height="30"/>
                        <rect key="frame" x="124" y="32.666666666666664" width="100" height="30"/>
                        <subviews>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00-00:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wnJ-m8-Cn6">
                                <rect key="frame" x="0.0" y="0.0" width="108" height="14"/>
                                <rect key="frame" x="0.0" y="0.0" width="100" height="14"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="14" id="cLS-sG-TFB"/>
                                </constraints>
@@ -35,7 +35,7 @@
                                <nil key="highlightedColor"/>
                            </label>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥0/会员扣0学时" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="trU-MW-rOB">
                                <rect key="frame" x="0.0" y="16" width="108" height="14"/>
                                <rect key="frame" x="0.0" y="16" width="100" height="14"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="14" id="xMb-Hp-9za"/>
                                </constraints>
@@ -46,7 +46,7 @@
                        </subviews>
                    </stackView>
                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hxG-tv-maw">
                        <rect key="frame" x="260" y="34.666666666666664" width="56" height="26"/>
                        <rect key="frame" x="252" y="34.666666666666664" width="56" height="26"/>
                        <color key="backgroundColor" red="0.42352941176470588" green="0.76470588235294112" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="26" id="Q86-Qa-ykm"/>
@@ -65,19 +65,25 @@
                            <action selector="bookingAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="Iyg-vB-cvj"/>
                        </connections>
                    </button>
                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_more" translatesAutoresizingMaskIntoConstraints="NO" id="ca5-70-BBW">
                        <rect key="frame" x="317" y="38.666666666666664" width="11" height="17.999999999999993"/>
                    </imageView>
                </subviews>
                <constraints>
                    <constraint firstAttribute="trailing" secondItem="hxG-tv-maw" secondAttribute="trailing" constant="21" id="8ck-B7-DOy"/>
                    <constraint firstAttribute="trailing" secondItem="hxG-tv-maw" secondAttribute="trailing" constant="29" id="8ck-B7-DOy"/>
                    <constraint firstItem="uBt-D3-uxa" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="CeF-Tg-D8i"/>
                    <constraint firstItem="uBt-D3-uxa" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="GXZ-NY-FSr"/>
                    <constraint firstItem="nxc-Xp-QTZ" firstAttribute="leading" secondItem="uBt-D3-uxa" secondAttribute="trailing" constant="10" id="Je0-bw-bFU"/>
                    <constraint firstItem="hxG-tv-maw" firstAttribute="centerY" secondItem="uBt-D3-uxa" secondAttribute="centerY" id="M3B-O2-xtI"/>
                    <constraint firstItem="nxc-Xp-QTZ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="124" id="Vc3-ne-itC"/>
                    <constraint firstItem="ca5-70-BBW" firstAttribute="centerY" secondItem="uBt-D3-uxa" secondAttribute="centerY" id="ZCf-Ly-7o6"/>
                    <constraint firstItem="hxG-tv-maw" firstAttribute="leading" secondItem="nxc-Xp-QTZ" secondAttribute="trailing" constant="28" id="dWM-Zg-Czb"/>
                    <constraint firstItem="nxc-Xp-QTZ" firstAttribute="centerY" secondItem="uBt-D3-uxa" secondAttribute="centerY" id="u6a-AJ-52h"/>
                    <constraint firstAttribute="trailing" secondItem="ca5-70-BBW" secondAttribute="trailing" constant="9" id="yex-Ry-j9c"/>
                </constraints>
            </tableViewCellContentView>
            <connections>
                <outlet property="btn_handle" destination="hxG-tv-maw" id="a8k-Dp-PW4"/>
                <outlet property="label_info" destination="trU-MW-rOB" id="apB-iN-WHi"/>
                <outlet property="label_time" destination="wnJ-m8-Cn6" id="Le5-1b-72V"/>
                <outlet property="label_title" destination="uBt-D3-uxa" id="EtQ-fq-UjT"/>
@@ -85,4 +91,7 @@
            <point key="canvasLocation" x="87.786259541984734" y="38.380281690140848"/>
        </tableViewCell>
    </objects>
    <resources>
        <image name="icon_more" width="11" height="18"/>
    </resources>
</document>
WanPai/Root/Course/TCell/CourseBooking_1_TCell.swift
@@ -23,6 +23,7 @@
            btn_exercise.isHidden = studentAppointModel.status != .complete
            btn_cancel.isHidden = studentAppointModel.status != .pedding
            btn_qrCode.isHidden = studentAppointModel.status != .pedding
            switch studentAppointModel.status{
                case .pedding:label_status.textColor = UIColor(hexStr: "#FD7402")
@@ -38,6 +39,8 @@
    @IBOutlet weak var btn_exercise: UIButton!
    @IBOutlet weak var label_status: UILabel!
    @IBOutlet weak var btn_cancel: UIButton!
    @IBOutlet weak var btn_qrCode: UIButton!
    private var disposeBag = DisposeBag()
WanPai/Root/Course/TCell/CourseBooking_1_TCell.xib
@@ -208,6 +208,7 @@
            <connections>
                <outlet property="btn_cancel" destination="7q7-IT-nb7" id="M9q-V4-ucL"/>
                <outlet property="btn_exercise" destination="Lsb-45-cHD" id="Mwu-mB-auF"/>
                <outlet property="btn_qrCode" destination="LjD-dz-nKL" id="295-0f-S3F"/>
                <outlet property="label_address" destination="ktg-rh-qFI" id="gv3-e7-O9G"/>
                <outlet property="label_courseNum" destination="5sN-Qk-YoW" id="1n8-pe-TiT"/>
                <outlet property="label_datetime" destination="Ezt-vJ-DRh" id="eSv-rM-t8Y"/>
WanPai/Root/Course/TCell/CourseSignUpTCell.swift
New file
@@ -0,0 +1,44 @@
//
//  CourseSignUpTCell.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/9/20.
//
import UIKit
import JQTools
import SDWebImage
class CourseSignUpTCell: UITableViewCell {
    @IBOutlet weak var img_cover: UIImageView!
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var label_enrollTime: UILabel!
    @IBOutlet weak var label_teachNum: UILabel!
    @IBOutlet weak var label_paymentState: UILabel!
    @IBOutlet weak var label_courseType: UILabel!
    var signUpCourseItemModel:SignUpCourseItemModel!{
        didSet{
            img_cover.sd_setImage(with: URL(string: signUpCourseItemModel.packageImg),placeholderImage: UIImage(named: "placeholder_1"))
            label_title.text = signUpCourseItemModel.courseNameStore
            label_enrollTime.text = "报名时间:" + signUpCourseItemModel.courseTime
            label_teachNum.attributedText = AttributedStringbuilder.build().add(string: "已上课课时数:", withFont: UIFont.systemFont(ofSize: 14), withColor: UIColor(hexStr: "#737373")).add(string: "\(signUpCourseItemModel.courseNums)课时", withFont: UIFont.systemFont(ofSize: 14), withColor: UIColor(hexStr: "#EA0C0C")).mutableAttributedString
            label_courseType.text = signUpCourseItemModel.type.strTitle
            label_paymentState.isHidden = signUpCourseItemModel.payStatus == .paymented
        }
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        selectionStyle = .none
    }
    override func layoutSubviews() {
        super.layoutSubviews()
        label_paymentState.jq_addCorners(corner: [.topLeft,.bottomRight], radius: 29)
    }
}
WanPai/Root/Course/TCell/CourseSignUpTCell.xib
New file
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <objects>
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="_CourseSignUpTCell" rowHeight="188" id="KGk-i7-Jjw" customClass="CourseSignUpTCell" customModule="WanPai" customModuleProvider="target">
            <rect key="frame" x="0.0" y="0.0" width="486" height="188"/>
            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
                <rect key="frame" x="0.0" y="0.0" width="486" height="188"/>
                <autoresizingMask key="autoresizingMask"/>
                <subviews>
                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="placeholder_1" translatesAutoresizingMaskIntoConstraints="NO" id="skA-8v-kDR">
                        <rect key="frame" x="14" y="22" width="106" height="141"/>
                        <constraints>
                            <constraint firstAttribute="width" constant="105" id="gdL-1V-gDh"/>
                        </constraints>
                        <userDefinedRuntimeAttributes>
                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                                <real key="value" value="9"/>
                            </userDefinedRuntimeAttribute>
                        </userDefinedRuntimeAttributes>
                    </imageView>
                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0U6-2L-7GF">
                        <rect key="frame" x="13" y="184" width="460" height="0.66666666666665719"/>
                        <color key="backgroundColor" red="0.59215686270000001" green="0.59215686270000001" blue="0.59215686270000001" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="0.5" id="RIv-mE-Uqk"/>
                        </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="9jG-tW-jzN">
                        <rect key="frame" x="130" y="20" width="346" height="22"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="22" id="Qwx-W5-t2d"/>
                        </constraints>
                        <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                        <nil key="textColor"/>
                        <nil key="highlightedColor"/>
                    </label>
                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="9" translatesAutoresizingMaskIntoConstraints="NO" id="082-6t-M2H">
                        <rect key="frame" x="131" y="51" width="119" height="49"/>
                        <subviews>
                            <stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="A86-Zm-2b1">
                                <rect key="frame" x="0.0" y="0.0" width="119" height="20"/>
                                <subviews>
                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_time" translatesAutoresizingMaskIntoConstraints="NO" id="WnX-nx-Rs5">
                                        <rect key="frame" x="0.0" y="0.0" width="16" height="20"/>
                                        <constraints>
                                            <constraint firstAttribute="width" constant="16" id="AZt-Tz-9fN"/>
                                        </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="JQC-Td-y2b">
                                        <rect key="frame" x="19" y="0.0" width="100" 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="hgr-1e-Mkn"/>
                                </constraints>
                            </stackView>
                            <stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="qty-G5-pIz">
                                <rect key="frame" x="0.0" y="29" width="119" height="20"/>
                                <subviews>
                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_calendar 1" translatesAutoresizingMaskIntoConstraints="NO" id="nez-ny-3Cx">
                                        <rect key="frame" x="0.0" y="0.0" width="16" height="20"/>
                                        <constraints>
                                            <constraint firstAttribute="width" constant="16" id="NaE-Hq-bhd"/>
                                        </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="HoK-tr-Fbj">
                                        <rect key="frame" x="19" y="0.0" width="100" 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="Y7h-EP-1zJ"/>
                                </constraints>
                            </stackView>
                        </subviews>
                    </stackView>
                    <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n2V-mw-3oN">
                        <rect key="frame" x="407" y="127" width="65" height="31"/>
                        <color key="backgroundColor" name="FE6E0D"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="31" id="58a-Oq-Tsl"/>
                            <constraint firstAttribute="width" constant="65" id="6Eo-xR-j7Q"/>
                        </constraints>
                        <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                        <state key="normal" title="详情"/>
                        <userDefinedRuntimeAttributes>
                            <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/>
                            <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB">
                                <real key="value" value="2"/>
                            </userDefinedRuntimeAttribute>
                        </userDefinedRuntimeAttributes>
                    </button>
                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="常规班" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xng-UM-o6a">
                        <rect key="frame" x="429" y="81" width="43" height="17"/>
                        <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                        <color key="textColor" name="FE6E0D"/>
                        <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="yS2-Ri-epi">
                        <rect key="frame" x="14" y="22" width="47" height="26.666666666666671"/>
                        <color key="backgroundColor" red="0.91764705882352937" green="0.047058823529411764" blue="0.047058823529411764" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="26.5" id="hpB-xz-OW0"/>
                            <constraint firstAttribute="width" constant="47" id="oPn-Fv-Zqm"/>
                        </constraints>
                        <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                        <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                        <nil key="highlightedColor"/>
                    </label>
                </subviews>
                <constraints>
                    <constraint firstItem="9jG-tW-jzN" firstAttribute="leading" secondItem="skA-8v-kDR" secondAttribute="trailing" constant="10" id="0KL-dk-3XM"/>
                    <constraint firstItem="yS2-Ri-epi" firstAttribute="top" secondItem="skA-8v-kDR" secondAttribute="top" id="18R-VB-f8t"/>
                    <constraint firstItem="0U6-2L-7GF" firstAttribute="top" secondItem="n2V-mw-3oN" secondAttribute="bottom" constant="26" id="2rb-an-jPP"/>
                    <constraint firstItem="skA-8v-kDR" firstAttribute="width" secondItem="skA-8v-kDR" secondAttribute="height" multiplier="1:1.33" id="CaL-vK-OKS"/>
                    <constraint firstItem="skA-8v-kDR" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="22" id="Eb0-Sp-QWA"/>
                    <constraint firstItem="skA-8v-kDR" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="F8n-ro-WoI"/>
                    <constraint firstItem="082-6t-M2H" firstAttribute="leading" secondItem="skA-8v-kDR" secondAttribute="trailing" constant="11" id="GRg-Ae-2bF"/>
                    <constraint firstItem="0U6-2L-7GF" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="13" id="I9d-Oe-rgC"/>
                    <constraint firstAttribute="bottom" secondItem="0U6-2L-7GF" secondAttribute="bottom" id="L5P-WV-rol"/>
                    <constraint firstAttribute="trailing" secondItem="n2V-mw-3oN" secondAttribute="trailing" constant="14" id="LLb-2k-2pv"/>
                    <constraint firstItem="9jG-tW-jzN" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="20" id="QZm-Gb-YNB"/>
                    <constraint firstItem="n2V-mw-3oN" firstAttribute="top" secondItem="xng-UM-o6a" secondAttribute="bottom" constant="29" id="Syq-ve-u64"/>
                    <constraint firstAttribute="trailing" secondItem="9jG-tW-jzN" secondAttribute="trailing" constant="10" id="eoC-4K-hq8"/>
                    <constraint firstItem="082-6t-M2H" firstAttribute="top" secondItem="9jG-tW-jzN" secondAttribute="bottom" constant="9" id="f0U-cy-08n"/>
                    <constraint firstItem="yS2-Ri-epi" firstAttribute="leading" secondItem="skA-8v-kDR" secondAttribute="leading" id="gfm-Ki-iqB"/>
                    <constraint firstAttribute="trailing" secondItem="0U6-2L-7GF" secondAttribute="trailing" constant="13" id="lC8-Ki-frT"/>
                    <constraint firstItem="xng-UM-o6a" firstAttribute="trailing" secondItem="n2V-mw-3oN" secondAttribute="trailing" id="uWJ-px-zyR"/>
                    <constraint firstItem="0U6-2L-7GF" firstAttribute="top" secondItem="skA-8v-kDR" secondAttribute="bottom" constant="21" id="z9H-7A-tml"/>
                </constraints>
            </tableViewCellContentView>
            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
            <connections>
                <outlet property="img_cover" destination="skA-8v-kDR" id="6UP-23-v8b"/>
                <outlet property="label_courseType" destination="xng-UM-o6a" id="OhT-0r-aif"/>
                <outlet property="label_enrollTime" destination="JQC-Td-y2b" id="rHR-1S-7W8"/>
                <outlet property="label_paymentState" destination="yS2-Ri-epi" id="k5Y-hA-wyq"/>
                <outlet property="label_teachNum" destination="HoK-tr-Fbj" id="cD6-aK-M7H"/>
                <outlet property="label_title" destination="9jG-tW-jzN" id="pXs-zA-I2N"/>
            </connections>
            <point key="canvasLocation" x="282.44274809160305" y="103.52112676056339"/>
        </tableViewCell>
    </objects>
    <resources>
        <image name="icon_calendar 1" width="14" height="14"/>
        <image name="icon_time" width="16" height="16"/>
        <image name="placeholder_1" width="106" height="141"/>
        <namedColor name="FE6E0D">
            <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
    </resources>
</document>
WanPai/Root/Course/VC/CourseDetailApplyVC.swift
@@ -122,7 +122,7 @@
            guard m != nil else {
                weakSelf.btn_couponInfo.setTitle("去选择", for: .normal);return
            }
            weakSelf.btn_couponInfo.setTitle("-\(m!.favorable)", for: .normal)
            weakSelf.btn_couponInfo.setTitle("-\(m!.favorable.currency())", for: .normal)
            weakSelf.changePrice(weakSelf.selectClassIndex)
        }
    }
@@ -157,7 +157,7 @@
                        var paymentPrice:Double = 0
                        switch payType {
                            case .aliPay,.wechat:
                                paymentPrice = price
                                paymentPrice = discountPrice
                            case .coin:
                                paymentPrice = Double(coin)
                            case .courseNum:break
@@ -170,8 +170,8 @@
                                        YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { [weak self] result in
                                            switch result {
                                                case .success:
                                                    self?.navigationController?.popViewController(animated: false)
                                                    let vc = PaymentResultVC(result: .success, objType: .courseApply)
//                                                    self?.navigationController?.popViewController(animated: false)
                                                    let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id)
                                                    vc.modalPresentationStyle = .fullScreen
                                                    self?.present(vc, animated: true)
                                                case .cancel:
@@ -185,8 +185,8 @@
                                        self?.navigationController?.popViewController(animated: false)
                                        break
                                    case .coin:
                                        self?.navigationController?.popViewController(animated: false)
                                        let vc = PaymentResultVC(result: .success, objType: .courseApply)
//                                        self?.navigationController?.popViewController(animated: false)
                                        let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id)
                                        vc.modalPresentationStyle = .fullScreen
                                        self?.present(vc, animated: true)
                                    case .courseNum:break
WanPai/Root/Course/VC/CourseDetailVC.swift
@@ -25,13 +25,18 @@
    @IBOutlet weak var label_courseType: UILabel!
    @IBOutlet weak var label_vaildTime: UILabel!
    @IBOutlet weak var view_vaildTime: UIView!
    @IBOutlet weak var view_handle: UIView!
    
    @IBOutlet weak var label_price: UILabel!
    @IBOutlet weak var label_originPrice: UILabel!
    @IBOutlet weak var label_vipPrice: UILabel!
    @IBOutlet weak var label_coin: UILabel!
    @IBOutlet weak var cons_handleHei: NSLayoutConstraint!
    @IBOutlet weak var btn_enroll: UIButton!
    private var id = 0
    private var signUpCourseModel:SignUpCourseItemDetailModel?
    private var detailModel:CourseDetailModel!{
        didSet{
            img_cover.sd_setImage(with: URL(string: detailModel.coverDrawing))
@@ -92,12 +97,33 @@
                label_originPrice.isHidden = true
                label_vipPrice.isHidden = true
            }
            //体验课,假期课不展示
            if detailModel.type != .normal && signUpCourseModel != nil{
                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.amount.currency()
                label_coin.alpha = m.wpGold == 0 ? 0:1
            }
        }
    }
    required init(id:Int) {
    required init(id:Int,signUpCourseModel:SignUpCourseItemDetailModel? = nil) {
        super.init(nibName: nil, bundle: nil)
        self.id = id
        self.signUpCourseModel = signUpCourseModel
    }
    required init?(coder: NSCoder) {
@@ -107,6 +133,12 @@
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "课程详情"
        if signUpCourseModel?.payStatus == 1{
            btn_enroll.setTitle("待支付", for: .normal)
        }else if signUpCourseModel?.payStatus == 2{
            btn_enroll.setTitle("续课", for: .normal)
        }
        Services.queryCourseInfo(id: id).subscribe(onNext: { data in
            if let m = data.data{
@@ -125,8 +157,17 @@
        label_type.jq_addCorners(corner: [.topLeft,.bottomLeft], radius: 4, width: 58, height: 25)
    }
    @IBAction func applyAction(_ sender: UIButton) {
        if let m = detailModel{
    @IBAction func applyAction(_ sender: UIButton) {
        //待支付订单
        if let m = signUpCourseModel,m.payStatus == 1{
            return
        }
        if let m = detailModel{
            let vc = CourseDetailApplyVC(detailModel: m)
           push(vc: vc)
        }
WanPai/Root/Course/VC/CourseDetailVC.xib
@@ -12,7 +12,9 @@
    <objects>
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CourseDetailVC" customModule="WanPai" customModuleProvider="target">
            <connections>
                <outlet property="btn_enroll" destination="xz5-Ol-6OL" id="a6w-84-ZYd"/>
                <outlet property="btn_local" destination="ejk-Ik-4lo" id="Gds-GI-U25"/>
                <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="cons_img2Height" destination="xwL-l2-kBa" id="qmV-Wg-NqV"/>
                <outlet property="img_1" destination="OTP-xt-gbB" id="ndO-dv-UDx"/>
@@ -30,6 +32,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_handle" destination="wnC-bp-nci" id="udT-Ld-nz5"/>
                <outlet property="view_vaildTime" destination="sLV-d8-3f1" id="Xd7-mZ-oTl"/>
            </connections>
        </placeholder>
WanPai/Root/Course/VC/CourseInfoVC.swift
@@ -41,7 +41,7 @@
    var startClouseHomeModel:StartClouseHomeModel?
    var weeklyCourseModels = [WeeklyCourseModel]()
    var weeklyCourseModel:WeeklyCourseModel?
    private var currentDate = Date()
    private var unDispatchNum:Int?
    private var mentals = [StudentMedalModel]()
@@ -298,10 +298,11 @@
    private func getSelectDayData(){
        if let model = startClouseHomeModel{
            Services.weeksOfCourseDetails(stuId: model.stuId, time: currentDate).subscribe(onNext: {[weak self] data in
                if let models = data.data{
                    self?.weeklyCourseModels = models
                    self?.cons_tableHei.constant = Double(models.flatMap({$0.courses}).count) * 70 + 58 * Double(models.count)
            let currentStoreId = UserDefaults.standard.value(forKey: "Current_StoreID")
            Services.weeksOfCourseDetails(stuId: model.stuId, time: currentDate,storeId: currentStoreId as! Int).subscribe(onNext: {[weak self] data in
                if let model = data.data{
                    self?.weeklyCourseModel = model
                    self?.cons_tableHei.constant = 58 + 70 * Double(model.data.count)
                    UIView.animate(withDuration: 0.3) {
                        self?.view.layoutIfNeeded()
                        self?.viewDidLayoutSubviews()
@@ -323,13 +324,18 @@
    @objc func localDetailAction(btn:UIButton){
        let index = btn.tag - 10
        let model = weeklyCourseModels[index]
        JQ_MapNavigationTool.startNav(CLLocationCoordinate2D(latitude: model.lat, longitude: model.lon), distanceName: model.areaName, scheme: "weparklife")
        if let model = weeklyCourseModel?.data[index]{
            JQ_MapNavigationTool.startNav(CLLocationCoordinate2D(latitude: weeklyCourseModel!.lat, longitude: weeklyCourseModel!.lon), distanceName: weeklyCourseModel!.name, scheme: "weparklife")
        }
    }
}
extension CourseInfoVC:UITableViewDelegate{
    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         let m = weeklyCourseModel?.data[indexPath.row]
        let vc = SignUpCourseVC()
        push(vc: vc)
    }
}
extension CourseInfoVC:UITableViewDataSource{
@@ -337,100 +343,114 @@
        let cell = tableView.dequeueReusableCell(withIdentifier: "_CourseBookingTCell") as! CourseBookingTCell
        cell.contentView.backgroundColor = UIColor(hexStr: "#F2F6F9")
        if indexPath.row == 0 && weeklyCourseModels[indexPath.section].courses.count == 1{
        if indexPath.row == 0 && weeklyCourseModel?.data.count == 1{
            cell.contentView.jq_addCorners(corner: [.allCorners], radius: 16,width: JQ_ScreenW - 48,height: 70)
        }else if indexPath.row == 0 && weeklyCourseModels[indexPath.section].courses.count != 1{
        }else if indexPath.row == 0 && weeklyCourseModel?.data.count != 1{
            cell.contentView.jq_addCorners(corner: [.topLeft,.topRight], radius: 16,width: JQ_ScreenW - 48,height: 70)
        }else if indexPath.row == weeklyCourseModels[indexPath.section].courses.count - 1{
        }else if indexPath.row == (weeklyCourseModel?.data.count ?? 0) - 1{
            cell.contentView.jq_addCorners(corner: [.bottomLeft,.bottomRight], radius: 16,width: JQ_ScreenW - 48,height: 70)
        }else{
            cell.contentView.jq_addCorners(corner: [.allCorners], radius: 0,width: JQ_ScreenW - 48,height: 70)
        }
        cell.weeklyCourseItemModel = weeklyCourseModels[indexPath.section].courses[indexPath.row]
        cell.weeklyCourseItemModel = weeklyCourseModel?.data[indexPath.row]
        cell.clickClouse = {[weak self] m in
            guard let weakSelf = self else { return }
            if let stuId = weakSelf.startClouseHomeModel?.stuId{
                Services.startCourceRreverse(courseId: m.courseID, time: weakSelf.currentDate.jq_format("yyyy-MM-dd"), stuId: stuId).subscribe(onNext: { data in
                    alertSuccess(msg: "预约成功")
                    tableView.beginUpdates()
                    weakSelf.weeklyCourseModels[indexPath.section].courses.remove(at: indexPath.row)
                    tableView.deleteRows(at: [indexPath], with: .automatic)
                    tableView.endUpdates()
                    weakSelf.cons_tableHei.constant = Double(weakSelf.weeklyCourseModels.flatMap({$0.courses}).count) * 70 + 58 * Double(weakSelf.weeklyCourseModels.count)
                    UIView.animate(withDuration: 0.3) {
                        weakSelf.view.layoutIfNeeded()
                        weakSelf.viewDidLayoutSubviews()
                    }
                }).disposed(by: weakSelf.disposeBag)
                //请假
                if m.type == 1{
                    Services.startCourceRreverse(courseId: m.id, time: weakSelf.currentDate.jq_format("yyyy-MM-dd"), stuId: stuId).subscribe(onNext: { data in
                        alertSuccess(msg: "请假成功")
                        tableView.beginUpdates()
                        weakSelf.weeklyCourseModel?.data.remove(at: indexPath.row)
                        tableView.deleteRows(at: [indexPath], with: .automatic)
                        tableView.endUpdates()
                        weakSelf.cons_tableHei.constant = 58 + 70 * Double(weakSelf.weeklyCourseModel?.data.count ?? 0)
                        UIView.animate(withDuration: 0.3) {
                            weakSelf.view.layoutIfNeeded()
                            weakSelf.viewDidLayoutSubviews()
                        }
                    }).disposed(by: weakSelf.disposeBag)
                }
                //购课
                if m.type == 2{
                    let vc = ExperienceCourseVC(courseId: m.id)
                    weakSelf.push(vc: vc)
                }
            }
        }
        return cell
    }
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return weeklyCourseModels[section].courses.count
        return weeklyCourseModel?.data.count ?? 0
}
    func numberOfSections(in tableView: UITableView) -> Int {
        return weeklyCourseModels.count
        return 1
    }
    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return 70
    }
    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        let m = weeklyCourseModels[section]
       var headerView  = tableView.dequeueReusableHeaderFooterView(withIdentifier: "header")
        if headerView == nil{
            headerView = UITableViewHeaderFooterView(reuseIdentifier: "header")
    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        if let m = weeklyCourseModel{
            var headerView  = tableView.dequeueReusableHeaderFooterView(withIdentifier: "header")
            if headerView == nil{
                headerView = UITableViewHeaderFooterView(reuseIdentifier: "header")
            let contentView = UIView()
            contentView.borderColor = UIColor(hexStr: "#E7E3E3")
            contentView.borderWidth = 1
            contentView.cornerRadius = 11
            headerView?.contentView.addSubview(contentView)
            contentView.snp.makeConstraints { make in
                make.center.equalToSuperview()
                make.left.right.equalToSuperview()
                make.height.equalTo(22)
            }
                let contentView = UIView()
                contentView.borderColor = UIColor(hexStr: "#E7E3E3")
                contentView.borderWidth = 1
                contentView.cornerRadius = 11
                headerView?.contentView.addSubview(contentView)
                contentView.snp.makeConstraints { make in
                    make.center.equalToSuperview()
                    make.left.right.equalToSuperview()
                    make.height.equalTo(22)
                }
            let label_address = UILabel()
            label_address.tag = 1000
            label_address.text = "成都非遗玩湃全科体育公园   0.0km"
            label_address.font = UIFont.systemFont(ofSize: 10, weight: .medium)
            label_address.textColor = UIColor(hexStr: "#AFB4BC")
            contentView.addSubview(label_address)
            label_address.snp.makeConstraints { make in
                make.left.equalToSuperview().offset(12)
                make.centerY.equalToSuperview()
                make.right.equalTo(-50)
            }
                let label_address = UILabel()
                label_address.tag = 1000
                label_address.text = "成都非遗玩湃全科体育公园   0.0km"
                label_address.font = UIFont.systemFont(ofSize: 10, weight: .medium)
                label_address.textColor = UIColor(hexStr: "#AFB4BC")
                contentView.addSubview(label_address)
                label_address.snp.makeConstraints { make in
                    make.left.equalToSuperview().offset(12)
                    make.centerY.equalToSuperview()
                    make.right.equalTo(-50)
                }
            let btn_detial = QMUIButton(type: .custom)
            btn_detial.setTitle("位置详情", for: .normal)
            btn_detial.tag = 10 + section
            btn_detial.addTarget(self, action: #selector(localDetailAction(btn:)), for: .touchUpInside)
            btn_detial.titleLabel?.font = UIFont.systemFont(ofSize: 10)
            btn_detial.setTitleColor(UIColor(hexStr: "#AFB4BC"), for: .normal)
            btn_detial.setImage(UIImage(named: "icon_pop"), for: .normal)
            btn_detial.imagePosition = .left
            btn_detial.spacingBetweenImageAndTitle = 3
            contentView.addSubview(btn_detial)
            btn_detial.snp.makeConstraints { make in
                make.right.equalTo(-10)
                make.centerY.equalToSuperview()
            }
        }
                let btn_detial = QMUIButton(type: .custom)
                btn_detial.setTitle("位置详情", for: .normal)
                btn_detial.tag = 10 + section
                btn_detial.addTarget(self, action: #selector(localDetailAction(btn:)), for: .touchUpInside)
                btn_detial.titleLabel?.font = UIFont.systemFont(ofSize: 10)
                btn_detial.setTitleColor(UIColor(hexStr: "#AFB4BC"), for: .normal)
                btn_detial.setImage(UIImage(named: "icon_pop"), for: .normal)
                btn_detial.imagePosition = .left
                btn_detial.spacingBetweenImageAndTitle = 3
                contentView.addSubview(btn_detial)
                btn_detial.snp.makeConstraints { make in
                    make.right.equalTo(-10)
                    make.centerY.equalToSuperview()
                }
            }
        if let label = headerView?.contentView.viewWithTag(1000) as? UILabel{
            label.text = String(format: "%@ %.1lfkm", m.areaName,m.siteDistance)
        }
            if let label = headerView?.contentView.viewWithTag(1000) as? UILabel{
                label.text = String(format: "%@ %.1lfkm", m.name,m.distance)
            }
        headerView?.contentView.backgroundColor = .white
        return headerView
    }
            headerView?.contentView.backgroundColor = .white
            return headerView
        }
        return nil
    }
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return 58
WanPai/Root/Course/VC/CourseListVC.swift
@@ -106,9 +106,19 @@
    }
    
    @IBAction func searchAction(_ sender: UIButton) {
        guard !tf_search.isEmpty else {
            alert(msg: "请输入搜索内容");return
        }
        viewModel.beginRefresh()
    }
    @IBAction func enrolledAction(_ sender: UIButton) {
        let vc = SignUpCourseVC()
        push(vc: vc)
    }
    @IBAction func crouseTypeAction(_ sender: UIButton) {
        guard viewModel.packageTypeData.value != nil else {
            alertError(msg: "分类数据加载失败,请再试一次")
@@ -201,7 +211,7 @@
extension CourseListVC:QMUITextFieldDelegate{
    func textFieldShouldReturn(_ textField: UITextField) -> Bool {
        textField.resignFirstResponder()
        refreshStatus.onNext(.beingHeaderRefresh)
        viewModel.beginRefresh()
        return true
    }
}
WanPai/Root/Course/VC/CourseListVC.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="22129"/>
        <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"/>
@@ -160,9 +160,22 @@
                    </userDefinedRuntimeAttributes>
                </view>
                <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="Uy7-FM-GEG" customClass="BaseTableView" customModule="WanPai" customModuleProvider="target">
                    <rect key="frame" x="0.0" y="169" width="393" height="649"/>
                    <rect key="frame" x="0.0" y="169" width="393" height="601"/>
                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                </tableView>
                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vNG-X1-4Fq">
                    <rect key="frame" x="0.0" y="770" width="393" height="48"/>
                    <color key="backgroundColor" name="FE6E0D"/>
                    <constraints>
                        <constraint firstAttribute="height" constant="48" id="CEx-uf-XZC"/>
                    </constraints>
                    <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="已报名课程"/>
                    <connections>
                        <action selector="enrolledAction:" destination="-1" eventType="touchUpInside" id="c1b-aj-ufD"/>
                    </connections>
                </button>
            </subviews>
            <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
@@ -171,9 +184,12 @@
                <constraint firstItem="Uy7-FM-GEG" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="RnS-Vt-AHl"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="1pn-Fd-8Ng" secondAttribute="trailing" id="S0j-qM-l39"/>
                <constraint firstItem="1pn-Fd-8Ng" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="VtA-Lr-az1"/>
                <constraint firstAttribute="trailing" secondItem="vNG-X1-4Fq" secondAttribute="trailing" id="YCo-Sp-cvO"/>
                <constraint firstItem="vNG-X1-4Fq" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="lBw-G4-izj"/>
                <constraint firstItem="vNG-X1-4Fq" firstAttribute="top" secondItem="Uy7-FM-GEG" secondAttribute="bottom" id="lX7-um-UZf"/>
                <constraint firstItem="1pn-Fd-8Ng" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="mT6-x6-x8x"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="vNG-X1-4Fq" secondAttribute="bottom" id="vYr-pU-k9N"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Uy7-FM-GEG" secondAttribute="trailing" id="vkT-06-nok"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="Uy7-FM-GEG" secondAttribute="bottom" id="ztp-Wd-zeE"/>
            </constraints>
            <point key="canvasLocation" x="38.931297709923662" y="20.422535211267608"/>
        </view>
WanPai/Root/Course/VC/ExperienceCourseVC.swift
New file
@@ -0,0 +1,115 @@
//
//  ExperienceCourseVC.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/9/19.
//
import UIKit
import JQTools
class ExperienceCourseVC: BaseVC {
    @IBOutlet weak var label_name: UILabel!
    @IBOutlet weak var label_num: UILabel!
    @IBOutlet weak var label_week: UILabel!
    @IBOutlet weak var label_times: UILabel!
    @IBOutlet weak var collectionView: UICollectionView!
    @IBOutlet weak var cons_collectionHei: NSLayoutConstraint!
    @IBOutlet weak var label_needNum: UILabel!
    private var courseId:Int!
    private var experienceCourseModel:ExperienceCourseModel?
    private var cellW:Double = 0
    private var cellH:Double = 0
    private var selectIndexs = Set<Int>()
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "体验购课"
        cellW = ((view.width - 28.0) - 11.0 * 3) / 4
        cellH = cellW * 0.439
        collectionView.delegate = self
        collectionView.dataSource = self
        collectionView.register(UINib(nibName: "Common_1_CCell", bundle: nil), forCellWithReuseIdentifier: "_Common_1_CCell")
        collectionView.contentInset = UIEdgeInsets(top: 0, left: 14, bottom: 0, right: 14)
        Services.payCourseInfo(courseId: courseId).subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
            if let model = data.data{
                self?.label_name.text = model.name
                self?.label_num.text = "\(model.num)课时"
                self?.label_week.text = model.week
                self?.label_times.text = model.time.joined(separator: "|")
                self?.experienceCourseModel = model
                self?.collectionView.reloadData()
                let h = ceil(Double(model.day.count) / 4) * weakSelf.cellH + floor(Double(model.day.count) / 4) * 11
                self?.cons_collectionHei.constant = h
            }
        }) { error in
        }.disposed(by: disposeBag)
    }
    init(courseId:Int) {
        super.init(nibName: nil, bundle: nil)
        self.courseId = courseId
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    @IBAction func paymenAction(_ sender: UIButton) {
        let n = (experienceCourseModel?.num ?? 0) * (experienceCourseModel?.time.count ?? 0) * selectIndexs.count
        if let storeId = UserDefaults.standard.value(forKey: "Current_StoreID") as? Int{
            PaymentCourseView.show(storeId: storeId, number: n) { s in
            }
        }
    }
}
extension ExperienceCourseVC:UICollectionViewDelegate{
    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        if selectIndexs.contains(indexPath.row){
            selectIndexs.remove(indexPath.row)
        }else{
            selectIndexs.insert(indexPath.row)
        }
        let n = (experienceCourseModel?.num ?? 0) * (experienceCourseModel?.time.count ?? 0) * selectIndexs.count
        label_needNum.text = "\(n)"
        collectionView.reloadData()
    }
}
extension ExperienceCourseVC:UICollectionViewDataSource{
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return experienceCourseModel?.day.count ?? 0
    }
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_Common_1_CCell", for: indexPath) as! Common_1_CCell
        let isSelected = selectIndexs.contains(indexPath.row)
        cell.label_content.text = experienceCourseModel!.day[indexPath.row]
        cell.label_content.backgroundColor = isSelected ? Def_ThemeColor : .white
        cell.label_content.textColor = isSelected ? .white : UIColor(hexStr: "#898989")
        cell.label_content.borderWidth = isSelected ? 0:1
        return cell
    }
}
extension ExperienceCourseVC:UICollectionViewDelegateFlowLayout{
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
        return 11
    }
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
        return 11
    }
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        return CGSizeMake(cellW, cellH)
    }
}
WanPai/Root/Course/VC/ExperienceCourseVC.xib
New file
@@ -0,0 +1,273 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <objects>
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ExperienceCourseVC" customModule="WanPai" customModuleProvider="target">
            <connections>
                <outlet property="collectionView" destination="aAb-vH-gKv" id="XZh-vb-HXz"/>
                <outlet property="cons_collectionHei" destination="j83-zf-wYk" id="Bwi-SR-CJ7"/>
                <outlet property="label_name" destination="cFP-un-jIB" id="zQP-Ga-obG"/>
                <outlet property="label_needNum" destination="uz9-su-Hs0" id="0xY-zw-KvC"/>
                <outlet property="label_num" destination="zEZ-Rl-yb2" id="X1R-XL-dqp"/>
                <outlet property="label_times" destination="nDH-V7-Kbb" id="MTG-9g-Zor"/>
                <outlet property="label_week" destination="2ac-mL-0CR" id="P8U-2a-oUu"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
            </connections>
        </placeholder>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
        <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <subviews>
                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="b5q-z9-ong">
                    <rect key="frame" x="0.0" y="59" width="393" height="335"/>
                    <subviews>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qw7-DM-ngL">
                            <rect key="frame" x="0.0" y="0.0" width="393" height="51"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mxz-Ro-M2G">
                                    <rect key="frame" x="13" y="50" width="380" height="1"/>
                                    <color key="backgroundColor" red="0.59215686274509804" green="0.59215686274509804" blue="0.59215686274509804" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="1" id="Rfm-D9-9bP"/>
                                    </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="nPx-yr-g0d">
                                    <rect key="frame" x="14" y="17" width="71.666666666666671" height="17"/>
                                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
                                    <nil key="textColor"/>
                                    <nil key="highlightedColor"/>
                                </label>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cFP-un-jIB">
                                    <rect key="frame" x="90.666666666666671" y="17" width="13" height="17"/>
                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                    <nil key="textColor"/>
                                    <nil key="highlightedColor"/>
                                </label>
                            </subviews>
                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                            <constraints>
                                <constraint firstAttribute="bottom" secondItem="mxz-Ro-M2G" secondAttribute="bottom" id="GcB-TI-FpE"/>
                                <constraint firstAttribute="trailing" secondItem="mxz-Ro-M2G" secondAttribute="trailing" id="GlG-3o-4IH"/>
                                <constraint firstItem="cFP-un-jIB" firstAttribute="centerY" secondItem="nPx-yr-g0d" secondAttribute="centerY" id="Nz7-lA-73Q"/>
                                <constraint firstItem="mxz-Ro-M2G" firstAttribute="leading" secondItem="qw7-DM-ngL" secondAttribute="leading" constant="13" id="TaH-ju-4cO"/>
                                <constraint firstItem="nPx-yr-g0d" firstAttribute="leading" secondItem="qw7-DM-ngL" secondAttribute="leading" constant="14" id="VzW-8y-TRk"/>
                                <constraint firstItem="cFP-un-jIB" firstAttribute="leading" secondItem="nPx-yr-g0d" secondAttribute="trailing" constant="5" id="e20-dx-d6u"/>
                                <constraint firstAttribute="height" constant="51" id="iDy-RV-nig"/>
                                <constraint firstItem="nPx-yr-g0d" firstAttribute="centerY" secondItem="qw7-DM-ngL" secondAttribute="centerY" id="sY5-qL-xyX"/>
                            </constraints>
                        </view>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cc1-X1-QhT">
                            <rect key="frame" x="0.0" y="51" width="393" height="51"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1sr-sX-Ipq">
                                    <rect key="frame" x="13" y="50" width="380" height="1"/>
                                    <color key="backgroundColor" red="0.59215686270000001" green="0.59215686270000001" blue="0.59215686270000001" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="1" id="59h-zA-fOX"/>
                                    </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="YMI-AK-UBj">
                                    <rect key="frame" x="14.000000000000004" y="17" width="57.333333333333343" height="17"/>
                                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
                                    <nil key="textColor"/>
                                    <nil key="highlightedColor"/>
                                </label>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zEZ-Rl-yb2">
                                    <rect key="frame" x="76.333333333333329" y="17" width="13" height="17"/>
                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                    <nil key="textColor"/>
                                    <nil key="highlightedColor"/>
                                </label>
                            </subviews>
                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                            <constraints>
                                <constraint firstItem="YMI-AK-UBj" firstAttribute="leading" secondItem="Cc1-X1-QhT" secondAttribute="leading" constant="14" id="1uV-LS-h99"/>
                                <constraint firstItem="zEZ-Rl-yb2" firstAttribute="leading" secondItem="YMI-AK-UBj" secondAttribute="trailing" constant="5" id="A84-Z5-wpN"/>
                                <constraint firstAttribute="trailing" secondItem="1sr-sX-Ipq" secondAttribute="trailing" id="ENF-yn-W5Y"/>
                                <constraint firstItem="1sr-sX-Ipq" firstAttribute="leading" secondItem="Cc1-X1-QhT" secondAttribute="leading" constant="13" id="J1p-TV-rIy"/>
                                <constraint firstAttribute="bottom" secondItem="1sr-sX-Ipq" secondAttribute="bottom" id="caH-GG-3EQ"/>
                                <constraint firstAttribute="height" constant="51" id="cpb-SA-Liv"/>
                                <constraint firstItem="zEZ-Rl-yb2" firstAttribute="centerY" secondItem="YMI-AK-UBj" secondAttribute="centerY" id="pkV-wT-2Mt"/>
                                <constraint firstItem="YMI-AK-UBj" firstAttribute="centerY" secondItem="Cc1-X1-QhT" secondAttribute="centerY" id="zEI-Wf-fXE"/>
                            </constraints>
                        </view>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1pI-gM-cuI">
                            <rect key="frame" x="0.0" y="102" width="393" height="79"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DG5-ef-vo4">
                                    <rect key="frame" x="13" y="78" width="380" height="1"/>
                                    <color key="backgroundColor" red="0.59215686270000001" green="0.59215686270000001" blue="0.59215686270000001" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="1" id="F3T-Vv-Jaz"/>
                                    </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="jIs-Eo-pYf">
                                    <rect key="frame" x="14" y="15" width="71.666666666666671" height="20"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="20" id="I5b-Fd-ZLX"/>
                                    </constraints>
                                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
                                    <nil key="textColor"/>
                                    <nil key="highlightedColor"/>
                                </label>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2ac-mL-0CR">
                                    <rect key="frame" x="90.666666666666671" y="15" width="13" height="20"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="20" id="9qn-vE-WlN"/>
                                    </constraints>
                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                    <nil key="textColor"/>
                                    <nil key="highlightedColor"/>
                                </label>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00-00:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nDH-V7-Kbb">
                                    <rect key="frame" x="90.666666666666657" y="43" width="86.666666666666657" height="20"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="20" id="ijd-ir-7HJ"/>
                                    </constraints>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                    <color key="textColor" name="FE6E0D"/>
                                    <nil key="highlightedColor"/>
                                </label>
                            </subviews>
                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                            <constraints>
                                <constraint firstAttribute="bottom" secondItem="DG5-ef-vo4" secondAttribute="bottom" id="1BP-R1-LFk"/>
                                <constraint firstItem="jIs-Eo-pYf" firstAttribute="leading" secondItem="1pI-gM-cuI" secondAttribute="leading" constant="14" id="6IZ-Df-T62"/>
                                <constraint firstItem="DG5-ef-vo4" firstAttribute="top" secondItem="nDH-V7-Kbb" secondAttribute="bottom" constant="15" id="8RB-I5-qIP"/>
                                <constraint firstItem="nDH-V7-Kbb" firstAttribute="top" secondItem="2ac-mL-0CR" secondAttribute="bottom" constant="8" id="E1N-2q-CuW"/>
                                <constraint firstItem="2ac-mL-0CR" firstAttribute="leading" secondItem="jIs-Eo-pYf" secondAttribute="trailing" constant="5" id="GLr-vA-TJc"/>
                                <constraint firstItem="nDH-V7-Kbb" firstAttribute="leading" secondItem="2ac-mL-0CR" secondAttribute="leading" id="ZMe-Do-YTr"/>
                                <constraint firstItem="jIs-Eo-pYf" firstAttribute="top" secondItem="1pI-gM-cuI" secondAttribute="top" constant="15" id="ajZ-nB-NIq"/>
                                <constraint firstItem="2ac-mL-0CR" firstAttribute="centerY" secondItem="jIs-Eo-pYf" secondAttribute="centerY" id="pu0-C5-rGQ"/>
                                <constraint firstAttribute="trailing" secondItem="DG5-ef-vo4" secondAttribute="trailing" id="qaM-Ky-bHB"/>
                                <constraint firstItem="DG5-ef-vo4" firstAttribute="leading" secondItem="1pI-gM-cuI" secondAttribute="leading" constant="13" id="vA4-Lf-wit"/>
                            </constraints>
                        </view>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SWn-GW-by1">
                            <rect key="frame" x="0.0" y="181" width="393" height="103"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="v2i-6n-RCr">
                                    <rect key="frame" x="13" y="102" width="380" height="1"/>
                                    <color key="backgroundColor" red="0.59215686270000001" green="0.59215686270000001" blue="0.59215686270000001" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="1" id="55u-8c-oGc"/>
                                    </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="1vX-Nj-xwW">
                                    <rect key="frame" x="14" y="15" width="100" height="20"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="20" id="Yd5-FB-pQ1"/>
                                    </constraints>
                                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
                                    <nil key="textColor"/>
                                    <nil key="highlightedColor"/>
                                </label>
                                <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="aAb-vH-gKv">
                                    <rect key="frame" x="14" y="48" width="365" height="36"/>
                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="36" id="j83-zf-wYk"/>
                                    </constraints>
                                    <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="vI8-xV-72T">
                                        <size key="itemSize" width="128" height="128"/>
                                        <size key="headerReferenceSize" width="0.0" height="0.0"/>
                                        <size key="footerReferenceSize" width="0.0" height="0.0"/>
                                        <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
                                    </collectionViewFlowLayout>
                                </collectionView>
                            </subviews>
                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                            <constraints>
                                <constraint firstItem="1vX-Nj-xwW" firstAttribute="leading" secondItem="SWn-GW-by1" secondAttribute="leading" constant="14" id="3Eg-Q7-VAj"/>
                                <constraint firstItem="v2i-6n-RCr" firstAttribute="leading" secondItem="SWn-GW-by1" secondAttribute="leading" constant="13" id="6pr-NT-W4X"/>
                                <constraint firstItem="v2i-6n-RCr" firstAttribute="top" secondItem="aAb-vH-gKv" secondAttribute="bottom" constant="18" id="LLl-rU-vtZ"/>
                                <constraint firstItem="1vX-Nj-xwW" firstAttribute="top" secondItem="SWn-GW-by1" secondAttribute="top" constant="15" id="Y6x-VO-0SQ"/>
                                <constraint firstAttribute="bottom" secondItem="v2i-6n-RCr" secondAttribute="bottom" id="alO-qh-HM2"/>
                                <constraint firstAttribute="trailing" secondItem="aAb-vH-gKv" secondAttribute="trailing" constant="14" id="ayC-DH-LhH"/>
                                <constraint firstItem="aAb-vH-gKv" firstAttribute="top" secondItem="1vX-Nj-xwW" secondAttribute="bottom" constant="13" id="hQ6-GF-56v"/>
                                <constraint firstItem="aAb-vH-gKv" firstAttribute="leading" secondItem="SWn-GW-by1" secondAttribute="leading" constant="14" id="qt0-wr-M5t"/>
                                <constraint firstAttribute="trailing" secondItem="v2i-6n-RCr" secondAttribute="trailing" id="yhP-Qg-aQP"/>
                            </constraints>
                        </view>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FNx-0c-0Fx">
                            <rect key="frame" x="0.0" y="284" width="393" height="51"/>
                            <subviews>
                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8g3-wn-7uU">
                                    <rect key="frame" x="13" y="50" width="380" height="1"/>
                                    <color key="backgroundColor" red="0.59215686270000001" green="0.59215686270000001" blue="0.59215686270000001" alpha="0.22" colorSpace="custom" customColorSpace="sRGB"/>
                                    <constraints>
                                        <constraint firstAttribute="height" constant="1" id="jtz-NB-okq"/>
                                    </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="4kU-uE-taS">
                                    <rect key="frame" x="14" y="17" width="86" height="17"/>
                                    <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
                                    <nil key="textColor"/>
                                    <nil key="highlightedColor"/>
                                </label>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uz9-su-Hs0">
                                    <rect key="frame" x="105" y="17" width="13" height="17"/>
                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                    <nil key="textColor"/>
                                    <nil key="highlightedColor"/>
                                </label>
                            </subviews>
                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                            <constraints>
                                <constraint firstItem="4kU-uE-taS" firstAttribute="centerY" secondItem="FNx-0c-0Fx" secondAttribute="centerY" id="13U-WC-eQ5"/>
                                <constraint firstItem="8g3-wn-7uU" firstAttribute="leading" secondItem="FNx-0c-0Fx" secondAttribute="leading" constant="13" id="Vwz-vD-7Ud"/>
                                <constraint firstItem="uz9-su-Hs0" firstAttribute="leading" secondItem="4kU-uE-taS" secondAttribute="trailing" constant="5" id="WfV-AK-8BD"/>
                                <constraint firstItem="uz9-su-Hs0" firstAttribute="centerY" secondItem="4kU-uE-taS" secondAttribute="centerY" id="eoJ-PX-DeB"/>
                                <constraint firstAttribute="bottom" secondItem="8g3-wn-7uU" secondAttribute="bottom" id="gHl-2P-ZA6"/>
                                <constraint firstAttribute="height" constant="51" id="q3O-QA-3vk"/>
                                <constraint firstAttribute="trailing" secondItem="8g3-wn-7uU" secondAttribute="trailing" id="ygi-8h-0IA"/>
                                <constraint firstItem="4kU-uE-taS" firstAttribute="leading" secondItem="FNx-0c-0Fx" secondAttribute="leading" constant="14" id="yzn-fa-pC4"/>
                            </constraints>
                        </view>
                    </subviews>
                </stackView>
                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Cfs-G0-9jv">
                    <rect key="frame" x="0.0" y="770" width="393" height="48"/>
                    <color key="backgroundColor" name="FE6E0D"/>
                    <constraints>
                        <constraint firstAttribute="height" constant="48" id="UAU-dV-8r7"/>
                    </constraints>
                    <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="去支付"/>
                    <connections>
                        <action selector="paymenAction:" destination="-1" eventType="touchUpInside" id="XBN-FI-Dd7"/>
                    </connections>
                </button>
            </subviews>
            <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
            <constraints>
                <constraint firstItem="Cfs-G0-9jv" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="1eY-uh-Spz"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="b5q-z9-ong" secondAttribute="trailing" id="2Si-nb-vFN"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="Cfs-G0-9jv" secondAttribute="bottom" id="3dF-uQ-CWU"/>
                <constraint firstItem="b5q-z9-ong" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="BB8-VB-Mk2"/>
                <constraint firstItem="b5q-z9-ong" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="GDJ-jp-TfU"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Cfs-G0-9jv" secondAttribute="trailing" id="n1x-tn-ZgW"/>
            </constraints>
            <point key="canvasLocation" x="64.885496183206101" y="20.422535211267608"/>
        </view>
    </objects>
    <resources>
        <namedColor name="FE6E0D">
            <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
    </resources>
</document>
WanPai/Root/Course/VC/SignUpCourseVC.swift
New file
@@ -0,0 +1,142 @@
//
//  SignUpCourseVC.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/9/20.
//
import UIKit
import QMUIKit
import JQTools
import RxSwift
import RxDataSources
import RxCocoa
class SignUpCourseViewModel:RefreshModel<SignUpCourseItemModel>{
    var packageTypeData = BehaviorRelay<[NormalSimpleModel]?>(value: nil)
    var selectPackeType = BehaviorRelay<NormalSimpleModel?>(value: nil)
    var courseTypeId = BehaviorRelay<Int?>(value: nil)
    var search = BehaviorRelay<String?>(value: nil)
    override func api() -> (Observable<BaseResponse<[SignUpCourseItemModel]>>)? {
        return Services.registeredCourse(courseTypeId: courseTypeId.value, search: search.value)
    }
    func getDefaultData(){
        Services.coursePackageType().subscribe(onNext: {[weak self] data in
            if var datas = data.data{
                datas.insert(NormalSimpleModel(id: -1, name: "全部"), at: 0)
                self?.packageTypeData.accept(datas)
            }
        }) { error in
        }.disposed(by: disposeBag)
    }
}
class SignUpCourseVC: BaseVC {
    @IBOutlet weak var view_topView: UIView!
    @IBOutlet weak var tf_search: QMUITextField!
    @IBOutlet weak var tableView: BaseTableView!
    @IBOutlet weak var btn_courseType: QMUIButton!
    private var showSubTypeView:CourseSubTypeView?
    private let viewModel = SignUpCourseViewModel()
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "已报名课程"
        viewModel.getDefaultData()
        viewModel.beginRefresh()
    }
    override func setUI() {
        btn_courseType.imagePosition = .right
        btn_courseType.spacingBetweenImageAndTitle = 5
        tableView.delegate = self
        tableView.dataSource = self
        tableView.register(UINib(nibName: "CourseSignUpTCell", bundle: nil), forCellReuseIdentifier: "_CourseSignUpTCell")
        tableView.separatorStyle = .none
        tf_search.delegate = self
        viewModel.configure(tableView,needMore: false)
        tableView.jq_setEmptyView()
    }
    override func setRx() {
        tf_search.rx.controlEvent(.editingDidEnd).subscribe(onNext: { [weak self] in
            if self?.tf_search.text?.isEmpty ?? true{
                self?.viewModel.search.accept(nil)
            }else{
                self?.viewModel.search.accept(self?.tf_search.text!)
            }
        }).disposed(by: disposeBag)
    }
    private func cleanOther(){
        btn_courseType.isSelected = false
    }
    @IBAction func crouseTypeAction(_ sender: UIButton) {
        guard !sender.isSelected else {return}
        cleanOther()
        sender.isSelected = true
        showSubTypeView = CourseSubTypeView.show(inView: self.view, afterView: view_topView, items: viewModel.packageTypeData.value!,selectModel: viewModel.selectPackeType.value) { [weak self] m in
            if m.name != "全部"{
                sender.setTitle(m.name, for: .normal)
                self?.viewModel.selectPackeType.accept(m)
            }else{
                sender.setTitle("课程类型", for: .normal)
                self?.viewModel.selectPackeType.accept(nil)
            }
            sender.isSelected = false
            self?.viewModel.beginRefresh()
        } closeClouse: {
            sender.isSelected = false
        }
    }
    @IBAction func searchAction(_ sender: UIButton) {
        viewModel.beginRefresh()
    }
}
extension SignUpCourseVC:UITableViewDelegate{
    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let item = viewModel.dataSource.value[indexPath.row]
        Services.registeredData(coursePayId: item.coursePayId).subscribe(onNext: {data in
            if let m = data.data{
                let vc = CourseDetailVC(id: item.coursePackageId,signUpCourseModel: m)
                self.push(vc: vc)
            }
        }) { error in
        }.disposed(by: disposeBag)
    }
}
extension SignUpCourseVC:UITableViewDataSource{
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "_CourseSignUpTCell") as! CourseSignUpTCell
        cell.signUpCourseItemModel = viewModel.dataSource.value[indexPath.row]
        return cell
    }
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return viewModel.dataSource.value.count
    }
}
extension SignUpCourseVC:QMUITextFieldDelegate{
    func textFieldShouldReturn(_ textField: UITextField) -> Bool {
        textField.resignFirstResponder()
        viewModel.beginRefresh()
        return true
    }
}
WanPai/Root/Course/VC/SignUpCourseVC.xib
New file
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <objects>
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SignUpCourseVC" customModule="WanPai" customModuleProvider="target">
            <connections>
                <outlet property="btn_courseType" destination="tTc-fK-ck9" id="5xi-U2-LOs"/>
                <outlet property="tableView" destination="2nE-6T-cdD" id="IZ4-5s-Tpa"/>
                <outlet property="tf_search" destination="6Cj-8V-y0Z" id="PQL-V6-pPR"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_topView" destination="nMo-PV-Mr6" id="eYf-5K-aIO"/>
            </connections>
        </placeholder>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
        <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <subviews>
                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nMo-PV-Mr6">
                    <rect key="frame" x="0.0" y="59" width="393" height="105"/>
                    <subviews>
                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="31H-AT-hGv">
                            <rect key="frame" x="14" y="15" width="326" height="38"/>
                            <subviews>
                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_search" translatesAutoresizingMaskIntoConstraints="NO" id="xDn-Uh-hs3">
                                    <rect key="frame" x="4" y="10.666666666666671" width="17" height="17"/>
                                </imageView>
                                <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入课程名称,门店名称" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="6Cj-8V-y0Z" customClass="QMUITextField">
                                    <rect key="frame" x="25" y="0.0" width="291" height="38"/>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                    <textInputTraits key="textInputTraits" returnKeyType="search"/>
                                    <userDefinedRuntimeAttributes>
                                        <userDefinedRuntimeAttribute type="color" keyPath="placeholderColor">
                                            <color key="value" red="0.7843137255" green="0.79215686269999996" blue="0.83921568629999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                        </userDefinedRuntimeAttribute>
                                    </userDefinedRuntimeAttributes>
                                </textField>
                            </subviews>
                            <color key="backgroundColor" red="0.96470588239999999" green="0.96470588239999999" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                            <constraints>
                                <constraint firstItem="xDn-Uh-hs3" firstAttribute="centerY" secondItem="31H-AT-hGv" secondAttribute="centerY" id="2b8-as-sQC"/>
                                <constraint firstAttribute="trailing" secondItem="6Cj-8V-y0Z" secondAttribute="trailing" constant="10" id="Lb1-de-99q"/>
                                <constraint firstItem="6Cj-8V-y0Z" firstAttribute="top" secondItem="31H-AT-hGv" secondAttribute="top" id="M3L-4I-USv"/>
                                <constraint firstAttribute="height" constant="38" id="RfL-3n-1CG"/>
                                <constraint firstItem="6Cj-8V-y0Z" firstAttribute="leading" secondItem="xDn-Uh-hs3" secondAttribute="trailing" constant="4" id="Yhe-iy-kzw"/>
                                <constraint firstItem="xDn-Uh-hs3" firstAttribute="leading" secondItem="31H-AT-hGv" secondAttribute="leading" constant="4" id="maE-Gr-ZFG"/>
                                <constraint firstAttribute="bottom" secondItem="6Cj-8V-y0Z" secondAttribute="bottom" id="nfq-8u-plo"/>
                            </constraints>
                            <userDefinedRuntimeAttributes>
                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                                    <real key="value" value="4.1600000000000001"/>
                                </userDefinedRuntimeAttribute>
                            </userDefinedRuntimeAttributes>
                        </view>
                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="v4T-Dq-znS">
                            <rect key="frame" x="340" y="15" width="53" height="38"/>
                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                            <state key="normal" title="搜索">
                                <color key="titleColor" name="FE6E0D"/>
                            </state>
                            <connections>
                                <action selector="searchAction:" destination="-1" eventType="touchUpInside" id="Jqz-wI-73J"/>
                            </connections>
                        </button>
                        <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="ljY-Lp-0lq">
                            <rect key="frame" x="14" y="53" width="86" height="52"/>
                            <subviews>
                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tTc-fK-ck9" customClass="QMUIButton">
                                    <rect key="frame" x="0.0" y="0.0" width="86" height="52"/>
                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                    <state key="normal" title="课程类型" image="icon_down_arrow">
                                        <color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                    </state>
                                    <state key="selected" image="icon_down_arrow_s">
                                        <color key="titleColor" name="FE6E0D"/>
                                    </state>
                                    <connections>
                                        <action selector="crouseTypeAction:" destination="-1" eventType="touchUpInside" id="p3g-kr-8yp"/>
                                    </connections>
                                </button>
                            </subviews>
                        </stackView>
                    </subviews>
                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                    <constraints>
                        <constraint firstAttribute="height" constant="105" id="8bd-YN-Fpb"/>
                        <constraint firstAttribute="trailing" secondItem="v4T-Dq-znS" secondAttribute="trailing" id="CMf-BL-cz9"/>
                        <constraint firstItem="ljY-Lp-0lq" firstAttribute="top" secondItem="31H-AT-hGv" secondAttribute="bottom" id="DbX-jy-RwF"/>
                        <constraint firstAttribute="trailing" secondItem="31H-AT-hGv" secondAttribute="trailing" constant="53" id="GVS-iY-fCp"/>
                        <constraint firstItem="31H-AT-hGv" firstAttribute="leading" secondItem="nMo-PV-Mr6" secondAttribute="leading" constant="14" id="PNy-hn-3GG"/>
                        <constraint firstAttribute="bottom" secondItem="ljY-Lp-0lq" secondAttribute="bottom" id="R9G-yl-9uF"/>
                        <constraint firstItem="ljY-Lp-0lq" firstAttribute="leading" secondItem="nMo-PV-Mr6" secondAttribute="leading" constant="14" id="RyA-cD-Qh4"/>
                        <constraint firstItem="v4T-Dq-znS" firstAttribute="leading" secondItem="31H-AT-hGv" secondAttribute="trailing" id="SbR-u4-f2g"/>
                        <constraint firstItem="v4T-Dq-znS" firstAttribute="bottom" secondItem="31H-AT-hGv" secondAttribute="bottom" id="l4D-46-MH0"/>
                        <constraint firstItem="v4T-Dq-znS" firstAttribute="top" secondItem="31H-AT-hGv" secondAttribute="top" id="r7G-0T-NaC"/>
                        <constraint firstItem="31H-AT-hGv" firstAttribute="top" secondItem="nMo-PV-Mr6" secondAttribute="top" constant="15" id="xLA-bm-rn7"/>
                    </constraints>
                    <userDefinedRuntimeAttributes>
                        <userDefinedRuntimeAttribute type="size" keyPath="shadowOffset">
                            <size key="value" width="0.0" height="2"/>
                        </userDefinedRuntimeAttribute>
                        <userDefinedRuntimeAttribute type="color" keyPath="shadowColor">
                            <color key="value" red="0.87450980389999999" green="0.87450980389999999" blue="0.87450980389999999" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
                        </userDefinedRuntimeAttribute>
                        <userDefinedRuntimeAttribute type="number" keyPath="shadowOpacity">
                            <real key="value" value="1"/>
                        </userDefinedRuntimeAttribute>
                    </userDefinedRuntimeAttributes>
                </view>
                <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="2nE-6T-cdD" customClass="BaseTableView" customModule="WanPai" customModuleProvider="target">
                    <rect key="frame" x="0.0" y="174" width="393" height="644"/>
                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                </tableView>
            </subviews>
            <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
            <constraints>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="nMo-PV-Mr6" secondAttribute="trailing" id="1qG-Hh-VjT"/>
                <constraint firstItem="nMo-PV-Mr6" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="2Ut-ap-CiK"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="2nE-6T-cdD" secondAttribute="bottom" id="KLY-P4-vUv"/>
                <constraint firstItem="2nE-6T-cdD" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="NYW-uN-uQn"/>
                <constraint firstItem="nMo-PV-Mr6" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="cFJ-B7-kMB"/>
                <constraint firstItem="2nE-6T-cdD" firstAttribute="top" secondItem="nMo-PV-Mr6" secondAttribute="bottom" constant="10" id="nLr-uq-oTT"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="2nE-6T-cdD" secondAttribute="trailing" id="x7h-2h-WQM"/>
            </constraints>
            <point key="canvasLocation" x="138" y="21"/>
        </view>
    </objects>
    <resources>
        <image name="icon_down_arrow" width="20" height="14"/>
        <image name="icon_down_arrow_s" width="20" height="14"/>
        <image name="icon_search" width="17" height="17"/>
        <namedColor name="FE6E0D">
            <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
    </resources>
</document>
WanPai/Root/Home/VC/HomeVC.swift
@@ -96,6 +96,12 @@
    }
    override func setRx() {
        viewModel.storeId.subscribe(onNext: { id in
            UserDefaults.standard.set(id, forKey: "Current_StoreID")
            UserDefaults.standard.synchronize()
        }) { error in
        }.disposed(by: disposeBag)
    }
    
WanPai/Root/Other/CCell/CouponCCell.swift
@@ -9,9 +9,35 @@
class CouponCCell: UICollectionViewCell {
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    @IBOutlet weak var label_money: UILabel!
    @IBOutlet weak var label_name: UILabel!
    @IBOutlet weak var label_fullMinus: UILabel!
    @IBOutlet weak var label_vaildTime: UILabel!
    var courseCouponModel:CourseCouponModel!{
        didSet{
            if let m = courseCouponModel{
                label_money.text = m.name
                label_name.text = m.type.rawTitle
                switch m.type {
                    case .discount:
                        label_fullMinus.isHidden = false
                        label_fullMinus.text = String(format: "满%.2lf元可用", m.content?.conditionalAmount ?? 0)
                    case .voucher:
                        label_fullMinus.isHidden = true
                    case .experience:
                        label_fullMinus.isHidden = true
                    case .none:
                        label_fullMinus.isHidden = true
                }
                label_vaildTime.text = String(format: "有效期:%@-%@", courseCouponModel.startTime,courseCouponModel.endTime)
            }
        }
    }
    override func awakeFromNib() {
        super.awakeFromNib()
    }
}
WanPai/Root/Other/CCell/CouponCCell.xib
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" 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="21505"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22129"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -29,6 +30,9 @@
                            </imageView>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0元" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="943-VV-dPw">
                                <rect key="frame" x="5" y="5" width="90" height="93"/>
                                <constraints>
                                    <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="90" id="uhd-ts-dAs"/>
                                </constraints>
                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
                                <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                <nil key="highlightedColor"/>
@@ -84,6 +88,12 @@
                                    <userDefinedRuntimeAttribute type="number" keyPath="jq_xibCornerRadius">
                                        <real key="value" value="2"/>
                                    </userDefinedRuntimeAttribute>
                                    <userDefinedRuntimeAttribute type="color" keyPath="ld_borderColorXIB">
                                        <color key="value" name="FE6E0D"/>
                                    </userDefinedRuntimeAttribute>
                                    <userDefinedRuntimeAttribute type="number" keyPath="ld_borderWidthXIB">
                                        <real key="value" value="1"/>
                                    </userDefinedRuntimeAttribute>
                                </userDefinedRuntimeAttributes>
                            </button>
                        </subviews>
@@ -118,12 +128,21 @@
                <constraint firstItem="mnx-Jv-DFb" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="10" id="jcL-zh-Hb4"/>
            </constraints>
            <size key="customSize" width="417" height="123"/>
            <connections>
                <outlet property="label_fullMinus" destination="gEm-JU-PoK" id="Hj9-Wb-JqI"/>
                <outlet property="label_money" destination="943-VV-dPw" id="tMl-vP-5mZ"/>
                <outlet property="label_name" destination="OYF-uW-SFs" id="bRA-ib-61b"/>
                <outlet property="label_vaildTime" destination="7Qw-dg-xym" id="rrz-7l-kG2"/>
            </connections>
            <point key="canvasLocation" x="319.84732824427482" y="44.014084507042256"/>
        </collectionViewCell>
    </objects>
    <resources>
        <image name="icon_coupon_footer" width="262" height="100"/>
        <image name="icon_coupon_header" width="100" height="100"/>
        <image name="icon_coupon_footer" width="19.333333969116211" height="46.666667938232422"/>
        <image name="icon_coupon_header" width="20.333333969116211" height="38.666667938232422"/>
        <namedColor name="FE6E0D">
            <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
        <systemColor name="systemBackgroundColor">
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
WanPai/Root/Other/VC/PaymentResultVC.swift
@@ -32,13 +32,16 @@
    
    private var result:PaymentResult!
    private var objType:PaymentObjType!
    private var courseConfigId:Int?
    private var handleVC:UIViewController?
    required init(result:PaymentResult,objType:PaymentObjType,handleVC:UIViewController? = nil) {
    private var models = [CourseCouponModel]()
    required init(result:PaymentResult,objType:PaymentObjType,handleVC:UIViewController? = nil,courseConfigId:Int? = nil) {
        super.init(nibName: nil, bundle: nil)
        self.result = result
        self.objType = objType
        self.handleVC = handleVC
        self.courseConfigId = courseConfigId
    }
    
    required init?(coder: NSCoder) {
@@ -66,8 +69,18 @@
            case .none:break
            }
        case .courseApply:
                //课时购买
            btn_backHome.isHidden = true
            collectionView.isHidden =  true
                if let id = courseConfigId{
                    Services.paymentCourseCouponList(id: id).subscribe(onNext: { data in
                        if let models = data.data{
                            self.models = models
                            self.collectionView.reloadData()
                        }
                    }) { error in
                    }.disposed(by: disposeBag)
                }
            switch result {
            case .fail(let str):
                btn_again.setTitle("再次支付", for: .normal)
@@ -150,34 +163,46 @@
        switch str{
            case "查看预约":
                dismiss(animated:true) {[weak self] in
                dismiss(animated:true){ [weak self] in
                    let vc = YardBookingListVC()
                    self?.handleVC?.navigationController?.pushViewController(vc)
                }
            case "立即预约":
                handleVC?.navigationController?.tabBarController?.selectedIndex = 1
                handleVC?.navigationController?.popToRootViewController(animated: true)
                dismiss(animated:true)
            default:break
        }
    }
    
    
    @IBAction func backAction(_ sender: UIButton) {
        dismiss(animated: true) {
            self.navigationController?.popToRootViewController(animated: true)
        if let handleVC{
            handleVC.navigationController?.popToRootViewController(animated: true)
        }
        dismiss(animated: true)
    }
}
extension PaymentResultVC:UICollectionViewDelegate{
    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        dismiss(animated: true)
        handleVC?.navigationController?.popToRootViewController(animated: false)
        let vc = WelfareCouponsListVC()
        vc.hidesBottomBarWhenPushed = true
        JQ_currentViewController().jq_push(vc: vc)
    }
}
extension PaymentResultVC:UICollectionViewDataSource{
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return 5
        return models.count
    }
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_CouponCCell", for: indexPath) as! CouponCCell
        let model = models[indexPath.row]
        cell.courseCouponModel = model
        return cell
    }
    
WanPai/Root/Other/VC/PaymentResultVC.xib
@@ -36,7 +36,7 @@
                    <nil key="highlightedColor"/>
                </label>
                <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="6ci-0V-ZT4">
                    <rect key="frame" x="0.0" y="228" width="393" height="471"/>
                    <rect key="frame" x="0.0" y="289" width="393" height="410"/>
                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                    <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="7br-70-TUT">
                        <size key="itemSize" width="128" height="128"/>
@@ -130,8 +130,8 @@
                <constraint firstItem="RK0-X7-xSS" firstAttribute="top" secondItem="Fv7-HV-ioC" secondAttribute="bottom" constant="20" id="6Ii-mh-axn"/>
                <constraint firstItem="Fv7-HV-ioC" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="49" id="Fj8-kC-rK8"/>
                <constraint firstItem="meY-wl-nNE" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="JNm-aR-XPU"/>
                <constraint firstItem="6ci-0V-ZT4" firstAttribute="top" secondItem="c1t-oI-xet" secondAttribute="bottom" constant="10" id="LuL-yl-IA1"/>
                <constraint firstItem="c1t-oI-xet" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="Pm4-Fl-Wha"/>
                <constraint firstItem="6ci-0V-ZT4" firstAttribute="top" secondItem="RK0-X7-xSS" secondAttribute="bottom" constant="43" id="SRc-4G-F63"/>
                <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="meY-wl-nNE" secondAttribute="bottom" constant="71" id="UnI-Ey-Pc1"/>
                <constraint firstItem="RK0-X7-xSS" firstAttribute="centerX" secondItem="Fv7-HV-ioC" secondAttribute="centerX" id="XBX-DI-MSD"/>
                <constraint firstItem="meY-wl-nNE" firstAttribute="top" secondItem="6ci-0V-ZT4" secondAttribute="bottom" constant="10" id="Y9C-4j-R40"/>
@@ -139,7 +139,7 @@
                <constraint firstItem="6ci-0V-ZT4" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="gBF-6S-2xb"/>
                <constraint firstItem="c1t-oI-xet" firstAttribute="top" secondItem="RK0-X7-xSS" secondAttribute="bottom" constant="54" id="ike-m8-wcL"/>
            </constraints>
            <point key="canvasLocation" x="104" y="21"/>
            <point key="canvasLocation" x="103.05343511450381" y="20.422535211267608"/>
        </view>
    </objects>
    <resources>
WanPai/Root/Welfare/TCell/ExchangeRecordTCell.swift
@@ -16,6 +16,14 @@
            label_state.text = recordsModel.useStatus.strTitle
            label_duetime.text = String(format: "有效期:%@-%@", recordsModel.startTime,recordsModel.endTime)
            label_type.text = recordsModel.goodType.strTitle
            label_state.textColor = recordsModel.useStatus == .used ? UIColor(hexStr: "#7A7A7A"):Def_ThemeColor
            switch recordsModel.goodType {
                case .ticket:
                    btn_qrCode.isHidden = recordsModel.useStatus == .used
                default:
                    btn_qrCode.isHidden = true
            }
            switch recordsModel.requiredType{
                case.coin:
@@ -34,7 +42,8 @@
    @IBOutlet weak var label_duetime: UILabel!
    @IBOutlet weak var label_price: UILabel!
    @IBOutlet weak var label_type: UILabel!
    @IBOutlet weak var btn_qrCode: UIButton!
    override func awakeFromNib() {
        super.awakeFromNib()
WanPai/Root/Welfare/TCell/ExchangeRecordTCell.xib
@@ -158,6 +158,7 @@
                </constraints>
            </tableViewCellContentView>
            <connections>
                <outlet property="btn_qrCode" destination="10F-7G-W2y" id="A9L-6i-tjR"/>
                <outlet property="label_duetime" destination="cwb-7C-fPf" id="yvY-PR-dni"/>
                <outlet property="label_price" destination="q70-lq-Dux" id="GuC-dt-G90"/>
                <outlet property="label_state" destination="B9F-rx-tLl" id="b3p-on-S1O"/>
WanPai/Root/Welfare/VC/CoinStoreCenterVC.swift
@@ -14,9 +14,10 @@
    var goodsType = BehaviorRelay<ExchangeType?>(value: nil)
    var rank = BehaviorRelay<Sort2Type?>(value: nil)
    let search = BehaviorRelay<String?>(value: nil)
    let shopId = BehaviorRelay<Int?>(value: nil)
    override func api() -> (Observable<BaseResponse<[MarketMdoel]>>)? {
        Services.mallList(page:page,goodsType: goodsType.value, rank: rank.value, search: search.value)
        Services.mallList(page:page,goodsType: goodsType.value, rank: rank.value, search: search.value, shopId: shopId.value)
    }
}
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift
@@ -33,7 +33,9 @@
    @IBOutlet weak var cons_webHei: NSLayoutConstraint!
    @IBOutlet weak var btn_exchange: UIButton!
    @IBOutlet weak var view_students: UIView!
    @IBOutlet weak var view_ticketType: UIView!
    @IBOutlet weak var label_ticketType: UILabel!
    private var bannerView:CommonBannerView = {
        let banner = CommonBannerView()
        return banner
@@ -77,6 +79,8 @@
                self?.view_courseHours.isHidden = model.courseHours == 0
                self?.view_exchangeStore.isHidden = model.exchangeAddrType != .store
                self?.view_students.isHidden = model.goodType != .course
                self?.view_ticketType.isHidden = model.goodType != .ticket
                self?.label_ticketType.text = model.cardType.strTitle
                switch model.exchangeType{
                    case .coin:
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.xib
@@ -26,6 +26,7 @@
                <outlet property="label_residueNum" destination="DpQ-7A-Y6o" id="wV8-M0-a7H"/>
                <outlet property="label_startTime" destination="RwQ-MS-2sL" id="n3f-g9-OqW"/>
                <outlet property="label_storeName" destination="4dK-Zl-Jdj" id="yAy-e3-kqY"/>
                <outlet property="label_ticketType" destination="2P3-z8-af9" id="p5K-WI-yNJ"/>
                <outlet property="label_title" destination="Xbv-xb-Opx" id="wSK-g7-wYb"/>
                <outlet property="tableView" destination="Iqj-NB-Sdv" id="whY-na-FVo"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
@@ -33,6 +34,7 @@
                <outlet property="view_courseHours" destination="FLV-Kf-Avt" id="oDU-BH-bZj"/>
                <outlet property="view_exchangeStore" destination="PF8-aV-ew9" id="x4R-3l-zbD"/>
                <outlet property="view_students" destination="0QQ-kQ-0an" id="cy7-oc-Uw9"/>
                <outlet property="view_ticketType" destination="DXe-Ah-4gm" id="Zdx-tC-AKo"/>
                <outlet property="webView" destination="tQn-lc-7cb" id="xcY-cg-bKR"/>
            </connections>
        </placeholder>
WanPai/Root/Welfare/View/CoinStoreHeadView.swift
@@ -108,6 +108,8 @@
    @IBAction func storeAction(_ sender: UIButton) {
        StoresChooseView.show { [weak self] storeId,storeName in
            self?.btn_store.setTitle(storeName, for: .normal)
            self?.viewModel.shopId.accept(storeId)
            self?.viewModel.beginRefresh()
        }
    }
WanPai/Root/Yard/TCell/YardBookingTCell.swift
@@ -118,7 +118,7 @@
//    }
    @IBAction func detailAction(_ sender: UIButton) {
        let vc = YardBookingDetailVC()
        let vc = YardBookingDetailVC(model: yardBookingModel)
        JQ_currentNavigationController().pushViewController(vc, animated: true)
    }
}
WanPai/Root/Yard/VC/YardBookingDetailVC.swift
@@ -10,16 +10,97 @@
class YardBookingDetailVC: BaseVC {
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var label_type: UILabel!
    @IBOutlet weak var label_address: UILabel!
    @IBOutlet weak var label_yardName: UILabel!
    @IBOutlet weak var label_bookingType: UILabel!
    @IBOutlet weak var label_halfYardName: UILabel!
    @IBOutlet weak var label_bookingPerson: UILabel!
    @IBOutlet weak var label_contact: UILabel!
    @IBOutlet weak var label_paymentPrice: UILabel!
    @IBOutlet weak var label_bookingTime: UILabel!
    @IBOutlet weak var label_paymentTime: UILabel!
    @IBOutlet weak var label_usedState: UILabel!
    @IBOutlet weak var img_QRCode: UIImageView!
    @IBOutlet weak var view_qrCode: UIView!
    @IBOutlet weak var btn_cancel: UIButton!
    @IBOutlet weak var btn_payment: UIButton!
    var yardBookingModel:YardBookingModel!
    init(model:YardBookingModel) {
        super.init(nibName: nil, bundle: nil)
        self.yardBookingModel = model
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "我的预约"
        label_title.text = yardBookingModel.name
        label_address.text = String(format: "%@(%@)", yardBookingModel.storeName,yardBookingModel.storeAddress)
        label_type.text = yardBookingModel.siteTypeName
        img_QRCode.image = QRCodeImage(string: "1", size: 132 * sceneDelegate!.window!.screen.scale)
        getData()
    }
    @IBAction func cancelAction(_ sender: UIButton) {
    private func getData(){
        Services.siteDetail(id: yardBookingModel.id).subscribe(onNext: {[weak self] data in
            if let model = data.data{
                self?.label_yardName.text = model.nextName
                self?.label_bookingType.text = model.isHalf == 1 ? "半场":"全场"
                self?.label_halfYardName.text = model.halfName
                self?.label_bookingPerson.text = model.booker
                self?.label_contact.text = model.phone
                self?.label_paymentPrice.text = model.payMoney.currency()
                self?.label_bookingTime.text = Date.jq_format(TimeInterval(model.startTime / 1000), formatter: "yyyy-MM-dd")
                switch model.state {
                    case .waitPayment:
                        self?.label_paymentTime.text = "待支付"
                        self?.label_usedState.text = "待支付"
                        self?.label_paymentTime.textColor = UIColor(hexStr: "#F44444")
                        self?.label_usedState.textColor = UIColor(hexStr: "#F44444")
                        self?.view_qrCode.isHidden = true
                        self?.btn_payment.isHidden = false
                    case .cancel,.complete:
                        self?.view_qrCode.isHidden = true
                        self?.btn_payment.isHidden = true
                    default:
                        self?.label_paymentTime.text = Date.jq_format(TimeInterval(model.payTime / 1000), formatter: "yyyy-MM-dd")
                        self?.label_usedState.text = model.state.titleRaw
                        self?.view_qrCode.isHidden = false
                        self?.btn_cancel.isHidden = false
                        self?.btn_payment.isHidden = true
                }
            }
        }) { error in
        }.disposed(by: disposeBag)
    }
    @IBAction func callAction(_ sender: UIButton) {
        UIApplication.shared.open(URL(string: "tell://\(yardBookingModel.phone)")!, options: [:], completionHandler: nil)
    }
    @IBAction func cancelAction(_ sender: UIButton) {
        CommonAlertView.show(title: "提示", content: "确认取消本次的预约吗?") {[weak self] status in
            if status{
                guard let weakSelf = self else { return }
                Services.cancelMySite(id: weakSelf.yardBookingModel.id).subscribe(onNext: { data in
                    weakSelf.getData()
                }) { error in
                }.disposed(by: weakSelf.disposeBag)
            }
        }
    }
    @IBAction func paymentAction(_ sender: UIButton) {
WanPai/Root/Yard/VC/YardBookingDetailVC.xib
@@ -11,8 +11,23 @@
    <objects>
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="YardBookingDetailVC" customModule="WanPai" customModuleProvider="target">
            <connections>
                <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="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_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"/>
                <outlet property="label_title" destination="02s-YH-Vmf" id="wf5-tW-e2w"/>
                <outlet property="label_type" destination="aO5-bJ-0tv" id="MBw-EQ-mpb"/>
                <outlet property="label_usedState" destination="sQU-vw-kAC" id="YJV-oc-jwv"/>
                <outlet property="label_yardName" destination="7h1-Dw-eHi" id="zti-Dx-dlW"/>
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
                <outlet property="view_qrCode" destination="1hl-Kq-mul" id="8Ro-IP-cgz"/>
            </connections>
        </placeholder>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@@ -65,6 +80,9 @@
                                    <rect key="frame" x="338" y="19.666666666666671" width="50" height="50"/>
                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                    <state key="normal" image="btn_call"/>
                                    <connections>
                                        <action selector="callAction:" destination="-1" eventType="touchUpInside" id="QcM-K2-Sfa"/>
                                    </connections>
                                </button>
                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_local_mini_gray" translatesAutoresizingMaskIntoConstraints="NO" id="n3f-YT-qUk">
                                    <rect key="frame" x="16" y="48.666666666666671" width="11" height="16"/>