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
d388e0dc
Commit
d388e0dc
authored
Oct 24, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
活动
parent
3dcb7f17
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
27 deletions
+34
-27
YHActivityTravelViewController.swift
...y(社区)/Activity(活动)/C/YHActivityTravelViewController.swift
+1
-1
YHApplyActivityAlert.swift
...s/Community(社区)/Activity(活动)/V/YHApplyActivityAlert.swift
+33
-26
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/C/YHActivityTravelViewController.swift
View file @
d388e0dc
...
@@ -326,7 +326,7 @@ extension YHActivityTravelViewController {
...
@@ -326,7 +326,7 @@ extension YHActivityTravelViewController {
@objc
func
clickleftButton
()
{
@objc
func
clickleftButton
()
{
if
self
.
viewModel
.
activityTravelModel
?
.
status
.
int
==
YHActivityStatus
.
applied
.
rawValue
{
//
if
self
.
viewModel
.
activityTravelModel
?
.
status
.
int
==
YHActivityStatus
.
applied
.
rawValue
{
//
// 已报名
// 已报名
YHCommonAlertView
.
show
(
""
,
"是否取消报名?"
,
"是"
,
"否"
,
fullGuestureEnable
:
false
)
{
YH
Gray
CommonAlertView
.
show
(
""
,
"是否取消报名?"
,
"是"
,
"否"
,
fullGuestureEnable
:
false
)
{
self
.
cancelActivityApply
()
self
.
cancelActivityApply
()
}
callBack
:
{
}
callBack
:
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/V/YHApplyActivityAlert.swift
View file @
d388e0dc
...
@@ -42,10 +42,7 @@ class YHApplyActivityAlert: UIView {
...
@@ -42,10 +42,7 @@ class YHApplyActivityAlert: UIView {
let
button
=
UIButton
(
type
:
.
custom
)
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
button
.
contentHorizontalAlignment
=
.
center
button
.
contentHorizontalAlignment
=
.
center
button
.
setImage
(
UIImage
(
named
:
"activity_sub_0"
),
for
:
.
normal
)
button
.
setImage
(
UIImage
(
named
:
"activity_sub_1"
),
for
:
.
normal
)
button
.
setImage
(
UIImage
(
named
:
"activity_sub_0"
),
for
:
.
disabled
)
button
.
setImage
(
UIImage
(
named
:
"activity_sub_1"
),
for
:
.
selected
)
button
.
setImage
(
UIImage
(
named
:
"activity_sub_1"
),
for
:
.
highlighted
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
addTarget
(
self
,
action
:
#selector(
clickSubBtn
)
,
for
:
.
touchUpInside
)
button
.
addTarget
(
self
,
action
:
#selector(
clickSubBtn
)
,
for
:
.
touchUpInside
)
...
@@ -56,11 +53,7 @@ class YHApplyActivityAlert: UIView {
...
@@ -56,11 +53,7 @@ class YHApplyActivityAlert: UIView {
let
button
=
UIButton
(
type
:
.
custom
)
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
button
.
contentHorizontalAlignment
=
.
center
button
.
contentHorizontalAlignment
=
.
center
button
.
setImage
(
UIImage
(
named
:
"activity_add_1"
),
for
:
.
normal
)
button
.
setImage
(
UIImage
(
named
:
"activity_add_0"
),
for
:
.
normal
)
button
.
setImage
(
UIImage
(
named
:
"activity_add_0"
),
for
:
.
disabled
)
button
.
setImage
(
UIImage
(
named
:
"activity_add_1"
),
for
:
.
selected
)
button
.
setImage
(
UIImage
(
named
:
"activity_add_1"
),
for
:
.
highlighted
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
addTarget
(
self
,
action
:
#selector(
clickAddBtn
)
,
for
:
.
touchUpInside
)
button
.
addTarget
(
self
,
action
:
#selector(
clickAddBtn
)
,
for
:
.
touchUpInside
)
...
@@ -189,25 +182,34 @@ class YHApplyActivityAlert: UIView {
...
@@ -189,25 +182,34 @@ class YHApplyActivityAlert: UIView {
extension
YHApplyActivityAlert
{
extension
YHApplyActivityAlert
{
func
updateSubButtonGray
(
_
is_gray
:
Bool
)
{
let
img_name
=
is_gray
?
"activity_sub_0"
:
"activity_sub_1"
subButton
.
setImage
(
UIImage
(
named
:
img_name
),
for
:
.
normal
)
subButton
.
setImage
(
UIImage
(
named
:
img_name
),
for
:
.
selected
)
subButton
.
setImage
(
UIImage
(
named
:
img_name
),
for
:
.
highlighted
)
}
func
updateAddButtonGray
(
_
is_gray
:
Bool
)
{
let
img_name
=
is_gray
?
"activity_add_0"
:
"activity_add_1"
addButton
.
setImage
(
UIImage
(
named
:
img_name
),
for
:
.
normal
)
addButton
.
setImage
(
UIImage
(
named
:
img_name
),
for
:
.
selected
)
addButton
.
setImage
(
UIImage
(
named
:
img_name
),
for
:
.
highlighted
)
}
func
handleSubAndAddButtonUI
()
{
func
handleSubAndAddButtonUI
()
{
if
applyNumber
>
9
{
if
applyNumber
>
9
{
subButton
.
isEnabled
=
true
updateSubButtonGray
(
false
)
addButton
.
isEnabled
=
false
updateAddButtonGray
(
true
)
subButton
.
isSelected
=
true
addButton
.
isSelected
=
false
}
else
if
applyNumber
>
1
{
}
else
if
applyNumber
>
1
{
subButton
.
isEnabled
=
true
addButton
.
isEnabled
=
true
subButton
.
isSelected
=
true
updateSubButtonGray
(
false
)
addButton
.
isSelected
=
true
updateAddButtonGray
(
false
)
}
else
{
}
else
{
subButton
.
isEnabled
=
false
addButton
.
isEnabled
=
true
subButton
.
isSelected
=
false
updateSubButtonGray
(
true
)
addButton
.
isSelected
=
true
updateAddButtonGray
(
false
)
}
}
...
@@ -269,6 +271,10 @@ extension YHApplyActivityAlert {
...
@@ -269,6 +271,10 @@ extension YHApplyActivityAlert {
}
}
@objc
func
clickSubBtn
()
{
@objc
func
clickSubBtn
()
{
if
applyNumber
<=
1
{
YHHUD
.
flash
(
message
:
"最少添加1人"
)
return
}
applyNumber
-=
1
applyNumber
-=
1
applyNumberTextField
.
text
=
String
(
applyNumber
)
applyNumberTextField
.
text
=
String
(
applyNumber
)
...
@@ -276,6 +282,10 @@ extension YHApplyActivityAlert {
...
@@ -276,6 +282,10 @@ extension YHApplyActivityAlert {
}
}
@objc
func
clickAddBtn
()
{
@objc
func
clickAddBtn
()
{
if
applyNumber
>=
10
{
YHHUD
.
flash
(
message
:
"最多添加10人"
)
return
}
applyNumber
+=
1
applyNumber
+=
1
applyNumberTextField
.
text
=
String
(
applyNumber
)
applyNumberTextField
.
text
=
String
(
applyNumber
)
handleSubAndAddButtonUI
()
handleSubAndAddButtonUI
()
...
@@ -286,9 +296,7 @@ extension YHApplyActivityAlert {
...
@@ -286,9 +296,7 @@ extension YHApplyActivityAlert {
}
}
@objc
func
clickSubmitBtn
()
{
@objc
func
clickSubmitBtn
()
{
subButton
.
isEnabled
=
false
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
self
.
subButton
.
isEnabled
=
true
if
self
.
allDataIsOK
()
{
if
self
.
allDataIsOK
()
{
self
.
block
?(
true
,
self
.
applyName
,
self
.
applyNumber
,
self
.
applyPhone
)
self
.
block
?(
true
,
self
.
applyName
,
self
.
applyNumber
,
self
.
applyPhone
)
self
.
clickCloseBtn
()
self
.
clickCloseBtn
()
...
@@ -522,9 +530,8 @@ extension YHApplyActivityAlert {
...
@@ -522,9 +530,8 @@ extension YHApplyActivityAlert {
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
42
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
42
)
}
}
subButton
.
isEnabled
=
false
updateSubButtonGray
(
true
)
addButton
.
isEnabled
=
true
updateAddButtonGray
(
false
)
addButton
.
isSelected
=
true
let
tap
:
UITapGestureRecognizer
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
tapButton(gestureRecognizer:)
)
)
let
tap
:
UITapGestureRecognizer
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
tapButton(gestureRecognizer:)
)
)
addGestureRecognizer
(
tap
)
addGestureRecognizer
(
tap
)
...
...
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