杨锴
2024-11-26 19e3fd5eecfa5fdf1b16b60e3462a5a61de1136e
fix BUG
9个文件已修改
2个文件已删除
2个文件已添加
316 ■■■■■ 已修改文件
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/Contents.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/新手冥想指南 1.jpg 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/新手冥想指南.jpg 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/组 20@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/组 20@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Home/VC/PaymentOrderVC.swift 250 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/InviteVC.swift 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/VIPCenterVC.swift 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Me/VC/WalletRechargeVC.swift 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Network/Models.swift 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/Network/Services.swift 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Root/PayMusicView/PayMusicVC.swift 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/SceneDelegate.swift 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/Contents.json
@@ -5,12 +5,12 @@
      "scale" : "1x"
    },
    {
      "filename" : "组 20@2x.png",
      "filename" : "新手冥想指南.jpg",
      "idiom" : "universal",
      "scale" : "2x"
    },
    {
      "filename" : "组 20@3x.png",
      "filename" : "新手冥想指南 1.jpg",
      "idiom" : "universal",
      "scale" : "3x"
    }
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/新手冥想指南 1.jpg
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/新手冥想指南.jpg
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/组 20@2x.png
Binary files differ
XQMuse/Assets.xcassets/Placeholder/bg_guide_home.imageset/组 20@3x.png
Binary files differ
XQMuse/Root/Home/VC/PaymentOrderVC.swift
@@ -16,6 +16,9 @@
    case t1
    case t2 //z__f__b
    case t3 //w__x
    case t1t2//组合
    case t1t3//组合
    case none
}
class PaymentOrderVC: BaseVC {
@@ -59,10 +62,41 @@
    @IBOutlet weak var img_action_2: UIImageView!
    @IBOutlet weak var img_action_3: UIImageView!
    private var tapType:TapType?
    private var price:Double = 0
    private var tapType:TapType = .none{
        didSet{
            switch tapType {
                case .t1:
                    img_action_1.image = UIImage(named: "icon_choose_small_s")
                    img_action_2.image = UIImage(named: "icon_choose_small_1")
                    img_action_3.image = UIImage(named: "icon_choose_small_1")
                case .t2:
                    img_action_1.image = UIImage(named: "icon_choose_small_1")
                    img_action_2.image = UIImage(named: "icon_choose_small_s")
                    img_action_3.image = UIImage(named: "icon_choose_small_1")
                case .t3:
                    img_action_1.image = UIImage(named: "icon_choose_small_1")
                    img_action_2.image = UIImage(named: "icon_choose_small_1")
                    img_action_3.image = UIImage(named: "icon_choose_small_s")
                case .t1t2:
                    img_action_1.image = UIImage(named: "icon_choose_small_s")
                    img_action_2.image = UIImage(named: "icon_choose_small_s")
                    img_action_3.image = UIImage(named: "icon_choose_small_1")
                case .t1t3:
                    img_action_1.image = UIImage(named: "icon_choose_small_s")
                    img_action_2.image = UIImage(named: "icon_choose_small_1")
                    img_action_3.image = UIImage(named: "icon_choose_small_s")
                case .none:
                    img_action_1.image = UIImage(named: "icon_choose_small_1")
                    img_action_2.image = UIImage(named: "icon_choose_small_1")
                    img_action_3.image = UIImage(named: "icon_choose_small_1")
            }
        }
    }
    private var isShowMore:Bool = false
    private var discountByCoin:Bool = false
//    private var discountByCoin:Bool = true
    private var museItemModel:MeditationModel?
    private var courseItemModel:CourseModel?
@@ -99,8 +133,6 @@
        view_searchUserInput.isHidden = !giftToOther
        img_action_1.image = UIImage(named: "icon_choose_small_s")
        getBalance()
        let btn = UIButton(type: .custom)
        btn.setTitle("取消订单", for: .normal)
        btn.setTitleColor(UIColor(hexString: "#353535"), for: .normal)
@@ -115,6 +147,7 @@
            Services.getCourseDetail(courseId: courseItemModel!.id).subscribe(onNext: {data in
                if let m = data.data{
                    self.courseModel = m
                    self.price = m.iosPrice
                    self.image_cover.sd_setImage(with: URL(string: m.coverUrl.components(separatedBy: ",").first?.jq_urlEncoded()))
                    self.label_courseName.text = m.courseTitle
@@ -130,6 +163,7 @@
                        self.label_orderPrice.text = "愈疗币\(m.iosPrice.jq_formatFloat)"
                        self.label_totalPrice.text = "愈疗币\(m.iosPrice.jq_formatFloat)"
                    }
                    self.getBalance()
                }
            }).disposed(by: disposeBag)
        }
