From 36a99221a8d6a2b06cc17c3349fe2730dd93469c Mon Sep 17 00:00:00 2001 From: linshujie Date: Thu, 3 Sep 2026 18:30:30 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=B8=B8=E5=AE=A2=E5=8F=AF=E8=A7=81?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4=20-=20IM=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E5=BC=80=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Main/Tabbar/MainTabBarController.swift | 2 +- QuickLocation/Manager/App/RouterManager.swift | 10 +++++++--- .../Section/Explore/FeatureIntroVC.swift | 9 +++++---- .../Section/Group/GroupChat/GroupChatVC.swift | 16 ++++++++-------- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/QuickLocation/Main/Tabbar/MainTabBarController.swift b/QuickLocation/Main/Tabbar/MainTabBarController.swift index 878b60f5..9aa8a01b 100644 --- a/QuickLocation/Main/Tabbar/MainTabBarController.swift +++ b/QuickLocation/Main/Tabbar/MainTabBarController.swift @@ -60,7 +60,7 @@ final class MainTabBarController: UITabBarController { customTabBar.delegate = self // 点击"探索"(index=1)或"圈子"(index=2)时游客跳登录、不选中 customTabBar.shouldSelectTab = { index in - if (index == 1 || index == 2), AppContextManager.shared.isGuest { + if index == 1, AppContextManager.shared.isGuest { AppRouter.push(Route.login) return false } diff --git a/QuickLocation/Manager/App/RouterManager.swift b/QuickLocation/Manager/App/RouterManager.swift index d0b1a363..fb05c0b6 100644 --- a/QuickLocation/Manager/App/RouterManager.swift +++ b/QuickLocation/Manager/App/RouterManager.swift @@ -349,7 +349,7 @@ extension AppRouter: AppRouterProtocol { // MARK: - 查找位置 AppRouter.register(Route.searchLocation) { url, parameters in let vc = SearchLocationVC() -// vc.isNeedLogin = true + vc.isNeedLogin = true return vc } @@ -440,12 +440,16 @@ extension AppRouter: AppRouterProtocol { // MARK: - 还在吗 AppRouter.register(Route.signIn) { _, _ in - SignInVC(lastLocation: nil) + let vc = SignInVC(lastLocation: nil) + vc.isNeedLogin = true + return vc } // MARK: - SOS AppRouter.register(Route.sos) { _, _ in - SOSViewController() + let vc = SOSViewController() + vc.isNeedLogin = true + return vc } // MARK: - 充值优惠弹窗 diff --git a/QuickLocation/Section/Explore/FeatureIntroVC.swift b/QuickLocation/Section/Explore/FeatureIntroVC.swift index a5fbefec..e70f6646 100644 --- a/QuickLocation/Section/Explore/FeatureIntroVC.swift +++ b/QuickLocation/Section/Explore/FeatureIntroVC.swift @@ -43,8 +43,11 @@ final class FeatureIntroVC: BaseViewController { private func handle(_ action: FeatureIntroAction) { switch action { case .signIn: + guard !AppContextManager.shared.isGuest else { + AppRouter.push(Route.login) + return + } let vc = SignInVC(lastLocation: savedLastLocation) - vc.isNeedLogin = true AppRouter.push(vc) case .createBubble: AppRouter.push(Route.createBubble) @@ -55,9 +58,7 @@ final class FeatureIntroVC: BaseViewController { case .searchLocation: AppRouter.push(Route.searchLocation) case .sos: - let vc = SOSViewController() - vc.isNeedLogin = true - AppRouter.push(vc) + AppRouter.push(Route.sos) case .placeholder: DLToast.show(text: "敬请期待") } diff --git a/QuickLocation/Section/Group/GroupChat/GroupChatVC.swift b/QuickLocation/Section/Group/GroupChat/GroupChatVC.swift index 973d6cde..8be5fabe 100644 --- a/QuickLocation/Section/Group/GroupChat/GroupChatVC.swift +++ b/QuickLocation/Section/Group/GroupChat/GroupChatVC.swift @@ -96,14 +96,14 @@ final class GroupChatVC: BaseViewController { IQKeyboardManager.shared.resignOnTouchOutside = false // 非圈主 会员权益拦截 - let isCircleOwner = GroupOwnerMatcher.matches( - userId: AppContextManager.shared.userId, - groupKey: viewModel.groupId - ) - let canSend = isCircleOwner || AppContextManager.shared.vip > 1 - rootView.disableIMView.isHidden = canSend - rootView.quickActionBar.isUserInteractionEnabled = canSend - rootView.quickActionBar.alpha = canSend ? 1 : 0.35 +// let isCircleOwner = GroupOwnerMatcher.matches( +// userId: AppContextManager.shared.userId, +// groupKey: viewModel.groupId +// ) +// let canSend = isCircleOwner || AppContextManager.shared.vip > 1 +// rootView.disableIMView.isHidden = canSend +// rootView.quickActionBar.isUserInteractionEnabled = canSend +// rootView.quickActionBar.alpha = canSend ? 1 : 0.35 } override func viewWillDisappear(_ animated: Bool) {