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
0d1db5c4
Commit
0d1db5c4
authored
Jul 09, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 消息新增类型和点击事件
parent
d4df3171
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
7 deletions
+21
-7
YHMessageDetailListVC.swift
...Classes/Modules/Message(消息)/C/YHMessageDetailListVC.swift
+13
-2
YHMsgListModel.swift
...galaxy/Classes/Modules/Message(消息)/M/YHMsgListModel.swift
+2
-1
YHDetailMessageCell.swift
...y/Classes/Modules/Message(消息)/V/YHDetailMessageCell.swift
+6
-4
No files found.
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHMessageDetailListVC.swift
View file @
0d1db5c4
...
...
@@ -7,6 +7,7 @@
//
import
UIKit
import
SafariServices
class
YHMessageDetailListVC
:
YHBaseViewController
{
...
...
@@ -196,8 +197,7 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHDetailMessageCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHDetailMessageCell
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
msgArr
.
count
{
let
item
=
msgArr
[
indexPath
.
row
]
cell
.
updateModel
(
item
)
cell
.
updateBottomBtn
(
type
:
self
.
type
)
cell
.
updateModel
(
item
,
type
:
self
.
type
)
}
return
cell
}
...
...
@@ -252,6 +252,17 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
}
}
else
if
self
.
type
==
YHMessageType
.
infoSubmit
.
rawValue
{
// 资料递交
if
!
item
.
url
.
isEmpty
{
if
let
url
=
URL
(
string
:
item
.
url
)
{
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
modalPresentationStyle
=
.
fullScreen
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
}
else
{
YHHUD
.
flash
(
message
:
"url无效"
)
}
return
}
self
.
navigationController
?
.
popToRootViewController
(
animated
:
false
)
goTabBarBy
(
tabType
:
.
service
)
}
...
...
galaxy/galaxy/Classes/Modules/Message(消息)/M/YHMsgListModel.swift
View file @
0d1db5c4
...
...
@@ -84,13 +84,14 @@ class YHDetailMessageModel: SmartCodable {
var
time
:
Int
=
0
var
isRead
:
Bool
=
false
var
orderId
:
String
=
""
var
url
:
String
=
""
required
init
()
{
}
enum
CodingKeys
:
String
,
CodingKey
{
case
id
,
title
,
content
,
time
case
id
,
title
,
content
,
time
,
url
case
isRead
=
"is_read"
case
orderId
=
"order_id"
}
...
...
galaxy/galaxy/Classes/Modules/Message(消息)/V/YHDetailMessageCell.swift
View file @
0d1db5c4
...
...
@@ -32,15 +32,13 @@ class YHDetailMessageCell: UITableViewCell {
setupUI
()
}
func
updateModel
(
_
model
:
YHDetailMessageModel
)
{
func
updateModel
(
_
model
:
YHDetailMessageModel
,
type
:
Int
)
{
self
.
model
=
model
titleLabel
.
text
=
model
.
title
detailLabel
.
text
=
model
.
content
unreadPointView
.
isHidden
=
model
.
isRead
timeLabel
.
text
=
formatTimestamp
(
Double
(
model
.
time
))
}
func
updateBottomBtn
(
type
:
Int
)
{
if
type
==
YHMessageType
.
infoFill
.
rawValue
{
bottomBtn
.
setTitle
(
"去填写"
.
local
,
for
:
.
normal
)
...
...
@@ -55,8 +53,12 @@ class YHDetailMessageCell: UITableViewCell {
}
else
if
type
==
YHMessageType
.
infoSubmit
.
rawValue
{
bottomBtn
.
setTitle
(
"去查看"
.
local
,
for
:
.
normal
)
if
!
model
.
url
.
isEmpty
{
bottomBtn
.
setTitle
(
"去签字"
.
local
,
for
:
.
normal
)
}
}
}
func
formatTimestamp
(
_
timestamp
:
TimeInterval
)
->
String
{
let
currentDate
=
Date
()
...
...
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