Переглянути джерело

【fix】【卡片】DMG,卡片中点击开通/试用,弹出比较表后,卡片弹窗要消失

tangchao 3 місяців тому
батько
коміт
e20777b8eb

+ 4 - 0
PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.swift

@@ -754,6 +754,8 @@ class KMUserInfoViewController: NSViewController {
                 self.viewModel.skipCompare(.lite_Base)
             } else {
                 // 其它情况根据账号状态跳转不同比较表
+                NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
+                
                 KMMemberInfo.shared.productCompareShow()
             }
         }
@@ -1213,6 +1215,8 @@ class KMUserInfoViewController: NSViewController {
                 self.viewModel.skipCompare(.lite_Base)
             } else {
                 // 其它情况根据账号状态跳转不同比较表
+                NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
+                
                 KMMemberInfo.shared.productCompareShow()
             }
         }

+ 2 - 0
PDF Office/PDF Master/MemberCenter/ViewModel/KMUserInfoVCModel.swift

@@ -287,6 +287,8 @@ class KMUserInfoVCModel: ObservableObject {
      @abstract 跳转比较表;
      */
     func skipCompare(_ type: KMCompareTableType) -> Void {
+        NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
+        
         KMProductCompareWC.shared.orientation = true
         KMProductCompareWC.shared.orientationType = type
         KMProductCompareWC.shared.showWindow(nil)