|
@@ -52,10 +52,21 @@ class AIHeaderView: NSView, NibLoadable {
|
|
|
|
|
|
//MARK: IBAction
|
|
//MARK: IBAction
|
|
@IBAction func creditInfoAction(_ sender: NSButton) {
|
|
@IBAction func creditInfoAction(_ sender: NSButton) {
|
|
-
|
|
|
|
AIInfoManager.default().fetchAIInfo { dict, error in
|
|
AIInfoManager.default().fetchAIInfo { dict, error in
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ if(KMMemberInfo.shared.isLogin == true) {
|
|
|
|
+ KMUserInfoViewController.refreshTokenUserInfo {[weak self] success in
|
|
|
|
+ if(success == true) {
|
|
|
|
+ self?.enterAIInfo()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ enterAIInfo()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ func enterAIInfo() {
|
|
|
|
|
|
KMUserInfoVCModel().refreshUserInfo { success, msg in
|
|
KMUserInfoVCModel().refreshUserInfo { success, msg in
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: kDeviceAIStatusChangeNotification), object: nil)
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: kDeviceAIStatusChangeNotification), object: nil)
|
|
@@ -100,7 +111,6 @@ class AIHeaderView: NSView, NibLoadable {
|
|
popover.contentViewController = controller
|
|
popover.contentViewController = controller
|
|
popover.behavior = .transient
|
|
popover.behavior = .transient
|
|
popover.show(relativeTo: sender.bounds, of: sender, preferredEdge: .minY)
|
|
popover.show(relativeTo: sender.bounds, of: sender, preferredEdge: .minY)
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|