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
0ad2729f
Commit
0ad2729f
authored
Oct 14, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// fix
parent
8050d6ac
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
YHNewProductCell.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHNewProductCell.swift
+3
-0
YHSelectViewController.swift
.../Modules/Home(首页)/YHSelect/C/YHSelectViewController.swift
+6
-1
YHSelectLookHeadView.swift
...es/Modules/Home(首页)/YHSelect/V/YHSelectLookHeadView.swift
+12
-0
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHNewProductCell.swift
View file @
0ad2729f
...
...
@@ -30,6 +30,9 @@ class YHNewProductCell: UITableViewCell {
func
updateModel
(
_
model
:
YHSelectGoodsModel
)
{
self
.
imgView
.
sd_setImage
(
with
:
URL
(
string
:
model
.
image
),
placeholderImage
:
UIImage
(
named
:
"global_default_image"
))
self
.
imgView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
model
.
ratio
*
(
KScreenWidth
-
20.0
*
2
))
}
}
func
setupUI
()
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/YHSelect/C/YHSelectViewController.swift
View file @
0ad2729f
...
...
@@ -127,6 +127,7 @@ extension YHSelectViewController {
head
.
block
=
{
index
in
self
.
selectItem
=
index
self
.
buttonItem
=
0
self
.
tableView
.
reloadData
()
self
.
updataData
()
}
head
.
buttonBlock
=
{
index
in
...
...
@@ -208,7 +209,7 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
let
model
=
self
.
viewModel
.
goodsArray
[
indexPath
.
row
]
if
model
.
goodsCategoryType
==
1
{
// 新品商品
return
160
return
UITableView
.
automaticDimension
}
if
indexPath
.
row
==
0
{
...
...
@@ -218,6 +219,9 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
if
selectItem
==
0
{
return
46
}
return
66
}
...
...
@@ -227,6 +231,7 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
// headView.itemButton.setTitle(model.name, for: .normal)
// headView.itemButton.iconInRight(with: 0.5)
// }
return
headView
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/YHSelect/V/YHSelectLookHeadView.swift
View file @
0ad2729f
...
...
@@ -21,6 +21,7 @@ class YHSelectLookHeadView: UIView {
normalButton
.
isSelected
=
true
hotButton
.
isSelected
=
false
priceButton
.
isSelected
=
false
}
else
if
buttonIndex
==
1
{
normalButton
.
isSelected
=
false
hotButton
.
isSelected
=
true
...
...
@@ -99,6 +100,7 @@ class YHSelectLookHeadView: UIView {
// button.setImage(UIImage(named: "home_select_icon_select"), for: .selected)
button
.
addTarget
(
self
,
action
:
#selector(
normalClick
)
,
for
:
.
touchUpInside
)
button
.
isSelected
=
true
button
.
isHidden
=
true
return
button
}()
addSubview
(
normalButton
)
...
...
@@ -118,6 +120,7 @@ class YHSelectLookHeadView: UIView {
button
.
setTitleColor
(
UIColor
.
brandMainColor
,
for
:
.
selected
)
// button.setImage(UIImage(named: "home_select_icon_select"), for: .selected)
button
.
addTarget
(
self
,
action
:
#selector(
hotClick
)
,
for
:
.
touchUpInside
)
button
.
isHidden
=
true
return
button
}()
addSubview
(
hotButton
)
...
...
@@ -137,6 +140,7 @@ class YHSelectLookHeadView: UIView {
button
.
setTitleColor
(
UIColor
.
brandMainColor
,
for
:
.
selected
)
button
.
setImage
(
UIImage
(
named
:
"home_select_icon_select"
),
for
:
.
selected
)
button
.
addTarget
(
self
,
action
:
#selector(
priceClick
)
,
for
:
.
touchUpInside
)
button
.
isHidden
=
true
return
button
}()
addSubview
(
priceButton
)
...
...
@@ -213,6 +217,14 @@ extension YHSelectLookHeadView: UICollectionViewDelegate, UICollectionViewDataSo
collectionView
.
reloadData
()
if
let
block
=
block
{
block
(
indexPath
.
row
)
normalButton
.
isHidden
=
false
hotButton
.
isHidden
=
false
priceButton
.
isHidden
=
false
if
indexPath
.
row
==
0
{
normalButton
.
isHidden
=
true
hotButton
.
isHidden
=
true
priceButton
.
isHidden
=
true
}
}
collectionView
.
scrollToItem
(
at
:
indexPath
,
at
:
.
centeredHorizontally
,
animated
:
true
)
}
...
...
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