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
60594a51
Commit
60594a51
authored
Mar 23, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的证件
parent
dce87db9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
69 additions
and
22 deletions
+69
-22
YHCertificateListContainerVC.swift
...MyCertificates(我的证书)/C/YHCertificateListContainerVC.swift
+6
-3
YHCertificateUploadContentListVC.swift
...rtificates(我的证书)/C/YHCertificateUploadContentListVC.swift
+12
-5
YHCertificateModel.swift
...ice(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
+31
-0
YHCertificateFilterView.swift
...务中心)/MyCertificates(我的证书)/V/YHCertificateFilterView.swift
+6
-3
YHCertificateInfoCell.swift
...(服务中心)/MyCertificates(我的证书)/V/YHCertificateInfoCell.swift
+10
-1
YHCertificateNameCell.swift
...(服务中心)/MyCertificates(我的证书)/V/YHCertificateNameCell.swift
+1
-7
YHCertificateTemplateSheetView.swift
...Certificates(我的证书)/V/YHCertificateTemplateSheetView.swift
+1
-1
YHCertificateUploadSheetView.swift
...MyCertificates(我的证书)/V/YHCertificateUploadSheetView.swift
+1
-1
YHFileRenameInputView.swift
...(服务中心)/MyCertificates(我的证书)/V/YHFileRenameInputView.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateListContainerVC.swift
View file @
60594a51
...
...
@@ -112,7 +112,7 @@ class YHCertificateListContainerVC: YHBaseViewController {
}()
lazy
var
filterSheetView
:
YHCertificateFilterView
=
{
let
view
=
YHCertificateFilterView
.
sheetView
let
view
=
YHCertificateFilterView
.
sheetView
()
view
.
confirmBlock
=
{
[
weak
self
]
dict
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -231,10 +231,13 @@ extension YHCertificateListContainerVC: JXSegmentedViewDelegate {
func
segmentedView
(
_
segmentedView
:
JXSegmentedView
,
didSelectedItemAt
index
:
Int
)
{
if
0
<=
index
&&
index
<
itemVCs
.
count
{
let
vc
=
itemVCs
[
index
]
vc
.
requestList
(
status
:
vc
.
status
,
extra
:
self
.
filterDict
)
if
index
==
0
{
vc
.
requestList
(
status
:
vc
.
status
,
extra
:
self
.
filterDict
)
}
else
{
vc
.
requestList
(
status
:
vc
.
status
)
}
}
}
/// 正在滚动中的回调
///
/// - Parameters:
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateUploadContentListVC.swift
View file @
60594a51
...
...
@@ -100,7 +100,8 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
renameInputView
.
editBlock
=
{
[
weak
self
]
text
in
guard
let
self
=
self
else
{
return
}
if
let
selectEditItem
=
selectEditItem
,
let
text
=
text
{
if
let
selectEditItem
=
selectEditItem
,
var
text
=
text
{
text
=
text
+
"."
+
selectEditItem
.
getFileSuffixName
()
self
.
viewModel
.
updateCertificateItem
(
supplementId
:
supplementInfo
.
id
,
urlModel
:
selectEditItem
,
operation
:
"rename"
,
rename
:
text
)
{
self
.
requestList
()
}
...
...
@@ -210,7 +211,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
if
editType
==
.
rename
{
// 重命名
IQKeyboardManager
.
shared
.
enable
=
false
renameInputView
.
textField
.
text
=
contentItem
.
name
renameInputView
.
textField
.
text
=
contentItem
.
getFileNameWithoutSuffix
()
renameInputView
.
textField
.
becomeFirstResponder
()
}
else
if
editType
==
.
delete
{
// 删除
...
...
@@ -284,7 +285,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
tipsLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
tipsLabel
.
numberOfLines
=
0
if
!
supplementInfo
.
templateInfo
.
description
.
isEmpty
{
tipsLabel
.
text
=
"注意事项:
\(
supplementInfo
.
templateInfo
.
description
)
"
tipsLabel
.
text
=
supplementInfo
.
templateInfo
.
description
}
view
.
addSubview
(
tipsLabel
)
...
...
@@ -340,7 +341,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
statusLabel
.
backgroundColor
=
bgColor
let
tipsLabel
=
UILabel
()
tipsLabel
.
textColor
=
.
warn
Color
tipsLabel
.
textColor
=
.
fail
Color
tipsLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
tipsLabel
.
textAlignment
=
.
left
tipsLabel
.
numberOfLines
=
0
...
...
@@ -404,7 +405,13 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
}
}
else
if
indexPath
.
section
==
1
{
// 证件列表
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
items
.
count
{
let
cer
=
items
[
indexPath
.
row
]
print
(
"
\(
cer
.
url
)
"
)
print
(
"
\(
cer
.
name
)
"
)
print
(
"
\(
cer
.
suffix
)
"
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
View file @
60594a51
...
...
@@ -143,6 +143,37 @@ class YHContentUrl: SmartCodable {
case
updatedAt
=
"updated_at"
}
// 获取文件后缀名 eg:123.pdf -> pdf
func
getFileSuffixName
()
->
String
{
let
res1
=
url
.
pathExtension
.
lowercased
()
if
!
res1
.
isEmpty
{
return
res1
}
let
res2
=
name
.
pathExtension
.
lowercased
()
if
!
res2
.
isEmpty
{
return
res2
}
if
!
suffix
.
isEmpty
{
return
suffix
}
return
""
}
// 获取文件名(不包含后缀) eg:123.pdf -> 123
func
getFileNameWithoutSuffix
()
->
String
{
if
name
.
isEmpty
{
return
name
}
if
!
name
.
contains
(
"."
)
{
return
name
}
if
!
name
.
pathExtension
.
isEmpty
{
let
fileName
=
(
name
as
NSString
)
.
deletingPathExtension
return
fileName
}
return
""
}
required
init
()
{
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateFilterView.swift
View file @
60594a51
...
...
@@ -63,8 +63,6 @@ class YHCertificateFilterView: UIView {
static
let
margin
=
21.0
static
let
gap
=
12.0
static
let
itemHeight
=
36.0
static
let
sheetView
=
YHCertificateFilterView
(
frame
:
UIScreen
.
main
.
bounds
)
var
confirmBlock
:(([
String
:
String
])
->
())?
var
items
:[
YHCertificateFilterSectionInfo
]
=
[
...
...
@@ -174,13 +172,18 @@ class YHCertificateFilterView: UIView {
createUI
()
}
static
func
sheetView
()
->
YHCertificateFilterView
{
let
sheetView
=
YHCertificateFilterView
(
frame
:
UIScreen
.
main
.
bounds
)
return
sheetView
}
func
createUI
()
{
self
.
addSubview
(
blackMaskView
)
self
.
addSubview
(
whiteContentView
)
let
corner
=
UIRectCorner
(
rawValue
:
UIRectCorner
.
topLeft
.
rawValue
|
UIRectCorner
.
topRight
.
rawValue
)
let
path
=
UIBezierPath
(
roundedRect
:
bounds
,
byRoundingCorners
:
corner
,
cornerRadii
:
CGSizeMake
(
16.0
,
16
.0
));
let
path
=
UIBezierPath
(
roundedRect
:
bounds
,
byRoundingCorners
:
corner
,
cornerRadii
:
CGSizeMake
(
8.0
,
8
.0
));
let
layer
=
CAShapeLayer
();
layer
.
frame
=
whiteContentView
.
bounds
;
layer
.
path
=
path
.
cgPath
;
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateInfoCell.swift
View file @
60594a51
...
...
@@ -57,7 +57,16 @@ class YHCertificateInfoCell: UITableViewCell {
statusLabel
.
text
=
title
statusLabel
.
textColor
=
titleColor
}
infoLabel
.
text
=
"类型:
\(
model
.
typeName
)
所属人:
\(
model
.
nameExtra
.
userName
)
"
var
infoStr
=
""
var
typeStr
=
"无"
var
ownerStr
=
"无"
if
!
model
.
typeName
.
isEmpty
{
typeStr
=
model
.
typeName
}
if
!
model
.
nameExtra
.
userName
.
isEmpty
{
ownerStr
=
model
.
nameExtra
.
userName
}
infoLabel
.
text
=
"类型:
\(
typeStr
)
所属人:
\(
ownerStr
)
"
var
result
:
ASAttributedString
=
.
init
(
string
:
""
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
mustTag
:
ASAttributedString
=
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
failColor
))
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateNameCell.swift
View file @
60594a51
...
...
@@ -37,15 +37,9 @@ class YHCertificateNameCell: UITableViewCell {
nameLabel
.
text
=
model
.
name
timeLabel
.
text
=
"上传于
\(
model
.
updatedAt
)
"
var
suffix
=
""
var
suffix
=
model
.
getFileSuffixName
()
var
iconImgName
=
""
if
!
model
.
url
.
pathExtension
.
isEmpty
{
suffix
=
model
.
url
.
pathExtension
}
else
{
suffix
=
model
.
suffix
}
if
suffix
==
"jpeg"
{
iconImgName
=
"my_cer_type_jpg"
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateTemplateSheetView.swift
View file @
60594a51
...
...
@@ -263,7 +263,7 @@ extension YHCertificateTemplateSheetView: UITableViewDelegate, UITableViewDataSo
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
numberOfLines
=
0
label
.
text
=
"注意事项:
\(
desc
)
"
label
.
text
=
desc
view
.
addSubview
(
label
)
label
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateUploadSheetView.swift
View file @
60594a51
...
...
@@ -339,7 +339,7 @@ extension YHCertificateUploadSheetView: UITableViewDelegate, UITableViewDataSour
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
numberOfLines
=
0
label
.
text
=
"注意事项:
\(
desc
)
"
label
.
text
=
desc
view
.
addSubview
(
label
)
label
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHFileRenameInputView.swift
View file @
60594a51
...
...
@@ -40,7 +40,7 @@ class YHFileRenameInputView: UIView {
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_B
(
ofSize
:
17
)
label
.
text
=
"
请选择上传方式
"
label
.
text
=
"
文件重命名
"
return
label
}()
...
...
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