无故事王国
2023-11-14 2a7b12af07d814030c1326f56fec6ebf0d11619f
修复BUG
13个文件已修改
105 ■■■■■ 已修改文件
WanPai/Model/CommonModels.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Network/Services.swift 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/TCell/ActivityInfoTCell.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailApplyVC.swift 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailVC.swift 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseInfoVC.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Home/Model/HomeModel.swift 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Home/VC/HomeVC.swift 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/View/StudentChooseView.swift 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.swift 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.xib 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Model/CommonModels.swift
@@ -198,6 +198,7 @@
    var storeName: String = ""
    var storeInfos = [ActivityDetailStoreModel]()
    var hasPass = 0 // 0:正常,1:截止
    var isReal:Int = 0
}
struct ActivityDetailStoreModel:HandyJSON{
WanPai/Network/Services.swift
@@ -1076,9 +1076,11 @@
        /// 获取参赛人员列表
    class func queryParticipantList(isAuth:Int? = nil)->Observable<BaseResponse<[ActivityDetailPartModel]>>{
        let params = ParamsAppender.build(url: All_Url)
        var params = ParamsAppender.build(url: All_Url)
            .interface(url: "competition/api/participant/queryParticipantList")
            .append(key: "isPre", value: isAuth)
        if isAuth == 1{
            params.append(key: "isPre", value: isAuth)
        }
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
WanPai/Root/Activity/TCell/ActivityInfoTCell.swift
@@ -13,7 +13,7 @@
    var activityListModel:ActivityListModel?{
        didSet{
            if let m = activityListModel{
                img_profile.sd_setImage(with: URL(string: m.coverDrawing)!,placeholderImage: UIImage(named: "placeholder_1"))
                img_profile.sd_setImage(with: URL(string: m.coverDrawing),placeholderImage: UIImage(named: "placeholder_1"))
                label_title.text = m.name
                var temp = [String]()
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
@@ -115,7 +115,7 @@
    }
    @IBAction func addStudentAction(_ sender: QMUIButton) {
        StudentChooseView.show(itemType: .activity, defaultStu: students) { [weak self] studs in
        StudentChooseView.show(itemType: .activity, defaultStu: students,isAuth: activityDetailModel.isReal) { [weak self] studs in
            self?.students = studs as! [ActivityDetailPartModel]
            self?.cons_tableHei.constant = Double(self?.students.count ?? 0) * 100
            self?.tableView.reloadData()
WanPai/Root/Course/VC/CourseDetailApplyVC.swift
@@ -278,10 +278,10 @@
                    label_price.isHidden = true
                    label_originPrice.isHidden = true
                    label_vipPrice.isHidden = true
                    label_coin.isHidden = false
                    //纯玩湃币没有优惠券项
                    btn_hasCoupon.isHidden = true
                    label_coin.isHidden = false
                        //玩湃币
                    label_coin.attributedText = AttributedStringbuilder.build()
                        .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
@@ -296,7 +296,7 @@
                        label_originPrice.isHidden = false
                    }
//                    label_originPrice.isHidden = (subM.paymentPrice == subM.originalPrice && subM.paymentPrice != 0 && subM.originalPrice != 0)
                    label_coin.isHidden = false
                        //玩湃币
                    label_coin.attributedText = AttributedStringbuilder.build()
                        .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
@@ -307,6 +307,8 @@
                    label_originPrice.attributedText = attribute.mutableAttributedString
                    if UserInfoModel.get()?.isVip == 1{
                        if subM.payType != .coin{
                            //会员
                        label_vipPrice.isHidden = true
                        if subM.paymentPrice < subM.vipPrice && subM.paymentPrice != 0{
@@ -319,7 +321,10 @@
                        }else{
                            label_price.text = (subM.paymentPrice * studentCount - (selectCouponModel?.favorable ?? 0)).currency()
                        }
                        }
                    }else{
                        if subM.payType != .coin{
                            //非会员
                        label_vipPrice.isHidden = subM.vipPrice == 0 || subM.vipPrice == subM.paymentPrice
                        let vipAttribute = AttributedStringbuilder.build()
@@ -341,17 +346,23 @@
                        }
                    }
            }
            }
            if detailModel?.type == .experience{
                if subM.paymentPrice != 0{
                label_price.text = subM.paymentPrice.currency()
                    label_price.isHidden = false
                }
                view_teach.isHidden = true
                label_originPrice.isHidden = true
                label_vipPrice.isHidden = true
            }
            if label_originPrice.isHidden && label_vipPrice.isHidden && label_coin.isHidden{
                label_coin.alpha = 0
            }
                //            if label_originPrice.isHidden && label_vipPrice.isHidden && label_coin.isHidden{
                //                label_coin.alpha = 0
                //            }
        }
    }
WanPai/Root/Course/VC/CourseDetailVC.swift
@@ -73,7 +73,7 @@
                            label_price.isHidden = true
                            label_originPrice.isHidden = true
                            label_vipPrice.isHidden = true
                            label_coin.isHidden = false
                            //玩湃币
                            label_coin.attributedText = AttributedStringbuilder.build()
                                .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
@@ -87,6 +87,7 @@
                            }else{
                                label_originPrice.isHidden = false
                            }
                            label_coin.isHidden = false
                                //玩湃币
                            label_coin.attributedText = AttributedStringbuilder.build()
                                .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F"))
@@ -97,6 +98,7 @@
                            label_originPrice.attributedText = attribute.mutableAttributedString
                            if UserInfoModel.get()?.isVip == 1{
                                if subM.payType != .coin{
                                    //会员
                                label_vipPrice.isHidden = true
                                //优惠价比会员价更优惠
@@ -112,7 +114,9 @@
                                }else{
                                    label_price.text = subM.paymentPrice.currency()
                                }
                                }
                            }else{
                                if subM.payType != .coin{
                                    //非会员
                                label_vipPrice.isHidden = subM.vipPrice == 0 || subM.vipPrice == subM.paymentPrice
                                let vipAttribute = AttributedStringbuilder.build()
@@ -133,14 +137,20 @@
                            }
                    }
                }
                }
                if m.type == .experience{
                    label_price.text = (m.list.first?.paymentPrice ?? 0).currency()
                    if  m.list.first?.paymentPrice != 0{
                        label_price.text = (m.list.first!.paymentPrice).currency()
                        label_price.isHidden = false
                    }
                    label_vaildTime.text = "购买当天有效"
                    label_originPrice.isHidden = true
                    label_vipPrice.isHidden = true
                    view_listen.isHidden = true
                    label_price.isHidden = (m.list.first?.paymentPrice ?? 0) == 0
//                    label_price.isHidden = (m.list.first?.paymentPrice ?? 0) == 0
                }
                    //体验课,假期课不展示
@@ -149,9 +159,9 @@
                    cons_handleHei.constant = 0
                }
                if label_originPrice.isHidden && label_vipPrice.isHidden && label_coin.isHidden{
                    label_coin.alpha = 0
                }
//                if label_originPrice.isHidden && label_vipPrice.isHidden && label_coin.isHidden{
//                    label_coin.alpha = 0
//                }
            }
        }
    }
WanPai/Root/Course/VC/CourseInfoVC.swift
@@ -117,7 +117,7 @@
    override func setUI() {
        cons_menuHeight.constant = 0
        scrollView.contentInset = UIEdgeInsets( top: 265 - JQ_NavBarHeight, left: 0, bottom: 0, right: 0)
        scrollView.contentInset = UIEdgeInsets( top: UIDevice.jq_safeEdges.top  + 158, left: 0, bottom: 0, right: 0)
        scrollView.delegate = self
        scrollView.bringSubviewToFront(img_header)
WanPai/Root/Home/Model/HomeModel.swift
@@ -30,8 +30,6 @@
    var sort:Int = 0
    var backgroundImage:String = ""
    var cellHeight:Double = 270
}
class HomeStoreTopBannerModel:HandyJSON{
@@ -44,8 +42,7 @@
    var type:String = "" //类型
    var turnId:Int?
    var model = ""
    var sort = 0
    var cellHeight:Double = 270
}
WanPai/Root/Home/VC/HomeVC.swift
@@ -11,10 +11,6 @@
import RxCocoa
import SDWebImage
    //http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
    //http://vjs.zencdn.net/v/oceans.mp4
    //https://media.w3.org/2010/05/sintel/trailer.mp4
