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
b23feb87
Commit
b23feb87
authored
Oct 15, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'new_product' into qrcode
# Conflicts: # galaxy/fastlane/Fastfile
parents
84f3b544
91d73bab
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
20 deletions
+80
-20
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+16
-16
YHNewProductCell.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHNewProductCell.swift
+31
-3
YHSelectViewController.swift
.../Modules/Home(首页)/YHSelect/C/YHSelectViewController.swift
+12
-1
YHSelectCategoryModel.swift
...s/Modules/Home(首页)/YHSelect/M/YHSelectCategoryModel.swift
+6
-0
YHSelectLookHeadView.swift
...es/Modules/Home(首页)/YHSelect/V/YHSelectLookHeadView.swift
+12
-0
String+Extension.swift
galaxy/galaxy/Classes/Tools/Extention/String+Extension.swift
+1
-0
YHOSSManager.swift
galaxy/galaxy/Classes/Tools/Upload/YHOSSManager.swift
+2
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
b23feb87
...
...
@@ -8968,7 +8968,7 @@
CODE_SIGN_ENTITLEMENTS
=
yinheReplayExt/yinheReplayExt.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
7
;
CURRENT_PROJECT_VERSION
=
1
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
GENERATE_INFOPLIST_FILE
=
YES
;
INFOPLIST_FILE
=
yinheReplayExt/Info.plist
;
...
...
@@ -8980,7 +8980,7 @@
"@executable_path/Frameworks"
,
"@executable_path/../../Frameworks"
,
);
MARKETING_VERSION
=
2.3.
4
;
MARKETING_VERSION
=
2.3.
5
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy.yinheReplayExt
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
@@ -8998,7 +8998,7 @@
CODE_SIGN_ENTITLEMENTS
=
yinheReplayExt/yinheReplayExt.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
7
;
CURRENT_PROJECT_VERSION
=
1
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
GENERATE_INFOPLIST_FILE
=
YES
;
INFOPLIST_FILE
=
yinheReplayExt/Info.plist
;
...
...
@@ -9010,7 +9010,7 @@
"@executable_path/Frameworks"
,
"@executable_path/../../Frameworks"
,
);
MARKETING_VERSION
=
2.3.
4
;
MARKETING_VERSION
=
2.3.
5
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy.yinheReplayExt
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
@@ -9028,7 +9028,7 @@
CODE_SIGN_ENTITLEMENTS
=
yinheReplayExt/yinheReplayExt.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
7
;
CURRENT_PROJECT_VERSION
=
1
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
GENERATE_INFOPLIST_FILE
=
YES
;
INFOPLIST_FILE
=
yinheReplayExt/Info.plist
;
...
...
@@ -9040,7 +9040,7 @@
"@executable_path/Frameworks"
,
"@executable_path/../../Frameworks"
,
);
MARKETING_VERSION
=
2.3.
4
;
MARKETING_VERSION
=
2.3.
5
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy.yinheReplayExt
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
@@ -9058,7 +9058,7 @@
CODE_SIGN_ENTITLEMENTS
=
yinheReplayExt/yinheReplayExt.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
7
;
CURRENT_PROJECT_VERSION
=
1
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
GENERATE_INFOPLIST_FILE
=
YES
;
INFOPLIST_FILE
=
yinheReplayExt/Info.plist
;
...
...
@@ -9070,7 +9070,7 @@
"@executable_path/Frameworks"
,
"@executable_path/../../Frameworks"
,
);
MARKETING_VERSION
=
2.3.
4
;
MARKETING_VERSION
=
2.3.
5
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy.yinheReplayExt
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
@@ -9147,7 +9147,7 @@
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyTestEnv.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
7
;
CURRENT_PROJECT_VERSION
=
1
;
DEBUG_INFORMATION_FORMAT
=
dwarf
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
...
@@ -9175,7 +9175,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
2.3.
4
;
MARKETING_VERSION
=
2.3.
5
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
@@ -9296,7 +9296,7 @@
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxy.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
7
;
CURRENT_PROJECT_VERSION
=
1
;
DEBUG_INFORMATION_FORMAT
=
dwarf
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
...
@@ -9324,7 +9324,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
2.3.
4
;
MARKETING_VERSION
=
2.3.
5
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
@@ -9507,7 +9507,7 @@
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxyDebug.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
7
;
CURRENT_PROJECT_VERSION
=
1
;
DEBUG_INFORMATION_FORMAT
=
dwarf
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
...
@@ -9535,7 +9535,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
2.3.
4
;
MARKETING_VERSION
=
2.3.
5
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
@@ -9558,7 +9558,7 @@
CODE_SIGN_ENTITLEMENTS
=
galaxy/galaxy.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
7
;
CURRENT_PROJECT_VERSION
=
1
;
DEBUG_INFORMATION_FORMAT
=
dwarf
;
DEVELOPMENT_TEAM
=
RXHYW88XR7
;
ENABLE_USER_SCRIPT_SANDBOXING
=
NO
;
...
...
@@ -9586,7 +9586,7 @@
"$(inherited)"
,
"@executable_path/Frameworks"
,
);
MARKETING_VERSION
=
2.3.
4
;
MARKETING_VERSION
=
2.3.
5
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.intelligence.galaxy
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHNewProductCell.swift
View file @
b23feb87
...
...
@@ -11,9 +11,12 @@ import UIKit
class
YHNewProductCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHNewProductCell"
var
model
:
YHSelectGoodsModel
=
YHSelectGoodsModel
()
var
onImageHeightChanged
:
(()
->
Void
)?
lazy
var
imgView
:
UIImageView
=
{
let
v
=
UIImageView
()
v
.
contentMode
=
.
scaleAspectFill
v
.
clipsToBounds
=
true
return
v
}()
...
...
@@ -28,15 +31,40 @@ class YHNewProductCell: UITableViewCell {
}
func
updateModel
(
_
model
:
YHSelectGoodsModel
)
{
self
.
imgView
.
sd_setImage
(
with
:
URL
(
string
:
model
.
image
),
placeholderImage
:
UIImage
(
named
:
"global_default_image"
))
self
.
model
=
model
if
let
url
=
URL
(
string
:
model
.
image
)
{
imgView
.
sd_setImage
(
with
:
url
,
placeholderImage
:
UIImage
(
named
:
"plan_product_default"
))
{
[
weak
self
]
image
,
_
,
_
,
resultUrl
in
guard
let
self
=
self
else
{
return
}
guard
resultUrl
?
.
absoluteString
==
self
.
model
.
image
else
{
return
}
guard
let
image
=
image
,
image
.
size
.
width
>
0
,
image
.
size
.
height
>
0
else
{
return
}
model
.
ratio
=
image
.
size
.
height
/
image
.
size
.
width
self
.
imgView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
model
.
ratio
*
(
KScreenWidth
-
20.0
*
2
))
}
self
.
onImageHeightChanged
?()
}
}
else
{
imgView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
YHSelectGoodsModel
.
fix_new_productRatio
*
(
KScreenWidth
-
20.0
*
2
))
}
}
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
self
.
contentView
.
addSubview
(
self
.
imgView
)
self
.
imgView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
160
)
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHSelectGoodsModel
.
fix_new_productRatio
*
(
KScreenWidth
-
20.0
*
2
))
make
.
bottom
.
equalTo
(
-
12
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/YHSelect/C/YHSelectViewController.swift
View file @
b23feb87
...
...
@@ -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
...
...
@@ -194,6 +195,12 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
return
UITableViewCell
()
}
cell
.
updateModel
(
model
)
cell
.
onImageHeightChanged
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
UIView
.
performWithoutAnimation
{
self
.
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
.
none
)
}
}
return
cell
}
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHSelectLookTableViewCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHSelectLookTableViewCell
else
{
...
...
@@ -208,7 +215,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 +225,9 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
if
selectItem
==
0
{
return
46
}
return
66
}
...
...
@@ -227,6 +237,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/M/YHSelectCategoryModel.swift
View file @
b23feb87
...
...
@@ -35,6 +35,8 @@ class YHSelectGoodModel: SmartCodable {
class
YHSelectGoodsModel
:
SmartCodable
{
static
let
fix_new_productRatio
=
160.0
/
335
var
id
:
String
=
""
var
name
:
String
=
""
var
products
:
[
Int
]
=
[]
...
...
@@ -66,7 +68,11 @@ class YHSelectGoodsModel: SmartCodable {
var
currency
:
String
=
""
var
goodsCategoryType
:
Int
=
0
// 产品的分类类型:0 默认普通,1 新品商品
// 新品图片宽高比
var
ratio
:
CGFloat
=
YHSelectGoodsModel
.
fix_new_productRatio
required
init
()
{
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/YHSelect/V/YHSelectLookHeadView.swift
View file @
b23feb87
...
...
@@ -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
)
}
...
...
galaxy/galaxy/Classes/Tools/Extention/String+Extension.swift
View file @
b23feb87
...
...
@@ -351,6 +351,7 @@ extension String {
func
getPrivateUrl
()
->
String
{
var
replacedString
=
self
.
replacingOccurrences
(
of
:
"prod-bucket-v1.oss-cn-shenzhen.aliyuncs.com"
,
with
:
"prod-cdn.galaxy-immi.com"
)
replacedString
=
replacedString
.
replacingOccurrences
(
of
:
"test-bucket-v1.oss-cn-shenzhen.aliyuncs.com"
,
with
:
"test-cdn.galaxy-immi.com"
)
replacedString
=
replacedString
.
replacingOccurrences
(
of
:
"galaxy-filecenter.oss-cn-shenzhen.aliyuncs.com"
,
with
:
"cdn-oss-galaxy-filecenter.galaxy-immi.com"
)
return
replacedString
}
}
galaxy/galaxy/Classes/Tools/Upload/YHOSSManager.swift
View file @
b23feb87
...
...
@@ -289,6 +289,8 @@ class YHOSSManager: NSObject, URLSessionDelegate {
return
"prod-bucket-v1"
}
else
if
url
.
contains
(
"prod-cdn-pub.galaxy-immi.com"
)
{
return
"prod-bucket-v1-pub"
}
else
if
url
.
contains
(
"galaxy-filecenter.galaxy-immi.com"
)
{
return
"galaxy-filecenter"
}
else
{
#if DEBUG
printLog
(
"OSS找不到正确的Bucket"
)
...
...
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