Commit 73f1ee3d authored by Alex朱枝文's avatar Alex朱枝文

首页增加社区入口

parent 99b67bf7
......@@ -1187,6 +1187,7 @@
0487C1FD2E99F8E800CE6472 /* YHKingfisherUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0487C1FC2E99F8E800CE6472 /* YHKingfisherUtils.swift */; };
0487C1FF2E9A54A600CE6472 /* YHCompanyAuthorizationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0487C1FE2E9A54A600CE6472 /* YHCompanyAuthorizationViewController.swift */; };
0487C2012E9A55A400CE6472 /* YHCompanyAuthSettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0487C2002E9A55A400CE6472 /* YHCompanyAuthSettingCell.swift */; };
0487C2082E9A794B00CE6472 /* YHCircleEntryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0487C2072E9A794B00CE6472 /* YHCircleEntryView.swift */; };
048D6ADB2D5E00DE00BC6F4C /* YHMemberCenterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048D6ADA2D5E00DE00BC6F4C /* YHMemberCenterViewController.swift */; };
048D6ADD2D5EF0A900BC6F4C /* YHMemberCenterHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048D6ADC2D5EF0A900BC6F4C /* YHMemberCenterHeaderView.swift */; };
048D6ADF2D5F0FBE00BC6F4C /* YHMemberCenterHeaderBannerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048D6ADE2D5F0FBE00BC6F4C /* YHMemberCenterHeaderBannerCell.swift */; };
......@@ -2567,6 +2568,7 @@
0487C1FC2E99F8E800CE6472 /* YHKingfisherUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHKingfisherUtils.swift; sourceTree = "<group>"; };
0487C1FE2E9A54A600CE6472 /* YHCompanyAuthorizationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCompanyAuthorizationViewController.swift; sourceTree = "<group>"; };
0487C2002E9A55A400CE6472 /* YHCompanyAuthSettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCompanyAuthSettingCell.swift; sourceTree = "<group>"; };
0487C2072E9A794B00CE6472 /* YHCircleEntryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCircleEntryView.swift; sourceTree = "<group>"; };
048D6ADA2D5E00DE00BC6F4C /* YHMemberCenterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMemberCenterViewController.swift; sourceTree = "<group>"; };
048D6ADC2D5EF0A900BC6F4C /* YHMemberCenterHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMemberCenterHeaderView.swift; sourceTree = "<group>"; };
048D6ADE2D5F0FBE00BC6F4C /* YHMemberCenterHeaderBannerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMemberCenterHeaderBannerCell.swift; sourceTree = "<group>"; };
......@@ -3481,6 +3483,7 @@
045C0AE02D12CA5E00BD2DC0 /* YHAiRadarAreaView.swift */,
045C0AE12D12CA5E00BD2DC0 /* YHConsultantQRCodeView.swift */,
045C0AE22D12CA5E00BD2DC0 /* YHEvaluationView.swift */,
0487C2072E9A794B00CE6472 /* YHCircleEntryView.swift */,
045C0AE32D12CA5E00BD2DC0 /* YHGalaxyManagerTipsItemView.swift */,
045C0AE42D12CA5E00BD2DC0 /* YHGestureTableView.swift */,
045C0AE52D12CA5E00BD2DC0 /* YHHomeBannerCollectionViewCell.swift */,
......@@ -8796,6 +8799,7 @@
045C13652D12CA5F00BD2DC0 /* YHLookResignResultStateThreeTableViewCell.swift in Sources */,
045C13662D12CA5F00BD2DC0 /* YHFormItemExpireDateCell.swift in Sources */,
045C13672D12CA5F00BD2DC0 /* YHSmallWhiteNoteTemplateView.swift in Sources */,
0487C2082E9A794B00CE6472 /* YHCircleEntryView.swift in Sources */,
0411CEED2D15154B00644D35 /* YHGCWorkListHasWorkExperienceTableViewCell.swift in Sources */,
0411CEF52D1548AF00644D35 /* YHGCWorkModel.swift in Sources */,
045C13682D12CA5F00BD2DC0 /* YHResignUploadTravelPassportViewController.swift in Sources */,
......
......@@ -151,7 +151,7 @@ class YHCommunityViewController: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(goActivityVC), name: YhConstant.YhNotification.goActivityVCNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(goConnectionVC), name: YhConstant.YhNotification.goConnectionVCNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(goCircleVC), name: YhConstant.YhNotification.goCircleVCNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(goConnectionVC), name: YhConstant.YhNotification.goConnectionVCNotifiction, object: nil)
......@@ -299,6 +299,13 @@ class YHCommunityViewController: YHBaseViewController {
}
}
@objc func goCircleVC() {
guard arrItemVCs.count > 1 else {
return
}
segmentedView.selectItemAt(index: 1)
}
@objc func goActivityVC() {
guard arrItemVCs.count > 4 else {
return
......
......@@ -130,6 +130,18 @@ class YHHomePageViewController: YHBaseViewController {
}
self.gotoMgrVC()
}
view.circleEntryBlock = { [weak self] in
if YHLoginManager.shared.isLogin() == false {
YHOneKeyLoginManager.shared.oneKeyLogin()
return
}
goTabBarBy(tabType: .community)
UIViewController.current?.navigationController?.popToRootViewController(animated: true)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
NotificationCenter.default.post(name: YhConstant.YhNotification.goCircleVCNotifiction, object: nil)
}
}
return view
}()
}
......
//
// YHCircleEntryView.swift
// galaxy
//
// Created by alexzzw on 2025/10/11.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCircleEntryView: UIView {
static let viewH = 88.0
var circleEntryBlock: (() -> Void)?
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(tapButton(gestureRecognizer:)))
addGestureRecognizer(tap)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var bkgImageV: UIImageView = {
let imgV: UIImageView = UIImageView()
imgV.contentMode = .scaleAspectFill
imgV.image = UIImage(named: "circle_entry_bkg")
imgV.clipsToBounds = true
return imgV
}()
lazy var lable1: UILabel = {
let lable: UILabel = UILabel()
lable.text = "创业社区"
lable.font = UIFont.PFSC_B(ofSize: 17)
lable.textColor = UIColor.mainTextColor
return lable
}()
lazy var lable2: UILabel = {
let lable: UILabel = UILabel()
lable.text = "为您找到更多同行"
lable.font = UIFont.PFSC_R(ofSize: 12)
lable.textColor = UIColor.brandGrayColor6
return lable
}()
lazy var iconImageV: UIImageView = {
let imgV: UIImageView = UIImageView()
imgV.contentMode = .scaleAspectFill
imgV.image = UIImage(named: "circle_entry_left_icon")
imgV.clipsToBounds = true
return imgV
}()
lazy var rightButton: UIButton = {
let button = UIButton(type: .custom)
button.setTitle("前往查看", for: .normal)
button.setTitleColor(.white, for: .normal)
button.backgroundColor = .brandGrayColor8
button.titleLabel?.font = .PFSC_M(ofSize: 12)
button.addTarget(self, action: #selector(rightButtonClick), for: .touchUpInside)
return button
}()
lazy var centerView: UIView = {
let view = UIView()
return view
}()
}
extension YHCircleEntryView {
@objc func tapButton(gestureRecognizer: UITapGestureRecognizer) {
// 跳转Circle
circleEntryBlock?()
}
@objc func rightButtonClick() {
// 跳转Circle
circleEntryBlock?()
}
func setupUI() {
addSubview(bkgImageV)
addSubview(iconImageV)
addSubview(centerView)
centerView.addSubview(lable1)
centerView.addSubview(lable2)
addSubview(rightButton)
bkgImageV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
iconImageV.snp.makeConstraints { make in
make.width.height.equalTo(76)
make.left.equalTo(8)
make.centerY.equalToSuperview()
}
centerView.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(iconImageV.snp.right).offset(8)
make.right.lessThanOrEqualTo(rightButton.snp.left).offset(-8)
}
lable1.snp.makeConstraints { make in
make.left.top.right.equalToSuperview()
}
lable2.snp.makeConstraints { make in
make.top.equalTo(lable1.snp.bottom).offset(3)
make.left.bottom.right.equalToSuperview()
}
rightButton.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-24)
make.height.equalTo(32)
make.width.equalTo(80)
}
}
}
......@@ -47,10 +47,11 @@ class YHHomeHeadView: UIView {
}
// 不包含订单提示视图的总高度
// private static let fixViewH : CGFloat = YHHomeHeadView.topMargin + (YHHomeBannerView.viewH) + (20 + YHHomeKingKongBlockView.viewH) + (20 + 1) + (20 + YHAiRadarAreaView.viewH) + (20 + YHHomeSalonAreaView.viewH) + (20 + 1) + 20
private static let fixViewH: CGFloat = YHHomeHeadView.topMargin + (YHHomeBannerView.viewH) + (20 + YHHomeKingKongBlockView.viewH) + (20 + 1) + 20
private static let fixViewH: CGFloat = YHHomeHeadView.topMargin + (YHHomeBannerView.viewH) + (20 + YHHomeKingKongBlockView.viewH) + (20 + 1) + 20 + YHCircleEntryView.viewH + 16
var galaxyManagerItemClickEvent: (() -> Void)?
var orderTipsViewClickEvent: (() -> Void)?
var circleEntryBlock: (() -> Void)?
func getHomeHeadViewH(headStyle: YHHomeHeadViewStyleType) -> CGFloat {
return YHHomeHeadView.fixViewH + headStyle.getHeight(orderTipsView.orderTipsViewStyle.getHeight()) + YHHomeHeadView.topMargin
......@@ -129,6 +130,14 @@ class YHHomeHeadView: UIView {
return line
}()
lazy var circleEntryView: YHCircleEntryView = {
let view = YHCircleEntryView()
view.circleEntryBlock = { [weak self] in
self?.circleEntryBlock?()
}
return view
}()
// 是否隐藏优才订单提示视图
var homeHeadViewStyleType: YHHomeHeadViewStyleType = .evaluationA {
didSet {
......@@ -162,7 +171,7 @@ class YHHomeHeadView: UIView {
evaluationView.isHidden = false
talentEvaluationView.isHidden = true
evaluationView.snp.remakeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.top.equalTo(circleEntryView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHEvaluationView.viewH)
}
......@@ -172,7 +181,7 @@ class YHHomeHeadView: UIView {
evaluationView.isHidden = true
talentEvaluationView.isHidden = false
talentEvaluationView.snp.remakeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.top.equalTo(circleEntryView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHEvaluationView.viewH)
}
......@@ -182,7 +191,7 @@ class YHHomeHeadView: UIView {
evaluationView.isHidden = true
talentEvaluationView.isHidden = true
orderTipsView.snp.remakeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.top.equalTo(circleEntryView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(orderTipsView.tipViewH)
}
......@@ -192,7 +201,7 @@ class YHHomeHeadView: UIView {
evaluationView.isHidden = false
talentEvaluationView.isHidden = false
evaluationView.snp.remakeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.top.equalTo(circleEntryView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHEvaluationView.viewH)
}
......@@ -207,7 +216,7 @@ class YHHomeHeadView: UIView {
evaluationView.isHidden = true
talentEvaluationView.isHidden = false
talentEvaluationView.snp.remakeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.top.equalTo(circleEntryView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHEvaluationView.viewH)
}
......@@ -266,10 +275,17 @@ private extension YHHomeHeadView {
make.height.equalTo(1)
}
addSubview(circleEntryView)
circleEntryView.snp.makeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHCircleEntryView.viewH)
}
// 订单入口
addSubview(orderTipsView)
orderTipsView.snp.makeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.top.equalTo(circleEntryView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
// make.height.equalTo(226)
make.height.equalTo(orderTipsView.tipViewH)
......@@ -278,7 +294,7 @@ private extension YHHomeHeadView {
// 测评界面
addSubview(evaluationView)
evaluationView.snp.makeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.top.equalTo(circleEntryView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHEvaluationView.viewH)
}
......@@ -312,7 +328,7 @@ private extension YHHomeHeadView {
// }
addSubview(bannerLineBottom)
bannerLineBottom.snp.makeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.top.equalTo(circleEntryView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(1)
}
......
......@@ -363,6 +363,9 @@ extension YhConstant {
// 点击文件清单空视图返回服务tab页
public static let didClickFileListBackToServiceTabNotifiction = Notification.Name(rawValue: "com.yinhe.certificate.backToService")
// 调招 社区的circle页
public static let goCircleVCNotifiction = Notification.Name(rawValue: "com.yinhe.goCircleVCNotifiction")
// 调招 社区的会话页
public static let goMessageVCNotifiction = Notification.Name(rawValue: "com.yinhe.goMessageVCNotifiction")
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "circle_entry_bkg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "circle_entry_bkg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "circle_entry_left_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "circle_entry_left_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment