parent
8b0976cdf6
commit
36a99221a8
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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: - 充值优惠弹窗
|
||||
|
|
|
|||
|
|
@ -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: "敬请期待")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue