无故事王国
2023-11-01 cb119c1aa79c5c5477f876660bee7ca0cb856ace
修复BUG
7个文件已修改
73 ■■■■■ 已修改文件
WanPai/Network/Services.swift 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/TCell/CourseOnlineTCell.xib 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseVideoDetailVC.swift 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/CCell/CouponCCell.swift 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/VC/PaymentResultVC.swift 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/VC/PaymentResultVC.xib 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardDetailVC.swift 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Network/Services.swift
@@ -220,6 +220,15 @@
            .append(key: "stuId", value: studentId)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
        /// 成为会员获取优惠券
        /// - Parameter menthod: 1=积分购买,2=注册赠送
    static func queryMemberCoupon(menthod:Int)->Observable<BaseResponse<[CouponInfoModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/activity/api/coupon/queryCouponList")
            .append(key: "distributionMethod", value: menthod)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
}
    // MARK: -- 首页部分
WanPai/Root/Course/TCell/CourseOnlineTCell.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
    <device id="retina6_12" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
        <capability name="Named colors" minToolsVersion="9.0"/>
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -58,7 +58,7 @@
                        <color key="textColor" red="0.93333333333333335" green="0.043137254901960784" blue="0.043137254901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <nil key="highlightedColor"/>
                    </label>
                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BbO-Ve-6Ru">
                    <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BbO-Ve-6Ru">
                        <rect key="frame" x="369" y="92" width="86" height="31"/>
                        <color key="backgroundColor" name="FE6E0D"/>
                        <constraints>
