杨锴
2024-10-09 1f08239dd60c05f1eb6eb9b3122aa23cd700348b
fix bug
17个文件已修改
111 ■■■■ 已修改文件
WanPai.xcodeproj/project.pbxproj 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Common/VC/CommonScanQRCodeVC.swift 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Config/TransitionUtil.swift 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Config/WeChatTools.swift 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/AddStudentVC.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/VC/CourseDetailVC.swift 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Course/View/CourseUnAssignView.swift 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Games/TCell/GamesTCell.swift 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Home/VC/HomeVC.swift 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Other/View/CommonDatePickerView.swift 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/VC/WorldCupContentVC.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Search/VC/WorldCupRecordVC.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Welfare/VC/WelfareExchangeRecordSubListVC.swift 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardBookingDetailVC.swift 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardBookingListVC.swift 补丁 | 查看 | 原始文档 | blame | 历史
WanPai/Root/Yard/VC/YardBookingSubListVC.swift 补丁 | 查看 | 原始文档 | blame | 历史
WanPai.xcodeproj/project.pbxproj
@@ -2193,7 +2193,7 @@
                CODE_SIGN_ENTITLEMENTS = WanPai/WanPaiDebug.entitlements;
                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
                CODE_SIGN_STYLE = Manual;
                CURRENT_PROJECT_VERSION = 12;
                CURRENT_PROJECT_VERSION = 13;
                DEVELOPMENT_TEAM = "";
                "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2MWV8K39DV;
                FRAMEWORK_SEARCH_PATHS = (
@@ -2222,7 +2222,7 @@
                    "$(inherited)",
                    "$(PROJECT_DIR)/WanPai/YYPaymentManager/WeChatPay",
                );
                MARKETING_VERSION = 2.0.2;
                MARKETING_VERSION = 2.0.3;
                OTHER_LDFLAGS = (
                    "$(inherited)",
                    "-ObjC",
@@ -2357,7 +2357,7 @@
                CODE_SIGN_ENTITLEMENTS = WanPai/WanPaiRelease.entitlements;
                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
                CODE_SIGN_STYLE = Manual;
                CURRENT_PROJECT_VERSION = 12;
                CURRENT_PROJECT_VERSION = 13;
                DEVELOPMENT_TEAM = "";
                "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2MWV8K39DV;
                FRAMEWORK_SEARCH_PATHS = (
@@ -2386,7 +2386,7 @@
                    "$(inherited)",
                    "$(PROJECT_DIR)/WanPai/YYPaymentManager/WeChatPay",
                );
                MARKETING_VERSION = 2.0.2;
                MARKETING_VERSION = 2.0.3;
                OTHER_LDFLAGS = (
                    "$(inherited)",
                    "-ObjC",
WanPai/Common/VC/CommonScanQRCodeVC.swift
@@ -86,48 +86,6 @@
                                                                self.navigationController?.popViewController()
                                                }
                                }
                                //        if(!checkCameraAuth()){
                                //
                                //            let authStatus = AVCaptureDevice.authorizationStatus(for: AVMediaType.video)
                                //            if authStatus == AVAuthorizationStatus.notDetermined {
                                //                AVCaptureDevice.requestAccess(for: AVMediaType.video) {[weak self] (granted) in
                                //                    if granted{
                                //                        self?.setupCaptureSession()
                                //                        self?.addSubviews()
                                //                        self?.scanTimer = Timer.scheduledTimer(timeInterval: 3.0, target: self, selector: #selector(startAnimation), userInfo: nil, repeats: true)
                                //                    }
                                //                }
                                //            } else if authStatus == AVAuthorizationStatus.restricted || authStatus == AVAuthorizationStatus.denied {
                                //                let alertController = UIAlertController(title: nil,message: "请在iphone的“设置-隐私-相机”选项中,允许应用访问你的相机", preferredStyle: .alert)
                                //                let cancelAction = UIAlertAction(title: "取消", style: .cancel, handler: { action in
                                //                    self.navigationController?.popViewController(animated: true)
                                //                })
                                //
                                //                let okAction = UIAlertAction(title: "前往", style: .default, handler: {action in
                                //                    let settingUrl = NSURL(string: UIApplication.openSettingsURLString)!
                                //                    if UIApplication.shared.canOpenURL(settingUrl as URL){
                                //                        if #available(iOS 10.0, *) {
                                //                            UIApplication.shared.open(settingUrl as URL, options: [:], completionHandler: nil)
                                //                        } else {
                                //                            UIApplication.shared.openURL(settingUrl as URL)
                                //                        }
                                //                    }
                                //                })
                                //
                                //                alertController.addAction(cancelAction)
                                //                alertController.addAction(okAction)
                                //                self.present(alertController, animated: true, completion: nil)
                                //            } else {
                                //
                                //            }
                                //
                                //        }else{
                                //            setupCaptureSession()
                                //            addSubviews()
                                //            scanTimer = Timer.scheduledTimer(timeInterval: 3.0, target: self, selector: #selector(startAnimation), userInfo: nil, repeats: true)
                                //        }
                }
                private func limitSuccess(){
@@ -201,15 +159,6 @@
                func addSubviews() {
                                let _: CGFloat = (UIScreen.main.bounds.size.width - borderWidth) * 0.5
                                //
                                //        let coverImageView = UIImageView(frame: CGRect(x: 0, y: 64, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height - 64))
                                //        coverImageView.backgroundColor = UIColor.clear
                                //        coverImageView.image = self.getCoverView(left: leftMargin, top: topMargin)
                                //        view.addSubview(coverImageView)
                                //扫描边框
                                borderView!.frame = CGRect.init(x: (UIScreen.main.bounds.size.width-(self.view.center.x+30))/2, y: (UIScreen.main.bounds.size.height-(self.view.center.x + 30))/2, width: self.view.center.x + 30, height: self.view.center.x + 30)
WanPai/Config/TransitionUtil.swift
WanPai/Config/WeChatTools.swift
WanPai/Root/Activity/VC/ActivityDetailApplyVC.swift
@@ -223,7 +223,20 @@
                                                                                                                                                self?.push(vc: vc)
                                                                                                                }
                                                                                                }
                                                                                case .wechat:break
                                                                                case .wechat:
                                                                                                let req = YYWeChatPayRequest(partnerId: m.partnerid, prepayId: m.prepayid, package: m.package, nonceStr: m.noncestr, timeStamp: m.timestamp, sign: m.sign)
                                                                                                YYPaymentManager.shared.sendPaymentRequest(req) { result in
                                                                                                                switch result {
                                                                                                                                case .success:
                                                                                                                                                let vc = PaymentResultVC(result: .success, objType: .activityApply)
                                                                                                                                                self?.push(vc: vc)
                                                                                                                                case .cancel:
                                                                                                                                                alert(msg: "已取消")
                                                                                                                                case .failure(_):
                                                                                                                                                let vc = PaymentResultVC(result: .fail("支付失败",0), objType: .activityApply)
                                                                                                                                                self?.push(vc: vc)
                                                                                                                }
                                                                                                }
                                                                                case .coin,.free:
                                                                                                let vc = PaymentResultVC(result: .success, objType: .activityApply)
                                                                                                self?.push(vc: vc)
