|
@@ -6,6 +6,7 @@
|
|
|
//
|
|
|
|
|
|
import Cocoa
|
|
|
+import KMAdvertisement
|
|
|
|
|
|
@objc enum KMHomeToolState : Int {
|
|
|
case OpenPDF = 0
|
|
@@ -110,16 +111,15 @@ import Cocoa
|
|
|
|
|
|
self.productPromotionPDFProSeries = ["Windows", "iPhone / iPad", "Android"]
|
|
|
self.productPromotionOthers = ["ComPDFKit", "ComVideoKit", "SignFlow", "FiImage Editor", "FiImage Screen", "Free PDF Templates"]
|
|
|
- self.productPromotionData = ["Windows": ["Name" : "Windows", "Image" : "icon_home_logo_windows"],
|
|
|
- "iPhone / iPad" : ["Name" : "iPhone / iPad", "Image" : "icon_home_logo_mac"],
|
|
|
- "Android" : ["Name" : "Android", "Image" : "icon_home_logo_android"],
|
|
|
- "ComPDFKit" : ["Name" : "ComPDFKit", "Image" : "icon_home_logo_comPDFKit"],
|
|
|
- "ComVideoKit" : ["Name" : "ComVideoKit", "Image" : "icon_home_logo_comVideoKit"],
|
|
|
- "SignFlow" : ["Name" : "SignFlow", "Image" : "icon_home_logo_signflow"],
|
|
|
- "FiImage Editor" : ["Name" : "FiImage Editor", "Image" : "icon_home_logo_editor"],
|
|
|
- "FiImage Screen" : ["Name" : "FiImage Screen", "Image" : "icon_home_logo_screen"],
|
|
|
- "Free PDF Templates" : ["Name" : "Free PDF Templates", "Image" : "icon_home_logo_templates"]]
|
|
|
-
|
|
|
+ self.productPromotionData = ["Windows": ["Name" : "Windows", "Image" : "icon_home_logo_windows", "link":""],
|
|
|
+ "iPhone / iPad" : ["Name" : "iPhone / iPad", "Image" : "icon_home_logo_mac", "link":""],
|
|
|
+ "Android" : ["Name" : "Android", "Image" : "icon_home_logo_android", "link":""],
|
|
|
+ "ComPDFKit" : ["Name" : "ComPDFKit", "Image" : "icon_home_logo_comPDFKit", "link":""],
|
|
|
+ "ComVideoKit" : ["Name" : "ComVideoKit", "Image" : "icon_home_logo_comVideoKit", "link":""],
|
|
|
+ "SignFlow" : ["Name" : "SignFlow", "Image" : "icon_home_logo_signflow", "link":""],
|
|
|
+ "FiImage Editor" : ["Name" : "FiImage Editor", "Image" : "icon_home_logo_editor", "link":""],
|
|
|
+ "FiImage Screen" : ["Name" : "FiImage Screen", "Image" : "icon_home_logo_screen", "link":""],
|
|
|
+ "Free PDF Templates" : ["Name" : "Free PDF Templates", "Image" : "icon_home_logo_templates"], "link":""]
|
|
|
NSEvent.addLocalMonitorForEvents(matching: .keyDown) { (aEvent) -> NSEvent? in
|
|
|
self.keyDown(with: aEvent)
|
|
|
return aEvent
|
|
@@ -132,7 +132,7 @@ import Cocoa
|
|
|
self.otherMouseDown(with: aEvent)
|
|
|
return aEvent
|
|
|
}
|
|
|
-
|
|
|
+ self.initNetworkingData()
|
|
|
self.initLocalization()
|
|
|
self.initializeUI()
|
|
|
|
|
@@ -141,6 +141,21 @@ import Cocoa
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(homeFileRectChange(_:)), name: Notification.Name("KMHomeFileRectChange"), object: nil)
|
|
|
}
|
|
|
|
|
|
+ func initNetworkingData() {
|
|
|
+ KMAdvertisementManager.manager.fetchData { [unowned self] data, responseObject, error in
|
|
|
+ print("获取广告数据成功")
|
|
|
+// print(error)
|
|
|
+// print(responseObject)
|
|
|
+ if data != nil {
|
|
|
+ for model in data! {
|
|
|
+ if model.showType == .list {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// MARK: Init
|
|
|
|
|
|
func initializeUI() {
|