|
@@ -158,8 +158,12 @@ class KMUserInfoVCModel: ObservableObject {
|
|
*/
|
|
*/
|
|
func signOutAction() -> Void {
|
|
func signOutAction() -> Void {
|
|
NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
|
|
NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
|
|
- KMMemberPromptWC.shared.showWindow(nil)
|
|
|
|
- KMMemberPromptWC.shared.tipType = .logout
|
|
|
|
|
|
+
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ KMMemberPromptWC.shared.showWindow(nil)
|
|
|
|
+ KMMemberPromptWC.shared.window?.makeKeyAndOrderFront(nil)
|
|
|
|
+ KMMemberPromptWC.shared.tipType = .logout
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -183,8 +187,11 @@ class KMUserInfoVCModel: ObservableObject {
|
|
let msg = resultDict.msg
|
|
let msg = resultDict.msg
|
|
if success {
|
|
if success {
|
|
self.refreshUserInfo { success, msg,resdic in
|
|
self.refreshUserInfo { success, msg,resdic in
|
|
- KMMemberPromptWC.shared.showWindow(nil)
|
|
|
|
- KMMemberPromptWC.shared.tipType = .cancelSignout
|
|
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ KMMemberPromptWC.shared.showWindow(nil)
|
|
|
|
+ KMMemberPromptWC.shared.window?.makeKeyAndOrderFront(nil)
|
|
|
|
+ KMMemberPromptWC.shared.tipType = .cancelSignout
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
print(msg as Any)
|
|
print(msg as Any)
|
|
@@ -196,13 +203,19 @@ class KMUserInfoVCModel: ObservableObject {
|
|
(KMMemberInfo.shared.ai_payType == 1) {
|
|
(KMMemberInfo.shared.ai_payType == 1) {
|
|
// 在续订中用户提示退订
|
|
// 在续订中用户提示退订
|
|
NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
|
|
NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
|
|
- KMMemberPromptWC.shared.showWindow(nil)
|
|
|
|
- KMMemberPromptWC.shared.tipType = .unsubscribe
|
|
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ KMMemberPromptWC.shared.showWindow(nil)
|
|
|
|
+ KMMemberPromptWC.shared.window?.makeKeyAndOrderFront(nil)
|
|
|
|
+ KMMemberPromptWC.shared.tipType = .unsubscribe
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
// 手动注销
|
|
// 手动注销
|
|
NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
|
|
NotificationCenter.default.post(name: NSNotification.Name("CloseMenuNotification"), object: nil)
|
|
- KMMemberPromptWC.shared.showWindow(nil)
|
|
|
|
- KMMemberPromptWC.shared.tipType = .signout
|
|
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ KMMemberPromptWC.shared.showWindow(nil)
|
|
|
|
+ KMMemberPromptWC.shared.window?.makeKeyAndOrderFront(nil)
|
|
|
|
+ KMMemberPromptWC.shared.tipType = .signout
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|