Bladeren bron

【会员系统】用户中心跳转按钮事件补充

wanjun 4 maanden geleden
bovenliggende
commit
d0c3fa5e3d

+ 3 - 3
PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.swift

@@ -279,7 +279,7 @@ class KMUserInfoViewController: NSViewController {
         }
         accountCenterBox.downCallback = { [weak self](downEntered: Bool, mouseBox: KMBox, event) -> Void in
             guard let self = self else { return }
-
+            self.viewModel.skipAccountCenter()
         }
         
         signOutBox.moveCallback =  { [weak self](mouseEntered: Bool, mouseBox: KMBox) -> Void in
@@ -294,7 +294,7 @@ class KMUserInfoViewController: NSViewController {
         }
         signOutBox.downCallback = { [weak self](downEntered: Bool, mouseBox: KMBox, event) -> Void in
             guard let self = self else { return }
-
+            self.viewModel.signOutAction()
         }
         
         closeAccountBox.moveCallback =  { [weak self](mouseEntered: Bool, mouseBox: KMBox) -> Void in
@@ -303,7 +303,7 @@ class KMUserInfoViewController: NSViewController {
         }
         closeAccountBox.downCallback = { [weak self](downEntered: Bool, mouseBox: KMBox, event) -> Void in
             guard let self = self else { return }
-
+            self.viewModel.closeAccountAction()
         }
     }
 

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

@@ -81,6 +81,29 @@ class KMUserInfoVCModel: ObservableObject {
         return images
     }
     
+    /**
+     @abstract 跳转官网用户中心;1、官网未登录,则跳转到登录页面;2、官网已登录,则跳转到官网-个人中心;
+     */
+    func skipAccountCenter() -> Void {
+        
+    }
+    
+    /**
+     @abstract 注销账户;
+     */
+    func signOutAction() -> Void {
+        
+    }
+    
+    /**
+     @abstract 退出登录;
+     */
+    func closeAccountAction() -> Void {
+        
+    }
+    
+    // MARK: Private Method
+    
     /**
      @abstract 获取用户支持的最大设备数
      @param