|
@@ -99,23 +99,28 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
|
|
|
#if VERSION_DMG
|
|
|
// 执行相应的操作
|
|
|
- if url.scheme == "subscriptiondmgSchemes" {
|
|
|
- if !KMLightMemberManager.manager.isLogin() && NSApp.mainWindow != nil {
|
|
|
- KMLoginWindowController.show(window: NSApp.mainWindow!)
|
|
|
- } else {
|
|
|
- KMPurchaseManager.manager.restorePurchases { isSuccess, error in
|
|
|
- if isSuccess {
|
|
|
-
|
|
|
- } else {
|
|
|
- KMComparativeTableViewController.purchasefailed(view: NSApp.mainWindow?.contentView, state: error)
|
|
|
+ if url.scheme == "subscriptiondmgschemes" {
|
|
|
+ if urlString.contains("open=expired") {
|
|
|
+ KMPrint("刷新用户信息")
|
|
|
+ if !KMLightMemberManager.manager.isLogin() && NSApp.mainWindow != nil {
|
|
|
+ KMLoginWindowController.show(window: NSApp.mainWindow!)
|
|
|
+ } else {
|
|
|
+ if NSApp.mainWindow != nil && KMLightMemberManager.manager.isLogin() {
|
|
|
+ KMAccountInfoWindowController.show(window: NSApp.mainWindow!)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if urlString.contains("open=success") {
|
|
|
+ if !KMLightMemberManager.manager.isLogin() && NSApp.mainWindow != nil {
|
|
|
+ KMLoginWindowController.show(window: NSApp.mainWindow!)
|
|
|
+ } else {
|
|
|
+ KMPurchaseManager.manager.restorePurchases { isSuccess, error in
|
|
|
+ if isSuccess {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ KMComparativeTableViewController.purchasefailed(view: NSApp.mainWindow?.contentView, state: error)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- if url.path == "/open" {
|
|
|
- // 执行打开操作
|
|
|
- } else if url.path == "/close" {
|
|
|
- // 执行关闭操作
|
|
|
}
|
|
|
}
|
|
|
#endif
|