소스 검색

【会员系统】DMG转档引导按钮检测是否登录

wanjun 6 일 전
부모
커밋
2e8605d2a3
1개의 변경된 파일17개의 추가작업 그리고 4개의 파일을 삭제
  1. 17 4
      PDF Office/PDF Master/Class/GuideInfo/Controllers/FunctionGuide/KMConvertGuideView.swift

+ 17 - 4
PDF Office/PDF Master/Class/GuideInfo/Controllers/FunctionGuide/KMConvertGuideView.swift

@@ -184,11 +184,24 @@ class KMConvertGuideView: NSView, NibLoadable {
     }
     
     @IBAction func convertAction(_ sender: Any) {
-        guard let callBack = self.clickHandle else {
-            return
+        if KMMemberInfo.shared.isLogin {
+            guard let callBack = self.clickHandle else {
+                return
+            }
+            callBack(self, .purchase)
+            FMTrackEventManager.defaultManager.trackOnceEvent(event: "PUW", withProperties: ["PUW_Btn":"Btn_PUW_StartGuideConvert_Buy"])
+        } else {
+            KMLoginWindowsController.shared.openWindow() { [weak self] success in
+                guard let self = self else { return }
+                if success {
+                    guard let callBack = self.clickHandle else {
+                        return
+                    }
+                    callBack(self, .purchase)
+                    FMTrackEventManager.defaultManager.trackOnceEvent(event: "PUW", withProperties: ["PUW_Btn":"Btn_PUW_StartGuideConvert_Buy"])
+                }
+            }
         }
-        callBack(self, .purchase)
-        FMTrackEventManager.defaultManager.trackOnceEvent(event: "PUW", withProperties: ["PUW_Btn":"Btn_PUW_StartGuideConvert_Buy"])
     }
     
     @objc func themeChange() {