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
2f18c0b6
Commit
2f18c0b6
authored
Oct 20, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'new_product'
parents
d0d5ed91
4b8edcdf
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
346 additions
and
235 deletions
+346
-235
Podfile
galaxy/Podfile
+0
-2
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+21
-33
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+0
-34
YHActivityDetailModel.swift
.../Community(社区)/Activity(活动)/M/YHActivityDetailModel.swift
+65
-9
YHActivityTravelModel.swift
.../Community(社区)/Activity(活动)/M/YHActivityTravelModel.swift
+65
-1
YHActivityDetailCell1.swift
.../Community(社区)/Activity(活动)/V/YHActivityDetailCell1.swift
+5
-2
YHActivityViewModel.swift
...s/Community(社区)/Activity(活动)/VM/YHActivityViewModel.swift
+1
-8
YHHomeWebViewController.swift
.../Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
+14
-1
YHHomeKingKongBlockView.swift
.../Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
+24
-0
YHNewProductCell.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHNewProductCell.swift
+72
-0
YHSelectViewController.swift
.../Modules/Home(首页)/YHSelect/C/YHSelectViewController.swift
+43
-5
YHSelectCategoryModel.swift
...s/Modules/Home(首页)/YHSelect/M/YHSelectCategoryModel.swift
+7
-0
YHSelectLookHeadView.swift
...es/Modules/Home(首页)/YHSelect/V/YHSelectLookHeadView.swift
+12
-0
YHH5WebViewVC.swift
.../Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
+14
-1
String+Extension.swift
galaxy/galaxy/Classes/Tools/Extention/String+Extension.swift
+1
-0
YHOSSManager.swift
galaxy/galaxy/Classes/Tools/Upload/YHOSSManager.swift
+2
-0
installcli.sh
galaxy/installcli.sh
+0
-139
No files found.
galaxy/Podfile
View file @
2f18c0b6
...
...
@@ -171,8 +171,6 @@ target 'galaxy' do
pod
'xxtea'
,
'1.0.2'
#代码规范
pod
'SwiftLint'
,
:configurations
=>
[
'Debug'
]
# 跟踪app性能
pod
'Sentry'
#腾讯IM
tencentIM_pods
#腾讯客服
...
...
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
2f18c0b6
This diff is collapsed.
Click to expand it.
galaxy/galaxy/AppDelegate.swift
View file @
2f18c0b6
...
...
@@ -6,7 +6,6 @@
//
import
UIKit
import
Sentry
import
ESTabBarController_swift
import
IQKeyboardManagerSwift
...
...
@@ -30,7 +29,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
var
window
:
UIWindow
?
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
configSentry
()
Thread
.
sleep
(
forTimeInterval
:
0.5
)
// 应产品同学Nick要求 启动页时间展示长点
setupAudionConfig
()
...
...
@@ -469,38 +467,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
extension
AppDelegate
{
private
func
configSentry
()
{
SentrySDK
.
start
{
options
in
options
.
dsn
=
"https://41235d99f7163a287785964dae61d5a9@dev-sentry.galaxy-immi.com/7"
// Adds IP for users.
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
options
.
sendDefaultPii
=
true
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options
.
tracesSampleRate
=
1.0
// Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.
options
.
configureProfiling
=
{
$0
.
sessionSampleRate
=
1.0
// We recommend adjusting this value in production.
$0
.
lifecycle
=
.
trace
}
#if DEBUG || TESTENV
// Uncomment the following lines to add more data to your events
options
.
attachScreenshot
=
true
// This adds a screenshot to the error events
options
.
attachViewHierarchy
=
true
// This adds the view hierarchy to the error events
options
.
debug
=
true
// Enabled debug when first installing is always helpful
options
.
environment
=
"debug"
#else
options
.
debug
=
false
// Enabled debug when first installing is always helpful
options
.
environment
=
"production"
options
.
attachViewHierarchy
=
true
#endif
}
// Remove the next line after confirming that your Sentry integration is working.
// SentrySDK.capture(message: "This app uses Sentry! :)")
}
private
func
thirdSetting
()
{
// 1.数据解析
#if DEBUG
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/M/YHActivityDetailModel.swift
View file @
2f18c0b6
...
...
@@ -7,16 +7,19 @@
//
import
UIKit
import
SmartCodable
class
YHActivityDetailModel
:
YHActivityModel
{
// var cover : String = "" //活动封面
// var name : String = "" //活动标题
// var tag : Int = 0 //活动标签枚举 1:V专享
// var beginTime : String = "" //开始时间戳
// var endTime : String = "" //结束时间戳
// var place : String = "" //活动地点
// var id : Int = 0 //活动ID
// var status : String = "" //活动的状态 1:立即报名 2:已报名 3:活动结束 4:已取消报名
class
YHActivityDetailModel
:
SmartCodable
{
var
id
:
Int
=
0
// 活动ID
var
tag
:
Int
=
0
// 活动标签枚举 1:V专享
var
name
:
String
=
""
// 活动标题
var
cover
:
String
=
""
// 活动封面
var
beginTime
:
String
=
""
// 开始时间戳
var
endTime
:
String
=
""
// 结束时间戳
var
place
:
String
=
""
// 活动地点
var
status
:
String
=
""
// 活动的状态 1:立即报名 2:已报名 3:活动结束 4:已取消报名 5:已下架
var
checkId
:
String
=
""
// 活动行程ID 仅当活动状态为2(已报名)时才大于0
var
tips
:
String
=
""
// 温馨提示
var
guidance
:
String
=
""
// 交通引导
...
...
@@ -37,4 +40,57 @@ class YHActivityDetailModel: YHActivityModel {
coverItems
.
append
(
item
)
}
}
required
init
()
{
}
private
var
beginTimeForUI
:
String
=
""
func
getDateString
(
format
:
String
=
"MM/dd"
)
->
String
{
if
beginTimeForUI
.
isEmpty
{
if
let
tttt
=
beginTime
.
double
()
{
// 1.
// 将时间戳转换为Date对象
let
date
=
Date
(
timeIntervalSince1970
:
TimeInterval
(
tttt
))
// 创建一个DateFormatter实例
let
dateFormatter
=
DateFormatter
()
// 设置日期格式,这里设置为"年-月-日 时:分:秒"
dateFormatter
.
dateFormat
=
format
// HH:mm:ss
// 使用DateFormatter将Date对象转换为字符串
let
dateString
=
dateFormatter
.
string
(
from
:
date
)
dateFormatter
.
dateFormat
=
"HH:mm"
let
titmeString
=
dateFormatter
.
string
(
from
:
date
)
// 获取Calendar的当前实例
let
calendar
=
Calendar
.
current
// 使用Calendar来获取星期几
let
weekday
=
calendar
.
component
(
.
weekday
,
from
:
date
)
// 星期几的名称,根据weekday的值,1到7分别代表周一到周日
if
weekday
>
0
&&
weekday
<
8
{
let
weekdayName
=
[
"周日"
,
"周一"
,
"周二"
,
"周三"
,
"周四"
,
"周五"
,
"周六"
][
weekday
-
1
]
if
let
tttt
=
endTime
.
double
()
{
// 将时间戳转换为Date对象
let
date2
=
Date
(
timeIntervalSince1970
:
TimeInterval
(
tttt
))
let
titmeString2
=
dateFormatter
.
string
(
from
:
date2
)
if
titmeString
.
contains
(
titmeString2
)
{
beginTimeForUI
=
dateString
+
" "
+
weekdayName
+
" "
+
titmeString
}
else
{
beginTimeForUI
=
dateString
+
" "
+
weekdayName
+
" "
+
titmeString
+
"-"
+
titmeString2
}
}
}
}
}
return
beginTimeForUI
}
}
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/M/YHActivityTravelModel.swift
View file @
2f18c0b6
...
...
@@ -18,10 +18,74 @@ class YHActivityApplyInfoModel: SmartCodable {
}
}
class
YHActivityTravelModel
:
YHActivityModel
{
class
YHActivityTravelModel
:
SmartCodable
{
var
id
:
Int
=
0
// 活动ID
var
tag
:
Int
=
0
// 活动标签枚举 1:V专享
var
name
:
String
=
""
// 活动标题
var
cover
:
String
=
""
// 活动封面
var
beginTime
:
String
=
""
// 开始时间戳
var
endTime
:
String
=
""
// 结束时间戳
var
place
:
String
=
""
// 活动地点
var
status
:
String
=
""
// 活动的状态 1:立即报名 2:已报名 3:活动结束 4:已取消报名 5:已下架
var
checkId
:
String
=
""
// 活动行程ID 仅当活动状态为2(已报名)时才大于0
var
statusCn
:
String
=
""
// 行程状态
var
user
:
YHActivityApplyInfoModel
?
var
tips
:
String
=
""
// 温馨提示
var
guidance
:
String
=
""
// 交通引导
required
init
()
{
}
private
var
beginTimeForUI
:
String
=
""
func
getDateString
(
format
:
String
=
"MM/dd"
)
->
String
{
if
beginTimeForUI
.
isEmpty
{
if
let
tttt
=
beginTime
.
double
()
{
// 1.
// 将时间戳转换为Date对象
let
date
=
Date
(
timeIntervalSince1970
:
TimeInterval
(
tttt
))
// 创建一个DateFormatter实例
let
dateFormatter
=
DateFormatter
()
// 设置日期格式,这里设置为"年-月-日 时:分:秒"
dateFormatter
.
dateFormat
=
format
// HH:mm:ss
// 使用DateFormatter将Date对象转换为字符串
let
dateString
=
dateFormatter
.
string
(
from
:
date
)
dateFormatter
.
dateFormat
=
"HH:mm"
let
titmeString
=
dateFormatter
.
string
(
from
:
date
)
// 获取Calendar的当前实例
let
calendar
=
Calendar
.
current
// 使用Calendar来获取星期几
let
weekday
=
calendar
.
component
(
.
weekday
,
from
:
date
)
// 星期几的名称,根据weekday的值,1到7分别代表周一到周日
if
weekday
>
0
&&
weekday
<
8
{
let
weekdayName
=
[
"周日"
,
"周一"
,
"周二"
,
"周三"
,
"周四"
,
"周五"
,
"周六"
][
weekday
-
1
]
if
let
tttt
=
endTime
.
double
()
{
// 将时间戳转换为Date对象
let
date2
=
Date
(
timeIntervalSince1970
:
TimeInterval
(
tttt
))
let
titmeString2
=
dateFormatter
.
string
(
from
:
date2
)
if
titmeString
.
contains
(
titmeString2
)
{
beginTimeForUI
=
dateString
+
" "
+
weekdayName
+
" "
+
titmeString
}
else
{
beginTimeForUI
=
dateString
+
" "
+
weekdayName
+
" "
+
titmeString
+
"-"
+
titmeString2
}
}
}
}
}
return
beginTimeForUI
}
}
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHActivityDetailCell1.swift
View file @
2f18c0b6
...
...
@@ -7,8 +7,8 @@
//
import
UIKit
class
YHActivityCoverItem
{
import
SmartCodable
class
YHActivityCoverItem
:
SmartCodable
{
var
url
:
String
=
""
let
width
:
CGFloat
=
KScreenWidth
-
40.0
var
height
:
CGFloat
=
KScreenWidth
-
40.0
...
...
@@ -18,6 +18,9 @@ class YHActivityCoverItem {
view
.
clipsToBounds
=
true
return
view
}()
required
init
()
{
}
}
class
YHActivityDetailCell1
:
UITableViewCell
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/VM/YHActivityViewModel.swift
View file @
2f18c0b6
...
...
@@ -60,20 +60,13 @@ extension YHActivityViewModel {
// 1. json字符串 转 对象
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
result
=
YHActivityTravelModel
.
deserialize
(
from
:
dic
)
else
{
self
.
activityTravelModel
=
nil
callBackBlock
(
false
,
nil
)
return
}
self
.
activityTravelModel
=
result
callBackBlock
(
true
,
nil
)
}
else
{
// self.activityTravelModel = nil
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
// self.activityTravelModel = nil
callBackBlock
(
false
,
err
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
View file @
2f18c0b6
...
...
@@ -44,7 +44,20 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
var
progBar
=
UIProgressView
()
var
bottomView
:
YHHomeWebBottomView
!
var
url
=
""
var
url
=
""
{
didSet
{
if
url
.
contains
(
"isLogin="
)
{
printLog
(
"RESULT_URL:
\(
url
)
"
)
return
}
let
is_login
=
YHLoginManager
.
shared
.
isLogin
()
?
1
:
0
if
url
.
contains
(
"?"
)
{
url
+=
"&isLogin=
\(
is_login
)
"
}
else
{
url
+=
"?isLogin=
\(
is_login
)
"
}
}
}
var
id
:
Int
=
0
var
vcTitle
:
String
?
var
model
:
YHWebModel
=
YHWebModel
()
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
View file @
2f18c0b6
...
...
@@ -136,6 +136,30 @@ private extension YHHomeKingKongBlockView {
case
7
:
// 生意星
gotoBusinessStar
()
case
8
:
// 银河新品
var
url
=
YHBaseUrlManager
.
shared
.
businessH5Url
()
+
"/yh-new-goods/detail"
if
YHLoginManager
.
shared
.
isLogin
()
{
let
token
=
YHLoginManager
.
shared
.
h5Token
let
urlHasParam
=
String
.
hasQueryParameters
(
urlString
:
url
)
if
urlHasParam
{
url
=
url
+
"¶m="
+
token
}
else
{
url
=
url
+
"?param="
+
token
}
}
// 2.增加导航栏高度 https://test-hklife.galaxy-immi.com/superAppBridge.html#/goods/sales-detail?id=
var
tUrl
=
url
if
!
url
.
contains
(
"navigationH="
)
{
tUrl
=
url
+
"?navigationH=
\(
k_Height_NavigationtBarAndStatuBar
)
"
if
url
.
contains
(
"?"
)
{
tUrl
=
url
+
"&navigationH=
\(
k_Height_NavigationtBarAndStatuBar
)
"
}
}
let
vc
=
YHH5WebViewVC
()
vc
.
url
=
tUrl
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
default
:
break
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHNewProductCell.swift
0 → 100644
View file @
2f18c0b6
//
// YHNewProductCell.swift
// galaxy
//
// Created by Dufet on 2025/10/12.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
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
}()
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
setupUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
updateModel
(
_
model
:
YHSelectGoodsModel
)
{
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
.
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 @
2f18c0b6
...
...
@@ -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
...
...
@@ -147,7 +148,9 @@ extension YHSelectViewController {
tableView
.
delegate
=
self
tableView
.
tableHeaderView
=
sectionView
tableView
.
tableFooterView
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
250
))
tableView
.
register
(
cellWithClass
:
YHSelectLookTableViewCell
.
self
)
tableView
.
register
(
YHSelectLookTableViewCell
.
self
,
forCellReuseIdentifier
:
YHSelectLookTableViewCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHNewProductCell
.
self
,
forCellReuseIdentifier
:
YHNewProductCell
.
cellReuseIdentifier
)
return
tableView
}()
view
.
addSubview
(
tableView
)
...
...
@@ -185,13 +188,36 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHSelectLookTableViewCell
.
self
)
let
model
=
self
.
viewModel
.
goodsArray
[
indexPath
.
row
]
if
model
.
goodsCategoryType
==
1
{
// 新品商品
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHNewProductCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHNewProductCell
else
{
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
{
return
UITableViewCell
()
}
cell
.
number
=
indexPath
.
row
cell
.
dataSource
=
self
.
viewModel
.
goodsArray
[
indexPath
.
row
]
cell
.
dataSource
=
model
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
let
model
=
self
.
viewModel
.
goodsArray
[
indexPath
.
row
]
if
model
.
goodsCategoryType
==
1
{
// 新品商品
return
UITableView
.
automaticDimension
}
if
indexPath
.
row
==
0
{
return
102
}
...
...
@@ -199,6 +225,9 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
if
selectItem
==
0
{
return
46
}
return
66
}
...
...
@@ -208,6 +237,7 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
// headView.itemButton.setTitle(model.name, for: .normal)
// headView.itemButton.iconInRight(with: 0.5)
// }
return
headView
}
...
...
@@ -221,8 +251,13 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
model
=
self
.
viewModel
.
goodsArray
[
indexPath
.
row
]
var
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge.html#/goods/sales-detail"
+
"?id=
\(
model
.
id
)
"
YHAnalytics
.
track
(
"APP_GalaxySelectionPage_ClickProduct"
,
properties
:
[
"productID"
:
model
.
id
])
var
url
=
""
if
model
.
goodsCategoryType
==
1
{
// 新品商品
url
=
YHBaseUrlManager
.
shared
.
businessH5Url
()
+
"/yh-new-goods/detail?id="
+
model
.
id
}
else
{
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge.html#/goods/sales-detail"
+
"?id=
\(
model
.
id
)
"
YHAnalytics
.
track
(
"APP_GalaxySelectionPage_ClickProduct"
,
properties
:
[
"productID"
:
model
.
id
])
}
if
YHLoginManager
.
shared
.
isLogin
()
{
let
token
=
YHLoginManager
.
shared
.
h5Token
...
...
@@ -264,6 +299,9 @@ extension YHSelectViewController: JXSegmentedListContainerViewListDelegate {
}
class
YHSelectLookTableViewCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHSelectLookTableViewCell"
var
centerImageView
:
UIImageView
!
var
titleLabel
:
UILabel
!
var
subTitleLabel
:
UILabel
!
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/YHSelect/M/YHSelectCategoryModel.swift
View file @
2f18c0b6
...
...
@@ -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
]
=
[]
...
...
@@ -64,8 +66,13 @@ class YHSelectGoodsModel: SmartCodable {
var
icons
:
[
YHSelectGoodIconModel
]
=
[]
// 货币符号 HKD、CNY
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 @
2f18c0b6
...
...
@@ -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/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
View file @
2f18c0b6
...
...
@@ -56,7 +56,20 @@ class YHH5WebViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
return
view
}()
var
url
=
""
var
url
=
""
{
didSet
{
if
url
.
contains
(
"isLogin="
)
{
// printLog("RESULT_URL: \(url)")
return
}
let
is_login
=
YHLoginManager
.
shared
.
isLogin
()
?
1
:
0
if
url
.
contains
(
"?"
)
{
url
+=
"&isLogin=
\(
is_login
)
"
}
else
{
url
+=
"?isLogin=
\(
is_login
)
"
}
}
}
var
navTitle
=
""
// 导航栏title
lazy
var
noNetWorkTipsView
:
YHEmptyDataView
=
{
...
...
galaxy/galaxy/Classes/Tools/Extention/String+Extension.swift
View file @
2f18c0b6
...
...
@@ -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 @
2f18c0b6
...
...
@@ -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"
)
...
...
galaxy/installcli.sh
deleted
100644 → 0
View file @
d0d5ed91
#!/bin/sh
set
-eu
# allow overriding the version
VERSION
=
${
SENTRY_CLI_VERSION
:-
latest
}
PLATFORM
=
`
uname
-s
`
ARCH
=
`
uname
-m
`
case
"
$PLATFORM
"
in
CYGWIN
*
)
PLATFORM
=
"Windows"
;;
MINGW
*
)
PLATFORM
=
"Windows"
;;
MSYS
*
)
PLATFORM
=
"Windows"
;;
Darwin
)
ARCH
=
"universal"
;;
esac
case
"
$ARCH
"
in
armv6
*
)
ARCH
=
"armv7"
;;
armv7
*
)
ARCH
=
"armv7"
;;
armv8
*
)
ARCH
=
"aarch64"
;;
armv64
*
)
ARCH
=
"aarch64"
;;
aarch64
*
)
ARCH
=
"aarch64"
;;
esac
# If the install directory is not set, set it to a default
if
[
-z
${
INSTALL_DIR
+x
}
]
;
then
INSTALL_DIR
=
/usr/local/bin
fi
if
[
-z
${
INSTALL_PATH
+x
}
]
;
then
INSTALL_PATH
=
"
${
INSTALL_DIR
}
/sentry-cli"
fi
DOWNLOAD_URL
=
"https://release-registry.services.sentry.io/apps/sentry-cli/
${
VERSION
}
?response=download&arch=
${
ARCH
}
&platform=
${
PLATFORM
}
&package=sentry-cli"
echo
"This script will automatically install sentry-cli (
${
VERSION
}
) for you."
echo
"Installation path:
${
INSTALL_PATH
}
"
if
[
"x
$(
id
-u
)
"
=
"x0"
]
;
then
echo
"Warning: this script is currently running as root. This is dangerous. "
echo
" Instead run it as normal user. We will sudo as needed."
fi
if
[
-f
"
$INSTALL_PATH
"
]
;
then
echo
"error: sentry-cli is already installed."
echo
" run
\"
sentry-cli update
\"
to update to latest version"
exit
1
fi
if
!
hash
curl 2> /dev/null
;
then
echo
"error: you do not have 'curl' installed which is required for this script."
exit
1
fi
TEMP_FILE
=
`
mktemp
"
${
TMPDIR
:-
/tmp
}
/.sentrycli.XXXXXXXX"
`
TEMP_HEADER_FILE
=
`
mktemp
"
${
TMPDIR
:-
/tmp
}
/.sentrycli-headers.XXXXXXXX"
`
cleanup
()
{
rm
-f
"
$TEMP_FILE
"
rm
-f
"
$TEMP_HEADER_FILE
"
}
trap
cleanup EXIT
HTTP_CODE
=
$(
curl
-SL
--progress-bar
"
$DOWNLOAD_URL
"
-D
"
$TEMP_HEADER_FILE
"
--output
"
$TEMP_FILE
"
--write-out
"%{http_code}"
)
if
[
${
HTTP_CODE
}
-lt
200
]
||
[
${
HTTP_CODE
}
-gt
299
]
;
then
echo
"error: your platform and architecture (
${
PLATFORM
}
-
${
ARCH
}
) is unsupported."
exit
1
fi
for
PYTHON
in
python3 python2 python
''
;
do
if
hash
"
$PYTHON
"
;
then
break
fi
done
if
[
"
$PYTHON
"
]
;
then
"
$PYTHON
"
-
<<
EOF
"
${
TEMP_FILE
}
" "
${
TEMP_HEADER_FILE
}
"
if 1:
import sys
import re
import hashlib
import binascii
validated = False
with open(sys.argv[2], "r") as f:
for line in f:
match = re.search("(?i)^digest:.?sha256=([^,\n ]+)", line)
if match is not None:
with open(sys.argv[1], "rb") as downloaded:
hasher = hashlib.sha256()
while True:
chunk = downloaded.read(4096)
if not chunk:
break
hasher.update(chunk)
calculated = hasher.digest()
expected = binascii.a2b_base64(match.group(1))
if calculated != expected:
print("error: checksum mismatch (got %s, expected %s)" % (
binascii.b2a_hex(calculated).decode("ascii"),
binascii.b2a_hex(expected).decode("ascii")
))
sys.exit(1)
validated = True
break
if not validated:
print("warning: unable to validate checksum because no checksum available")
EOF
else
echo
"warning: python not available, unable to verify checksums"
fi
chmod
0755
"
$TEMP_FILE
"
if
!
(
mkdir
-p
"
$(
dirname
"
$INSTALL_PATH
"
)
"
&&
mv
"
$TEMP_FILE
"
"
$INSTALL_PATH
"
)
2> /dev/null
;
then
sudo
-k
sh
-c
"mkdir -p
\"
$(
dirname
"
$INSTALL_PATH
"
)
\"
&& mv
\"
$TEMP_FILE
\"
\"
$INSTALL_PATH
\"
"
fi
echo
"Sucessfully installed
$(
"
$INSTALL_PATH
"
--version
)
"
VERSION
=
$(
"
$INSTALL_PATH
"
--version
|
awk
'{print $2}'
)
MAJOR
=
$(
echo
"
$VERSION
"
|
cut
-d
.
-f1
)
MINOR
=
$(
echo
"
$VERSION
"
|
cut
-d
.
-f2
)
if
(
test
-d
"
${
HOME
}
/.oh-my-zsh"
)
2>/dev/null
&&
[
$MAJOR
-eq
2
]
&&
[
$MINOR
-ge
22
]
;
then
echo
'Detected Oh My Zsh, installing Zsh completions...'
if
(
mkdir
-p
"
${
HOME
}
/.oh-my-zsh/completions"
)
2>&1
&&
(
"
$INSTALL_PATH
"
completions zsh
>
"
${
HOME
}
/.oh-my-zsh/completions/_sentry_cli"
)
2>&1
;
then
echo
"Successfully installed Zsh completions."
else
echo
'Warning: failed to install Zsh completions.'
fi
fi
echo
'Done!'
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