WanPai/Root/Course/VC/AddStudentVC.swift
@@ -187,6 +187,7 @@
                                studentModel.phone = tf_phone.text!
                                studentModel.idCard = tf_idCard.text!
                                studentModel.name = tf_name.text!
                                studentModel.birthday = tf_birthday.text!
                                if profileImg != nil{
                                                showHUD("正在上传头像")
WanPai/Root/Course/VC/CourseDetailVC.swift
WanPai/Root/Course/View/CourseUnAssignView.swift
WanPai/Root/Games/TCell/GamesTCell.swift
@@ -41,7 +41,7 @@
                                                guard let weakSelf = self else { return }
                                                PaymentView.show(enumType:.game,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.storeId, sutuId: weakSelf.sutuId, type: payType,gameType: weakSelf.gameListModel.gameType).subscribe(onNext: {data in
                Services.payGame(configId: weakSelf.gameListModel.id, gameId: weakSelf.gameListModel.gameId, spaceId: weakSelf.spaceId, sutuId: weakSelf.sutuId, type: payType,gameType: weakSelf.gameListModel.gameType).subscribe(onNext: {data in
                                                                                if let m = data.data{
                                                                                                if m.isStaff{
WanPai/Root/Home/VC/HomeVC.swift
@@ -235,6 +235,27 @@
                }
                @IBAction func scanAction(_ sender: UIButton) {
        if let model = QRCodeModel.deserialize(from: "{\"scan_type\": 1000, \"space_id\": 27, \"sutu_id\": 1036}"){
            if model.scan_type == .games{
                let gamesListVC = GamesListVC(model: model)
                self.push(vc: gamesListVC)
            }else if model.scan_type == .yard{
                let vc = YardDetailVC(id: model.id!)
                self.push(vc: vc)
            }else if model.scan_type == .course{
                let vc = CourseDetailVC(id: model.id!)
                self.push(vc: vc)
            }
        }else{
            alertError(msg: "识别失败")
        }
return
                                let codeVC = CommonScanQRCodeVC {[weak self] text, status in
                                                if status{
                                                                if let model = QRCodeModel.deserialize(from: text){
WanPai/Root/Other/View/CommonDatePickerView.swift
@@ -183,8 +183,11 @@
                                                switch type{
                                                                case .YMD:
                                                                                let year = years[pickerView.selectedRow(inComponent: 0)]
                                                                                let month = months[pickerView.selectedRow(inComponent: 1)]
                                                                                var month = months[pickerView.selectedRow(inComponent: 1)]
                                                                                if year == Date().jq_nowYear(){
                                                                                                month = Date().jq_nowMonth() - pickerView.selectedRow(inComponent: 1)
                                                                                }
                                                                                if year == Date().jq_nowYear() && month == Date().jq_nowMonth(){
                                                                                                return Date().jq_nowDay()
                                                                                }else{
@@ -221,8 +224,9 @@
                                if component == 1{
                                                switch type{
                                                                case .YM,.YMD:
                                                                                let nowMonth = Date().jq_nowMonth()
                                                                                if pickerView.selectedRow(inComponent: 0) == 0{
                                                                                                return "\(11 - Date().jq_nowMonth() - row - 1)月"
                                                                                                return "\(nowMonth - row)月"
                                                                                }
                                                                                return "\(months[row])月"
                                                                case .HHmm:return String(format: "%02ld分", minutes[row])
WanPai/Root/Search/VC/WorldCupContentVC.swift
@@ -9,6 +9,7 @@
import RxSwift
import RxRelay
import RxDataSources
import SnapKit
let WorldCupRefresh_Noti = Notification.Name.init("WorldCupRefresh_Noti")
WanPai/Root/Search/VC/WorldCupRecordVC.swift
@@ -8,6 +8,7 @@
import UIKit
import RxSwift
import RxCocoa
import SnapKit
class WorldCupRecordViewModel:RefreshInnerModel<WorldCupMatchRecordDataModel>{
WanPai/Root/Welfare/VC/WelfareExchangeRecordSubListVC.swift
@@ -8,6 +8,7 @@
import UIKit
import RxRelay
import RxSwift
import SnapKit
class RecordsViewModel:RefreshModel<RecordsModel>{
    let goodsType = BehaviorRelay<ExchangeType?>(value: nil)
WanPai/Root/Yard/VC/YardBookingDetailVC.swift
@@ -263,6 +263,7 @@
                                                                                                                                                YYPaymentManager.shared.sendPaymentRequest(YYAlipayRequest(orderString: m.orderString)) { result in
                                                                                                                                                                switch result {
                                                                                                                                                                                case .success:
                                                                                                                                                                                                self?.getData()
                                                                                                                                                                                                let vc = PaymentResultVC(result: .success, objType: .activityApply)
                                                                                                                                                                                                self?.push(vc: vc)
                                                                                                                                                                                case .cancel:
@@ -276,6 +277,7 @@
                                                                                                                                                YYPaymentManager.shared.sendPaymentRequest(YYWeChatPayRequest(partnerId: m.partnerid, prepayId: m.prepayid, package: m.package, nonceStr: m.noncestr, timeStamp: m.timestamp, sign: m.sign)) { result in
                                                                                                                                                                switch result {
                                                                                                                                                                                case .success:
                                                                                                                                                                                                self?.getData()
                                                                                                                                                                                                let vc = PaymentResultVC(result: .success, objType: .activityApply)
                                                                                                                                                                                                self?.push(vc: vc)
                                                                                                                                                                                case .cancel:
WanPai/Root/Yard/VC/YardBookingListVC.swift
WanPai/Root/Yard/VC/YardBookingSubListVC.swift