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