@@ -139,23 +173,26 @@
                self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: btn)
            }
            Services.getMeditationDetail(id: museItemModel!.id).subscribe(onNext: {data in
            Services.getMeditationDetail(id: museItemModel!.id).subscribe(onNext: {[weak self] data in
                guard let weakSelf = self else { return }
                if let m = data.data{
                    self.museModel = m
                    self.image_cover.sd_setImage(with: URL(string: m.coverUrl.components(separatedBy: ",").first?.jq_urlEncoded()))
                    self.label_courseName.text = m.meditationTitle
                    self.label_teacher.text = ""
                    self.label_paymentCount.text = "x1"
                    weakSelf.museModel = m
                    weakSelf.price = m.iosPrice
                    weakSelf.image_cover.sd_setImage(with: URL(string: m.coverUrl.components(separatedBy: ",").first?.jq_urlEncoded()))
                    weakSelf.label_courseName.text = m.meditationTitle
                    weakSelf.label_teacher.text = ""
                    weakSelf.label_paymentCount.text = "x1"
                    if self.isShowMore{
                        self.label_price.text = "¥\(m.iosPrice.jq_formatFloat)"
                        self.label_orderPrice.text = "¥\(m.iosPrice.jq_formatFloat)"
                        self.label_totalPrice.text = "¥\(m.iosPrice.jq_formatFloat)"
                    if weakSelf.isShowMore{
                        weakSelf.label_price.text = "¥\(m.iosPrice.jq_formatFloat)"
                        weakSelf.label_orderPrice.text = "¥\(m.iosPrice.jq_formatFloat)"
                        weakSelf.label_totalPrice.text = "¥\(m.iosPrice.jq_formatFloat)"
                    }else{
                        self.label_price.text = "愈疗币\(m.iosPrice.jq_formatFloat)"
                        self.label_orderPrice.text = "愈疗币\(m.iosPrice.jq_formatFloat)"
                        self.label_totalPrice.text = "愈疗币\(m.iosPrice.jq_formatFloat)"
                        weakSelf.label_price.text = "愈疗币\(m.iosPrice.jq_formatFloat)"
                        weakSelf.label_orderPrice.text = "愈疗币\(m.iosPrice.jq_formatFloat)"
                        weakSelf.label_totalPrice.text = "愈疗币\(m.iosPrice.jq_formatFloat)"
                    }
                    weakSelf.getBalance()
                }
            }).disposed(by: disposeBag)
        }
@@ -193,18 +230,22 @@
    }
    override func setRx() {
        NotificationCenter.default.rx.notification(Refreh_PaymentWallet_Noti).take(until: self.rx.deallocated).subscribe(onNext: {_ in
            self.getBalance()
        NotificationCenter.default.rx.notification(Refreh_PaymentWallet_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] _ in
            self?.getBalance()
        }).disposed(by: disposeBag)
        NotificationCenter.default.rx.notification(UIApplication.didBecomeActiveNotification).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] _ in
            guard let weakSelf = self else { return }
            showHUD("正在查询支付结果...")
            DispatchQueue.main.asyncAfter(delay: 2.5) {
            if weakSelf.isShowMore && weakSelf.orderId != nil{
                Services.queryPayment(orderId: weakSelf.orderId!).subscribe(onNext: {data in
                    if let str = data.data{
                        switch str{
                            case "succeeded":
                                    hiddenHUD()
                                alertSuccess(msg: "购买成功")
                                var id = 0
                                var money:Double = 0
@@ -221,17 +262,23 @@
                                let vc = PaymentOrderResultVC(type: weakSelf.type, id: id, price: money)
                                weakSelf.push(vc: vc)
                            case "failed":
                                    hiddenHUD()
                                alertError(msg: "购买失败")
                            case "closed":
                                    hiddenHUD()
                                alertError(msg: "交易已关闭")
                            case "refunded":
                                    hiddenHUD()
                                alertError(msg: "全额退款")
                            case "pending":
                                alertError(msg: "待支付")
                                    showHUD("正在支付...")
                            default:break
                        }
                    }
                }).disposed(by: weakSelf.disposeBag)
                }else{
                    hiddenHUD()
                }
            }
        }).disposed(by: disposeBag)
