Commit 15a9dd7d authored by David黄金龙's avatar David黄金龙

首页 --- 银河线下沙龙

parent e65f4255
......@@ -346,6 +346,7 @@
A5573EE92B317C0100D98EC0 /* galaxyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EE82B317C0100D98EC0 /* galaxyTests.swift */; };
A5573EF32B317C0100D98EC0 /* galaxyUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EF22B317C0100D98EC0 /* galaxyUITests.swift */; };
A5573EF52B317C0100D98EC0 /* galaxyUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EF42B317C0100D98EC0 /* galaxyUITestsLaunchTests.swift */; };
A566A79A2C219FA400980D06 /* YHHomeSalonAreaView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A566A7992C219FA400980D06 /* YHHomeSalonAreaView.swift */; };
A567E5922BD7643D00D5D5A0 /* YHHomeWebViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5682BD7643D00D5D5A0 /* YHHomeWebViewModel.swift */; };
A567E5932BD7643D00D5D5A0 /* YHHomePageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5692BD7643D00D5D5A0 /* YHHomePageViewModel.swift */; };
A567E5942BD7643D00D5D5A0 /* YHHomeListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E56B2BD7643D00D5D5A0 /* YHHomeListModel.swift */; };
......@@ -861,6 +862,7 @@
A5573EEE2B317C0100D98EC0 /* galaxyUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = galaxyUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
A5573EF22B317C0100D98EC0 /* galaxyUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = galaxyUITests.swift; sourceTree = "<group>"; };
A5573EF42B317C0100D98EC0 /* galaxyUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = galaxyUITestsLaunchTests.swift; sourceTree = "<group>"; };
A566A7992C219FA400980D06 /* YHHomeSalonAreaView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeSalonAreaView.swift; sourceTree = "<group>"; };
A567E5682BD7643D00D5D5A0 /* YHHomeWebViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeWebViewModel.swift; sourceTree = "<group>"; };
A567E5692BD7643D00D5D5A0 /* YHHomePageViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomePageViewModel.swift; sourceTree = "<group>"; };
A567E56B2BD7643D00D5D5A0 /* YHHomeListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeListModel.swift; sourceTree = "<group>"; };
......@@ -2243,6 +2245,7 @@
049AB5ED2C0EF68700155DDF /* YHOrderTipsView.swift */,
A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */,
A5EE41EE2C21387C005BBA5D /* YHAiRadarAreaView.swift */,
A566A7992C219FA400980D06 /* YHHomeSalonAreaView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -3167,6 +3170,7 @@
04A7BD132BA42F4200BD35A2 /* YHMyDocumentsDetailViewController.swift in Sources */,
04A671622BA058DE00C1FB91 /* YHCertificateEditSheetView.swift in Sources */,
04FD85682C21277800BEF9C5 /* YHMyNameCardAvatarInfoCell.swift in Sources */,
A566A79A2C219FA400980D06 /* YHHomeSalonAreaView.swift in Sources */,
A5ACE9432B4564F7002C94D2 /* UILable+Extension.swift in Sources */,
0414BDB22BCCC0A500225367 /* YHCollectionModel.swift in Sources */,
045EEE882B9F171A0022A143 /* YHPreviewAcademicAndProfessionalQualificationViewController.swift in Sources */,
......
......@@ -285,7 +285,7 @@ private extension YHHomePageViewController {
view.addSubview(homeCollectView)
homeCollectView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(searchView.snp.bottom).offset(6+20)
make.top.equalTo(searchView.snp.bottom).offset(20)
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
}
......
......@@ -10,7 +10,7 @@ import UIKit
class YHHomeHeadView: UIView {
// 不包含订单提示视图的总高度
static let fixViewH : CGFloat = (YHHomeBannerView.viewH) + (20 + YHHkLifeAndIdView.viewH) + (20 + YHHomeKingKongBlockView.viewH) + 20 + 20 + 1 + (YHAiRadarAreaView.viewH + 20) + 1
static let fixViewH : CGFloat = (YHHomeBannerView.viewH) + (20 + YHHkLifeAndIdView.viewH) + (20 + YHHomeKingKongBlockView.viewH) + (20 + 1) + (20 + YHAiRadarAreaView.viewH) + (20 + YHHomeSalonAreaView.viewH) + (20 + 1) + 20
// 包含订单提示视图的总高度
static let viewHWithOrderTips: CGFloat = YHHomeHeadView.fixViewH + (20 + YHOrderTipsView.viewH)
......@@ -65,6 +65,10 @@ class YHHomeHeadView: UIView {
//6.银河线下沙龙
lazy var salonArea: YHHomeSalonAreaView = {
let view = YHHomeSalonAreaView(frame: .zero)
return view
}()
......@@ -137,14 +141,21 @@ private extension YHHomeHeadView {
make.height.equalTo(YHAiRadarAreaView.viewH)
}
addSubview(salonArea)
salonArea.snp.makeConstraints { make in
make.top.equalTo(aiRadarArea.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHHomeSalonAreaView.viewH)
}
addSubview(bannerLineBottom)
bannerLineBottom.snp.makeConstraints { make in
make.top.equalTo(aiRadarArea.snp.bottom).offset(20)
make.top.equalTo(salonArea.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(1)
}
}
}
//
// YHHomeSalonAreaView.swift
// galaxy
//
// Created by davidhuangA on 2024/6/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeSalonAreaView: UIView {
static let viewH = 259.0
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: "home_salon_bkg")
return imgV
}()
lazy var lable1: UILabel = {
let lable : UILabel = UILabel()
lable.text = "银河线下沙龙"
lable.font = UIFont.PFSC_B(ofSize: 17)
lable.textColor = UIColor.black
return lable
}()
lazy var lable2: UILabel = {
let lable : UILabel = UILabel()
lable.text = "线上预约,线下参加"
lable.font = UIFont.PFSC_R(ofSize: 12)
lable.textColor = UIColor.yhGreyColor
return lable
}()
lazy var lable3: UILabel = {
let lable : UILabel = UILabel()
lable.text = "前往预约"
lable.font = UIFont.PFSC_R(ofSize: 13)
lable.textColor = UIColor.mainTextColor
lable.textAlignment = .center
lable.layer.borderColor = UIColor.mainTextColor30.cgColor
lable.layer.borderWidth = 1
return lable
}()
}
extension YHHomeSalonAreaView {
@objc func tapButton(gestureRecognizer:UITapGestureRecognizer) {
goTabBarBy(tabType: .community)
}
func setupUI() {
backgroundColor = UIColor(hex: 0xF8FAFB)
addSubview(bkgImageV)
bkgImageV.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(166)
}
let subView : UIView = UIView()
addSubview(subView)
subView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.top.equalTo(bkgImageV.snp.bottom)
}
subView.addSubview(lable1)
lable1.snp.makeConstraints { make in
make.top.left.equalTo(24)
make.height.equalTo(24)
}
subView.addSubview(lable2)
lable2.snp.makeConstraints { make in
make.top.equalTo(lable1.snp.bottom).offset(4)
make.left.equalTo(lable1.snp.left)
make.height.equalTo(17)
}
subView.addSubview(lable3)
lable3.snp.makeConstraints { make in
make.right.equalTo(-24)
make.centerY.equalToSuperview()
make.width.equalTo(76)
make.height.equalTo(34)
}
}
}
......@@ -30,6 +30,7 @@ extension UIColor {
// static let mainTextColor : UIColor = UIColor(hexString: "#222222")!
static let mainTextColor : UIColor = UIColor(hexString: "#121A26")!
static let mainTextColor5 : UIColor = UIColor(hexString: "#121A26",transparency: 0.05)!
static let mainTextColor18 : UIColor = UIColor(hexString: "#121A26",transparency: 0.18)!
static let mainTextColor30 : UIColor = UIColor(hexString: "#121A26",transparency: 0.3)!
static let mainTextColor50 : UIColor = UIColor(hexString: "#121A26",transparency: 0.5)!
static let mainTextColor70 : UIColor = UIColor(hexString: "#121A26",transparency: 0.7)!
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "九宫格6(1) 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "九宫格6(1) 1@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