- 游客可见页面调整

- IM聊天开放
This commit is contained in:
linshujie 2026-09-03 18:30:30 +08:00
parent 8b0976cdf6
commit 36a99221a8
4 changed files with 21 additions and 16 deletions

View File

@ -60,7 +60,7 @@ final class MainTabBarController: UITabBarController {
customTabBar.delegate = self customTabBar.delegate = self
// ""index=1""index=2 // ""index=1""index=2
customTabBar.shouldSelectTab = { index in customTabBar.shouldSelectTab = { index in
if (index == 1 || index == 2), AppContextManager.shared.isGuest { if index == 1, AppContextManager.shared.isGuest {
AppRouter.push(Route.login) AppRouter.push(Route.login)
return false return false
} }

View File

@ -349,7 +349,7 @@ extension AppRouter: AppRouterProtocol {
// MARK: - // MARK: -
AppRouter.register(Route.searchLocation) { url, parameters in AppRouter.register(Route.searchLocation) { url, parameters in
let vc = SearchLocationVC() let vc = SearchLocationVC()
// vc.isNeedLogin = true vc.isNeedLogin = true
return vc return vc
} }
@ -440,12 +440,16 @@ extension AppRouter: AppRouterProtocol {
// MARK: - // MARK: -
AppRouter.register(Route.signIn) { _, _ in AppRouter.register(Route.signIn) { _, _ in
SignInVC(lastLocation: nil) let vc = SignInVC(lastLocation: nil)
vc.isNeedLogin = true
return vc
} }
// MARK: - SOS // MARK: - SOS
AppRouter.register(Route.sos) { _, _ in AppRouter.register(Route.sos) { _, _ in
SOSViewController() let vc = SOSViewController()
vc.isNeedLogin = true
return vc
} }
// MARK: - // MARK: -

View File

@ -43,8 +43,11 @@ final class FeatureIntroVC: BaseViewController {
private func handle(_ action: FeatureIntroAction) { private func handle(_ action: FeatureIntroAction) {
switch action { switch action {
case .signIn: case .signIn:
guard !AppContextManager.shared.isGuest else {
AppRouter.push(Route.login)
return
}
let vc = SignInVC(lastLocation: savedLastLocation) let vc = SignInVC(lastLocation: savedLastLocation)
vc.isNeedLogin = true
AppRouter.push(vc) AppRouter.push(vc)
case .createBubble: case .createBubble:
AppRouter.push(Route.createBubble) AppRouter.push(Route.createBubble)
@ -55,9 +58,7 @@ final class FeatureIntroVC: BaseViewController {
case .searchLocation: case .searchLocation:
AppRouter.push(Route.searchLocation) AppRouter.push(Route.searchLocation)
case .sos: case .sos:
let vc = SOSViewController() AppRouter.push(Route.sos)
vc.isNeedLogin = true
AppRouter.push(vc)
case .placeholder: case .placeholder:
DLToast.show(text: "敬请期待") DLToast.show(text: "敬请期待")
} }

View File

@ -96,14 +96,14 @@ final class GroupChatVC: BaseViewController {
IQKeyboardManager.shared.resignOnTouchOutside = false IQKeyboardManager.shared.resignOnTouchOutside = false
// //
let isCircleOwner = GroupOwnerMatcher.matches( // let isCircleOwner = GroupOwnerMatcher.matches(
userId: AppContextManager.shared.userId, // userId: AppContextManager.shared.userId,
groupKey: viewModel.groupId // groupKey: viewModel.groupId
) // )
let canSend = isCircleOwner || AppContextManager.shared.vip > 1 // let canSend = isCircleOwner || AppContextManager.shared.vip > 1
rootView.disableIMView.isHidden = canSend // rootView.disableIMView.isHidden = canSend
rootView.quickActionBar.isUserInteractionEnabled = canSend // rootView.quickActionBar.isUserInteractionEnabled = canSend
rootView.quickActionBar.alpha = canSend ? 1 : 0.35 // rootView.quickActionBar.alpha = canSend ? 1 : 0.35
} }
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {