Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
d6d9398b
Commit
d6d9398b
authored
Apr 08, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
f5d1a715
' into xiezhaolin
parents
37c0dda8
f5d1a715
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
155 additions
and
62 deletions
+155
-62
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+8
-0
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+15
-9
YHHkLiftAndIdView.swift
...galaxy/Classes/Modules/Home(首页)/V/YHHkLiftAndIdView.swift
+25
-0
YHHomeBannerView.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHHomeBannerView.swift
+27
-52
YHHomeHeadView.swift
...xy/galaxy/Classes/Modules/Home(首页)/V/YHHomeHeadView.swift
+58
-1
YHHomeKingKongBlockView.swift
.../Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
+22
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
d6d9398b
...
...
@@ -267,6 +267,8 @@
A510441A2B495DD0006B60BB
/* UIView+Extension.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A51044192B495DD0006B60BB
/* UIView+Extension.swift */
;
};
A514E5DC2B60A2B700C93951
/* YHServiceCenterSecondViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A514E5DB2B60A2B700C93951
/* YHServiceCenterSecondViewController.swift */
;
};
A5173D682BC399B9007D4E74
/* YHHomePageViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5173D672BC399B9007D4E74
/* YHHomePageViewController.swift */
;
};
A5173D6A2BC3C187007D4E74
/* YHHkLiftAndIdView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5173D692BC3C187007D4E74
/* YHHkLiftAndIdView.swift */
;
};
A5173D6C2BC3C273007D4E74
/* YHHomeKingKongBlockView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5173D6B2BC3C273007D4E74
/* YHHomeKingKongBlockView.swift */
;
};
A517A4DF2BB53BE8000DEECD
/* YHDocListBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A517A4DE2BB53BE8000DEECD
/* YHDocListBottomView.swift */
;
};
A517A4E12BB573EB000DEECD
/* YHDocListCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A517A4E02BB573EB000DEECD
/* YHDocListCell.swift */
;
};
A517A4E42BB6C4BB000DEECD
/* YHDocumentUploadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A517A4E22BB6C4BB000DEECD
/* YHDocumentUploadView.swift */
;
};
...
...
@@ -690,6 +692,8 @@
A51044192B495DD0006B60BB
/* UIView+Extension.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"UIView+Extension.swift"
;
sourceTree
=
"<group>"
;
};
A514E5DB2B60A2B700C93951
/* YHServiceCenterSecondViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHServiceCenterSecondViewController.swift
;
sourceTree
=
"<group>"
;
};
A5173D672BC399B9007D4E74
/* YHHomePageViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomePageViewController.swift
;
sourceTree
=
"<group>"
;
};
A5173D692BC3C187007D4E74
/* YHHkLiftAndIdView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHkLiftAndIdView.swift
;
sourceTree
=
"<group>"
;
};
A5173D6B2BC3C273007D4E74
/* YHHomeKingKongBlockView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomeKingKongBlockView.swift
;
sourceTree
=
"<group>"
;
};
A517A4DE2BB53BE8000DEECD
/* YHDocListBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDocListBottomView.swift
;
sourceTree
=
"<group>"
;
};
A517A4E02BB573EB000DEECD
/* YHDocListCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDocListCell.swift
;
sourceTree
=
"<group>"
;
};
A517A4E22BB6C4BB000DEECD
/* YHDocumentUploadView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDocumentUploadView.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2143,6 +2147,8 @@
A5C5B2FA2B5535DF00A7C5D1
/* YHHomeBannerView.swift */
,
A501BE672BC2B85F00C4F1FB
/* YHHomeSearchView.swift */
,
A5C5B30F2B57677300A7C5D1
/* YHGestureTableView.swift */
,
A5173D692BC3C187007D4E74
/* YHHkLiftAndIdView.swift */
,
A5173D6B2BC3C273007D4E74
/* YHHomeKingKongBlockView.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -2648,9 +2654,11 @@
A5ACE9382B4564F7002C94D2
/* UIApplication+Extension.swift in Sources */
,
041B52872B5657B3007EBCEB
/* IMAppKey.swift in Sources */
,
0468D42B2B55019900CFB916
/* YHAnalytics.swift in Sources */
,
A5173D6A2BC3C187007D4E74
/* YHHkLiftAndIdView.swift in Sources */
,
045EEEBE2B9F171A0022A143
/* YHResultBottomView.swift in Sources */
,
045EEEEB2B9F171A0022A143
/* YHTest.swift in Sources */
,
045EEEAC2B9F171A0022A143
/* YHWorkExperienceTableViewCell.swift in Sources */
,
A5173D6C2BC3C273007D4E74
/* YHHomeKingKongBlockView.swift in Sources */
,
A5ACE93C2B4564F7002C94D2
/* UIColor+Extension.swift in Sources */
,
045EEEC02B9F171A0022A143
/* YHOtherInfoFillViewModel.swift in Sources */
,
045EEEF22B9F171A0022A143
/* YHChildBasicInfoVC.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
d6d9398b
...
...
@@ -15,11 +15,6 @@ class YHHomePageViewController: YHBaseViewController {
return
[
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
)]
}()
private
lazy
var
homeBannerView
:
YHHomeBannerView
=
{
let
view
=
YHHomeBannerView
()
return
view
}()
lazy
var
homeCollectView
=
{
// 设置布局方向
let
flowLayout
=
UICollectionViewFlowLayout
()
...
...
@@ -32,7 +27,7 @@ class YHHomePageViewController: YHBaseViewController {
flowLayout
.
scrollDirection
=
.
vertical
let
collectinoView
=
UICollectionView
(
frame
:
.
zero
,
collectionViewLayout
:
flowLayout
)
collectinoView
.
contentInset
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
//
collectinoView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
collectinoView
.
backgroundColor
=
.
white
collectinoView
.
register
(
YHAboutUsAdvantageCell
.
self
,
forCellWithReuseIdentifier
:
YHAboutUsAdvantageCell
.
cellReuseIdentifier
)
collectinoView
.
register
(
YHDavidTestCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
YHDavidTestCollectionViewCell
.
cellReuseIdentifier
)
...
...
@@ -49,12 +44,16 @@ class YHHomePageViewController: YHBaseViewController {
setupUI
()
}
lazy
var
searchView
:
YHHomeSearchView
=
{
let
view
=
YHHomeSearchView
()
return
view
}()
lazy
var
homeHeaderView
:
YHHomeHeadView
=
{
let
view
=
YHHomeHeadView
()
return
view
}()
}
private
extension
YHHomePageViewController
{
...
...
@@ -73,12 +72,19 @@ private extension YHHomePageViewController {
view
.
addSubview
(
homeCollectView
)
homeCollectView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
searchView
.
snp
.
bottom
)
.
offset
(
20
)
make
.
top
.
equalTo
(
searchView
.
snp
.
bottom
)
}
homeHeaderView
.
frame
=
CGRect
(
x
:
0
,
y
:
-
YHHomeHeadView
.
viewH
,
width
:
KScreenWidth
-
40
,
height
:
YHHomeHeadView
.
viewH
)
homeCollectView
.
addSubview
(
homeHeaderView
)
// homeHeaderView.backgroundColor = UIColor.red //for test hjl
homeCollectView
.
contentInset
=
UIEdgeInsets
(
top
:
YHHomeHeadView
.
viewH
,
left
:
20
,
bottom
:
20
,
right
:
20
)
homeCollectView
.
es
.
addInfiniteScrolling
{
self
.
loadFakeData
()
}
homeCollectView
.
reloadData
()
}
func
loadFirstItem
()
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHkLiftAndIdView.swift
0 → 100644
View file @
d6d9398b
//
// YHHkLiftAndIdView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
/*
香港身份 香港生活
*/
class
YHHkLiftAndIdView
:
UIView
{
static
let
viewH
:
CGFloat
=
74.0
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
// initView()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeBannerView.swift
View file @
d6d9398b
...
...
@@ -9,18 +9,15 @@
import
Foundation
import
FSPagerView
import
Kingfisher
//import SwifterSwift
class
YHHomeBannerView
:
UIView
{
// MARK: - constant 常量
// 位置、大小、图片、文本
fileprivate
var
dataArr
:
[
YHBannerModel
]
=
[
YHBannerModel
(),
YHBannerModel
(),
YHBannerModel
(),
YHBannerModel
(),
YHBannerModel
()]
static
let
viewH
:
CGFloat
=
KScreenWidth
-
20
*
2
//
MARK: - life cycle 生命周期
//工程的viewDidLoad、viewWillAppear、init、didReceiveMemoryWarning等方法都放在这里
//
位置、大小、图片、文本
fileprivate
var
dataArr
:
[
YHBannerModel
]
=
[
YHBannerModel
(),
YHBannerModel
(),
YHBannerModel
(),
YHBannerModel
(),
YHBannerModel
()]
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
...
...
@@ -31,17 +28,34 @@ class YHHomeBannerView: UIView {
fatalError
(
"init(coder:) has not been implemented"
)
}
private
lazy
var
bannerView
:
FSPagerView
=
{
let
view
=
FSPagerView
()
view
.
delegate
=
self
view
.
dataSource
=
self
view
.
automaticSlidingInterval
=
3
view
.
register
(
FSPagerViewCell
.
self
,
forCellWithReuseIdentifier
:
"cell"
)
view
.
itemSize
=
FSPagerView
.
automaticSize
view
.
interitemSpacing
=
10
return
view
}()
// MARK: - view layout 子视图的布局
//界面布局
lazy
var
pageControl
:
FSPageControl
=
{
let
view
=
FSPageControl
()
return
view
}()
}
private
extension
YHHomeBannerView
{
func
initView
()
{
addSubview
(
bannerView
)
bannerView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
10
)
make
.
bottom
.
equalToSuperview
()
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
16
)
make
.
top
.
equalToSuperview
()
make
.
left
.
equalToSuperview
()
make
.
right
.
equalToSuperview
(
)
make
.
height
.
equalTo
(
YHHomeBannerView
.
viewH
)
}
bannerView
.
addSubview
(
pageControl
)
...
...
@@ -49,7 +63,6 @@ class YHHomeBannerView: UIView {
make
.
left
.
bottom
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
25
)
}
setupPageControl
()
bannerView
.
reloadData
()
}
...
...
@@ -60,53 +73,15 @@ class YHHomeBannerView: UIView {
self
.
pageControl
.
contentInsets
=
UIEdgeInsets
(
top
:
0
,
left
:
12
,
bottom
:
10
,
right
:
12
)
let
normalImage
=
UIImage
(
color
:
UIColor
(
hex
:
0xff0000
,
alpha
:
1.0
),
size
:
CGSize
(
width
:
5
,
height
:
5
))
//UIImage(color: UIColor(white: 1, alpha: 0.5), size: CGSize(width: 5, height: 5))
let
normalImage
=
UIImage
(
color
:
UIColor
(
hex
:
0xff0000
,
alpha
:
1.0
),
size
:
CGSize
(
width
:
5
,
height
:
5
))
let
selectImage
=
UIImage
(
color
:
.
white
,
size
:
CGSize
(
width
:
8
,
height
:
5
))
self
.
pageControl
.
setImage
(
normalImage
,
for
:
.
normal
)
self
.
pageControl
.
setImage
(
selectImage
,
for
:
.
selected
)
self
.
pageControl
.
interitemSpacing
=
3
}
// public func refreshUI(_ arr: [YHBannerModel]) {
//
// let model : YHBannerModel = YHBannerModel()
// model.img_url = "https://upload-cdn.galaxy-immi.com/sell/test/1668772072522.jpg"
//
// model.link_type = 0
// model.title = "我是测试数据"
//
// let arr = [model,model,model,model,model]
//
// self.dataArr = arr
// setupPageControl()
// bannerView.reloadData()
// }
private
lazy
var
bannerView
:
FSPagerView
=
{
let
view
=
FSPagerView
()
view
.
delegate
=
self
view
.
dataSource
=
self
view
.
automaticSlidingInterval
=
3
view
.
register
(
FSPagerViewCell
.
self
,
forCellWithReuseIdentifier
:
"cell"
)
view
.
itemSize
=
FSPagerView
.
automaticSize
view
.
interitemSpacing
=
10
return
view
}()
lazy
var
pageControl
:
FSPageControl
=
{
let
view
=
FSPageControl
()
return
view
}()
}
// MARK: - delegate 具体到某个delegate,比如UITableViewDelegate
//代理或者数据源
// MARK: - FSPagerViewDelegate
extension
YHHomeBannerView
:
FSPagerViewDataSource
,
FSPagerViewDelegate
{
public
func
numberOfItems
(
in
pagerView
:
FSPagerView
)
->
Int
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeHeadView.swift
View file @
d6d9398b
...
...
@@ -7,7 +7,64 @@
//
import
UIKit
class
YHHomeHeadView
:
UIView
{
static
let
viewH
:
CGFloat
=
(
20
+
YHHomeBannerView
.
viewH
)
+
(
20
+
YHHkLiftAndIdView
.
viewH
)
+
(
20
+
YHHomeKingKongBlockView
.
viewH
)
+
31
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
initView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
//1.bannner
lazy
var
homeBannerView
:
YHHomeBannerView
=
{
let
view
=
YHHomeBannerView
()
return
view
}()
//2.香港身份 香港生活
lazy
var
homeHkLife
:
YHHkLiftAndIdView
=
{
let
view
=
YHHkLiftAndIdView
()
return
view
}()
//3. 四大金刚区
lazy
var
homeKingKongBlock
:
YHHomeKingKongBlockView
=
{
let
view
=
YHHomeKingKongBlockView
()
return
view
}()
}
private
extension
YHHomeHeadView
{
func
initView
()
{
backgroundColor
=
.
clear
addSubview
(
homeBannerView
)
homeBannerView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
20
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHHomeBannerView
.
viewH
)
}
homeBannerView
.
backgroundColor
=
.
red
addSubview
(
homeHkLife
)
homeHkLife
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
homeBannerView
.
snp
.
bottom
)
.
offset
(
20
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHHkLiftAndIdView
.
viewH
)
}
homeHkLife
.
backgroundColor
=
.
yellow
addSubview
(
homeKingKongBlock
)
homeKingKongBlock
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
homeHkLife
.
snp
.
bottom
)
.
offset
(
20
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHHomeKingKongBlockView
.
viewH
)
}
homeKingKongBlock
.
backgroundColor
=
.
purple
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
0 → 100644
View file @
d6d9398b
//
// YHHomeKingKongBlockView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHHomeKingKongBlockView
:
UIView
{
static
let
viewH
:
CGFloat
=
71.0
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment