|
@@ -66,9 +66,9 @@ class KMProductCompareWC: NSWindowController {
|
|
|
@IBOutlet @objc weak var standardPlanInfoLabel: NSTextField!
|
|
|
@IBOutlet @objc weak var standardPlanPurchaseLabel: NSTextField!
|
|
|
@IBOutlet @objc weak var standardPlanPurchaseSubLabel: NSTextField!
|
|
|
- @IBOutlet @objc weak var standardPlanPurchaseButton: KMButton!
|
|
|
+ @IBOutlet @objc weak var standardPlanPurchaseButton: NSButton!
|
|
|
@IBOutlet @objc weak var standardPlanPurchaseLbl: NSTextField!
|
|
|
- @IBOutlet @objc weak var standardPlanPurchaseLblBtn: KMButton!
|
|
|
+ @IBOutlet @objc weak var standardPlanPurchaseLblBtn: NSButton!
|
|
|
@IBOutlet @objc weak var standardPlanPurchaseSubLabel2: NSTextField!
|
|
|
|
|
|
// 高级版年订阅
|
|
@@ -76,9 +76,9 @@ class KMProductCompareWC: NSWindowController {
|
|
|
@IBOutlet @objc weak var advancedPlanInfoLabel: NSTextField!
|
|
|
@IBOutlet @objc weak var advancedPlanPurchaseLabel: NSTextField!
|
|
|
@IBOutlet @objc weak var advancedPlanPurchaseSubLabel: NSTextField!
|
|
|
- @IBOutlet @objc weak var advancedPlanPurchaseButton: KMButton!
|
|
|
+ @IBOutlet @objc weak var advancedPlanPurchaseButton: NSButton!
|
|
|
@IBOutlet @objc weak var advancedPlanPurchaseLbl: NSTextField!
|
|
|
- @IBOutlet @objc weak var advancedPlanPurchaseLblBtn: KMButton!
|
|
|
+ @IBOutlet @objc weak var advancedPlanPurchaseLblBtn: NSButton!
|
|
|
@IBOutlet @objc weak var advancedPlanPurchaseSubLabel2: NSTextField!
|
|
|
@IBOutlet weak var backgroundImage3: NSImageView!
|
|
|
@IBOutlet @objc weak var discountPermanent2: NSImageView!
|
|
@@ -751,7 +751,9 @@ class KMProductCompareWC: NSWindowController {
|
|
|
|
|
|
value1PurchaseBtnLbl.textColor = value1PurchaseBtnLblBtn.isEnabled ? NSColor.white : NSColor.white.withAlphaComponent(0.5)
|
|
|
permanentPurchaseLblBtn.isEnabled = permanentPurchaseButton.isEnabled
|
|
|
-
|
|
|
+ standardPlanPurchaseLblBtn.isEnabled = standardPlanPurchaseButton.isEnabled
|
|
|
+ advancedPlanPurchaseLblBtn.isEnabled = advancedPlanPurchaseButton.isEnabled
|
|
|
+
|
|
|
let averageMonthPrice: String?
|
|
|
let monthPrice: String?
|
|
|
let averageMonthPriceDiscount: String?
|
|
@@ -1085,11 +1087,14 @@ class KMProductCompareWC: NSWindowController {
|
|
|
}
|
|
|
|
|
|
@IBAction func appstorePurchaseAction(_ sender: NSButton) {
|
|
|
+#if !VERSION_DMG
|
|
|
addWaitingView(to: window?.contentView ?? NSView())
|
|
|
+#endif
|
|
|
model.appstorePurchaseAction(sender.tag) { [weak self] success, msg in
|
|
|
guard let self = self else { return }
|
|
|
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// MARK: - InAppPurchaseManager Notification
|
|
@@ -1138,11 +1143,16 @@ class KMProductCompareWC: NSWindowController {
|
|
|
@objc func IAPSubscriptionLoadedNotification(_ notification: Notification) {
|
|
|
removeWaitingView(from: window?.contentView ?? NSView())
|
|
|
reloadData()
|
|
|
- if KMMemberInfo.shared.isLogin {
|
|
|
- model.appStoreEquityVerification(notification) { success, msg in
|
|
|
- KMUserInfoVCModel().refreshUserInfo { success, msg,dic in
|
|
|
+ DispatchQueue.global().async { [weak self] in
|
|
|
+ guard let self = self else { return }
|
|
|
+ if KMMemberInfo.shared.isLogin {
|
|
|
+ self.model.appStoreEquityVerification(notification) { success, msg in
|
|
|
+ KMUserInfoVCModel().refreshUserInfo { success, msg,dic in
|
|
|
+ }
|
|
|
+ DispatchQueue.main.async {
|
|
|
+ self.window?.close()
|
|
|
+ }
|
|
|
}
|
|
|
- self.window?.close()
|
|
|
}
|
|
|
}
|
|
|
}
|