@@ -258,60 +305,99 @@
    }
    private func getBalance(){
        Services.getUserBalance().subscribe(onNext: {data in
            self.balance = data.data ?? 0
            if self.isShowMore{
                self.label_walletBalance.text = String(format: "当前可用 ¥%@", data.data?.jq_formatFloat ?? "0")
        Services.getUserBalance().subscribe(onNext: { [weak self] data in
            guard let weakSelf = self else { return }
            // 解包数据并更新余额
            if let balanceData = data.data {
                weakSelf.balance = balanceData
                let formattedBalance = balanceData.jq_formatFloat
                // 更新 UI
                if weakSelf.isShowMore {
                    weakSelf.img_action_1.image = balanceData > 0 ? UIImage(named: "icon_choose_small_s") : UIImage(named: "icon_choose_small_1")
                    weakSelf.label_walletBalance.text = "当前可用 ¥\(formattedBalance)"
                    if balanceData > weakSelf.price {
                        weakSelf.tapType = .t1
                    }
            }else{
                self.label_walletBalance.text = String(format: "当前可用 %@疗愈币", data.data?.jq_formatFloat ?? "0")
                    weakSelf.label_walletBalance.text = "当前可用 \(formattedBalance)疗愈币"
                    weakSelf.tapType = .t1
                }
            } else {
                weakSelf.balance = 0
                weakSelf.label_walletBalance.text = "当前可用 0疗愈币"
                weakSelf.tapType = .t1
            }
        }).disposed(by: disposeBag)
    }
    @IBAction func discountByCoinAction(_ sender: TapBtn) {
        discountByCoin.toggle()
        if discountByCoin{
            img_action_1.image = UIImage(named: "icon_choose_small_s")
        }else{
            img_action_1.image = UIImage(named: "icon_choose_small_1")
        }
        guard balance > 0 else {return}
        //是否能全部抵扣
        let allDiscount = balance > price
        var price:Double = 0
        switch type {
            case .course:
                if discountByCoin{
                    price = max((courseModel?.iosPrice ?? 0) - balance,0)
        if allDiscount{
            tapType = .t1
                }else{
                    price = courseModel?.iosPrice ?? 0
                }
            case .muse:
                if discountByCoin{
                    price = max((museModel?.iosPrice ?? 0) - balance,0)
                }else{
                    price = museModel?.iosPrice ?? 0
                }
            switch tapType {
                case .t2:self.tapType = .t1t2
                case .t3:self.tapType = .t1t3
                case .t1t2:
                    self.tapType = .t2
                case .t1t3:
                    self.tapType = .t3
            default:break
        }
        }
        print(tapType)
        label_totalPrice.text = "¥" + price.jq_formatFloat
//        label_totalPrice.text = "¥" + price.jq_formatFloat
    }
    @IBAction func chooseAction(_ sender: TapBtn) {
        switch sender.tag {
            case 2001:
                tapType = .t2
                img_action_2.image = UIImage(named: "icon_choose_small_s")
                img_action_3.image = UIImage(named: "icon_choose_small_1")
            case 2002:
                tapType = .t3
                img_action_2.image = UIImage(named: "icon_choose_small_1")
                img_action_3.image = UIImage(named: "icon_choose_small_s")
        var price:Double = 0
        switch type {
            case .course:
                price = courseModel?.iosPrice ?? 0
            case .muse:
                price = courseModel?.iosPrice ?? 0
            default: break
        }
        //是否能全部抵扣
        let allDiscount = balance > price
        switch sender.tag {
            case 2001:
                if allDiscount {
                    tapType = .t2
                }else{
                    if img_action_1.image == UIImage(named: "icon_choose_small_s"){
                        tapType = .t1t2
                    }else{
                        tapType = .t2
                    }
                }
            case 2002:
                if allDiscount{
                    tapType = .t3
                }else{
                    if img_action_1.image == UIImage(named: "icon_choose_small_s"){
                        tapType = .t1t3
                    }else{
                        tapType = .t3
                    }
                }
            default: break
        }
        print(tapType)
    }
    @IBAction func invateRegisterAction(_ sender: UIButton) {
@@ -377,17 +463,12 @@
    @IBAction func completeAction(_ sender: UIButton) {
        var money:Double = 0
        var id:Int = 0
        if let m = courseModel{
            money = m.iosPrice
            id = m.id
        }
        if let m = museModel{
            money = m.iosPrice
            id = m.id
            guard id != UserViewModel.getAvatarInfo().id else {
@@ -410,33 +491,46 @@
        }
        if isShowMore{
            guard tapType != nil else {alertError(msg: "请选择支付方式");return}
            var price:Double = 0
            guard tapType != .none else {alertError(msg: "请选择支付方式");return}
            var targetId:Int = 0
            switch type {
                case .course:
                    price = courseModel!.iosPrice
                    targetId = courseModel!.id
                case .muse:
                    price = museModel!.iosPrice
                    targetId = museModel!.id
                default:break
            }
            if discountByCoin && balance < price{
            if balance < price && tapType == .t1{
                alertError(msg: "抵扣余额不足");return
            }
            Services.placeOrder(orderForm: type, payType: tapType == .t2 ? 2:1, amount: nil, balanceFlag: discountByCoin ? 1:2, orderId: nil, receiverId: giftUserId, targetId: targetId, vipType: nil).subscribe(onNext: { [self] data in
                if let m = data.data{
                    self.orderId = m.orderId
            //进行抵扣
            var discountByCoin = 2
            if tapType == .t1 || tapType == .t1t2 || tapType == .t1t3{
                discountByCoin = 1
            }
                    if self.tapType == .t2{
            var payType = 1
            if tapType == .t1t2 || tapType == .t2{
                payType = 2
            }
            if tapType == .t1{
                paymentByCoin(id: id);return
            }
            Services.placeOrder(orderForm: type, payType: payType, amount: nil, balanceFlag: discountByCoin, orderId: nil, receiverId: giftUserId, targetId: targetId, vipType: nil).subscribe(onNext: { [weak self] data in
                guard let weakSelf = self else { return }
                if let m = data.data{
                    weakSelf.orderId = m.orderId
                    if weakSelf.tapType == .t2 || weakSelf.tapType == .t1t2{
                        guard  m.qrcodeUrl?.isEmpty == false else{alertError(msg: "QRCode 为空");return}
                        UIApplication.shared.open(URL(string: m.qrcodeUrl!)!)
                    }
                    if self.tapType == .t3{
                    if weakSelf.tapType == .t3 || weakSelf.tapType == .t1t3{
                        let miniProgram =  WXLaunchMiniProgramReq.object()
                        miniProgram.miniProgramType = .release
                        miniProgram.userName = m.orgId!
@@ -451,7 +545,14 @@
            }).disposed(by: disposeBag)
        }else{
            guard balance > money else{
            paymentByCoin(id: id)
        }
    }
    private func paymentByCoin(id:Int){
        guard balance > price else{
                CommonAlertView.show(title: "提示", content: "当前余额不足,请先充值", cancelStr: "暂不充值", completeStr: "去充值", isSingle: false) {[weak self] state in
                    if state{
                        let vc = WalletRechargeVC()
@@ -468,7 +569,7 @@
                    self?.courseItemModel?.isBuy = .yes
                    self?.museModel?.isBuy = .yes
                    self?.courseModel?.isBuy = .yes
                    let vc = PaymentOrderResultVC(type: weakSelf.type, id: id, price: money)
                let vc = PaymentOrderResultVC(type: weakSelf.type, id: id, price: weakSelf.price)
                    self?.push(vc: vc)
                }).disposed(by: disposeBag)
                return
@@ -480,9 +581,8 @@
                self?.courseItemModel?.isBuy = .yes
                self?.museModel?.isBuy = .yes
                self?.courseModel?.isBuy = .yes
                let vc = PaymentOrderResultVC(type: weakSelf.type, id: id, price: money)
            let vc = PaymentOrderResultVC(type: weakSelf.type, id: id, price: weakSelf.price)
                self?.push(vc: vc)
            }).disposed(by: disposeBag)
        }
    }
}
XQMuse/Root/Me/VC/InviteVC.swift
@@ -41,7 +41,12 @@
        btn_share.jq_cornerRadius = 21.25
        view_role.jq_gradientColor(colorArr: [UIColor(hexString: "#eafbeb")!.cgColor,UIColor.white.cgColor], cornerRadius: 20, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: nil, locations: nil)
//        view_role.jq_gradientColor(colorArr: [UIColor(hexString: "#eafbeb")!.cgColor,UIColor.white.cgColor], cornerRadius: 20, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: nil, locations: nil)
    }
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        view_role.jq_gradientColor(colorArr: [UIColor(hexString: "#eafbeb")!.cgColor,UIColor.white.cgColor], cornerRadius: 20, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: nil, locations: nil,clear: true)
    }
    @IBAction func shareAction(_ sender: UIButton) {
XQMuse/Root/Me/VC/VIPCenterVC.swift
@@ -353,23 +353,23 @@
    func isSelect(_ state:Bool,indexPath:IndexPath,vipContentModel:VIPContentModel){
        var price:Int = 0
        var formartPrice:String = ""
        switch indexPath.row{
            case 0:
                price = vipContentModel.monthlyVipIos
//                price = vipContentModel.monthlyVipIos
                label_title.text = "月度会员"
                label_price.text = "¥" + vipContentModel.monthlyVipIos.string
                lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.monthlyVipIos.double / 30.0)
                formartPrice =  vipContentModel.monthlyVipIos.jq_formatFloat
                lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.monthlyVipIos / 30.0)
            case 1:
                price = vipContentModel.quarterlyVipIos
//                price = vipContentModel.quarterlyVipIos
               label_title.text = "半年会员"
               label_price.text = "¥" + vipContentModel.quarterlyVipIos.string
               lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.quarterlyVipIos.double / 30.0)
                formartPrice = vipContentModel.quarterlyVipIos.jq_formatFloat
               lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.quarterlyVipIos / 30.0)
            case 2:
                price = vipContentModel.annualVipIos
//                price = vipContentModel.annualVipIos
                label_title.text = "年度会员"
                label_price.text = "¥" + vipContentModel.annualVipIos.string
                lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.annualVipIos.double / 30.0)
                formartPrice = vipContentModel.annualVipIos.jq_formatFloat
                lable_priorDay.text = String(format: "¥%.2lf/天", vipContentModel.annualVipIos / 30.0)
            default:break
        }
@@ -377,12 +377,12 @@
            contentView.backgroundColor = UIColor(hexString: "#A6C586")
            label_title.textColor = .white
            lable_priorDay.textColor = .white
            label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 15, weight:.heavy), withColor: .white).add(string: "\(price)", withFont: .systemFont(ofSize: 20, weight:.heavy), withColor: .white).mutableAttributedString
            label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 15, weight:.heavy), withColor: .white).add(string: formartPrice, withFont: .systemFont(ofSize: 20, weight:.heavy), withColor: .white).mutableAttributedString
        }else{
            contentView.backgroundColor = UIColor(hexString: "#EFF2F2")
            label_title.textColor = UIColor(hexString: "#353535")
            lable_priorDay.textColor = UIColor(hexString: "#B7B7B7")
            label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 15, weight:.heavy), withColor: UIColor(hexString: "#353535")!).add(string: "\(price)", withFont: .systemFont(ofSize: 20, weight:.heavy), withColor: UIColor(hexString: "#353535")!).mutableAttributedString
            label_price.attributedText = AttributedStringbuilder.build().add(string: "¥", withFont: .systemFont(ofSize: 15, weight:.heavy), withColor: UIColor(hexString: "#353535")!).add(string: formartPrice, withFont: .systemFont(ofSize: 20, weight:.heavy), withColor: UIColor(hexString: "#353535")!).mutableAttributedString
        }
    }