let ChooseHomeStore_Noti = Notification.Name.init("ChooseHomeStore_Noti")
let UpdateCurrentStore_Noti = Notification.Name.init("UpdateCurrentStore_Noti")
@@ -58,7 +54,6 @@
        }).disposed(by: disposeBag)
        Services.bannerList(position: .homeTop).subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
            if let models = data.data{
                var bannerResources = [CommonBannerModel]()
                for (i,item) in models.enumerated() {
@@ -117,7 +112,6 @@
    private func getStoreItemList(){
//        showHUD()
        items.removeAll()
        Services.homeStoreConfig(storeId: storeId!).subscribe(onNext: {[weak self] data in
@@ -185,6 +179,18 @@
        }
        group.notify(queue: .main) {
            self.items = self.items.sorted { v1, v2 in
                var v1Sort = 0
                var v2Sort = 0
                v1Sort = (v1 as? HomeStoreConfigModel)?.sort ?? 0
                v2Sort = (v2 as? HomeStoreConfigModel)?.sort ?? 0
                v1Sort = (v1 as? HomeStoreTopBannerModel)?.sort ?? 0
                v2Sort = (v2 as? HomeStoreTopBannerModel)?.sort ?? 0
                return v1Sort < v2Sort
            }
            self.layout.collectionView?.reloadData()
            self.collectionView.reloadData()
        }
WanPai/Root/Other/View/StudentChooseView.swift
@@ -19,8 +19,9 @@
}
class ActivityViewModel:RefreshModel<ActivityDetailPartModel>{
    var isAuth = BehaviorRelay<Int?>.init(value: nil)
    override func api() -> (Observable<BaseResponse<[ActivityDetailPartModel]>>)? {
        return Services.queryParticipantList(isAuth: 1)
        return Services.queryParticipantList(isAuth: isAuth.value)
    }
    
}
@@ -63,7 +64,7 @@
        setRx()
    }
    
    static func show(itemType:ItemType,defaultStu:[Any]? = nil,clickClouse:@escaping ([Any])->Void,needAddClouse:@escaping ()->Void){
    static func show(itemType:ItemType,defaultStu:[Any]? = nil,isAuth:Int? = nil,clickClouse:@escaping ([Any])->Void,needAddClouse:@escaping ()->Void){
        let studentChooseView = StudentChooseView.jq_loadNibView()
        if defaultStu != nil{
            studentChooseView.selectStudents = defaultStu!
@@ -88,6 +89,7 @@
            studentChooseView.stuViewModel.beginRefresh()
        }else{
            studentChooseView.actViewModel.configure(studentChooseView.tableView,needMore: false)
            studentChooseView.actViewModel.isAuth.accept(isAuth)
            studentChooseView.actViewModel.beginRefresh()
            studentChooseView.cons_tableLeading.constant = 0
            studentChooseView.cons_tableTrailing.constant = 0
WanPai/Root/Welfare/VC/WelfareRedeemGoodsDetailVC.swift
@@ -236,11 +236,11 @@
        switch exchangeGoodsModel!.exchangeType{
            case .cash:
                attribute.add(string: (exchangeGoodsModel!.cash * Double(num)).currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8))
                attribute.add(string: (exchangeGoodsModel!.cash * Double(studentModels.count) * Double(num)).currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8))
            case .cashAndCoin:
                attribute.add(string: String(format: "%ld积分和%@", exchangeGoodsModel!.integral * num,(exchangeGoodsModel!.cash * Double(num)).currency()), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8))
                attribute.add(string: String(format: "%ld积分和%@", exchangeGoodsModel!.integral * num * studentModels.count,(exchangeGoodsModel!.cash * Double(num) * Double(studentModels.count)).currency()), withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8))
            case .coin:
                attribute.add(string: "\(exchangeGoodsModel!.integral * num)积分", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8))
                attribute.add(string: "\(exchangeGoodsModel!.integral * num * studentModels.count)积分", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexStr: "#E41818").withAlphaComponent(0.8))
        }
        attribute.add(string: "兑换此商品吗?", withFont: UIFont.systemFont(ofSize: 16, weight: .medium), withColor: .black.withAlphaComponent(0.9))
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.swift
@@ -43,6 +43,7 @@
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "运动营详情"
        label_vip.isHidden = true
        Services.weekBenefitDetail(id: id).subscribe(onNext: {[weak self] data in
            guard let weakSelf = self else { return }
@@ -56,10 +57,13 @@
                weakSelf.label_attendWeeks.text = model.weekTime
                weakSelf.label_datetime.text = model.time
                weakSelf.label_distance.text = String(format: "距离我%.2lfkm", model.distance)
                weakSelf.label_vip.isHidden  = model.discountPrice == 0
                weakSelf.label_coin.isHidden = model.wanpaiGold == 0
                weakSelf.label_originPrice.isHidden = model.costPrice == 0
                weakSelf.label_originPrice.attributedText = AttributedStringbuilder.build().add(string: model.costPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).mutableAttributedString
                weakSelf.label_price.text = model.discountPrice.currency()
                weakSelf.img_intro.sd_setImage(with: URL(string: model.detailDrawing)) {[weak self] image, error, type, url in
                    if let img = image{
                        self?.img_intro.image = img
WanPai/Root/Welfare/VC/WelfareWeeklyDetailVC.xib
@@ -157,8 +157,8 @@
                                                <constraint firstAttribute="height" constant="1" id="Ctc-XK-pWb"/>
                                            </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="IWq-FM-yEj">
                                            <rect key="frame" x="14" y="14" width="86" height="20"/>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="额外赠送:" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IWq-FM-yEj">
                                            <rect key="frame" x="14" y="14" width="71.666666666666671" height="20"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="20" id="Vgb-AO-v9r"/>
                                            </constraints>
@@ -167,7 +167,7 @@
                                            <nil key="highlightedColor"/>
                                        </label>
                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0课时" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mQE-9m-7Uc">
                                            <rect key="frame" x="105" y="14" width="37.333333333333343" height="20"/>
                                            <rect key="frame" x="90.666666666666671" y="14" width="37.333333333333329" height="20"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="20" id="y12-6z-YGI"/>
                                            </constraints>