Преглед на файлове

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

wanjun преди 2 дни
родител
ревизия
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() {