无故事王国
2023-10-30 43574ebb55e06a2213d3097745f82968efc43b32
调整闸机和游戏部分
16个文件已修改
101 ■■■■■ 已修改文件
WanPai/Common/VC/CommonWebVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/CommonBannerView.swift 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/View/PaymentView.swift 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Config/Def.swift 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Model/CommonModels.swift 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Network/Services.swift 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivitySignupListSubVC.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseBooking_1_TCell.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseInfoVC.swift 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Games/TCell/GamesTCell.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Login/VC/BindPhoneVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Login/VC/LoginVC.swift 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/CCell/CouponCCell.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/RechargeCenterVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklyListVC.swift 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/VC/CommonWebVC.swift
@@ -45,7 +45,7 @@
    }
    override var preferredStatusBarStyle: UIStatusBarStyle{
        return .lightContent
        return .darkContent
    }
    override var shouldAutorotate: Bool{
WanPai/Common/View/CommonBannerView.swift
@@ -80,6 +80,7 @@
        image.sizeToFit()
        image.frame = CGRect(x:0,y:0,width:width,height:height)
        image.contentMode = .scaleToFill
        image.tag = images.count - 1
        image.isUserInteractionEnabled = true
        setImage(image: image, index: images.count - 1)
        scrollView.addSubview(image)
@@ -101,6 +102,7 @@
        image.frame = CGRect(x:width * CGFloat(images.count +
                                               1),y:0,width:width,height:height)
        image.contentMode = .scaleToFill
        image.tag = 0
        image.isUserInteractionEnabled = true
        scrollView.addSubview(image)
        setImage(image: image, index: 0)
WanPai/Common/View/PaymentView.swift
@@ -30,8 +30,7 @@
    @IBOutlet weak var label_courseMoney: UILabel!
    @IBOutlet weak var btn_complete: UIButton!
    @IBOutlet weak var btn_integral: UIButton!
    private var hasNotStudent:Bool = false
    private var clouse:((PayType)->Void)?
    private var payType:PayType?
@@ -48,7 +47,7 @@
        layoutIfNeeded()
    }
    static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),_ clouse:@escaping (PayType)->Void){
    static func show(money:(ali:Double?,wx:Double?,coin:Int?,course:Int?,integral:Int?),hasNotStudent:Bool = false,_ clouse:@escaping (PayType)->Void){
        let paymentView = PaymentView.jq_loadNibView()
        paymentView.frame = sceneDelegate?.window?.frame ?? .zero
        paymentView.clouse = clouse
@@ -62,6 +61,7 @@
        paymentView.label_coinMoney.text = "\(money.coin ?? 0)币"
        paymentView.label_courseMoney.text = "\(money.course ?? 0)课时"
        paymentView.label_integral.text = "\(money.integral ?? 0)积分"
        paymentView.view_course.alpha = hasNotStudent ? 0.5:1
        sceneDelegate?.window?.addSubview(paymentView)
        paymentView.cons_bottom.constant = 0
@@ -70,6 +70,8 @@
        if !paymentView.view_wechat.isHidden{customType.append(.wechat)}
        if !paymentView.view_coin.isHidden{customType.append(.coin)}
        paymentView.btn_course.isUserInteractionEnabled = !hasNotStudent
        paymentView.payType = customType.first
        switch customType.first {
            case .aliPay:paymentView.btn_alipay.isSelected = true
WanPai/Config/Def.swift
@@ -169,29 +169,37 @@
                }
            }
            if page == "线上课得积分" || page == "看视频得奖励"{
            if page == "线上课得积分"{
                if type == "详情"{
                    let vc = CourseVideoDetailVC(id: id ?? 0)
                    vc.title = page
                    JQ_currentViewController().jq_push(vc: vc)
                }else{
                }else if type == "列表"{
                    let vc = CourseOnlineSubListVC(classificationId: id ?? 0)
                    vc.title = page
                    JQ_currentViewController().jq_push(vc: vc)
                }else if type == "主页"{
                    let vc = CourseOnlineListVC(position: 1)
                    vc.title = page
                    JQ_currentViewController().jq_push(vc: vc)
                }
            }
//            if page == "看视频得奖励"{
//                if type == "详情"{
//                    let vc = CourseVideoDetailVC(id: id ?? 0)
//                    vc.title = page
//                    JQ_currentViewController().jq_push(vc: vc)
//                }else{
//                    let vc = CourseOnlineSubListVC(classificationId: id ?? 0)
//                    vc.title = page
//                    JQ_currentViewController().jq_push(vc: vc)
//                }
//            }
            if page == "看视频得奖励"{
                if type == "详情"{
                    let vc = CourseVideoDetailVC(id: id ?? 0)
                    vc.title = page
                    JQ_currentViewController().jq_push(vc: vc)
                }else if type == "列表"{
                    let vc = CourseOnlineSubListVC(classificationId: id ?? 0)
                    vc.title = page
                    JQ_currentViewController().jq_push(vc: vc)
                }else if type == "主页"{
                    let vc = CourseOnlineListVC(position: 2)
                    vc.title = page
                    JQ_currentViewController().jq_push(vc: vc)
                }
            }
            if page == "预约场地"{
                if type == "详情"{
WanPai/Model/CommonModels.swift
@@ -216,6 +216,7 @@
    var gender:GenderType = .man
    var height:Double = 0
    var weight:Double = 0
    var isStudent = 0 // 1:是学员, 0:否
}
@@ -777,6 +778,7 @@
    var userPopulation: Int = 0
    var useScope: Int = 0
    var available:String = ""
    var timePeriod:String = "" //有效期
}
struct YardBookingDetailModel:HandyJSON{
WanPai/Network/Services.swift
@@ -14,7 +14,8 @@
#if DEBUG
//let All_Url = "https://ds867zleb4ow.xiaomiqiu.com"
//let All_Url = "http://192.168.110.27:56666"
let All_Url = "http://8.137.22.229:56666"
let All_Url = "http://8.137.22.229:56666" //正式地址
//let All_Url = "http://8.137.22.229: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/Activity/VC/ActivityDetailApplyVC.swift
@@ -135,7 +135,8 @@
            let course = weakSelf.activityDetailModel.classPrice * weakSelf.students.count
            if status{
                PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course,integral:nil)) { [weak self] type in
                let isStudent = weakSelf.students.filter({$0.isStudent == 0}).count > 0 ? true:false
                PaymentView.show(money: (ali:price,wx:price,coin:coin,course:course,integral:nil),hasNotStudent: isStudent) { [weak self] type in
                    guard let weakSelf = self else { return }
                    if type == .courseNum{
                        PaymentCourseView.show(id: weakSelf.activityDetailModel.id,number:course) { id in
WanPai/Root/Activity/VC/ActivitySignupListSubVC.swift
@@ -25,6 +25,7 @@
        let tableView = BaseTableView(frame: .zero, style: .plain)
        tableView.delegate = self
        tableView.dataSource = self
        tableView.separatorStyle = .none
        tableView.register(UINib(nibName: "ActivityInfoTCell", bundle: nil), forCellReuseIdentifier: "_ActivityInfoTCell")
        return tableView
    }()
WanPai/Root/Course/TCell/CourseBooking_1_TCell.swift
@@ -25,6 +25,7 @@
            btn_exercise.isHidden = studentAppointModel.status != .complete
            btn_cancel.isHidden = true
            btn_qrCode.isHidden = studentAppointModel.status != .pedding
            btn_qrCode.isHidden = false
            switch studentAppointModel.status{
                case .pedding:label_status.textColor = UIColor(hexStr: "#FD7402")
WanPai/Root/Course/VC/CourseInfoVC.swift
@@ -41,6 +41,8 @@
    @IBOutlet weak var view_exerciseTitle: UIView!
    @IBOutlet weak var view_footer: UIView!
    private var updateProdDate:Date?
    var startClouseHomeModel:StartClouseHomeModel?
    var weeklyCourseModel:WeeklyCourseModel?
@@ -94,6 +96,18 @@
        return btn
    }()
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        if let date = updateProdDate{
            //防止反复切换,15秒
            if Date().timeIntervalSince1970 - date.timeIntervalSince1970 > 15{
                updateData()
            }
        }
    }
    override func viewDidLoad() {
        super.viewDidLoad()
@@ -192,7 +206,7 @@
    private func updateData(){
        if let m = startClouseHomeModel{
            updateProdDate = Date()
            img_header.sd_setImage(with: URL(string: m.stuImg))
            label_stu_name.text = m.stuName
            img_gender.image = m.stuSex == .man ? UIImage(named: "icon_man") : UIImage(named: "icon_woman")
WanPai/Root/Games/TCell/GamesTCell.swift
@@ -41,7 +41,7 @@
            guard let weakSelf = self else { return }
            PaymentView.show(money: (ali: weakSelf.gameListModel.cash, wx: weakSelf.gameListModel.cash, coin: weakSelf.gameListModel.playCoin, course: nil,integral:weakSelf.gameListModel.integral)) { [weak self] payType in
                guard let weakSelf = self else { return }
                Services.payGame(configId: weakSelf.gameListModel.id, gameId: weakSelf.gameListModel.gameId, spaceId: weakSelf.spaceId, sutuId: weakSelf.sutuId, type: payType).subscribe(onNext: {data in
                Services.payGame(configId: weakSelf.gameListModel.id, gameId: weakSelf.gameListModel.gameId, spaceId: weakSelf.storeId, sutuId: weakSelf.sutuId, type: payType).subscribe(onNext: {data in
                    switch payType {
                        case .wechat:break
                        case .aliPay:
WanPai/Root/Login/VC/BindPhoneVC.swift
@@ -76,7 +76,7 @@
                alert(msg: data.msg)
            }
        }) { error in
            alertError(msg: error.localizedDescription)
        }.disposed(by: disposeBag)
    }
WanPai/Root/Login/VC/LoginVC.swift
@@ -200,8 +200,15 @@
extension LoginVC:UITextViewDelegate{
    func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
        var str:String = ""
        if #available(iOS 16.0, *) {
            if let str = URL.host(percentEncoded: true){
            str = URL.host(percentEncoded: true)!
        } else {
            str = URL.host!
        }
                switch str {
                case "treaty":
                        push(vc: CommonWebVC(type: .privacy))
@@ -212,10 +219,5 @@
                default:break
                }
                return true
            }
        } else {
            // Fallback on earlier versions
        }
        return false
    }
}
WanPai/Root/Other/CCell/CouponCCell.swift
@@ -40,7 +40,7 @@
                    case .none:
                        label_fullMinus.isHidden = true
                }
                label_vaildTime.text = String(format: "有效期至%@-%@", courseCouponModel.startTime,courseCouponModel.endTime)
                label_vaildTime.text = String(format: "有效期至%@", courseCouponModel.timePeriod)
            }
        }
    }
WanPai/Root/Welfare/VC/RechargeCenterVC.swift
@@ -59,7 +59,7 @@
                weakSelf.items.append(RechargeItem(coin: v.wpGold, money: v.amount))
            }
            let h = ceil(Double(weakSelf.items.count) / 3.0) * weakSelf.cellH + (floor(Double(weakSelf.items.count) / 3.0) - 1) * 18.0
            let h = ceil(Double(weakSelf.items.count) / 3.0) * weakSelf.cellH + (floor(Double(weakSelf.items.count) / 3.0) - 1) * 21.0
            weakSelf.cons_collectHei.constant = h
            weakSelf.collectionView.reloadData()
        }).disposed(by: disposeBag)
WanPai/Root/Welfare/VC/WelfareWeeklyListVC.swift
@@ -66,9 +66,10 @@
        pageMenu.delegate = self
        pageViewController.delegate = self
        pageViewController.scroll(toPage: toPage, animation: false)
        pageMenu.selectedItemIndex = toPage
        DispatchQueue.main.asyncAfter(deadline: .now()+0.3) {
            self.pageViewController.scroll(toPage: self.toPage, animation: false)
            self.pageMenu.selectedItemIndex = self.toPage
        }
    }
    override func setUI() {