From 65d04d0aebb1d2c5ba8342551d2bac47decd99ec Mon Sep 17 00:00:00 2001 From: zjx Date: Fri, 8 Aug 2025 15:26:47 +0800 Subject: [PATCH] =?UTF-8?q?1.1.2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Veloria.xcodeproj/project.pbxproj | 4 ++-- Veloria/AppDelegate/AppDelegate+Open.swift | 7 ++++++- Veloria/AppDelegate/SceneDelegate.swift | 2 +- Veloria/Base/Networking/API/VPWalletAPI.swift | 4 ++-- Veloria/Libs/AdManager/AppOpen/VPAppOpenAdManager.swift | 2 +- Veloria/Libs/VPIAPManager/VPIAPManager.swift | 8 +++++--- Veloria/Libs/VPIAPManager/VPWaitRestoreModel.swift | 1 + 7 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Veloria.xcodeproj/project.pbxproj b/Veloria.xcodeproj/project.pbxproj index 0b5ec83..4119352 100644 --- a/Veloria.xcodeproj/project.pbxproj +++ b/Veloria.xcodeproj/project.pbxproj @@ -1929,7 +1929,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.1; + MARKETING_VERSION = 1.1.2; PRODUCT_BUNDLE_IDENTIFIER = com.qjwl168.veloria.ios; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1972,7 +1972,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.1; + MARKETING_VERSION = 1.1.2; PRODUCT_BUNDLE_IDENTIFIER = com.qjwl168.veloria.ios; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Veloria/AppDelegate/AppDelegate+Open.swift b/Veloria/AppDelegate/AppDelegate+Open.swift index 45c7661..2b1535d 100644 --- a/Veloria/AppDelegate/AppDelegate+Open.swift +++ b/Veloria/AppDelegate/AppDelegate+Open.swift @@ -42,9 +42,14 @@ extension SceneDelegate { static var allowOpenMessage = true ///是否需要重试 static var isNeedRetry = false - private static var webpageURL: URL? + static var webpageURL: URL? func vp_handleOpenAppMessage(webpageURL: URL?) { + guard SceneDelegate.allowOpenMessage else { + SceneDelegate.webpageURL = nil + return + } + guard VPNetworkReachabilityManager.manager.isReachable == true, //有网 AppDelegate.haveBeenShownAPNS, //推送弹窗 self.isOpenApp, //APP被开启 diff --git a/Veloria/AppDelegate/SceneDelegate.swift b/Veloria/AppDelegate/SceneDelegate.swift index 3ff94ed..7d7e4b9 100644 --- a/Veloria/AppDelegate/SceneDelegate.swift +++ b/Veloria/AppDelegate/SceneDelegate.swift @@ -65,7 +65,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { vpLog(message: "++++++++++++++sceneWillEnterForeground") VPAppTool.appDelegate?.uploadNoticeStatus() DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { - self.vp_handleOpenAppMessage(webpageURL: nil) + self.vp_handleOpenAppMessage(webpageURL: SceneDelegate.webpageURL) } } diff --git a/Veloria/Base/Networking/API/VPWalletAPI.swift b/Veloria/Base/Networking/API/VPWalletAPI.swift index f0c563f..ce48579 100644 --- a/Veloria/Base/Networking/API/VPWalletAPI.swift +++ b/Veloria/Base/Networking/API/VPWalletAPI.swift @@ -135,13 +135,13 @@ class VPWalletAPI { } ///校验内购 - static func requestVerifyOrder(orderCode: String, payId: String, productId: String, purchaseToken: String, completer: ((_ model: VPIAPVerifyModel?) -> Void)?) { + static func requestVerifyOrder(orderCode: String, payId: String, productId: String, transactionId: String, purchaseToken: String, completer: ((_ model: VPIAPVerifyModel?) -> Void)?) { var param = VPNetworkParameters(path: "/applePaid") param.parameters = [ "order_code" : orderCode, "pay_setting_id" : payId, "pkg_name" : kVPAPPBundleIdentifier, - "transaction_id" : productId, + "transaction_id" : transactionId, "purchases_token" : purchaseToken ] diff --git a/Veloria/Libs/AdManager/AppOpen/VPAppOpenAdManager.swift b/Veloria/Libs/AdManager/AppOpen/VPAppOpenAdManager.swift index d8b6336..458c6b1 100644 --- a/Veloria/Libs/AdManager/AppOpen/VPAppOpenAdManager.swift +++ b/Veloria/Libs/AdManager/AppOpen/VPAppOpenAdManager.swift @@ -95,7 +95,7 @@ class VPAppOpenAdManager: NSObject { if self.appOpenAd?.isReady == true { self.showAd() } else { - self.timeOutTimer = Timer.scheduledTimer(timeInterval: 30, target: YYWeakProxy(target: self), selector: #selector(handleTimeOutTimer), userInfo: nil, repeats: false) + self.timeOutTimer = Timer.scheduledTimer(timeInterval: 5, target: YYWeakProxy(target: self), selector: #selector(handleTimeOutTimer), userInfo: nil, repeats: false) self.needAutoShow = true self.loadAd() diff --git a/Veloria/Libs/VPIAPManager/VPIAPManager.swift b/Veloria/Libs/VPIAPManager/VPIAPManager.swift index c7566e2..d800c40 100644 --- a/Veloria/Libs/VPIAPManager/VPIAPManager.swift +++ b/Veloria/Libs/VPIAPManager/VPIAPManager.swift @@ -95,7 +95,8 @@ class VPIAPManager { let orderCode = waitRestoreModel.orderCode, let payId = waitRestoreModel.payId, let productId = waitRestoreModel.productId, - let receipt = waitRestoreModel.receipt + let receipt = waitRestoreModel.receipt, + let transactionId = waitRestoreModel.transactionId else { if isLoding { VPToast.show(text: "veloria_pay_error_3".localized) @@ -106,7 +107,7 @@ class VPIAPManager { if isLoding { VPHUD.show() } - VPWalletAPI.requestVerifyOrder(orderCode: orderCode, payId: payId, productId: productId, purchaseToken: receipt) { model in + VPWalletAPI.requestVerifyOrder(orderCode: orderCode, payId: payId, productId: productId, transactionId: transactionId, purchaseToken: receipt) { model in if isLoding { VPHUD.dismiss() } @@ -165,10 +166,11 @@ extension VPIAPManager: JXIAPManagerDelegate { self.waitRestoreModel?.productId = productId self.waitRestoreModel?.receipt = receipt + self.waitRestoreModel?.transactionId = transactionIdentifier UserDefaults.vp_setObject(self.waitRestoreModel, forKey: kVPWaitRestoreIAPDefaultsKey) - VPWalletAPI.requestVerifyOrder(orderCode: orderCode, payId: payId, productId: productId, purchaseToken: receipt) { model in + VPWalletAPI.requestVerifyOrder(orderCode: orderCode, payId: payId, productId: productId, transactionId: transactionIdentifier ?? "", purchaseToken: receipt) { model in VPHUD.dismiss() self.orderCode = nil diff --git a/Veloria/Libs/VPIAPManager/VPWaitRestoreModel.swift b/Veloria/Libs/VPIAPManager/VPWaitRestoreModel.swift index aa1c741..ff997c4 100644 --- a/Veloria/Libs/VPIAPManager/VPWaitRestoreModel.swift +++ b/Veloria/Libs/VPIAPManager/VPWaitRestoreModel.swift @@ -12,6 +12,7 @@ class VPWaitRestoreModel: VPModel, NSSecureCoding { var orderCode: String? var payId: String? var productId: String? + var transactionId: String? var receipt: String? var buyType: VPWalletAPI.BuyType?