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
4c4c1651
Commit
4c4c1651
authored
Sep 09, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 消息
parent
bac1a8c1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
26 deletions
+78
-26
YHMessageListVC.swift
...alaxy/Classes/Modules/Message(消息)/C/YHMessageListVC.swift
+48
-25
YHMessageSessionCell.swift
.../Classes/Modules/Message(消息)/V/YHMessageSessionCell.swift
+8
-1
Contents.json
...ets/Message/msg_icon_yinhe_manager.imageset/Contents.json
+22
-0
Group@2x.png
...sets/Message/msg_icon_yinhe_manager.imageset/Group@2x.png
+0
-0
Group@3x.png
...sets/Message/msg_icon_yinhe_manager.imageset/Group@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHMessageListVC.swift
View file @
4c4c1651
...
...
@@ -107,6 +107,10 @@ class YHMessageListVC: YHBaseViewController {
let
mgrMsg
=
YHMessageInfoModel
()
mgrMsg
.
type
=
YHMessageType
.
yinheManager
.
rawValue
mgrMsg
.
unreadCount
=
YHButlerServiceManager
.
shared
.
unreadCount
if
let
lastMsg
=
YHButlerServiceManager
.
shared
.
getLastMessage
()
{
mgrMsg
.
lastMessage
=
lastMsg
.
content
mgrMsg
.
lastMessageTime
=
Int64
(
lastMsg
.
timeStamp
)
}
msgArr
.
append
(
mgrMsg
)
}
...
...
@@ -181,26 +185,29 @@ class YHMessageListVC: YHBaseViewController {
if
success
{
var
hasUnreadMsg
=
false
// 资料填写
if
!
self
.
viewModel
.
msgList
.
information
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
}
// 证件上传
if
!
self
.
viewModel
.
msgList
.
certificate
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
}
// 文书定稿
if
!
self
.
viewModel
.
msgList
.
draft
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
}
// 文件签字
if
!
self
.
viewModel
.
msgList
.
signature
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
}
// 资料递交
if
!
self
.
viewModel
.
msgList
.
dataSubmission
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
if
!
isHidden
{
// 资料填写
if
!
self
.
viewModel
.
msgList
.
information
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
}
// 证件上传
if
!
self
.
viewModel
.
msgList
.
certificate
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
}
// 文书定稿
if
!
self
.
viewModel
.
msgList
.
draft
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
}
// 文件签字
if
!
self
.
viewModel
.
msgList
.
signature
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
}
// 资料递交
if
!
self
.
viewModel
.
msgList
.
dataSubmission
.
lastMessage
.
isEmpty
{
hasUnreadMsg
=
true
}
}
// 身份获批
...
...
@@ -235,6 +242,7 @@ class YHMessageListVC: YHBaseViewController {
}
emptyDataTipsView
.
isHidden
=
msgArr
.
count
>
0
self
.
tableView
.
reloadData
()
didRefreshYinHeManagerUnreadMsg
()
}
}
}
...
...
@@ -250,7 +258,7 @@ class YHMessageListVC: YHBaseViewController {
self
.
serviceCenterViewModel
.
getStageInformation
(
params
:
[
"orderId"
:
orderInfo
.
id
])
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
self
.
serviceCenterViewModel
.
personInfoModel
.
type
==
2
{
// 申请结果
if
self
.
serviceCenterViewModel
.
personInfoModel
.
type
!=
1
{
// 身份申请完成之后
callback
?(
true
)
}
else
{
...
...
@@ -268,6 +276,9 @@ class YHMessageListVC: YHBaseViewController {
func
markAllMsgsRead
()
{
// 清除银河管家未读消息数
YHButlerServiceManager
.
shared
.
clearUnreadCount
()
YHHUD
.
show
(
.
progress
(
message
:
"清除中..."
))
self
.
viewModel
.
readMessages
(
type
:
nil
,
msgIds
:
nil
,
isAllRead
:
true
)
{
[
weak
self
]
success
,
error
in
...
...
@@ -333,12 +344,14 @@ class YHMessageListVC: YHBaseViewController {
}
extension
YHMessageListVC
{
private
func
gotoYinHeManager
()
{
private
func
gotoYinHeManager
(
completion
:
@escaping
(
Bool
)
->
Void
)
{
guard
let
userId
=
YHLoginManager
.
shared
.
userModel
?
.
id
,
userId
.
count
>
0
else
{
return
}
YHButlerServiceManager
.
shared
.
gotoButlerServiceSessionVC
(
navigationController
:
navigationController
,
completion
:
{
_
in
})
YHButlerServiceManager
.
shared
.
gotoButlerServiceSessionVC
(
navigationController
:
navigationController
,
completion
:
{
success
in
completion
(
success
)
})
}
@objc
func
didRefreshYinHeManagerUnreadMsg
()
{
...
...
@@ -349,7 +362,7 @@ extension YHMessageListVC {
for
msg
in
msgArr
{
if
msg
.
type
==
YHMessageType
.
yinheManager
.
rawValue
{
// 银河管家
msg
.
unreadCount
=
YHButlerServiceManager
.
shared
.
unreadCount
if
let
lastMsg
=
YHButlerServiceManager
.
shared
.
lastMessage
{
if
let
lastMsg
=
YHButlerServiceManager
.
shared
.
getLastMessage
()
{
msg
.
lastMessage
=
lastMsg
.
content
msg
.
lastMessageTime
=
Int64
(
lastMsg
.
timeStamp
)
self
.
tableView
.
reloadData
()
...
...
@@ -407,7 +420,17 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource {
let
msgItem
=
msgArr
[
indexPath
.
row
]
if
msgItem
.
type
==
YHMessageType
.
yinheManager
.
rawValue
{
// 进银河管家
self
.
gotoYinHeManager
()
self
.
gotoYinHeManager
{
success
in
YHHUD
.
hide
()
if
success
{
YHButlerServiceManager
.
shared
.
clearUnreadCount
()
if
let
managerSession
=
self
.
msgArr
.
first
,
managerSession
.
type
==
YHMessageType
.
yinheManager
.
rawValue
{
managerSession
.
unreadCount
=
0
self
.
tableView
.
reloadData
()
}
}
}
return
}
let
vc
=
YHMessageDetailListVC
()
...
...
galaxy/galaxy/Classes/Modules/Message(消息)/V/YHMessageSessionCell.swift
View file @
4c4c1651
...
...
@@ -35,7 +35,7 @@ class YHMessageSessionCell: UITableViewCell {
self
.
nameLabel
.
text
=
model
.
getTitle
()
if
model
.
type
==
YHMessageType
.
yinheManager
.
rawValue
{
self
.
iconImgView
.
image
=
UIImage
(
named
:
"msg_icon_
info_fill
"
)
self
.
iconImgView
.
image
=
UIImage
(
named
:
"msg_icon_
yinhe_manager
"
)
}
else
if
model
.
type
==
YHMessageType
.
infoFill
.
rawValue
{
self
.
iconImgView
.
image
=
UIImage
(
named
:
"msg_icon_info_fill"
)
...
...
@@ -78,6 +78,13 @@ class YHMessageSessionCell: UITableViewCell {
make
.
width
.
equalTo
(
width
)
}
self
.
iconImgView
.
snp
.
updateConstraints
{
make
in
let
width
=
model
.
type
==
YHMessageType
.
yinheManager
.
rawValue
?
32.0
:
21.0
let
height
=
model
.
type
==
YHMessageType
.
yinheManager
.
rawValue
?
12.0
:
21.0
make
.
width
.
equalTo
(
width
)
make
.
height
.
equalTo
(
height
)
}
self
.
detailLabel
.
text
=
!
model
.
lastMessage
.
isEmpty
?
model
.
lastMessage
:
"暂无消息"
.
local
self
.
timeLabel
.
text
=
formatTimestamp
(
Double
(
model
.
lastMessageTime
))
self
.
timeLabel
.
isHidden
=
model
.
lastMessage
.
isEmpty
...
...
galaxy/galaxy/Res/Assets.xcassets/Message/msg_icon_yinhe_manager.imageset/Contents.json
0 → 100644
View file @
4c4c1651
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Message/msg_icon_yinhe_manager.imageset/Group@2x.png
0 → 100644
View file @
4c4c1651
1.06 KB
galaxy/galaxy/Res/Assets.xcassets/Message/msg_icon_yinhe_manager.imageset/Group@3x.png
0 → 100644
View file @
4c4c1651
1.49 KB
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