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
ca8706e5
Commit
ca8706e5
authored
Apr 08, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
d638dbad
' into xiezhaolin
parents
a701c728
d638dbad
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
264 additions
and
228 deletions
+264
-228
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+8
-8
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+1
-3
YHStartPageViewController.swift
...lasses/Modules/Home(首页)/C/YHStartPageViewController.swift
+1
-1
YHHkLifeAndIdItemView.swift
...xy/Classes/Modules/Home(首页)/V/YHHkLifeAndIdItemView.swift
+116
-0
YHHkLifeAndIdView.swift
...galaxy/Classes/Modules/Home(首页)/V/YHHkLifeAndIdView.swift
+30
-4
YHHomeHeadView.swift
...xy/galaxy/Classes/Modules/Home(首页)/V/YHHomeHeadView.swift
+6
-6
YHHomeKingKongBlockView.swift
.../Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
+7
-0
YHPageContentView.swift
...galaxy/Classes/Modules/Home(首页)/V/YHPageContentView.swift
+0
-205
YHSchemeTableViewCell.swift
...ice(服务中心)/MyScheme(我的方案)/View/YHSchemeTableViewCell.swift
+1
-1
Contents.json
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/Contents.json
+6
-0
Contents.json
....xcassets/Home/hklife/hklife_bkg_0.imageset/Contents.json
+22
-0
Rectangle 346240964@2x.png
...e/hklife/hklife_bkg_0.imageset/Rectangle 346240964@2x.png
+0
-0
Rectangle 346240964@3x.png
...e/hklife/hklife_bkg_0.imageset/Rectangle 346240964@3x.png
+0
-0
Contents.json
....xcassets/Home/hklife/hklife_bkg_1.imageset/Contents.json
+22
-0
Rectangle 346240965@2x.png
...e/hklife/hklife_bkg_1.imageset/Rectangle 346240965@2x.png
+0
-0
Rectangle 346240965@3x.png
...e/hklife/hklife_bkg_1.imageset/Rectangle 346240965@3x.png
+0
-0
Contents.json
...xcassets/Home/hklife/hklife_icon_0.imageset/Contents.json
+22
-0
激活身份@2x.png
...s.xcassets/Home/hklife/hklife_icon_0.imageset/激活身份@2x.png
+0
-0
激活身份@3x.png
...s.xcassets/Home/hklife/hklife_icon_0.imageset/激活身份@3x.png
+0
-0
Contents.json
...xcassets/Home/hklife/hklife_icon_1.imageset/Contents.json
+22
-0
Group 2033194154@2x.png
...ome/hklife/hklife_icon_1.imageset/Group 2033194154@2x.png
+0
-0
Group 2033194154@3x.png
...ome/hklife/hklife_icon_1.imageset/Group 2033194154@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
ca8706e5
...
...
@@ -267,7 +267,7 @@
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
/* YHHkLif
tAndIdView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5173D692BC3C187007D4E74
/* YHHkLift
AndIdView.swift */
;
};
A5173D6A2BC3C187007D4E74
/* YHHkLif
eAndIdView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5173D692BC3C187007D4E74
/* YHHkLife
AndIdView.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 */
;
};
...
...
@@ -361,7 +361,6 @@
A5C5B2E82B4EC95600A7C5D1
/* YHDavidTestCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2E72B4EC95600A7C5D1
/* YHDavidTestCollectionViewCell.swift */
;
};
A5C5B2EA2B4ECA4D00A7C5D1
/* YHDavidModel0.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2E92B4ECA4D00A7C5D1
/* YHDavidModel0.swift */
;
};
A5C5B2EE2B4F9B8800A7C5D1
/* Localizable.xcstrings in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2ED2B4F9B8800A7C5D1
/* Localizable.xcstrings */
;
};
A5C5B2F92B5515CE00A7C5D1
/* YHPageContentView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2F82B5515CE00A7C5D1
/* YHPageContentView.swift */
;
};
A5C5B2FB2B5535DF00A7C5D1
/* YHHomeBannerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2FA2B5535DF00A7C5D1
/* YHHomeBannerView.swift */
;
};
A5C5B2FD2B55361700A7C5D1
/* YHBannerModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2FC2B55361700A7C5D1
/* YHBannerModel.swift */
;
};
A5C5B3002B55623800A7C5D1
/* YHMainContentBaseViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5C5B2FE2B55623700A7C5D1
/* YHMainContentBaseViewController.swift */
;
};
...
...
@@ -387,6 +386,7 @@
A5EF21372BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF21362BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift */
;
};
A5EF213B2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF213A2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift */
;
};
A5F8AC082B9F414000A21EFA
/* YHCustomTextView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5F8AC072B9F414000A21EFA
/* YHCustomTextView.swift */
;
};
A5F9AD332BC3CD66000323F8
/* YHHkLifeAndIdItemView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5F9AD322BC3CD66000323F8
/* YHHkLifeAndIdItemView.swift */
;
};
A5FD63BD2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD63BC2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift */
;
};
A5FD63BF2B6250BC00D1D9DA
/* YHInformationPerfectCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD63BE2B6250BC00D1D9DA
/* YHInformationPerfectCell.swift */
;
};
A5FD63C12B62616D00D1D9DA
/* YHInformationPerfectModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD63C02B62616D00D1D9DA
/* YHInformationPerfectModel.swift */
;
};
...
...
@@ -692,7 +692,7 @@
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
/* YHHkLif
tAndIdView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHkLift
AndIdView.swift
;
sourceTree
=
"<group>"
;
};
A5173D692BC3C187007D4E74
/* YHHkLif
eAndIdView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHkLife
AndIdView.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>"
;
};
...
...
@@ -790,7 +790,6 @@
A5C5B2E72B4EC95600A7C5D1
/* YHDavidTestCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDavidTestCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
A5C5B2E92B4ECA4D00A7C5D1
/* YHDavidModel0.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDavidModel0.swift
;
sourceTree
=
"<group>"
;
};
A5C5B2ED2B4F9B8800A7C5D1
/* Localizable.xcstrings */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.json.xcstrings
;
path
=
Localizable.xcstrings
;
sourceTree
=
"<group>"
;
};
A5C5B2F82B5515CE00A7C5D1
/* YHPageContentView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPageContentView.swift
;
sourceTree
=
"<group>"
;
};
A5C5B2FA2B5535DF00A7C5D1
/* YHHomeBannerView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomeBannerView.swift
;
sourceTree
=
"<group>"
;
};
A5C5B2FC2B55361700A7C5D1
/* YHBannerModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHBannerModel.swift
;
sourceTree
=
"<group>"
;
};
A5C5B2FE2B55623700A7C5D1
/* YHMainContentBaseViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMainContentBaseViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -816,6 +815,7 @@
A5EF21362BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHQuestionAndAnswerModel.swift
;
sourceTree
=
"<group>"
;
};
A5EF213A2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHQuestionAndAnswerCell.swift
;
sourceTree
=
"<group>"
;
};
A5F8AC072B9F414000A21EFA
/* YHCustomTextView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCustomTextView.swift
;
sourceTree
=
"<group>"
;
};
A5F9AD322BC3CD66000323F8
/* YHHkLifeAndIdItemView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHkLifeAndIdItemView.swift
;
sourceTree
=
"<group>"
;
};
A5FD63BC2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationPerfectListVC.swift
;
sourceTree
=
"<group>"
;
};
A5FD63BE2B6250BC00D1D9DA
/* YHInformationPerfectCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationPerfectCell.swift
;
sourceTree
=
"<group>"
;
};
A5FD63C02B62616D00D1D9DA
/* YHInformationPerfectModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationPerfectModel.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2131,7 +2131,6 @@
A5ACE95B2B45712D002C94D2
/* V */
=
{
isa
=
PBXGroup
;
children
=
(
A5C5B2F82B5515CE00A7C5D1
/* YHPageContentView.swift */
,
A530268F2B4E6F2700F35102
/* YHHomeCustomCell.swift */
,
A5C5B2E72B4EC95600A7C5D1
/* YHDavidTestCollectionViewCell.swift */
,
A5C5B32A2B57D17600A7C5D1
/* YHDavidCell5.swift */
,
...
...
@@ -2147,8 +2146,9 @@
A5C5B2FA2B5535DF00A7C5D1
/* YHHomeBannerView.swift */
,
A501BE672BC2B85F00C4F1FB
/* YHHomeSearchView.swift */
,
A5C5B30F2B57677300A7C5D1
/* YHGestureTableView.swift */
,
A5173D692BC3C187007D4E74
/* YHHkLif
t
AndIdView.swift */
,
A5173D692BC3C187007D4E74
/* YHHkLif
e
AndIdView.swift */
,
A5173D6B2BC3C273007D4E74
/* YHHomeKingKongBlockView.swift */
,
A5F9AD322BC3CD66000323F8
/* YHHkLifeAndIdItemView.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -2491,6 +2491,7 @@
045EEF222B9F171A0022A143
/* YHImagePickerView.swift in Sources */
,
A5ACE9442B4564F7002C94D2
/* Array+Extension.swift in Sources */
,
0435FA812BA186D600024EAE
/* YHMyFileMethodTableViewCell.swift in Sources */
,
A5F9AD332BC3CD66000323F8
/* YHHkLifeAndIdItemView.swift in Sources */
,
0468D4282B50D4AF00CFB916
/* YHPrivacyAlertView.swift in Sources */
,
045EEEB22B9F171A0022A143
/* YHWorkActionView.swift in Sources */
,
A58AC09F2BAC05BA00A30FA9
/* YHFileListItemsView.swift in Sources */
,
...
...
@@ -2503,7 +2504,6 @@
045EEF212B9F171A0022A143
/* YHMainInformationTableViewCell.swift in Sources */
,
A5ACE9462B4564F7002C94D2
/* YHHUDSquareBaseView.swift in Sources */
,
A5551FFE2B4C26CE00510980
/* YHBaseViewModel.swift in Sources */
,
A5C5B2F92B5515CE00A7C5D1
/* YHPageContentView.swift in Sources */
,
045EEED92B9F171A0022A143
/* YHEducationDetailVC.swift in Sources */
,
045EEF1A2B9F171A0022A143
/* YHAddressViewController.swift in Sources */
,
A5C382CA2B5E1F4C00C5E65C
/* YHLoginTipsView.swift in Sources */
,
...
...
@@ -2654,7 +2654,7 @@
A5ACE9382B4564F7002C94D2
/* UIApplication+Extension.swift in Sources */
,
041B52872B5657B3007EBCEB
/* IMAppKey.swift in Sources */
,
0468D42B2B55019900CFB916
/* YHAnalytics.swift in Sources */
,
A5173D6A2BC3C187007D4E74
/* YHHkLif
t
AndIdView.swift in Sources */
,
A5173D6A2BC3C187007D4E74
/* YHHkLif
e
AndIdView.swift in Sources */
,
045EEEBE2B9F171A0022A143
/* YHResultBottomView.swift in Sources */
,
045EEEEB2B9F171A0022A143
/* YHTest.swift in Sources */
,
045EEEAC2B9F171A0022A143
/* YHWorkExperienceTableViewCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
ca8706e5
...
...
@@ -27,12 +27,11 @@ 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
.
backgroundColor
=
.
white
collectinoView
.
register
(
YHAboutUsAdvantageCell
.
self
,
forCellWithReuseIdentifier
:
YHAboutUsAdvantageCell
.
cellReuseIdentifier
)
collectinoView
.
register
(
YHDavidTestCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
YHDavidTestCollectionViewCell
.
cellReuseIdentifier
)
collectinoView
.
delegate
=
self
collectinoView
.
dataSource
=
self
collectinoView
.
showsVerticalScrollIndicator
=
false
collectinoView
.
translatesAutoresizingMaskIntoConstraints
=
false
collectinoView
.
alwaysBounceVertical
=
true
...
...
@@ -77,7 +76,6 @@ private extension YHHomePageViewController {
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
)
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHStartPageViewController.swift
View file @
ca8706e5
...
...
@@ -14,7 +14,7 @@ import ESTabBarController_swift
class
YHStartPageViewController
:
UIViewController
{
private
var
MaxTime
:
Int
=
50
//for test hjl
private
var
MaxTime
:
Int
=
3
private
var
timer
:
Timer
?
lazy
var
imagV
:
UIImageView
=
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHkLifeAndIdItemView.swift
0 → 100644
View file @
ca8706e5
//
// YHHkLifeAndIdItemView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
enum
HkLifeItemType
:
Int
{
case
unknow
=
-
1
//未知
case
hkID
=
0
//香港身份
case
hklife
=
1
//香港生活
}
class
YHHkLifeAndIdItemView
:
UIView
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
initView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
lazy
var
bkgImagV
:
UIImageView
=
{
let
imageV
=
UIImageView
()
imageV
.
contentMode
=
.
scaleAspectFill
return
imageV
}()
lazy
var
iconV
:
UIImageView
=
{
let
imageV
=
UIImageView
()
imageV
.
contentMode
=
.
scaleAspectFill
return
imageV
}()
lazy
var
titleLable
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"香港身份"
label
.
textColor
=
UIColor
.
mainTextColor
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
label
.
lineBreakMode
=
.
byTruncatingMiddle
return
label
}()
lazy
var
subtitleLable
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"去香港"
label
.
textColor
=
UIColor
(
hex
:
0x94A3B8
,
alpha
:
1.0
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
11
)
label
.
lineBreakMode
=
.
byTruncatingMiddle
return
label
}()
var
itemType
:
HkLifeItemType
=
.
unknow
{
didSet
{
updateUI
()
}
}
}
private
extension
YHHkLifeAndIdItemView
{
func
initView
()
{
addSubview
(
bkgImagV
)
bkgImagV
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
addSubview
(
iconV
)
iconV
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalToSuperview
()
make
.
left
.
equalTo
(
kMargin
)
make
.
width
.
height
.
equalTo
(
34
)
}
addSubview
(
titleLable
)
titleLable
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
iconV
.
snp
.
top
)
.
offset
(
-
3
)
make
.
left
.
equalTo
(
iconV
.
snp
.
right
)
.
offset
(
kMargin
)
make
.
height
.
equalTo
(
24
)
make
.
right
.
equalTo
(
-
10
)
}
addSubview
(
subtitleLable
)
subtitleLable
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
titleLable
.
snp
.
bottom
)
.
offset
(
2
)
make
.
left
.
equalTo
(
titleLable
.
snp
.
left
)
make
.
height
.
equalTo
(
16
)
make
.
right
.
equalTo
(
titleLable
.
snp
.
right
)
}
}
func
updateUI
()
{
if
itemType
==
.
hkID
{
bkgImagV
.
image
=
UIImage
(
named
:
"hklife_bkg_0"
)
iconV
.
image
=
UIImage
(
named
:
"hklife_icon_0"
)
titleLable
.
text
=
"香港身份"
subtitleLable
.
text
=
"去香港"
}
else
if
itemType
==
.
hklife
{
bkgImagV
.
image
=
UIImage
(
named
:
"hklife_bkg_1"
)
iconV
.
image
=
UIImage
(
named
:
"hklife_icon_1"
)
titleLable
.
text
=
"香港生活"
subtitleLable
.
text
=
"在香港"
}
else
{
printLog
(
"errorr:未处理"
)
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHkLif
t
AndIdView.swift
→
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHkLif
e
AndIdView.swift
View file @
ca8706e5
//
// YHHkLif
t
AndIdView.swift
// YHHkLif
e
AndIdView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
...
...
@@ -7,19 +7,45 @@
//
import
UIKit
/*
香港身份 香港生活
*/
class
YHHkLif
t
AndIdView
:
UIView
{
class
YHHkLif
e
AndIdView
:
UIView
{
static
let
viewH
:
CGFloat
=
74.0
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
//
initView()
initView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
}
private
extension
YHHkLifeAndIdView
{
func
initView
()
{
let
itemW
:
CGFloat
=
(
KScreenWidth
-
20
*
2
-
12
)
/
2.0
let
item0
=
YHHkLifeAndIdItemView
()
item0
.
itemType
=
.
hkID
addSubview
(
item0
)
item0
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHHkLifeAndIdView
.
viewH
)
make
.
width
.
equalTo
(
itemW
)
}
let
item1
=
YHHkLifeAndIdItemView
()
item1
.
itemType
=
.
hklife
addSubview
(
item1
)
item1
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
make
.
left
.
equalTo
(
item0
.
snp
.
right
)
.
offset
(
12
)
make
.
height
.
equalTo
(
YHHkLifeAndIdView
.
viewH
)
make
.
width
.
equalTo
(
itemW
)
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeHeadView.swift
View file @
ca8706e5
...
...
@@ -8,7 +8,7 @@
import
UIKit
class
YHHomeHeadView
:
UIView
{
static
let
viewH
:
CGFloat
=
(
20
+
YHHomeBannerView
.
viewH
)
+
(
20
+
YHHkLif
t
AndIdView
.
viewH
)
+
(
20
+
YHHomeKingKongBlockView
.
viewH
)
+
31
static
let
viewH
:
CGFloat
=
(
20
+
YHHomeBannerView
.
viewH
)
+
(
20
+
YHHkLif
e
AndIdView
.
viewH
)
+
(
20
+
YHHomeKingKongBlockView
.
viewH
)
+
31
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
...
...
@@ -26,8 +26,8 @@ class YHHomeHeadView: UIView {
}()
//2.香港身份 香港生活
lazy
var
homeHkLife
:
YHHkLif
t
AndIdView
=
{
let
view
=
YHHkLif
t
AndIdView
()
lazy
var
homeHkLife
:
YHHkLif
e
AndIdView
=
{
let
view
=
YHHkLif
e
AndIdView
()
return
view
}()
...
...
@@ -49,15 +49,15 @@ private extension YHHomeHeadView {
make
.
height
.
equalTo
(
YHHomeBannerView
.
viewH
)
}
homeBannerView
.
backgroundColor
=
.
red
//
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
(
YHHkLif
t
AndIdView
.
viewH
)
make
.
height
.
equalTo
(
YHHkLif
e
AndIdView
.
viewH
)
}
homeHkLife
.
backgroundColor
=
.
yellow
//
homeHkLife.backgroundColor = .yellow
addSubview
(
homeKingKongBlock
)
homeKingKongBlock
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
View file @
ca8706e5
...
...
@@ -14,9 +14,16 @@ class YHHomeKingKongBlockView: UIView {
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
initView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
}
private
extension
YHHomeKingKongBlockView
{
func
initView
()
{
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHPageContentView.swift
deleted
100755 → 0
View file @
a701c728
//
// BsPageContentView.swift
// GDKit
//
// Created by GDKit on 01/11/2022.
// Copyright (c) 2022 GDKit. All rights reserved.
//
import
UIKit
@objc
public
protocol
YHPageContentViewDelegate
:
AnyObject
{
func
pageContentView
(
_
contentView
:
YHPageContentView
,
progress
:
CGFloat
,
sourceIndex
:
Int
,
targetIndex
:
Int
)
}
private
let
ContentCellID
=
"BsContentCellID"
open
class
YHPageContentView
:
UIView
{
// MARK: - 定义属性
fileprivate
var
childVcs
:
[
UIViewController
]
fileprivate
weak
var
parentVC
:
UIViewController
?
fileprivate
var
startOffsetX
:
CGFloat
=
0
fileprivate
var
isForbidScrollDelegate
:
Bool
=
false
@objc
public
weak
var
delegate
:
YHPageContentViewDelegate
?
public
var
isScrollEnabled
:
Bool
?
{
didSet
{
if
let
isScrollEnabled
=
isScrollEnabled
{
collectionView
.
isScrollEnabled
=
isScrollEnabled
}
}
}
@objc
public
func
banScrollEnabled
()
{
// collectionView.isScrollEnabled = false
collectionView
.
isScrollEnabled
=
true
}
fileprivate
func
getLayout
()
->
UICollectionViewFlowLayout
{
let
layout
=
UICollectionViewFlowLayout
()
layout
.
itemSize
=
self
.
bounds
.
size
layout
.
minimumLineSpacing
=
0
layout
.
minimumInteritemSpacing
=
0
layout
.
scrollDirection
=
.
horizontal
return
layout
}
// MARK: - 懒加载属性
fileprivate
lazy
var
collectionView
:
UICollectionView
=
{[
weak
self
]
in
// 1.创建layout
let
layout
=
self
?
.
getLayout
()
??
UICollectionViewFlowLayout
()
// 2.创建UICollectionView
let
collectionView
=
UICollectionView
(
frame
:
CGRect
.
zero
,
collectionViewLayout
:
layout
)
collectionView
.
backgroundColor
=
.
clear
//groupTableViewBackground
collectionView
.
showsHorizontalScrollIndicator
=
false
collectionView
.
isPagingEnabled
=
true
collectionView
.
bounces
=
false
collectionView
.
dataSource
=
self
collectionView
.
delegate
=
self
collectionView
.
scrollsToTop
=
false
collectionView
.
register
(
UICollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
ContentCellID
)
return
collectionView
}()
// MARK: - 自定义构造函数
@objc
public
init
(
frame
:
CGRect
,
childVcs
:
[
UIViewController
],
parentViewController
:
UIViewController
?)
{
self
.
childVcs
=
childVcs
self
.
parentVC
=
parentViewController
super
.
init
(
frame
:
frame
)
// 设置UI
setupUI
()
}
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
}
// MARK: - 设置UI界面
extension
YHPageContentView
{
fileprivate
func
setupUI
()
{
// 1.将所有的子控制器添加父控制器中
// for childVc in childVcs {
// parentVC?.addChild(childVc)
// }
// 2.添加UICollectionView,用于在Cell中存放控制器的View
addSubview
(
collectionView
)
collectionView
.
frame
=
bounds
}
public
func
refreshRect
()
{
collectionView
.
frame
=
bounds
collectionView
.
collectionViewLayout
=
self
.
getLayout
()
}
}
// MARK: - 遵守UICollectionViewDataSource
extension
YHPageContentView
:
UICollectionViewDataSource
{
public
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
return
childVcs
.
count
}
public
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
// 1.创建Cell
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
ContentCellID
,
for
:
indexPath
)
// 2.给Cell设置内容
for
view
in
cell
.
contentView
.
subviews
{
view
.
removeFromSuperview
()
}
let
childVc
=
childVcs
[(
indexPath
as
NSIndexPath
)
.
item
]
childVc
.
view
.
frame
=
cell
.
contentView
.
bounds
cell
.
contentView
.
addSubview
(
childVc
.
view
)
return
cell
}
}
// MARK: - 遵守UICollectionViewDelegate
extension
YHPageContentView
:
UICollectionViewDelegate
{
public
func
scrollViewWillBeginDragging
(
_
scrollView
:
UIScrollView
)
{
isForbidScrollDelegate
=
false
startOffsetX
=
scrollView
.
contentOffset
.
x
}
public
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
// 0.判断是否是点击事件
if
isForbidScrollDelegate
{
return
}
// 1.定义获取需要的数据
var
progress
:
CGFloat
=
0
var
sourceIndex
:
Int
=
0
var
targetIndex
:
Int
=
0
// 2.判断是左滑还是右滑
let
currentOffsetX
=
scrollView
.
contentOffset
.
x
let
scrollViewW
=
scrollView
.
bounds
.
width
if
currentOffsetX
>
startOffsetX
{
// 左滑
// 1.计算progress
progress
=
currentOffsetX
/
scrollViewW
-
floor
(
currentOffsetX
/
scrollViewW
)
// 2.计算sourceIndex
sourceIndex
=
Int
(
currentOffsetX
/
scrollViewW
)
// 3.计算targetIndex
targetIndex
=
sourceIndex
+
1
if
targetIndex
>=
childVcs
.
count
{
targetIndex
=
childVcs
.
count
-
1
}
// 4.如果完全划过去
if
currentOffsetX
-
startOffsetX
==
scrollViewW
{
progress
=
1
targetIndex
=
sourceIndex
}
}
else
{
// 右滑
// 1.计算progress
progress
=
1
-
(
currentOffsetX
/
scrollViewW
-
floor
(
currentOffsetX
/
scrollViewW
))
// 2.计算targetIndex
targetIndex
=
Int
(
currentOffsetX
/
scrollViewW
)
// 3.计算sourceIndex
sourceIndex
=
targetIndex
+
1
if
sourceIndex
>=
childVcs
.
count
{
sourceIndex
=
childVcs
.
count
-
1
}
}
// 3.将progress/sourceIndex/targetIndex传递给titleView
delegate
?
.
pageContentView
(
self
,
progress
:
progress
,
sourceIndex
:
sourceIndex
,
targetIndex
:
targetIndex
)
}
}
// MARK: - 对外暴露的方法
extension
YHPageContentView
{
@objc
public
func
setCurrentIndex
(
_
currentIndex
:
Int
)
{
// 1.记录需要进制执行代理方法
isForbidScrollDelegate
=
true
// 2.滚动正确的位置
let
offsetX
=
CGFloat
(
currentIndex
)
*
collectionView
.
frame
.
width
collectionView
.
setContentOffset
(
CGPoint
(
x
:
offsetX
,
y
:
0
),
animated
:
false
)
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyScheme(我的方案)/View/YHSchemeTableViewCell.swift
View file @
ca8706e5
...
...
@@ -168,7 +168,7 @@ class YHSchemeTableViewCell: UITableViewCell {
mainMessageLabel
.
attributedText
=
newString
let
paragraphStyle
=
NSMutableParagraphStyle
()
paragraphStyle
.
lineSpacing
=
10
// 设置行间距
paragraphStyle
.
lineSpacing
=
4
// 设置行间距
let
attributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
.
paragraphStyle
:
paragraphStyle
,
.
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
)
...
...
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/Contents.json
0 → 100644
View file @
ca8706e5
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_bkg_0.imageset/Contents.json
0 → 100644
View file @
ca8706e5
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Rectangle 346240964@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Rectangle 346240964@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_bkg_0.imageset/Rectangle 346240964@2x.png
0 → 100644
View file @
ca8706e5
38 KB
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_bkg_0.imageset/Rectangle 346240964@3x.png
0 → 100644
View file @
ca8706e5
84.2 KB
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_bkg_1.imageset/Contents.json
0 → 100644
View file @
ca8706e5
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Rectangle 346240965@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Rectangle 346240965@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_bkg_1.imageset/Rectangle 346240965@2x.png
0 → 100644
View file @
ca8706e5
43.4 KB
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_bkg_1.imageset/Rectangle 346240965@3x.png
0 → 100644
View file @
ca8706e5
96.8 KB
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_icon_0.imageset/Contents.json
0 → 100644
View file @
ca8706e5
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"激活身份@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"激活身份@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_icon_0.imageset/激活身份@2x.png
0 → 100644
View file @
ca8706e5
3.45 KB
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_icon_0.imageset/激活身份@3x.png
0 → 100644
View file @
ca8706e5
7.11 KB
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_icon_1.imageset/Contents.json
0 → 100644
View file @
ca8706e5
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 2033194154@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 2033194154@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_icon_1.imageset/Group 2033194154@2x.png
0 → 100644
View file @
ca8706e5
4.28 KB
galaxy/galaxy/Res/Assets.xcassets/Home/hklife/hklife_icon_1.imageset/Group 2033194154@3x.png
0 → 100644
View file @
ca8706e5
8.32 KB
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