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
6344247e
Commit
6344247e
authored
Apr 18, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
cb197587
' into xiezhaolin
parents
8a39c6bd
cb197587
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
66 deletions
+107
-66
YHMessageDetailListVC.swift
...Classes/Modules/Message(消息)/C/YHMessageDetailListVC.swift
+1
-1
YHMessageListVC.swift
...alaxy/Classes/Modules/Message(消息)/C/YHMessageListVC.swift
+40
-30
YHMessageSessionCell.swift
.../Classes/Modules/Message(消息)/V/YHMessageSessionCell.swift
+16
-17
YHMySettingViewController.swift
...lasses/Modules/Mine(我的)/C/YHMySettingViewController.swift
+47
-3
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+3
-15
No files found.
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHMessageDetailListVC.swift
View file @
6344247e
...
...
@@ -73,7 +73,7 @@ class YHMessageDetailListVC: YHBaseViewController {
label
.
textColor
=
UIColor
(
hex
:
0x94A3B8
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
textAlignment
=
.
center
label
.
text
=
"暂无
新
消息"
.
local
label
.
text
=
"暂无消息"
.
local
view
.
addSubview
(
label
)
imgView
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHMessageListVC.swift
View file @
6344247e
...
...
@@ -32,32 +32,31 @@ class YHMessageListVC: YHBaseViewController {
return
tableView
}()
lazy
var
navBar
:
YHCustomNavigationBar
=
{
let
bar
=
YHCustomNavigationBar
.
navBar
()
bar
.
backButton
.
isHidden
=
true
bar
.
backgroundColor
=
.
white
bar
.
title
=
"消息"
bar
.
showRightButtonType
(
.
clean
)
bar
.
backBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
lazy
var
navBar
:
UIView
=
{
let
bar
=
UIView
()
let
titleLabel
=
UILabel
()
titleLabel
.
textColor
=
UIColor
(
hex
:
0x121A26
)
titleLabel
.
textAlignment
=
.
left
titleLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
21
)
titleLabel
.
text
=
"消息"
bar
.
addSubview
(
titleLabel
)
let
cleanBtn
=
UIButton
()
cleanBtn
.
setImage
(
UIImage
(
named
:
"msg_clean"
),
for
:
.
normal
)
cleanBtn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
cleanBtn
.
addTarget
(
self
,
action
:
#selector(
didCleanButtonClicked
)
,
for
:
.
touchUpInside
)
bar
.
addSubview
(
cleanBtn
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
bottom
.
equalToSuperview
()
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalTo
(
cleanBtn
.
snp
.
left
)
.
offset
(
-
20
)
}
bar
.
rightBtnClick
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
bar
.
rightBtnClick
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
unreadMessages
=
self
.
msgArr
.
filter
{
$0
.
unreadCount
>
0
}
if
unreadMessages
.
count
<=
0
{
YHHUD
.
flash
(
message
:
"暂无未读消息~"
)
return
}
YHCommonAlertView
.
show
(
"清除未读"
,
"确定要清除所有未读提示吗?"
,
"取消"
,
"确认"
)
{
self
.
markAllMsgsRead
()
}
}
cleanBtn
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
24
)
make
.
centerY
.
equalToSuperview
()
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
}
return
bar
}()
...
...
@@ -72,7 +71,7 @@ class YHMessageListVC: YHBaseViewController {
label
.
textColor
=
UIColor
(
hex
:
0x94A3B8
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
textAlignment
=
.
center
label
.
text
=
"暂无
新
消息"
.
local
label
.
text
=
"暂无消息"
.
local
view
.
addSubview
(
label
)
imgView
.
snp
.
makeConstraints
{
make
in
...
...
@@ -140,6 +139,17 @@ class YHMessageListVC: YHBaseViewController {
}
@objc
func
didCleanButtonClicked
()
{
let
unreadMessages
=
self
.
msgArr
.
filter
{
$0
.
unreadCount
>
0
}
if
unreadMessages
.
count
<=
0
{
YHHUD
.
flash
(
message
:
"暂无未读消息~"
)
return
}
YHCommonAlertView
.
show
(
"清除未读"
,
"确定要清除所有未读提示吗?"
,
"取消"
,
"确认"
)
{
self
.
markAllMsgsRead
()
}
}
@objc
func
getUnreadMsgList
()
{
self
.
viewModel
.
getUnreadMsgList
{
[
weak
self
]
success
,
error
in
...
...
@@ -147,19 +157,19 @@ class YHMessageListVC: YHBaseViewController {
if
success
,
let
msgList
=
viewModel
.
msgList
{
msgArr
.
removeAll
()
// 资料填写
if
let
infoMsg
=
msgList
.
information
{
if
let
infoMsg
=
msgList
.
information
,
!
infoMsg
.
lastMessage
.
isEmpty
{
msgArr
.
append
(
infoMsg
)
}
// 证件上传
if
let
cerMsg
=
msgList
.
certificate
{
if
let
cerMsg
=
msgList
.
certificate
,
!
cerMsg
.
lastMessage
.
isEmpty
{
msgArr
.
append
(
cerMsg
)
}
// 文书定稿
if
let
dratMsg
=
msgList
.
draft
{
if
let
dratMsg
=
msgList
.
draft
,
!
dratMsg
.
lastMessage
.
isEmpty
{
msgArr
.
append
(
dratMsg
)
}
// 文件签字
if
let
signMsg
=
msgList
.
signature
{
if
let
signMsg
=
msgList
.
signature
,
!
signMsg
.
lastMessage
.
isEmpty
{
msgArr
.
append
(
signMsg
)
}
emptyDataTipsView
.
isHidden
=
msgArr
.
count
>
0
...
...
galaxy/galaxy/Classes/Modules/Message(消息)/V/YHMessageSessionCell.swift
View file @
6344247e
...
...
@@ -18,7 +18,7 @@ class YHMessageSessionCell: UITableViewCell {
var
badgeLabel
:
UILabel
!
var
nameLabel
:
UILabel
!
var
detailLabel
:
UILabel
!
var
timeLabel
:
UILabel
!
//
var timeLabel: UILabel!
var
bottomLineView
:
UIView
!
required
init
?(
coder
:
NSCoder
)
{
...
...
@@ -64,7 +64,7 @@ class YHMessageSessionCell: UITableViewCell {
}
self
.
detailLabel
.
text
=
!
model
.
lastMessage
.
isEmpty
?
model
.
lastMessage
:
"暂无消息"
.
local
self
.
timeLabel
.
text
=
formatTimestamp
(
Double
(
model
.
lastMessageTime
))
//
self.timeLabel.text = formatTimestamp(Double(model.lastMessageTime))
}
func
formatTimestamp
(
_
timestamp
:
TimeInterval
)
->
String
{
...
...
@@ -126,13 +126,13 @@ class YHMessageSessionCell: UITableViewCell {
detailLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
contentView
.
addSubview
(
detailLabel
)
timeLabel
=
UILabel
()
timeLabel
.
textColor
=
UIColor
(
hex
:
0x121A26
,
alpha
:
0.3
)
timeLabel
.
textAlignment
=
.
right
timeLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
11
)
timeLabel
.
setContentCompressionResistancePriority
(
.
required
,
for
:
.
horizontal
)
timeLabel
.
setContentHuggingPriority
(
.
required
,
for
:
.
horizontal
)
contentView
.
addSubview
(
timeLabel
)
//
timeLabel = UILabel()
//
timeLabel.textColor = UIColor(hex:0x121A26, alpha: 0.3)
//
timeLabel.textAlignment = .right
//
timeLabel.font = UIFont.PFSC_R(ofSize:11)
//
timeLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
//
timeLabel.setContentHuggingPriority(.required, for: .horizontal)
//
contentView.addSubview(timeLabel)
bottomLineView
=
UIView
()
bottomLineView
.
backgroundColor
=
UIColor
(
hex
:
0xF0F3F7
)
...
...
@@ -158,23 +158,22 @@ class YHMessageSessionCell: UITableViewCell {
nameLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
iconContentView
.
snp
.
right
)
.
offset
(
16
)
make
.
right
.
equalTo
(
timeLabel
.
snp
.
left
)
.
offset
(
-
20
)
make
.
right
.
equalTo
Superview
(
)
.
offset
(
-
20
)
make
.
top
.
equalTo
(
iconContentView
)
make
.
height
.
equalTo
(
21
)
}
detailLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
nameLabel
)
make
.
right
.
equalTo
(
timeLabel
)
make
.
left
.
right
.
equalTo
(
nameLabel
)
make
.
top
.
equalTo
(
nameLabel
.
snp
.
bottom
)
.
offset
(
2
)
make
.
height
.
equalTo
(
17
)
}
timeLabel
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalTo
(
nameLabel
)
make
.
height
.
equalTo
(
15
)
}
//
timeLabel.snp.makeConstraints { make in
//
make.right.equalToSuperview().offset(-20)
//
make.top.equalTo(nameLabel)
//
make.height.equalTo(15)
//
}
bottomLineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
detailLabel
)
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMySettingViewController.swift
View file @
6344247e
...
...
@@ -35,13 +35,35 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
return
btn
}()
lazy
var
versionLabel
:
UILabel
=
{
let
btn
=
UILabel
()
btn
.
text
=
"版本号:V0.1.8测试服"
btn
.
textColor
=
UIColor
(
hex
:
0x949DB5
,
alpha
:
1.0
)
btn
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
13
)
btn
.
textAlignment
=
.
center
return
btn
}()
lazy
var
items
:
[
PersonalModuleItem
]
=
{
#if DEBUG
return
[
PersonalModuleItem
(
title
:
"通知设置"
.
local
,
type
:
.
notifySettings
),
PersonalModuleItem
(
title
:
"权限配置"
.
local
,
type
:
.
permissionSettings
),
PersonalModuleItem
(
title
:
"关于我们"
.
local
,
type
:
.
aboutUs
),
PersonalModuleItem
(
title
:
"设备相关"
.
local
,
type
:
.
deviceInfo
)]
#elseif TESTENV
return
[
PersonalModuleItem
(
title
:
"通知设置"
.
local
,
type
:
.
notifySettings
),
PersonalModuleItem
(
title
:
"权限配置"
.
local
,
type
:
.
permissionSettings
),
PersonalModuleItem
(
title
:
"个人信息收集清单"
.
local
,
type
:
.
infoCollectList
),
PersonalModuleItem
(
title
:
"第三方信息共享清单"
.
local
,
type
:
.
infoShareList
),
PersonalModuleItem
(
title
:
"关于我们"
.
local
,
type
:
.
aboutUs
),
PersonalModuleItem
(
title
:
"设备相关"
.
local
,
type
:
.
deviceInfo
)]
#else
return
[
PersonalModuleItem
(
title
:
"通知设置"
.
local
,
type
:
.
notifySettings
),
PersonalModuleItem
(
title
:
"权限配置"
.
local
,
type
:
.
permissionSettings
),
// PersonalModuleItem(title: "个人信息收集清单".local, type:.infoCollectList),
// PersonalModuleItem(title: "第三方信息共享清单".local, type:.infoShareList),
PersonalModuleItem
(
title
:
"关于我们"
.
local
,
type
:
.
aboutUs
)]
#endif
}()
override
func
viewDidLoad
()
{
...
...
@@ -55,18 +77,40 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
self
.
view
.
backgroundColor
=
.
white
view
.
addSubview
(
tableView
)
view
.
addSubview
(
logoutBtn
)
view
.
addSubview
(
versionLabel
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
logoutBtn
.
snp
.
top
)
.
offset
(
-
30
)
make
.
bottom
.
equalTo
(
versionLabel
.
snp
.
top
)
.
offset
(
-
30
)
}
versionLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
height
.
equalTo
(
18
)
make
.
bottom
.
equalTo
(
logoutBtn
.
snp
.
top
)
.
offset
(
-
kMargin
)
}
logoutBtn
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
height
.
equalTo
(
48.0
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
30
)
}
#if DEBUG
let
version
=
"版本号:V"
+
UIDevice
.
appVersion
()
+
"_"
+
UIDevice
.
appBuild
()
+
"开发服"
versionLabel
.
text
=
version
#elseif TESTENV
let
version
=
"版本号:V"
+
UIDevice
.
appVersion
()
+
"_"
+
UIDevice
.
appBuild
()
+
"测试服"
versionLabel
.
text
=
version
#else
let
version
=
"版本号:V"
+
UIDevice
.
appVersion
()
+
"_"
+
UIDevice
.
appBuild
()
versionLabel
.
text
=
version
#endif
}
@objc
func
logout
()
{
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
6344247e
...
...
@@ -70,19 +70,6 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
PersonalModuleItem
(
icon
:
"mine_item_code"
,
title
:
"我的测评码"
.
local
,
type
:
.
myTestCode
),
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
"预约银河湾"
.
local
,
type
:
.
appointGalaxyBay
)
]
#if DEBUG
let
version
=
"app版本号:"
+
UIDevice
.
appVersion
()
+
"_"
+
UIDevice
.
appBuild
()
arrData
.
append
(
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
version
,
type
:
.
none
))
#elseif TESTENV
let
version
=
"app版本号:"
+
UIDevice
.
appVersion
()
+
"_"
+
UIDevice
.
appBuild
()
arrData
.
append
(
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
version
,
type
:
.
none
))
#else
#endif
return
arrData
}()
...
...
@@ -253,13 +240,14 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
var
token
:
String
=
param
//待h5端同学提供
var
url
=
"https:www.baidu.com"
var
addtionString
=
randomAlphanumericString
(
6
)
//随机6个字母或者数字
let
addtionString
=
randomAlphanumericString
(
6
)
//随机6个字母或者数字
let
indexToInsert
=
token
.
index
(
token
.
startIndex
,
offsetBy
:
6
)
//插入位置,这里以第六个字符后面为例
token
.
insert
(
contentsOf
:
addtionString
,
at
:
indexToInsert
)
url
=
url
+
"?param="
+
token
YHHUD
.
flash
(
message
:
"还需要H5同学给URL"
)
printLog
(
url
)
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
url
self
.
navigationController
?
.
pushViewController
(
vc
)
...
...
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