XQMuse/Root/Me/VC/WalletRechargeVC.swift
@@ -100,11 +100,14 @@
                            case "failed":
                                alertError(msg: "购买失败")
                            case "closed":
                                alertError(msg: "交易已关闭")
                                break
//                                alertError(msg: "交易已关闭")
                            case "refunded":
                                alertError(msg: "全额退款")
                                break
//                                alertError(msg: "全额退款")
                            case "pending":
                                alertError(msg: "待支付")
                                break
//                                alertError(msg: "待支付")
                            default:break
                        }
                    }
XQMuse/Root/Network/Models.swift
@@ -512,9 +512,9 @@
}
struct VIPContentModel:HandyJSON{
    var annualVipIos:Int = 0
    var monthlyVipIos:Int = 0
    var quarterlyVipIos:Int = 0
    var annualVipIos:Double = 0
    var monthlyVipIos:Double = 0
    var quarterlyVipIos:Double = 0
}
struct PaymentResultModel:HandyJSON{
XQMuse/Root/Network/Services.swift
@@ -18,6 +18,7 @@
//let All_Url = "https://mock.apipost.net/mock/31b303c60464000"
#else
let All_Url = "https://xq.xqzhihui.com/api"
//let All_Url = "http://192.168.110.64:9000"
#endif
let ShareUrl = "http://113.45.158.158/share/#/pages"
@@ -380,6 +381,7 @@
            .append(key: "receiverId", value: receiverId)
            .append(key: "targetId", value: targetId)
            .append(key: "vipType", value: vipType)
            .append(key: "type", value: 1)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
XQMuse/Root/PayMusicView/PayMusicVC.swift
@@ -310,7 +310,7 @@
        NotificationCenter.default.addObserver(forName: ChangeMasterVoice_Noti, object: nil, queue: .main) { noti in
            if let value = noti.object as? Float{
                print("--->进入")
//                self.masterPlayer?.volume = value
                self.masterPlayer?.volume = value
                self.bgmPlayer?.volume = value
            }
        }
@@ -411,10 +411,10 @@
                                                }
                                                self.bgmPlayer = AVPlayer(url: self.urls[firstPlayIndex])
//                                                if masterUrl != nil{
//                                                                self.masterPlayer = AVPlayer(url: masterUrl!)
//                self.masterPlayer?.volume = Float(UserDefaultSettingViewModel.getSetting()?.masterVolume ?? 0.5)
//            }
                                                if masterUrl != nil{
                                                                self.masterPlayer = AVPlayer(url: masterUrl!)
                self.masterPlayer?.volume = Float(UserDefaultSettingViewModel.getSetting()?.masterVolume ?? 0.5)
            }
                                }
                                self.bgmPlayer?.addPeriodicTimeObserver(forInterval: CMTimeMake(value: 1, timescale: 1), queue: DispatchQueue.main) { [weak self](time) in
XQMuse/SceneDelegate.swift
@@ -190,7 +190,9 @@
    }
    func onResp(_ resp: BaseResp) {
        if let minProgramResp = resp as? WXLaunchMiniProgramResp{
            minProgramResp.description
        }
    }
}