Browse Source

【会员系统】付费版升级产品权益绑定处理

wanjun 3 months ago
parent
commit
6bf751ea83

+ 15 - 0
PDF Office/PDF Master/MemberCenter/ViewModel/KMProductModel.swift

@@ -738,6 +738,21 @@ class KMProductModel: ObservableObject {
                 if IAPProductsManager.default().fourDevicesAllAccessPack12months_pro.isSubscribed {
                     isSubscribed = true
                 }
+            } else if productId == "com.pdfreaderpro.mac.advanced_add_devices_all_access_pack_advanced_annual.001" {
+                productCode = "advanced-annual-subscription-standard-upgrade"
+                if IAPProductsManager.default().standardAddDevicesAllAccessPack12months_pro.isSubscribed {
+                    isSubscribed = true
+                }
+            } else if productId == "com.pdfreaderpro.mac.advanced_add_devices_all_access_pack_advanced_annual.001" {
+                productCode = "advanced-annual-subscription-single-upgrade"
+                if IAPProductsManager.default().advancedAddDevicesAllAccessPack12months_pro.isSubscribed {
+                    isSubscribed = true
+                }
+            } else if productId == "com.pdfreaderpro.mac.advanced_add_2_devices_all_access_pack_advanced_annual.001" {
+                productCode = "advanced-annual-subscription-multi-upgrade"
+                if IAPProductsManager.default().advancedAdd2DevicesAllAccessPack12months_pro.isSubscribed {
+                    isSubscribed = true
+                }
             }
             if isSubscribed {
                 KMMemberCenterManager.manager.appStoreEquityVerification(applePayProductId: productId, transactionId: transactionId, productCode: productCode) { success, result in

+ 3 - 0
PDF Office/PDF Master/MemberCenter/WindowsController/KMProductCompareWC.swift

@@ -1116,6 +1116,9 @@ class KMProductCompareWC: NSWindowController {
             model.appStoreEquityVerification(notification) { success, msg in
                 KMUserInfoVCModel().refreshUserInfo { success, msg,dic  in
                 }
+                DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
+                    self.window?.close()
+                }
             }
         }
     }