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
a8178ff7
Commit
a8178ff7
authored
Oct 17, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 活动
parent
0c25026d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
41 deletions
+34
-41
YHActivityListViewController.swift
...ity(社区)/Activity(活动)/C/YHActivityListViewController.swift
+29
-29
YHActivityTravelViewController.swift
...y(社区)/Activity(活动)/C/YHActivityTravelViewController.swift
+5
-4
YHActivityViewModel.swift
...s/Community(社区)/Activity(活动)/VM/YHActivityViewModel.swift
+0
-8
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/C/YHActivityListViewController.swift
View file @
a8178ff7
...
...
@@ -86,20 +86,20 @@ enum YHActivityStatus: Int {
var
activityColor
:
UIColor
{
switch
self
{
case
.
notApply
:
case
.
notApply
:
// 立即报名
return
UIColor
.
brandMainColor
case
.
applied
:
return
UIColor
.
successColor
case
.
end
:
return
UIColor
.
mainTextColor30
case
.
canceled
:
case
.
applied
:
// 已报名
return
UIColor
.
successColor2
case
.
end
:
// 活动结束
return
UIColor
.
brandGrayColor5
case
.
canceled
:
// 已取消
return
UIColor
.
brandGrayColor5
case
.
soldout
:
// 已下架
return
UIColor
.
brandGrayColor5
case
.
scanSign
:
// 去签到
return
UIColor
.
brandMainColor
case
.
soldout
:
return
UIColor
.
mainTextColor30
case
.
scanSign
:
return
UIColor
.
successColor
case
.
signed
:
return
UIColor
.
mainTextColor30
case
.
signed
:
// 已签到
return
UIColor
.
successColor2
default
:
return
UIColor
.
clear
}
...
...
@@ -107,20 +107,20 @@ enum YHActivityStatus: Int {
var
activityColorForMyApplyList
:
UIColor
{
switch
self
{
case
.
notApply
:
case
.
notApply
:
// 立即报名
return
UIColor
.
brandMainColor
case
.
applied
:
return
UIColor
.
successColor
case
.
end
:
return
UIColor
.
mainTextColor30
case
.
canceled
:
return
UIColor
.
mainTextColor30
case
.
soldout
:
return
UIColor
.
mainTextColor30
case
.
scanSign
:
return
UIColor
.
success
Color
case
.
signed
:
return
UIColor
.
mainTextColor30
case
.
applied
:
// 已报名
return
UIColor
.
successColor
2
case
.
end
:
// 活动结束
return
UIColor
.
brandGrayColor5
case
.
canceled
:
// 已取消
return
UIColor
.
brandGrayColor5
case
.
soldout
:
// 已下架
return
UIColor
.
brandGrayColor5
case
.
scanSign
:
// 去签到
return
UIColor
.
brandMain
Color
case
.
signed
:
// 已签到
return
UIColor
.
successColor2
default
:
return
UIColor
.
clear
}
...
...
@@ -131,17 +131,17 @@ enum YHActivityStatus: Int {
case
.
notApply
:
return
UIColor
.
brandGrayColor8
case
.
applied
:
return
UIColor
.
successColor
return
UIColor
.
successColor
2
case
.
end
:
return
UIColor
.
mainTextColor30
return
UIColor
.
brandGrayColor4
case
.
canceled
:
return
UIColor
.
brandGrayColor8
case
.
soldout
:
return
UIColor
.
mainTextColor30
return
UIColor
.
brandGrayColor4
case
.
scanSign
:
return
UIColor
.
brandGrayColor8
case
.
signed
:
return
UIColor
.
mainTextColor30
return
UIColor
.
brandGrayColor4
default
:
return
UIColor
.
clear
}
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/C/YHActivityTravelViewController.swift
View file @
a8178ff7
...
...
@@ -324,15 +324,16 @@ extension YHActivityTravelViewController {
}
@objc
func
clickleftButton
()
{
if
self
.
viewModel
.
activityTravelModel
?
.
status
.
int
==
2
{
//
取消
if
self
.
viewModel
.
activityTravelModel
?
.
status
.
int
==
YHActivityStatus
.
applied
.
rawValue
{
//
//
已报名
YHCommonAlertView
.
show
(
""
,
"是否取消报名?"
,
"是"
,
"否"
,
fullGuestureEnable
:
false
)
{
self
.
cancelActivityApply
()
}
callBack
:
{
}
}
else
if
self
.
viewModel
.
activityTravelModel
?
.
status
.
int
==
4
{
}
else
if
self
.
viewModel
.
activityTravelModel
?
.
status
.
int
==
YHActivityStatus
.
canceled
.
rawValue
{
// 已取消
if
let
nav
=
self
.
navigationController
{
let
rrr
=
nav
.
viewControllers
.
contains
{
$0
.
isKind
(
of
:
YHActivityDetailViewController
.
self
)
}
if
rrr
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Activity(活动)/VM/YHActivityViewModel.swift
View file @
a8178ff7
...
...
@@ -63,20 +63,12 @@ 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
)
}
}
...
...
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