无故事王国
2023-10-24 e9474fe95f7f6c3e1652d6406c00804910cb44ad
修复BUG
23个文件已修改
495 ■■■■■ 已修改文件
WanPai/Common/View/PaymentView.swift 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Config/Enums.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Model/CommonModels.swift 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Network/Services.swift 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseTCell.swift 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailApplyVC.swift 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailVC.swift 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseInfoVC.swift 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseInfoVC.xib 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/View/StudentCourseDetailHeadView.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Home/Model/HomeModel.swift 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Home/VC/HomeVC.swift 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/VC/PaymentResultVC.swift 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/View/StoresChooseView.swift 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/TCell/WelfareWeeklyTCell.swift 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/TCell/WelfareWeeklyTCell.xib 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareFreeVC.swift 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareFreeVC.xib 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.swift 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.xib 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklyListVC.swift 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklySubListVC.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/View/CoinStoreHeadView.swift 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/PaymentView.swift
@@ -38,10 +38,6 @@
    override func awakeFromNib() {
        super.awakeFromNib()
        btn_alipay.isSelected = true
        payType = .aliPay
        cons_bottom.constant = -(225 + UIDevice.jq_safeEdges.bottom)
        view_wechat.isHidden = true
        view_coin.isHidden = true
@@ -68,7 +64,20 @@
        paymentView.label_integral.text = "\(money.integral ?? 0)积分"
        sceneDelegate?.window?.addSubview(paymentView)
        paymentView.cons_bottom.constant = 0
        var customType = [PayType]()
        if !paymentView.view_alipay.isHidden{customType.append(.aliPay)}
        if !paymentView.view_wechat.isHidden{customType.append(.wechat)}
        if !paymentView.view_coin.isHidden{customType.append(.coin)}
        paymentView.payType = customType.first
        switch customType.first {
            case .aliPay:paymentView.btn_alipay.isSelected = true
            case .coin:paymentView.btn_coin.isSelected = true
            case .wechat:paymentView.btn_wechat.isSelected = true
            default:break
        }
        UIView.animate(withDuration: 0.4) {
            paymentView.alpha = 1
            paymentView.layoutIfNeeded()
WanPai/Config/Enums.swift
@@ -168,6 +168,7 @@
enum PaymentType:Int,HandyJSONEnum{
    case cash = 1 //现金
    case coin = 2 //玩湃币
    case cashCoin = 3 //现金 + 币
}
enum CouponType:Int,HandyJSONEnum{
WanPai/Model/CommonModels.swift
@@ -74,10 +74,10 @@
struct CourseDetailListModel:HandyJSON {
    var classHours: Int = 0
    var id: Int = 0
    var originalPrice:Double?
    var originalPrice:Double = 0
    var paymentPrice:Double = 0
    var payType: PaymentType = .cash
    var playPaiCoin:Int?
    var playPaiCoin:Int = 0
    var vipPrice:Double = 0
}
WanPai/Network/Services.swift
@@ -12,7 +12,8 @@
import JQTools
#if DEBUG
let All_Url = "https://ds867zleb4ow.xiaomiqiu.com"
//let All_Url = "https://ds867zleb4ow.xiaomiqiu.com"
let All_Url = "http://192.168.110.27:56666"
let Game_Url = "https://try.daowepark.com"
//let All_Url = "https://console-mock.apipost.cn/mock/b5b2dee0-5564-40ae-f082-a352d502a153"
//let All_Url = "http://192.168.110.165:10393/mock/b5b2dee0-5564-40ae-f082-a352d502a153"
WanPai/Root/Course/TCell/CourseTCell.swift
@@ -30,28 +30,43 @@
            label_distance.text = String(format: "%.2lfkm", courseItemModel.distance)
            stack_teachTime.isHidden = courseItemModel.classStartTime.count == 0
            if courseItemModel.payType == .coin || (courseItemModel.originalPrice == 0 && courseItemModel.paymentPrice == 0 && courseItemModel.vipPrice == 0){
                label_price.text = "玩湃币 " + "\(courseItemModel.playPaiCoin)"
                stackView_vipPrice.isHidden = true
                label_originPrice.isHidden = true
            }else{
                if UserInfoModel.get()?.isVip == 1{
            switch courseItemModel.payType {
                case .cash,.cashCoin:
                    //显示原价
                    label_originPrice.isHidden = courseItemModel.originalPrice == 0
                    label_originPrice.attributedText = AttributedStringbuilder.build().add(string: courseItemModel.originalPrice.currency() , withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")).delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString
                    if UserInfoModel.get()?.isVip == 1{
                        //持续隐藏
                        stackView_vipPrice.isHidden = true
                        //默认展示VIP价格【会员】
                        label_price.text = courseItemModel.vipPrice.currency()
                        if courseItemModel.paymentPrice == 0 && courseItemModel.vipPrice != 0{
                            label_price.text = courseItemModel.vipPrice.currency()
                        }else if courseItemModel.paymentPrice != 0 && courseItemModel.vipPrice == 0{
                            label_price.text = courseItemModel.paymentPrice.currency()
                        }else{
                            label_price.text = min(courseItemModel.paymentPrice, courseItemModel.vipPrice).currency()
                        }
                    }else{
                        label_vipPrice.text = courseItemModel.vipPrice.currency()
                        stackView_vipPrice.isHidden = courseItemModel.vipPrice == 0 || courseItemModel.vipPrice == courseItemModel.paymentPrice
                        if courseItemModel.paymentPrice == 0 && courseItemModel.originalPrice != 0{
                            label_price.text = courseItemModel.vipPrice.currency()
                        }else if courseItemModel.paymentPrice != 0 && courseItemModel.originalPrice == 0{
                            label_price.text = courseItemModel.paymentPrice.currency()
                        }else{
                            label_price.text = min(courseItemModel.paymentPrice, courseItemModel.originalPrice).currency()
                        }
                    }
                case .coin:
                    stackView_vipPrice.isHidden = true
                    label_price.text = courseItemModel.vipPrice.currency()
                    label_originPrice.attributedText = AttributedStringbuilder.build().add(string: courseItemModel.paymentPrice.currency() , withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")).delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString
                    label_originPrice.isHidden = courseItemModel.paymentPrice == 0
                }else{
                    stackView_vipPrice.isHidden = courseItemModel.vipPrice == 0 || (courseItemModel.paymentPrice == courseItemModel.vipPrice)
                    label_price.text = courseItemModel.paymentPrice.currency()
                    label_vipPrice.text = "会员价:\(courseItemModel.vipPrice.currency())"
                    label_originPrice.attributedText = AttributedStringbuilder.build().add(string: courseItemModel.paymentPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")).delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString
                    //容错:原价 == 支付价 | 原价 == 0 -> 原价隐藏
                    label_originPrice.isHidden = courseItemModel.originalPrice == 0 || courseItemModel.paymentPrice <= courseItemModel.originalPrice
                }
                    label_originPrice.isHidden = true
                    label_price.text = "玩湃币 " + "\(courseItemModel.playPaiCoin)"
            }
        }
    }
WanPai/Root/Course/VC/CourseDetailApplyVC.swift
@@ -185,8 +185,7 @@
                    //减去优惠
                    let discountPrice = price - (weakSelf.selectCouponModel?.favorable ?? 0)
                    let coin = (model.playPaiCoin ?? 0) * weakSelf.studentModels.count
                    let coin = model.playPaiCoin * weakSelf.studentModels.count
                    PaymentView.show(money: (ali:discountPrice,wx:discountPrice,coin:coin,course:nil,integral:nil)) { [weak self] payType in
                        guard let weakSelf = self else { return }
@@ -208,6 +207,7 @@
                                            switch result {
                                                case .success:
                                                    let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id)
                                                    vc.isExtend = self?.isExtend ?? false
                                                    self?.push(vc: vc)
                                                case .cancel:
                                                    alert(msg: "已取消")
@@ -222,6 +222,7 @@
                                    case .coin:
//                                        self?.navigationController?.popViewController(animated: false)
                                        let vc = PaymentResultVC(result: .success, objType: .courseApply,handleVC: self,courseConfigId: model.id)
                                        vc.isExtend = self?.isExtend ?? false
                                        self?.push(vc: vc)
                                    case .courseNum,.integral:break
                                }
@@ -260,33 +261,61 @@
                studentCount = Double(studentModels.count)
            }
            label_price.isHidden = subM.paymentPrice == 0
            label_price.text = (subM.paymentPrice * studentCount - (selectCouponModel?.favorable ?? 0)).currency()
            label_originPrice.isHidden = subM.originalPrice == nil || subM.originalPrice == 0
            label_coin.isHidden = subM.playPaiCoin == nil || subM.playPaiCoin == 0
            label_vipPrice.isHidden = subM.vipPrice == 0
                //原价
            if let originPrice =  subM.originalPrice{
                let attribute = AttributedStringbuilder.build().add(string: (originPrice * studentCount).currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58))
                label_originPrice.attributedText = attribute.mutableAttributedString
            }
            switch subM.payType {
                case .coin:
                    label_price.text = ""
                    label_price.isHidden = true
                    label_originPrice.isHidden = true
                    label_vipPrice.isHidden = true
                //玩湃币
            if let paiCoin = subM.playPaiCoin{
                let coinAttribute = AttributedStringbuilder.build()
                    .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                    .add(string: "\(paiCoin * studentModels.count)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                label_coin.attributedText = coinAttribute.mutableAttributedString
            }
                        //玩湃币
                    label_coin.attributedText = AttributedStringbuilder.build()
                        .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                        .add(string: "\(subM.playPaiCoin * studentModels.count)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString
                //会员价
            if subM.vipPrice != 0{
                let vipAttribute = AttributedStringbuilder.build()
                    .add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                    .add(string: (subM.vipPrice * studentCount).currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                label_vipPrice.attributedText = vipAttribute.mutableAttributedString
            }
                case .cash:
                    label_coin.isHidden = true;fallthrough
                case .cashCoin:
                    if subM.originalPrice == 0{label_originPrice.isHidden = true}
                        //玩湃币
                    label_coin.attributedText = AttributedStringbuilder.build()
                        .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                        .add(string: "\(subM.playPaiCoin * studentModels.count)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString
                        //原价
                    let attribute = AttributedStringbuilder.build().add(string: (subM.originalPrice * studentCount).currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58))
                    label_originPrice.attributedText = attribute.mutableAttributedString
                    if UserInfoModel.get()?.isVip == 1{
                            //会员
                        label_vipPrice.isHidden = true
                        if subM.paymentPrice < subM.vipPrice && subM.paymentPrice != 0{
                            label_price.text = (subM.paymentPrice * studentCount - (selectCouponModel?.favorable ?? 0)).currency()
                        }else{
                            label_price.text = (subM.vipPrice * studentCount - (selectCouponModel?.favorable ?? 0)).currency()
                        }
                    }else{
                            //非会员
                        label_vipPrice.isHidden = subM.vipPrice == 0 || subM.vipPrice == subM.paymentPrice
                        let vipAttribute = AttributedStringbuilder.build()
                            .add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                            .add(string: (subM.vipPrice * studentCount).currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                        label_vipPrice.attributedText = vipAttribute.mutableAttributedString
                        if subM.originalPrice != 0 && subM.paymentPrice == 0{
                            label_price.text = (subM.originalPrice * studentCount - (selectCouponModel?.favorable ?? 0)).currency()
                        }else if subM.originalPrice == 0 && subM.paymentPrice != 0{
                            label_price.text = (subM.paymentPrice * studentCount - (selectCouponModel?.favorable ?? 0)).currency()
                        }else{
                            var money = min(subM.originalPrice,subM.paymentPrice)
                            money = money - (selectCouponModel?.favorable ?? 0)
                            label_price.text = (money * studentCount).currency()
                        }
                    }
            }
            if detailModel?.type == .experience{
                label_price.text = subM.paymentPrice.currency()
@@ -305,10 +334,11 @@
            var price:Double?
            switch subM.payType{
                case .cash:
                    price = subM.originalPrice == nil ? subM.vipPrice : subM.originalPrice
                    price = subM.originalPrice == 0 ? subM.vipPrice : subM.originalPrice
                case .coin:
                    if let coin = subM.playPaiCoin{price = Double(coin)}
            }
                    price = Double(subM.playPaiCoin)
                case .cashCoin:break
            }
            guard price != nil else {
                LogError("会员优惠价格出现问题:nil");return
WanPai/Root/Course/VC/CourseDetailVC.swift
@@ -12,7 +12,6 @@
class CourseDetailVC: BaseVC {
    @IBOutlet weak var view_banner: CommonBannerView!
        //    @IBOutlet weak var img_cover: UIImageView!
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var label_local: UILabel!
    @IBOutlet weak var label_distance: UILabel!
@@ -20,9 +19,7 @@
    @IBOutlet weak var view_listen: UIView!
    @IBOutlet weak var label_listenTime: UILabel!
    @IBOutlet weak var img_1: UIImageView!
//    @IBOutlet weak var img_2: UIImageView!
    @IBOutlet weak var cons_img1Height: NSLayoutConstraint!
//    @IBOutlet weak var cons_img2Height: NSLayoutConstraint!
    @IBOutlet weak var label_courseType: UILabel!
    @IBOutlet weak var label_vaildTime: UILabel!
    @IBOutlet weak var view_vaildTime: UIView!
@@ -52,7 +49,7 @@
                label_courseType.text = m.type.strTitle
                label_courseType.isHidden = m.type == .none
                view_vaildTime.isHidden = m.type == .normal
                label_price.isHidden = (m.list.first?.paymentPrice ?? 0) == 0
//                label_price.isHidden = (m.list.first?.paymentPrice ?? 0) == 0
                let w = String.jq_getWidth(text: m.type.strTitle, height: 25, font: 14)
                label_courseType.jq_cornerPartWithNib(byRoundingCorners: [.topLeft,.bottomLeft], radii: 8, size: CGSize(width: w, height: 25))
@@ -67,32 +64,58 @@
                }
                label_price.text = m.list.first!.paymentPrice.currency()
                if let subM = m.list.first {
                    label_originPrice.isHidden = subM.originalPrice == nil || subM.originalPrice == 0
                    label_coin.isHidden = subM.playPaiCoin == nil || subM.playPaiCoin == 0
                    label_vipPrice.isHidden =  subM.vipPrice == 0
                    switch subM.payType {
                        case .coin:
                            label_price.text = ""
                            label_price.isHidden = true
                            label_originPrice.isHidden = true
                            label_vipPrice.isHidden = true
                        //原价
                    if let originPrice =  subM.originalPrice{
                        let attribute = AttributedStringbuilder.build().add(string: originPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58))
                        label_originPrice.attributedText = attribute.mutableAttributedString
                    }
                            //玩湃币
                            label_coin.attributedText = AttributedStringbuilder.build()
                                .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                                .add(string: "\(subM.playPaiCoin )币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString
                        //玩湃币
                    if let paiCoin = subM.playPaiCoin{
                        let coinAttribute = AttributedStringbuilder.build()
                            .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                            .add(string: "\(paiCoin)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                        label_coin.attributedText = coinAttribute.mutableAttributedString
                    }
                        case .cash:
                            label_coin.isHidden = true;fallthrough
                        case .cashCoin:
                            if subM.originalPrice == 0{label_originPrice.isHidden = true}
                        //会员价
                    if subM.vipPrice != 0{
                        let vipAttribute = AttributedStringbuilder.build()
                            .add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                            .add(string: subM.vipPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                        label_vipPrice.attributedText = vipAttribute.mutableAttributedString
                                //玩湃币
                            label_coin.attributedText = AttributedStringbuilder.build()
                                .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                                .add(string: "\(subM.playPaiCoin )币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString
                                //原价
                            let attribute = AttributedStringbuilder.build().add(string: subM.originalPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58))
                            label_originPrice.attributedText = attribute.mutableAttributedString
                            if UserInfoModel.get()?.isVip == 1{
                                    //会员
                                label_vipPrice.isHidden = true
                                if subM.paymentPrice < subM.vipPrice && subM.paymentPrice != 0{
                                    label_price.text = subM.paymentPrice.currency()
                                }else{
                                    label_price.text = subM.vipPrice.currency()
                                }
                            }else{
                                    //非会员
                                label_vipPrice.isHidden = subM.vipPrice == 0 || subM.vipPrice == subM.paymentPrice
                                let vipAttribute = AttributedStringbuilder.build()
                                    .add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
                                    .add(string: subM.vipPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313"))
                                label_vipPrice.attributedText = vipAttribute.mutableAttributedString
                                if subM.originalPrice != 0 && subM.paymentPrice == 0{
                                    label_price.text = subM.originalPrice.currency()
                                }else if subM.originalPrice == 0 && subM.paymentPrice != 0{
                                    label_price.text = subM.paymentPrice.currency()
                                }else{
                                    label_price.text = min(subM.originalPrice,subM.paymentPrice).currency()
                                }
                            }
                    }
                }
WanPai/Root/Course/VC/CourseInfoVC.swift
@@ -11,6 +11,8 @@
import FFPage
import QMUIKit
let StudentRefresh_Nofi = Notification.Name.init("StudentRefresh_Nofi")
class CourseInfoVC: BaseVC {
    @IBOutlet weak var scrollView: CourseInfoScrollView!
@@ -206,6 +208,19 @@
    }
    override func setRx() {
        NotificationCenter.default.rx.notification(StudentRefresh_Nofi).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] noti in
            guard let weakSelf = self else { return }
            Services.startCourseHome().subscribe(onNext: {[weak self] data in
                if let model = data.data{
                    self?.startClouseHomeModel = model
                    if model.courseList.count > 0{
                        self?.pageMenu.setItems(model.courseList.map({$0.courseName}), selectedItemIndex: 0)
                    }
                }
            }).disposed(by: weakSelf.disposeBag)
        }).disposed(by: disposeBag)
        NotificationCenter.default.rx.notification(StudentUpdate_Nofi).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] noti in
            guard let weakSelf = self else { return }
            Services.startCourseHome().subscribe(onNext: {[weak self] data in
@@ -231,6 +246,10 @@
        }) { error in
        }.disposed(by: disposeBag)
    }
    private func updateData(){
    }
    private func setAttribute(t1:String,t2:String)->NSMutableAttributedString{
@@ -280,6 +299,18 @@
        push(vc: vc)
    }
    @IBAction func renewalAction(_ sender: UIButton) {
        let index = pageMenu.selectedItemIndex
        let models = startClouseHomeModel!.courseList
        Services.queryCourseInfo(id: models[index].courseId).subscribe(onNext: {[weak self] data in
            if let m = data.data{
                let vc = CourseDetailApplyVC(detailModel: m,isExtend: true)
                self?.push(vc: vc)
            }
        }).disposed(by: disposeBag)
    }
    @IBAction func bookingRecordAction(_ sender: UIButton) {
        guard startClouseHomeModel != nil else {return}
        let vc = CourseBookingListVC(student: startClouseHomeModel!)
WanPai/Root/Course/VC/CourseInfoVC.xib
@@ -295,13 +295,16 @@
                                                                    <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                    <nil key="highlightedColor"/>
                                                                </label>
                                                                <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rpx-zm-bba">
                                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rpx-zm-bba">
                                                                    <rect key="frame" x="37.333333333333343" y="27.333333333333314" width="56.666666666666657" height="27"/>
                                                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                                                    <state key="normal" title="续费">
                                                                        <color key="titleColor" red="0.9882352941176471" green="0.94901960784313721" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                    </state>
                                                                    <connections>
                                                                        <action selector="renewalAction:" destination="-1" eventType="touchUpInside" id="8oE-ym-zQt"/>
                                                                    </connections>
                                                                </button>
                                                            </subviews>
                                                            <constraints>
@@ -322,13 +325,16 @@
                                                                    <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                    <nil key="highlightedColor"/>
                                                                </label>
                                                                <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4FR-g7-qm9">
                                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4FR-g7-qm9">
                                                                    <rect key="frame" x="31" y="27.333333333333314" width="69" height="27"/>
                                                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                                                    <state key="normal" title="详情">
                                                                        <color key="titleColor" red="0.98823529409999999" green="0.94901960780000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                    </state>
                                                                    <connections>
                                                                        <action selector="detailAction:" destination="-1" eventType="touchUpInside" id="v7F-Ha-hWS"/>
                                                                    </connections>
                                                                </button>
                                                            </subviews>
                                                            <constraints>
@@ -349,13 +355,16 @@
                                                                    <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                    <nil key="highlightedColor"/>
                                                                </label>
                                                                <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eg1-Jb-LxV">
                                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eg1-Jb-LxV">
                                                                    <rect key="frame" x="31" y="27.333333333333314" width="69" height="27"/>
                                                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                                                    <state key="normal" title="续费">
                                                                        <color key="titleColor" red="0.98823529409999999" green="0.94901960780000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                    </state>
                                                                    <connections>
                                                                        <action selector="renewalAction:" destination="-1" eventType="touchUpInside" id="f3O-Hz-nLC"/>
                                                                    </connections>
                                                                </button>
                                                            </subviews>
                                                            <constraints>
@@ -369,24 +378,13 @@
                                                        </view>
                                                    </subviews>
                                                </stackView>
                                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="640-q8-Cdv">
                                                    <rect key="frame" x="0.0" y="0.0" width="393" height="61"/>
                                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                                    <connections>
                                                        <action selector="detailAction:" destination="-1" eventType="touchUpInside" id="szP-fb-sh5"/>
                                                    </connections>
                                                </button>
                                            </subviews>
                                            <color key="backgroundColor" name="FE6E0D"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="61" id="0pN-vy-q6R"/>
                                                <constraint firstAttribute="trailing" secondItem="8jh-Rx-lWh" secondAttribute="trailing" id="3vg-YM-95J"/>
                                                <constraint firstAttribute="bottom" secondItem="8jh-Rx-lWh" secondAttribute="bottom" id="5Gr-nb-ZpF"/>
                                                <constraint firstItem="640-q8-Cdv" firstAttribute="leading" secondItem="wDl-8F-uHt" secondAttribute="leading" id="EcQ-m1-ofc"/>
                                                <constraint firstAttribute="trailing" secondItem="640-q8-Cdv" secondAttribute="trailing" id="Smf-EY-i9E"/>
                                                <constraint firstItem="640-q8-Cdv" firstAttribute="top" secondItem="wDl-8F-uHt" secondAttribute="top" id="aSI-vi-oef"/>
                                                <constraint firstItem="8jh-Rx-lWh" firstAttribute="top" secondItem="wDl-8F-uHt" secondAttribute="top" id="ljX-c0-ETU"/>
                                                <constraint firstAttribute="bottom" secondItem="640-q8-Cdv" secondAttribute="bottom" id="qDO-Op-ID4"/>
                                                <constraint firstItem="8jh-Rx-lWh" firstAttribute="leading" secondItem="wDl-8F-uHt" secondAttribute="leading" id="usj-W6-dwc"/>
                                            </constraints>
                                        </view>
WanPai/Root/Course/View/StudentCourseDetailHeadView.swift
@@ -30,7 +30,7 @@
        pageMenu.setTrackerHeight(3, cornerRadius: 1.5)
        pageMenu.tracker.backgroundColor = .clear
        pageMenu.trackerFollowingMode = .always
        pageMenu.contentInset = UIEdgeInsets(top: 0, left: 19, bottom: 0, right: 19)
        pageMenu.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 19)
        // 分割线
        pageMenu.dividingLine.backgroundColor = .clear
WanPai/Root/Home/Model/HomeModel.swift
@@ -14,6 +14,11 @@
    var name = ""
    var lon:Double = 0
    var lat:Double = 0
    var province = ""
    var provinceCode:Int = 0
    var city:String = ""
    var cityCode:Int = 0
}
class HomeStoreConfigModel:HandyJSON {
WanPai/Root/Home/VC/HomeVC.swift
@@ -88,6 +88,7 @@
    private func getStoreInfo(){
        Services.homeInfo().subscribe(onNext: {[weak self] data in
            if let m = data.data{
                self?.storeModel = m
                var text = "欢迎来到 快乐运动俱乐部"
                if m.storeId != 0{
                    self?.label_store.text = m.name.isEmpty ? "门店获取失败":m.name
@@ -208,11 +209,11 @@
    
    
    @IBAction func chooseStoresAction(_ sender: TapBtn) {
        StoresChooseView.show { [weak self] storeId,storeName in
        StoresChooseView.show(defaultM: storeModel) { [weak self] province,city,store in
            guard let weakSelf = self else { return }
            weakSelf.storeId = storeId
            weakSelf.label_store.text = storeName
            weakSelf.storeModel = HomeStoreModel(isVip: 0, storeId: storeId, name: storeName, lon: 0, lat: 0)
            weakSelf.storeId = store.id
            weakSelf.label_store.text = store.name
            weakSelf.storeModel = HomeStoreModel(isVip: weakSelf.storeModel!.isVip, storeId: store.id, name: store.name, lon: 0, lat: 0, province: province.name, provinceCode: province.code, city: city.name, cityCode: city.code)
            weakSelf.items.removeAll()
            weakSelf.getStoreItemList()
WanPai/Root/Other/VC/PaymentResultVC.swift
@@ -22,8 +22,7 @@
        case games //邮箱
    }
    
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var img_paymentState: UIImageView!
    @IBOutlet weak var label_content: UILabel!
    @IBOutlet weak var collectionView: UICollectionView!
@@ -36,8 +35,9 @@
    private var courseConfigId:Int?
    private var handleVC:UIViewController?
    private var models = [CourseCouponModel]()
    private var againClouse:(()->Void)?
    var isExtend:Bool = false
    required init(result:PaymentResult,objType:PaymentObjType,handleVC:UIViewController? = nil,courseConfigId:Int? = nil,againClouse:(()->Void)? = nil) {
        super.init(nibName: nil, bundle: nil)
@@ -101,6 +101,11 @@
                btn_again.setTitle("立即预约", for: .normal)
                btn_back.setTitle("返回首页", for: .normal)
                label_content.text = "报名成功,请及时预约课程上课!"
                    if isExtend{
                        btn_back.isHidden = true
                        btn_again.setTitle("返回", for: .normal)
                        label_content.text = "续课成功!"
                    }
            case .none:break
            }
            
@@ -171,8 +176,11 @@
                let vc = YardBookingListVC()
                JQ_currentViewController().jq_push(vc: vc)
            case "立即预约":
                navigationController?.popToRootViewController(animated: true)
                navigationController?.qmui_popToRootViewController(animated: true, completion: { () in
                    JQ_currentViewController().tabBarController?.selectedIndex = 1
                })
                NotificationCenter.default.post(name: UpdateCurrentStore_Noti, object: nil)
                NotificationCenter.default.post(name: StudentRefresh_Nofi, object: nil)
            case "查看报名":
                let vc = ActivitySignupListVC()
                JQ_currentViewController().jq_push(vc: vc)
@@ -184,6 +192,10 @@
                navigationController?.popViewController(animated: true, {() in
                    let vc = RechargeCenterVC()
                    JQ_currentViewController().jq_push(vc: vc)
                })
            case "返回":
                navigationController?.popViewController(animated: true, {() in
                })
            default:break
        }
@@ -200,7 +212,7 @@
    }
    override var preferredStatusBarStyle: UIStatusBarStyle{
        return .default
        return .lightContent
    }
}
WanPai/Root/Other/View/StoresChooseView.swift
@@ -27,9 +27,11 @@
    private var storesModel = [CityProfileModel]()
    private var clouse:((Int,String)->Void)!
    private var clouse:((CityProfileModel,CityProfileModel,CityProfileModel)->Void)!
    private let disposeBag = DisposeBag()
    private var defaultStoreModel:HomeStoreModel?
    override func awakeFromNib() {
        super.awakeFromNib()
        view_container.transform = .init(scaleX: 0.1, y: 0.1)
@@ -37,12 +39,25 @@
        layoutIfNeeded()
    }
    
    static func show(_ clouse:@escaping (Int,String)->Void){
    static func show(defaultM:HomeStoreModel? = nil, clouse:@escaping (CityProfileModel,CityProfileModel,CityProfileModel)->Void){
        let storesView = StoresChooseView.jq_loadNibView()
        storesView.clouse = clouse
        storesView.defaultStoreModel = defaultM
        storesView.frame = sceneDelegate?.window?.frame ?? .zero
        sceneDelegate?.window?.addSubview(storesView)
        if let m = defaultM{
            storesView.label_city.text = m.city
            storesView.label_province.text = m.province
            storesView.label_currently.text = m.name
            storesView.provinceModel = CityProfileModel(id: 0, code: m.provinceCode, name: m.province)
            storesView.cityModel = CityProfileModel(id: 0, code: m.cityCode, name: m.city)
            storesView.storeModel = CityProfileModel(id: m.storeId, code: 0, name: m.name)
            storesView.getData(m.provinceCode)
            storesView.getStore(m.cityCode)
        }
        UIView.animate(withDuration: 0.4) {
            storesView.view_container.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
            storesView.alpha = 1
@@ -97,6 +112,12 @@
            weakSelf.provinceModel = weakSelf.provincesModel[index]
            weakSelf.label_province.text = weakSelf.provinceModel?.name ?? ""
            weakSelf.getData(weakSelf.provinceModel!.code)
            weakSelf.cityModel = nil
            weakSelf.label_city.text = "选择城市"
            weakSelf.storeModel = nil
            weakSelf.label_currently.text = "选择门店"
        }
    }
@@ -108,16 +129,18 @@
            weakSelf.cityModel = weakSelf.citysModel[index]
            weakSelf.label_city.text = weakSelf.cityModel?.name ?? ""
            weakSelf.getStore(weakSelf.cityModel!.code)
            weakSelf.storeModel = nil
            weakSelf.label_currently.text = "选择门店"
        }
    }
    @IBAction func storeAction(_ sender: TapBtn) {
        guard provincesModel.count != 0 else {
        guard provinceModel != nil else {
            alertError(msg: "请先选择省份");return
        }
        guard citysModel.count != 0 else {
        guard cityModel != nil else {
            alertError(msg: "请先选城市");return
        }
@@ -134,12 +157,21 @@
    }
    
    @IBAction func completeAction(_ sender: UIButton) {
        guard provinceModel != nil else {
            alertError(msg: "请先选择省份");return
        }
        guard cityModel != nil else {
            alertError(msg: "请先选城市");return
        }
        guard storeModel != nil else {
            alertError(msg: "请选择门店名称");return
        }
        close()
        clouse?(storeModel!.id,storeModel!.name)
        clouse?(provinceModel!,cityModel!,storeModel!)
    }
    
}
WanPai/Root/Welfare/TCell/WelfareWeeklyTCell.swift
@@ -28,11 +28,16 @@
            label_courseNum.text = "\(weeklyItemModel.courseHours)课时"
            label_giftCourseNum.text = "\(weeklyItemModel.donateHours)课时"
            label_datetime.text = weeklyItemModel.dataTime
            label_distance.text = String(format: "%.2lfkm", weeklyItemModel.storeDistance)
            view_giftCourseNum.isHidden = weeklyItemModel.donateHours == 0
            label_discountPrice.isHidden = weeklyItemModel.discountPrice == 0
            if weeklyItemModel.status == 1{
                btn_status.setTitle("查看详情", for: .normal)
                btn_status.backgroundColor = Def_ThemeColor
            }else{
                btn_status.setTitle("暂未开始", for: .normal)
                btn_status.backgroundColor = UIColor(hexStr: "#A2A2A2")
            }
            if weeklyItemModel.discountPrice != 0{
                label_discountPrice.attributedText = AttributedStringbuilder.build().add(string:  weeklyItemModel.originalPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")).delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString
@@ -41,13 +46,7 @@
                label_price.text = weeklyItemModel.originalPrice.currency()
            }
            if weeklyItemModel.status == 1{
                btn_status.setTitle("查看详情", for: .normal)
                btn_status.backgroundColor = Def_ThemeColor
            }else{
                btn_status.setTitle("未开始", for: .normal)
                btn_status.backgroundColor = UIColor(hexStr: "#A2A2A2")
            }
        }
    }
WanPai/Root/Welfare/TCell/WelfareWeeklyTCell.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -33,7 +33,7 @@
                            </userDefinedRuntimeAttribute>
                        </userDefinedRuntimeAttributes>
                    </imageView>
                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CvQ-a2-im1">
                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CvQ-a2-im1">
                        <rect key="frame" x="130" y="17" width="40.666666666666657" height="22"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="22" id="NXO-9V-71t"/>
@@ -42,8 +42,8 @@
                        <nil key="textColor"/>
                        <nil key="highlightedColor"/>
                    </label>
                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0km" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RQ7-n5-NbV">
                        <rect key="frame" x="379" y="18.333333333333336" width="33" height="19.333333333333336"/>
                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="0km" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RQ7-n5-NbV">
                        <rect key="frame" x="181.66666666666663" y="18.333333333333336" width="230.33333333333337" height="19.333333333333336"/>
                        <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                        <color key="textColor" red="0.23921568627450979" green="0.24313725490196078" blue="0.27058823529411763" alpha="0.68999999999999995" colorSpace="custom" customColorSpace="sRGB"/>
                        <nil key="highlightedColor"/>
@@ -190,6 +190,7 @@
                    <constraint firstAttribute="bottom" secondItem="zmP-dy-2N0" secondAttribute="bottom" priority="750" constant="24" id="ZIO-2k-ssi"/>
                    <constraint firstItem="XeG-Bi-KdU" firstAttribute="top" secondItem="Tyi-iF-uKa" secondAttribute="bottom" constant="25" id="aWI-ar-ua6"/>
                    <constraint firstItem="CvQ-a2-im1" firstAttribute="leading" secondItem="zmP-dy-2N0" secondAttribute="trailing" constant="11" id="bUj-Zw-piQ"/>
                    <constraint firstItem="RQ7-n5-NbV" firstAttribute="leading" secondItem="CvQ-a2-im1" secondAttribute="trailing" constant="11" id="dFf-Ob-7y3"/>
                    <constraint firstItem="Pqd-Ff-XyA" firstAttribute="centerY" secondItem="UEa-W5-680" secondAttribute="centerY" id="dK8-0r-l9d"/>
                    <constraint firstItem="CvQ-a2-im1" firstAttribute="top" secondItem="zmP-dy-2N0" secondAttribute="top" constant="1" id="ggp-yB-1Mf"/>
                    <constraint firstItem="zmP-dy-2N0" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="16" id="hBV-WZ-xfd"/>
@@ -226,7 +227,7 @@
            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
        </systemColor>
        <systemColor name="systemGray6Color">
            <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
            <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </systemColor>
    </resources>
</document>
WanPai/Root/Welfare/VC/WelfareFreeVC.swift
@@ -8,12 +8,13 @@
import UIKit
import WebKit
import JQTools
import QMUIKit
class WelfareFreeVC: BaseVC {
    var storeWalfareModel:StoreWalfareModel?
    @IBOutlet weak var webView: WKWebView!
    @IBOutlet weak var btn_call: UIButton!
    @IBOutlet weak var btn_call: QMUIButton!
    init(_ model:StoreWalfareModel) {
        super.init(nibName: nil, bundle: nil)
@@ -35,6 +36,11 @@
        }
    }
    override func setUI() {
        btn_call.imagePosition = .left
        btn_call.spacingBetweenImageAndTitle = 13
    }
    @IBAction func callPhoneAction(_ sender: UIButton) {
        if let phone = storeWalfareModel?.phone{
            UIApplication.shared.open(URL(string: "tel://\(phone)")!, options: [:], completionHandler: nil)
WanPai/Root/Welfare/VC/WelfareFreeVC.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -22,7 +22,7 @@
            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <subviews>
                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="myM-xc-SEC">
                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="myM-xc-SEC" customClass="QMUIButton">
                    <rect key="frame" x="0.0" y="770" width="393" height="48"/>
                    <color key="backgroundColor" name="FE6E0D"/>
                    <constraints>
@@ -30,7 +30,7 @@
                    </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="联系我们">
                    <state key="normal" title="联系我们" image="btn_phone">
                        <color key="titleColor" red="0.94901960784313721" green="0.97647058823529409" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                    </state>
                    <connections>
@@ -61,6 +61,7 @@
        </view>
    </objects>
    <resources>
        <image name="btn_phone" width="14" height="14"/>
        <namedColor name="FE6E0D">
            <color red="0.99199998378753662" green="0.53299999237060547" blue="0.0080000003799796104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
        </namedColor>
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.swift
@@ -22,10 +22,6 @@
    @IBOutlet weak var label_datetime: UILabel!
    @IBOutlet weak var img_intro: UIImageView!
    @IBOutlet weak var cons_imgIntroHei: NSLayoutConstraint!
//    @IBOutlet weak var img_intro2: UIImageView!
//    @IBOutlet weak var cons_imgIntro2Hei: NSLayoutConstraint!
    @IBOutlet weak var label_price: UILabel!
    @IBOutlet weak var label_originPrice: UILabel!
    @IBOutlet weak var label_coin: UILabel!
@@ -52,7 +48,6 @@
            guard let weakSelf = self else { return }
            if let model = data.data{
                weakSelf.weeklyItemDetailModel = model
//                weakSelf.img_cover.sd_setImage(with: URL(string: model.detailDrawing))
                weakSelf.label_name.text = model.coursePackageName
                weakSelf.label_address.text = model.storeNameAddr
                weakSelf.label_courseNum.text = "\(model.classHours)课时"
@@ -65,17 +60,17 @@
                weakSelf.label_coin.isHidden = model.wanpaiGold == 0
                weakSelf.label_originPrice.isHidden = model.costPrice == 0
                if model.discountPrice > 0{
                    weakSelf.label_price.text = model.discountPrice.currency()
                    weakSelf.label_originPrice.attributedText =  AttributedStringbuilder.build().add(string: model.costPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6"))
                        .delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString
                }else{
                    weakSelf.label_price.text = model.costPrice.currency()
                }
                weakSelf.label_vip.attributedText = AttributedStringbuilder.build().add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")).add(string: model.vipPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString
                weakSelf.label_coin.attributedText = AttributedStringbuilder.build().add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")).add(string: "\(model.wanpaiGold)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString
//                if model.discountPrice > 0{
//                    weakSelf.label_price.text = model.discountPrice.currency()
//                    weakSelf.label_originPrice.attributedText =  AttributedStringbuilder.build().add(string: model.costPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6"))
//                        .delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString
//                }else{
//                    weakSelf.label_price.text = model.costPrice.currency()
//                }
//
//                weakSelf.label_vip.attributedText = AttributedStringbuilder.build().add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")).add(string: model.vipPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString
//
//                weakSelf.label_coin.attributedText = AttributedStringbuilder.build().add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")).add(string: "\(model.wanpaiGold)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString
                weakSelf.img_intro.sd_setImage(with: URL(string: model.detailDrawing)) {[weak self] image, error, type, url in
                    if let img = image{
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -199,25 +199,26 @@
                                            </constraints>
                                        </view>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上课时间:" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zRt-B2-VxK">
                                            <rect key="frame" x="14" y="14" width="71.666666666666671" height="20"/>
                                            <rect key="frame" x="14" y="14" width="72" height="20"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="20" id="g4z-ux-eUw"/>
                                                <constraint firstAttribute="width" constant="72" id="hSa-Fo-lXa"/>
                                            </constraints>
                                            <fontDescription key="fontDescription" type="system" weight="medium" 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" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oZw-he-MSe">
                                            <rect key="frame" x="90.666666666666671" y="14" width="128.66666666666663" height="20"/>
                                            <rect key="frame" x="91" y="14" width="297" height="20"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="20" id="EF4-GU-KpM"/>
                                                <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="EF4-GU-KpM"/>
                                            </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 - 24:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gCN-9v-2nh">
                                            <rect key="frame" x="90.666666666666657" y="42" width="93.666666666666657" height="17"/>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00 - 24:00" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gCN-9v-2nh">
                                            <rect key="frame" x="91" y="42" width="292" height="17"/>
                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                                            <color key="textColor" name="FE6E0D"/>
                                            <nil key="highlightedColor"/>
@@ -230,11 +231,13 @@
                                        <constraint firstItem="zRt-B2-VxK" firstAttribute="leading" secondItem="hQc-bT-aln" secondAttribute="leading" constant="14" id="B4i-dv-OHq"/>
                                        <constraint firstItem="hrq-r5-1M6" firstAttribute="leading" secondItem="hQc-bT-aln" secondAttribute="leading" constant="13" id="D39-DT-QLQ"/>
                                        <constraint firstItem="gCN-9v-2nh" firstAttribute="top" secondItem="oZw-he-MSe" secondAttribute="bottom" constant="8" id="GFo-G5-Pvd"/>
                                        <constraint firstAttribute="trailing" secondItem="gCN-9v-2nh" secondAttribute="trailing" constant="10" id="MtU-Li-KME"/>
                                        <constraint firstItem="hrq-r5-1M6" firstAttribute="top" secondItem="gCN-9v-2nh" secondAttribute="bottom" constant="14" id="bKB-KY-57w"/>
                                        <constraint firstItem="oZw-he-MSe" firstAttribute="centerY" secondItem="zRt-B2-VxK" secondAttribute="centerY" id="iYG-Xo-prr"/>
                                        <constraint firstItem="gCN-9v-2nh" firstAttribute="leading" secondItem="oZw-he-MSe" secondAttribute="leading" id="j8e-7o-2ew"/>
                                        <constraint firstAttribute="bottom" secondItem="hrq-r5-1M6" secondAttribute="bottom" constant="12" id="jab-HZ-SRd"/>
                                        <constraint firstItem="oZw-he-MSe" firstAttribute="leading" secondItem="zRt-B2-VxK" secondAttribute="trailing" constant="5" id="tV8-D0-IcO"/>
                                        <constraint firstAttribute="trailing" secondItem="oZw-he-MSe" secondAttribute="trailing" constant="5" id="vro-n9-BeA"/>
                                    </constraints>
                                </view>
                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9fb-wg-pcf">
WanPai/Root/Welfare/VC/WelfareWeeklyListVC.swift
@@ -28,13 +28,12 @@
        pageMenu.dividingLineHeight = 1
        // item
        pageMenu.spacing = 20.0
        pageMenu.permutationWay = .notScrollEqualWidths
        pageMenu.setItems(["限时折扣","赠送课时"], selectedItemIndex: 0)
        // 字体
        pageMenu.selectedItemTitleFont = UIFont.systemFont(ofSize: 14, weight: .semibold)
        pageMenu.unSelectedItemTitleFont = UIFont.systemFont(ofSize: 14,weight: .medium)
        pageMenu.selectedItemTitleFont = UIFont.systemFont(ofSize: 16, weight: .semibold)
        pageMenu.unSelectedItemTitleFont = UIFont.systemFont(ofSize: 16,weight: .medium)
        // 颜色
        pageMenu.selectedItemTitleColor = .black.withAlphaComponent(0.8)
        pageMenu.unSelectedItemTitleColor = .black.withAlphaComponent(0.6)
@@ -73,7 +72,7 @@
    }
    override func setUI() {
        pageMenu.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 9, width: JQ_ScreenW, height: 45)
        pageMenu.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 5, width: JQ_ScreenW, height: 45)
        pageMenu.layer.shadowColor = UIColor(hexStr: "#EFEEEE").withAlphaComponent(0.5).cgColor
        pageMenu.layer.shadowOffset = CGSize(width: 0, height: 2)
        pageMenu.layer.shadowOpacity = 1
@@ -84,7 +83,7 @@
        view.insertSubview(pageViewController.view, at: 0)
        pageViewController.didMove(toParent: self)
        pageViewController.view.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 9 + 45, width: JQ_ScreenW, height: JQ_ScreenH - view.safeAreaInsets.top - JQ_NavBarHeight - 9 - 45)
        pageViewController.view.frame = CGRect(x: 0, y: view.safeAreaInsets.top + JQ_NavBarHeight + 5 + 45, width: JQ_ScreenW, height: JQ_ScreenH - view.safeAreaInsets.top - JQ_NavBarHeight - 5 - 45)
    }
}
WanPai/Root/Welfare/VC/WelfareWeeklySubListVC.swift
@@ -60,6 +60,7 @@
extension WelfareWeeklySubListVC:UITableViewDelegate{
    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let model = viewModel.dataSource.value[indexPath.row]
        guard model.status == 1 else {return}
        let vc = WelfareWeeklyDetailVC(id: model.coursePackageDiscountId)
        push(vc: vc)
    }
WanPai/Root/Welfare/View/CoinStoreHeadView.swift
@@ -113,9 +113,9 @@
    }
    @IBAction func storeAction(_ sender: UIButton) {
        StoresChooseView.show { [weak self] storeId,storeName in
            self?.btn_store.setTitle(storeName, for: .normal)
            self?.viewModel.shopId.accept(storeId)
        StoresChooseView.show { [weak self] province,city,store in
            self?.btn_store.setTitle(store.name, for: .normal)
            self?.viewModel.shopId.accept(store.id)
            self?.viewModel.beginRefresh()
        }
    }