From 38f768d39ba27d303147c59a222655b7c6cdfb25 Mon Sep 17 00:00:00 2001
From: younger_times <841720330@qq.com>
Date: 星期二, 04 七月 2023 14:45:02 +0800
Subject: [PATCH] 修改BUG

---
 OKProject/Class/Login/Controller/LoginVC.swift |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/OKProject/Class/Login/Controller/LoginVC.swift b/OKProject/Class/Login/Controller/LoginVC.swift
index 8da6048..dac89ce 100644
--- a/OKProject/Class/Login/Controller/LoginVC.swift
+++ b/OKProject/Class/Login/Controller/LoginVC.swift
@@ -12,6 +12,7 @@
 import TTTAttributedLabel
 import SwiftDate
 
+let LoginSuccess_Noti = Notification.Name.init("LoginSuccess_Noti")
 
 /// 登录注册
 class LoginVC: YYViewController {
@@ -247,6 +248,7 @@
                     self.hide()
                     self.dismiss(animated: true, completion: nil)
                     self.userInfoViewModel.queryUserInfo()
+                    NotificationCenter.default.post(name: LoginSuccess_Noti, object: nil)
                     break
                 case .error(let error):
                     self.hide()
@@ -254,7 +256,7 @@
                     break
                 }
         }).disposed(by: disposeBag)
-        
+
         /// 登录处理
         viewModel.wxLoginSubject
         .subscribeOn(MainScheduler.instance)
@@ -275,6 +277,7 @@
                             app.loginInfo.save(model: data)
                             self.userInfoViewModel.queryUserInfo()
                             self.dismiss(animated: true, completion: nil)
+                            NotificationCenter.default.post(name: LoginSuccess_Noti, object: nil)
                         }
                     }
                    

--
Gitblit v1.7.1