WanPai/Root/Course/VC/CourseVideoDetailVC.swift
@@ -53,10 +53,13 @@
        super.viewDidLoad()
        if let id {
            try? AVAudioSession.sharedInstance().setCategory(.playAndRecord, options: .defaultToSpeaker)
            Services.benefitsVideoDetail(id: id).subscribe(onNext: { [weak self] data in
                if let model = data.data{
                    self?.detailModel = model
                    self?.playerVC.player = AVPlayer(url: URL(string: model.courseVideo)!)
                    self?.playerVC.exitsFullScreenWhenPlaybackEnds = true
                    self?.playerVC.entersFullScreenWhenPlaybackBegins = true
                    self?.playerVC.player?.play()
                    self?.playerVC.player?.addPeriodicTimeObserver(forInterval: CMTimeMake(value: 1, timescale: 1), queue: DispatchQueue.main) { [weak self](time) in
WanPai/Root/Other/CCell/CouponCCell.swift
@@ -22,19 +22,20 @@
    var courseCouponModel:CourseCouponModel!{
        didSet{
            if let m = courseCouponModel{
                label_name.text = m.type.rawTitle
                label_name.text = m.name
                label_useCity.text = m.available
                let ruleModel = CouponModelRuleModel.deserialize(from: m.content)
                switch m.type {
                    case .discount:
                        label_money.text = ruleModel?.deductionAmount ?? ""
                        label_fullMinus.isHidden = false
                        label_fullMinus.text = ruleModel?.conditionalAmount ?? ""
                    case .voucher:
                        label_money.text = ruleModel?.conditionalAmount ?? ""
                    case .discount: //满减券
                        label_money.text = "\(ruleModel?.deductionAmount ?? "")元"
                        label_fullMinus.isHidden = true
                    case .experience:
                        label_useCity.text = String(format: "满%@元可用", ruleModel?.conditionalAmount ?? "0")
                        label_fullMinus.text = "\(ruleModel?.conditionalAmount ?? "")元"
                    case .voucher: //代金券
                        label_money.text = "\(ruleModel?.conditionalAmount ?? "")元"
                        label_fullMinus.isHidden = true
                    case .experience: //体验券
                        label_money.text = ruleModel?.experienceName ?? ""
                        label_fullMinus.isHidden = true
                    case .none:
WanPai/Root/Other/VC/PaymentResultVC.swift
@@ -76,17 +76,23 @@
            case .fail(let str, _):
                label_content.text = str
            case .success:
                label_content.text = "支付成功,恭喜您成为玩湃会员!并获得优惠券!"
                        label_content.text = "支付成功,恭喜您成为玩湃会员!"
            case .none:break
            }
//                Services.queryMemberCoupon(menthod: 1).subscribe(onNext: { data in
//
//                }) { error in
//
//                }.disposed(by: disposeBag)
        case .courseApply:
                //课时购买
            btn_backHome.isHidden = true
                if let id = courseConfigId{
                    Services.paymentCourseCouponList(id: id).subscribe(onNext: { data in
                    Services.paymentCourseCouponList(id: id).subscribe(onNext: {[weak self] data in
                        if let models = data.data{
                            self.models = models
                            self.collectionView.reloadData()
                            self?.models = models
                            self?.collectionView.reloadData()
                        }
                    }) { error in
@@ -153,7 +159,7 @@
                case .success:
                    btn_again.setTitle("查看预约", for: .normal)
                    btn_back.setTitle("返回首页", for: .normal)
                    label_content.text = "报名成功,请注意预约开始时间!"
                    label_content.text = "预约成功,请注意预约开始时间!"
                case .none:break
                }
@@ -221,13 +227,19 @@
    
    @IBAction func backAction(_ sender: UIButton) {
        navigationController?.popViewController(animated: true, {
            if sender.titleLabel?.text == "我的数据"{
                JQ_currentViewController().jq_push(vc: GamesDataSourceVC())
            }
        if sender.titleLabel?.text == "返回首页"{
            navigationController?.qmui_popToRootViewController(animated: true, completion: {
                JQ_currentViewController().tabBarController?.selectedIndex = 0
        })
    }
        if sender.titleLabel?.text == "我的数据"{
            navigationController?.popViewController(animated: true, {
                JQ_currentViewController().jq_push(vc: GamesDataSourceVC())
            })
        }
    }
    override var preferredStatusBarStyle: UIStatusBarStyle{
        return .lightContent
    }
WanPai/Root/Other/VC/PaymentResultVC.xib
@@ -57,7 +57,7 @@
                    </constraints>
                    <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="返回主页">
                    <state key="normal" title="返回首页">
                        <color key="titleColor" red="0.36862745098039218" green="0.36862745098039218" blue="0.36862745098039218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                    </state>
                    <userDefinedRuntimeAttributes>
WanPai/Root/Yard/VC/YardDetailVC.swift
@@ -331,8 +331,8 @@
    @IBAction func bookingAction(_ sender: UIButton) {
        guard !YardDetailDateManager.shared().dates.value.isEmpty else {alertError(msg: "请选择预约时间");return}
        guard !tf_person.isEmpty else {alertError(msg: "请输入预约人");return}
        guard !tf_phone.isEmpty else {alertError(msg: "请输入联系方式");return}
        guard !tf_person.isEmpty else {alertError(msg: "请输入预约人");tf_person.becomeFirstResponder();return}
        guard !tf_phone.isEmpty else {alertError(msg: "请输入联系方式");tf_phone.becomeFirstResponder();return}
        guard tf_phone.text!.jq_isPhone else {alertError(msg: "请输入正确的联系方式");return}
        if btn_halfYard.isSelected && halfIndex == nil{
            alert(msg: "请选择半场");return
@@ -383,6 +383,8 @@
                                                weakSelf.push(vc: vc)
                                            case .cancel:
                                                alert(msg: "交易取消")
                                                let vc = YardBookingListVC(page: 5)
                                                weakSelf.push(vc: vc)
                                            case .failure(_):
                                                NotificationCenter.default.post(name: UpdateDetailDate_Noti, object: nil)
                                                let vc = PaymentResultVC(result: .fail("交易失败",0), objType: .yard,handleVC: nil)