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
2e63d041
Commit
2e63d041
authored
Jun 21, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '630-dev' of
http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS
into 630-dev
parents
7e039949
91f67a9f
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
374 additions
and
33 deletions
+374
-33
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+20
-12
YHActivityTravelViewController.swift
...y(社区)/Activity(活动)/C/YHActivityTravelViewController.swift
+142
-0
YHApplyActivityResultViewController.swift
.../Activity(活动)/C/YHApplyActivityResultViewController.swift
+2
-1
YHActivityDetailCell.swift
...s/Community(社区)/Activity(活动)/V/YHActivityDetailCell.swift
+6
-6
YHActivityDetailItemView.swift
...mmunity(社区)/Activity(活动)/V/YHActivityDetailItemView.swift
+3
-3
YHActivityTipsItemView.swift
...Community(社区)/Activity(活动)/V/YHActivityTipsItemView.swift
+3
-3
YHActivityTitleItemView.swift
...ommunity(社区)/Activity(活动)/V/YHActivityTitleItemView.swift
+3
-3
YHActivityTravelCell.swift
...s/Community(社区)/Activity(活动)/V/YHActivityTravelCell.swift
+167
-0
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+6
-5
Contents.json
...ssets/Activity/activity_travel_bkg.imageset/Contents.json
+22
-0
Group 2033195113@2x.png
...vity/activity_travel_bkg.imageset/Group 2033195113@2x.png
+0
-0
Group 2033195113@3x.png
...vity/activity_travel_bkg.imageset/Group 2033195113@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
2e63d041
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/C/YHActivityTravelViewController.swift
0 → 100644
View file @
2e63d041
//
// YHActivityTravelViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/6/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHActivityTravelViewController
:
YHBaseViewController
{
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
plain
)
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
backgroundColor
=
UIColor
.
clear
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YHActivityTravelCell
.
self
,
forCellReuseIdentifier
:
YHActivityTravelCell
.
cellReuseIdentifier
)
tableView
.
tableHeaderView
=
nil
tableView
.
tableFooterView
=
nil
tableView
.
estimatedSectionHeaderHeight
=
0
tableView
.
estimatedSectionFooterHeight
=
0
return
tableView
}()
lazy
var
topBkgImageV
:
UIImageView
=
{
let
view
=
UIImageView
()
view
.
contentMode
=
.
scaleAspectFill
view
.
image
=
UIImage
(
named
:
"activity_travel_bkg"
)
return
view
}()
lazy
var
topView
:
UIView
=
{
let
view
=
UIView
()
return
view
}()
lazy
var
bottomView
:
YHActivityDetailBottomView
=
{
let
view
=
YHActivityDetailBottomView
()
return
view
}()
// MARK: - 生命周期方法
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
gk_navigationBar
.
isHidden
=
false
gk_navigationBar
.
backgroundColor
=
.
clear
view
.
backgroundColor
=
UIColor
.
pageBkgColor
//1.
view
.
addSubview
(
topBkgImageV
)
view
.
addSubview
(
tableView
)
topBkgImageV
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
332
)
}
tableView
.
contentInsetAdjustmentBehavior
=
.
never
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
bottom
.
equalToSuperview
()
}
}
}
extension
YHActivityTravelViewController
{
func
addTopView
()
{
topView
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
114
)
view
.
addSubview
(
topView
)
let
gradientLayer
=
CAGradientLayer
()
gradientLayer
.
frame
=
topView
.
bounds
// 定义渐变颜色,这里使用了两种颜色
let
colorTop
=
UIColor
.
red
//UIColor(hex: 0x000000, alpha: 1)
let
colorBottom
=
UIColor
.
blue
//UIColor(hex: 0x000000, alpha: 0)
// 设置颜色数组
gradientLayer
.
colors
=
[
colorTop
,
colorBottom
]
// 设置渐变方向,从上到下
gradientLayer
.
startPoint
=
CGPoint
(
x
:
0.5
,
y
:
0.0
)
gradientLayer
.
endPoint
=
CGPoint
(
x
:
0.5
,
y
:
1.0
)
// 添加渐变层到当前视图的layer
topView
.
layer
.
insertSublayer
(
gradientLayer
,
at
:
0
)
}
}
extension
YHActivityTravelViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHActivityTravelCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHActivityTravelCell
cell
.
sessionIndex
=
indexPath
.
section
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
UITableView
.
automaticDimension
}
// func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
//
// return 0.001
// }
//
// func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
//
// let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 0.001))
// view.backgroundColor = .clear
// return view
// }
//
// func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
// let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth-16.0*2, height: 0.001))
// view.backgroundColor = .clear
// return view
// }
//
// func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
// return 0.001
// }
}
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/C/YHApplyActivityResultViewController.swift
View file @
2e63d041
...
...
@@ -106,6 +106,7 @@ extension YHApplyActivityResultViewController {
}
@objc
func
clickSubmitBtn
()
{
let
vc
=
YHActivityTravelViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHActivityDetailCell.swift
View file @
2e63d041
...
...
@@ -41,21 +41,21 @@ class YHActivityDetailCell: UITableViewCell {
//活动名称地址
lazy
var
acitivityTitle
:
YHAc
i
tivityTitleItemView
=
{
let
view
=
YHAc
i
tivityTitleItemView
()
lazy
var
acitivityTitle
:
YHActivityTitleItemView
=
{
let
view
=
YHActivityTitleItemView
()
return
view
}()
//活动详情
lazy
var
acitivityDetail
:
YHAc
i
tivityDetailItemView
=
{
let
view
=
YHAc
i
tivityDetailItemView
()
lazy
var
acitivityDetail
:
YHActivityDetailItemView
=
{
let
view
=
YHActivityDetailItemView
()
return
view
}()
//活动温馨提示
lazy
var
acitivityTips
:
YHAc
i
tivityTipsItemView
=
{
let
view
=
YHAc
i
tivityTipsItemView
()
lazy
var
acitivityTips
:
YHActivityTipsItemView
=
{
let
view
=
YHActivityTipsItemView
()
return
view
}()
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHAc
i
tivityDetailItemView.swift
→
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHActivityDetailItemView.swift
View file @
2e63d041
//
// YHAc
i
tivityDetailItemView.swift
// YHActivityDetailItemView.swift
// galaxy
//
// Created by davidhuangA on 2024/6/20.
...
...
@@ -8,7 +8,7 @@
import
UIKit
class
YHAc
i
tivityDetailItemView
:
UIView
{
class
YHActivityDetailItemView
:
UIView
{
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
...
...
@@ -49,7 +49,7 @@ class YHAcitivityDetailItemView: UIView {
}
extension
YHAc
i
tivityDetailItemView
{
extension
YHActivityDetailItemView
{
func
setupUI
()
{
addSubview
(
bottomLine
)
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHAc
i
tivityTipsItemView.swift
→
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHActivityTipsItemView.swift
View file @
2e63d041
//
// YHAc
i
tivityTipsItemView.swift
// YHActivityTipsItemView.swift
// galaxy
//
// Created by davidhuangA on 2024/6/20.
...
...
@@ -8,7 +8,7 @@
import
UIKit
class
YHAc
i
tivityTipsItemView
:
UIView
{
class
YHActivityTipsItemView
:
UIView
{
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
...
...
@@ -49,7 +49,7 @@ class YHAcitivityTipsItemView: UIView {
}
extension
YHAc
i
tivityTipsItemView
{
extension
YHActivityTipsItemView
{
func
setupUI
()
{
addSubview
(
bottomLine
)
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHAc
i
tivityTitleItemView.swift
→
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHActivityTitleItemView.swift
View file @
2e63d041
//
// YHAc
itivityTitle
View.swift
// YHAc
tivityTitleItem
View.swift
// galaxy
//
// Created by davidhuangA on 2024/6/20.
...
...
@@ -8,7 +8,7 @@
import
UIKit
class
YHAc
i
tivityTitleItemView
:
UIView
{
class
YHActivityTitleItemView
:
UIView
{
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
...
...
@@ -80,7 +80,7 @@ class YHAcitivityTitleItemView: UIView {
}
extension
YHAc
i
tivityTitleItemView
{
extension
YHActivityTitleItemView
{
func
setupUI
()
{
addSubview
(
nameLabel
)
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHActivityTravelCell.swift
0 → 100644
View file @
2e63d041
//
// YHActivityTravelCell.swift
// galaxy
//
// Created by davidhuangA on 2024/6/21.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHActivityTravelCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHActivityTravelCell"
private
var
isApplyFlag
:
Bool
=
true
var
sessionIndex
:
Int
=
0
{
didSet
{
// let tmp = sessionIndex % 3
// let name = "activity_cell_bkg_" + String(tmp)
// bkgImgV.image = UIImage(named: name)
}
}
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
}
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
setupUI
()
}
lazy
var
statusLable
:
UILabel
=
{
let
lable
=
UILabel
()
lable
.
textColor
=
UIColor
.
mainTextColor
lable
.
textAlignment
=
.
left
lable
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
28
)
lable
.
text
=
"已报名"
return
lable
}()
//活动名称地址
lazy
var
acitivityTitle
:
YHActivityTitleItemView
=
{
let
view
=
YHActivityTitleItemView
()
return
view
}()
//活动详情
lazy
var
acitivityDetail
:
YHActivityDetailItemView
=
{
let
view
=
YHActivityDetailItemView
()
return
view
}()
//活动温馨提示
lazy
var
acitivityTips
:
YHActivityTipsItemView
=
{
let
view
=
YHActivityTipsItemView
()
return
view
}()
//取消活动
lazy
var
cancelButton
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
.
brandMainColor
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
15
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"取消报名"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
addTarget
(
self
,
action
:
#selector(
clickCancelBtn
)
,
for
:
.
touchUpInside
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
clipsToBounds
=
true
return
button
}()
}
extension
YHActivityTravelCell
{
@objc
func
clickCancelBtn
()
{
YHCommonAlertView
.
show
(
""
,
"是否取消报名?"
,
"是"
,
"否"
,
fullGuestureEnable
:
false
)
{
self
.
isApplyFlag
=
false
self
.
updateRightBtnUI
()
}
callBack
:
{
}
}
func
updateRightBtnUI
()
{
if
isApplyFlag
{
cancelButton
.
setTitle
(
"取消报名"
,
for
:
.
normal
)
cancelButton
.
setTitle
(
"取消报名"
,
for
:
.
highlighted
)
cancelButton
.
setTitleColor
(
UIColor
.
mainTextColor
,
for
:
.
normal
)
cancelButton
.
setTitleColor
(
UIColor
.
mainTextColor
,
for
:
.
highlighted
)
cancelButton
.
backgroundColor
=
.
white
cancelButton
.
layer
.
borderWidth
=
1
cancelButton
.
layer
.
borderColor
=
UIColor
.
mainTextColor50
.
cgColor
}
else
{
cancelButton
.
setTitle
(
"重新报名"
,
for
:
.
normal
)
cancelButton
.
setTitle
(
"重新报名"
,
for
:
.
highlighted
)
cancelButton
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
cancelButton
.
setTitleColor
(
UIColor
.
white
,
for
:
.
highlighted
)
cancelButton
.
backgroundColor
=
.
brandMainColor
cancelButton
.
layer
.
borderWidth
=
0
cancelButton
.
layer
.
borderColor
=
UIColor
.
clear
.
cgColor
}
}
func
setupUI
()
{
backgroundColor
=
.
clear
contentView
.
backgroundColor
=
.
clear
selectionStyle
=
.
none
contentView
.
addSubview
(
statusLable
)
contentView
.
addSubview
(
acitivityTitle
)
contentView
.
addSubview
(
acitivityDetail
)
contentView
.
addSubview
(
acitivityTips
)
contentView
.
addSubview
(
cancelButton
)
statusLable
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
20
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
40
)
}
acitivityTitle
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
statusLable
.
snp
.
bottom
)
.
offset
(
20
)
make
.
left
.
right
.
equalToSuperview
()
}
acitivityDetail
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
acitivityTitle
.
snp
.
bottom
)
.
offset
(
24
)
make
.
left
.
right
.
equalToSuperview
()
}
acitivityTips
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
acitivityDetail
.
snp
.
bottom
)
.
offset
(
24
)
make
.
left
.
right
.
equalToSuperview
()
// make.bottom.equalToSuperview().offset(-42)
}
cancelButton
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
acitivityTips
.
snp
.
bottom
)
.
offset
(
32
)
make
.
width
.
equalTo
(
178
)
make
.
height
.
equalTo
(
42
)
make
.
centerX
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
46
)
}
updateRightBtnUI
()
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
2e63d041
...
...
@@ -380,10 +380,11 @@ extension YHHomePageViewController : UITabBarControllerDelegate {
}
self
.
tapTimestamp
=
timestamp
}
else
if
tabBarController
.
selectedIndex
==
2
{
// 点击消息tab 清空应用icon未读数
UIApplication
.
shared
.
applicationIconBadgeNumber
=
0
}
}
// else if tabBarController.selectedIndex == 2 {
// // 点击消息tab 清空应用icon未读数
// UIApplication.shared.applicationIconBadgeNumber = 0
// }
}
...
...
@@ -391,7 +392,7 @@ extension YHHomePageViewController : UITabBarControllerDelegate {
guard
let
index
=
tabBarController
.
viewControllers
?
.
firstIndex
(
of
:
viewController
)
else
{
return
false
}
if
index
==
1
||
index
==
2
{
if
index
==
1
{
if
YHLoginManager
.
shared
.
isLogin
()
{
return
true
}
else
{
...
...
galaxy/galaxy/Res/Assets.xcassets/Activity/activity_travel_bkg.imageset/Contents.json
0 → 100644
View file @
2e63d041
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 2033195113@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 2033195113@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Activity/activity_travel_bkg.imageset/Group 2033195113@2x.png
0 → 100644
View file @
2e63d041
709 KB
galaxy/galaxy/Res/Assets.xcassets/Activity/activity_travel_bkg.imageset/Group 2033195113@3x.png
0 → 100644
View file @
2e63d041
This diff is collapsed.
Click to expand it.
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