|
@@ -204,6 +204,20 @@ import Cocoa
|
|
|
KMAdvertisementManager.manager.fetchDataWithResponseObject { [weak self] data, responseObject, error in
|
|
|
KMPrint("获取广告数据成功")
|
|
|
if data != nil {
|
|
|
+ let showMenu = (data?.remoteControl?.showMenuHelpInfo ?? "") == "1"
|
|
|
+ DispatchQueue.main.async {
|
|
|
+ let mainMenu = NSApp.mainMenu?.item(at: 0)?.submenu
|
|
|
+ if let item = mainMenu?.item(withTitle: NSLocalizedString("Volume Discount", comment: "")) {
|
|
|
+ item.isHidden = !showMenu
|
|
|
+ }
|
|
|
+ if let item = mainMenu?.item(withTitle: NSLocalizedString("One License for Mac and Windows", comment: "")) {
|
|
|
+ item.isHidden = !showMenu
|
|
|
+ }
|
|
|
+ if let item = mainMenu?.item(withTitle: NSLocalizedString("Education Discount", comment: "")) {
|
|
|
+ item.isHidden = !showMenu
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
let content = data!.recommondContent
|
|
|
let item = content?.recommondContentPDFPro
|
|
|
var infos: [KMAdvertisementItemInfo] = []
|