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
83da690e
Commit
83da690e
authored
May 17, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
香港生活及服务首页UI优化
parent
03a85c6a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
121 additions
and
47 deletions
+121
-47
YHServiceBannerView.swift
...ules/IntelligentService(服务中心)/V/YHServiceBannerView.swift
+96
-44
YHServiceOrderProgressTableViewCell.swift
...Service(服务中心)/V/YHServiceOrderProgressTableViewCell.swift
+3
-3
Contents.json
...ServiceCenter/主入口/service_title_bg.imageset/Contents.json
+22
-0
service_title_bg@2x.png
...ter/主入口/service_title_bg.imageset/service_title_bg@2x.png
+0
-0
service_title_bg@3x.png
...ter/主入口/service_title_bg.imageset/service_title_bg@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHServiceBannerView.swift
View file @
83da690e
...
@@ -15,6 +15,13 @@ class YHServiceBannerView: UIView {
...
@@ -15,6 +15,13 @@ class YHServiceBannerView: UIView {
var
dataArr
:
[
YHBannerModel
]
=
[]
{
var
dataArr
:
[
YHBannerModel
]
=
[]
{
didSet
{
didSet
{
self
.
indicatorView
.
indicatorItems
=
self
.
dataArr
.
count
self
.
indicatorView
.
indicatorItems
=
self
.
dataArr
.
count
let
width
=
16
*
self
.
dataArr
.
count
+
3
*
(
self
.
dataArr
.
count
-
1
)
indicatorView
.
snp
.
remakeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
height
.
equalTo
(
2
)
make
.
bottom
.
equalTo
(
-
14
)
make
.
width
.
equalTo
(
width
)
}
bannerView
.
reloadData
()
bannerView
.
reloadData
()
}
}
}
}
...
@@ -35,14 +42,8 @@ class YHServiceBannerView: UIView {
...
@@ -35,14 +42,8 @@ class YHServiceBannerView: UIView {
view
.
delegate
=
self
view
.
delegate
=
self
view
.
dataSource
=
self
view
.
dataSource
=
self
view
.
automaticSlidingInterval
=
3
view
.
automaticSlidingInterval
=
3
view
.
register
(
FSPager
ViewCell
.
self
,
forCellWithReuseIdentifier
:
"cell"
)
view
.
register
(
YHServiceBannerCollection
ViewCell
.
self
,
forCellWithReuseIdentifier
:
"cell"
)
view
.
itemSize
=
FSPagerView
.
automaticSize
view
.
itemSize
=
FSPagerView
.
automaticSize
// view.interitemSpacing = 10
return
view
}()
lazy
var
pageControl
:
FSPageControl
=
{
let
view
=
FSPageControl
()
return
view
return
view
}()
}()
...
@@ -59,35 +60,15 @@ private extension YHServiceBannerView {
...
@@ -59,35 +60,15 @@ private extension YHServiceBannerView {
make
.
top
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
left
.
right
.
bottom
.
equalToSuperview
()
}
}
bannerView
.
addSubview
(
pageControl
)
pageControl
.
snp
.
makeConstraints
{
make
in
make
.
left
.
bottom
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
25
)
}
// setupPageControl()
bannerView
.
addSubview
(
indicatorView
)
bannerView
.
addSubview
(
indicatorView
)
indicatorView
.
snp
.
makeConstraints
{
make
in
indicatorView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
(
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
height
.
equalTo
(
2
)
make
.
height
.
equalTo
(
2
)
make
.
bottom
.
equalTo
(
-
14
)
make
.
bottom
.
equalTo
(
-
14
)
}
}
bannerView
.
reloadData
()
bannerView
.
reloadData
()
}
}
func
setupPageControl
()
{
self
.
pageControl
.
numberOfPages
=
self
.
dataArr
.
count
self
.
pageControl
.
contentHorizontalAlignment
=
.
center
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
))
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
}
func
goAppTab
(
tabBarName
:
String
)
{
func
goAppTab
(
tabBarName
:
String
)
{
if
!
tabBarName
.
isEmpty
{
if
!
tabBarName
.
isEmpty
{
if
tabBarName
.
contains
(
"tabBarHome"
,
caseSensitive
:
false
)
{
if
tabBarName
.
contains
(
"tabBarHome"
,
caseSensitive
:
false
)
{
...
@@ -117,24 +98,10 @@ extension YHServiceBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
...
@@ -117,24 +98,10 @@ extension YHServiceBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
}
}
public
func
pagerView
(
_
pagerView
:
FSPagerView
,
cellForItemAt
index
:
Int
)
->
FSPagerViewCell
{
public
func
pagerView
(
_
pagerView
:
FSPagerView
,
cellForItemAt
index
:
Int
)
->
FSPagerViewCell
{
let
cell
=
pagerView
.
dequeueReusableCell
(
withReuseIdentifier
:
"cell"
,
at
:
index
)
let
cell
=
pagerView
.
dequeueReusableCell
(
withReuseIdentifier
:
"cell"
,
at
:
index
)
as!
YHServiceBannerCollectionViewCell
if
index
<
dataArr
.
count
{
if
index
<
dataArr
.
count
{
let
model
=
dataArr
[
index
]
cell
.
dataModel
=
dataArr
[
index
]
if
model
.
id
!=
0
{
if
let
url
=
URL
(
string
:
model
.
img_url
)
{
// cell.imageView?.kf.setImage(with: url)
cell
.
imageView
?
.
kf
.
setImage
(
with
:
url
,
placeholder
:
UIImage
(
named
:
"global_default_image"
))
}
}
else
{
cell
.
imageView
?
.
image
=
UIImage
(
named
:
model
.
img_url
)
}
// cell.textLabel?.text = model.name
}
}
cell
.
imageView
?
.
contentMode
=
.
scaleAspectFill
cell
.
backgroundColor
=
.
contentBkgColor
cell
.
contentView
.
layer
.
shadowColor
=
UIColor
.
clear
.
cgColor
return
cell
return
cell
}
}
...
@@ -183,3 +150,88 @@ extension YHServiceBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
...
@@ -183,3 +150,88 @@ extension YHServiceBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
self
.
indicatorView
.
curIndicatorIndex
=
pagerView
.
currentIndex
self
.
indicatorView
.
curIndicatorIndex
=
pagerView
.
currentIndex
}
}
}
}
class
YHServiceBannerCollectionViewCell
:
FSPagerViewCell
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
textLabel
?
.
text
=
""
textLabel
?
.
isHidden
=
true
imageView
?
.
isHidden
=
true
initView
()
}
required
init
?(
coder
aDecoder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
lazy
var
bannerImagV
:
UIImageView
=
{
let
imagV
:
UIImageView
=
UIImageView
()
imagV
.
contentMode
=
.
scaleAspectFill
imagV
.
clipsToBounds
=
true
imagV
.
image
=
UIImage
(
named
:
"global_default_image"
)
return
imagV
}()
lazy
var
bannerTitleLable
:
UILabel
=
{
let
lable
=
UILabel
()
lable
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
17
)
lable
.
textColor
=
UIColor
.
white
return
lable
}()
lazy
var
bgImageView
:
UIImageView
=
{
let
imageView
=
UIImageView
()
imageView
.
image
=
UIImage
(
named
:
"service_title_bg"
)
return
imageView
}()
var
dataModel
:
YHBannerModel
?
{
didSet
{
updateUI
()
}
}
}
private
extension
YHServiceBannerCollectionViewCell
{
func
initView
()
{
contentView
.
addSubview
(
bannerImagV
)
bannerImagV
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
contentView
.
addSubview
(
bgImageView
)
bgImageView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
64
)
}
contentView
.
addSubview
(
bannerTitleLable
)
bannerTitleLable
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
20
)
make
.
bottom
.
equalTo
(
-
20
)
make
.
left
.
equalTo
(
20
)
make
.
height
.
equalTo
(
24
)
}
}
func
updateUI
()
{
guard
let
model
=
dataModel
else
{
return
}
if
model
.
isLocalItemFlag
{
bannerTitleLable
.
isHidden
=
true
bannerImagV
.
image
=
UIImage
(
named
:
model
.
img_url
)
}
else
{
bannerTitleLable
.
isHidden
=
false
if
let
url
=
URL
(
string
:
model
.
img_url
)
{
bannerImagV
.
kf
.
setImage
(
with
:
url
,
placeholder
:
UIImage
(
named
:
"global_default_image"
))
}
else
{
bannerImagV
.
image
=
UIImage
(
named
:
"global_default_image"
)
}
bannerTitleLable
.
text
=
model
.
name
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHServiceOrderProgressTableViewCell.swift
View file @
83da690e
...
@@ -50,10 +50,10 @@ extension YHServiceOrderProgressTableViewCell {
...
@@ -50,10 +50,10 @@ extension YHServiceOrderProgressTableViewCell {
messageLabel
.
text
=
"您还有"
+
"
\(
model
.
num
)
"
+
"份信息待填写哦~"
messageLabel
.
text
=
"您还有"
+
"
\(
model
.
num
)
"
+
"份信息待填写哦~"
// 0未知 1待开始 2进行中 3 已完成
// 0未知 1待开始 2进行中 3 已完成
if
model
.
status
==
1
{
if
model
.
status
==
1
{
titleLabel
.
textColor
=
UIColor
(
hex
:
0x121a26
,
transparency
:
0.
3
)
titleLabel
.
textColor
=
UIColor
(
hex
:
0x121a26
,
transparency
:
0.
5
)
messageLabel
.
textColor
=
UIColor
(
hex
:
0x94a3b8
,
transparency
:
0.
3
)
messageLabel
.
textColor
=
UIColor
(
hex
:
0x94a3b8
,
transparency
:
0.
5
)
buttonLabel
.
text
=
"待开始"
buttonLabel
.
text
=
"待开始"
buttonLabel
.
backgroundColor
=
UIColor
(
hex
:
0xb8babe
,
transparency
:
0.
3
)
buttonLabel
.
backgroundColor
=
UIColor
(
hex
:
0xb8babe
,
transparency
:
0.
5
)
progressImageView
.
image
=
UIImage
(
named
:
"service_progress_normal"
)
progressImageView
.
image
=
UIImage
(
named
:
"service_progress_normal"
)
// 1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
// 1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
if
model
.
type
==
1
{
if
model
.
type
==
1
{
...
...
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_title_bg.imageset/Contents.json
0 → 100644
View file @
83da690e
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"service_title_bg@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"service_title_bg@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_title_bg.imageset/service_title_bg@2x.png
0 → 100644
View file @
83da690e
42.6 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主入口/service_title_bg.imageset/service_title_bg@3x.png
0 → 100644
View file @
83da690e
99.4 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