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
3214f962
Commit
3214f962
authored
Mar 20, 2024
by
Steven杜宇
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的证书
parent
3f581fbd
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
136 additions
and
20 deletions
+136
-20
YHCertificateResourceUploadVC.swift
...yCertificates(我的证书)/C/YHCertificateResourceUploadVC.swift
+11
-2
YHUploadContentVC.swift
...vice(服务中心)/MyCertificates(我的证书)/C/YHUploadContentVC.swift
+0
-0
YHCertificateModel.swift
...ice(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
+24
-0
YHCertificateNameCell.swift
...(服务中心)/MyCertificates(我的证书)/V/YHCertificateNameCell.swift
+44
-0
YHCertificateTemplateCell.swift
...心)/MyCertificates(我的证书)/V/YHCertificateTemplateCell.swift
+37
-3
YHCertificateTemplateView.swift
...心)/MyCertificates(我的证书)/V/YHCertificateTemplateView.swift
+7
-6
YHFileRenameInputView.swift
...(服务中心)/MyCertificates(我的证书)/V/YHFileRenameInputView.swift
+12
-8
YHCertificateViewModel.swift
...务中心)/MyCertificates(我的证书)/VM/YHCertificateViewModel.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateResourceUploadVC.swift
View file @
3214f962
...
...
@@ -18,7 +18,7 @@ class YHCertificateResourceUploadVC: YHBaseViewController {
var
status
:
YHCertificateUploadStatus
=
.
all
var
items
:[
YHSupplementInfo
]
=
[]
var
viewModel
:
YHCertificateViewModel
=
YHCertificateViewModel
()
var
categoryInfo
:
YHCategoryData
=
YHCategoryData
()
var
categoryInfo
:
YHCategoryData
!
lazy
var
tableView
:
UITableView
=
{
...
...
@@ -97,8 +97,10 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
item
=
items
[
indexPath
.
section
]
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHCertificateInfoCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificateInfoCell
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
let
item
=
items
[
indexPath
.
section
]
cell
.
updateModel
(
item
)
cell
.
templateBlock
=
{
[
weak
self
]
in
...
...
@@ -112,6 +114,7 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
}
view
.
show
()
}
}
return
cell
}
...
...
@@ -122,6 +125,12 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
vc
=
YHUploadContentVC
()
vc
.
orderId
=
orderId
vc
.
categoryInfo
=
categoryInfo
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
let
item
=
items
[
indexPath
.
section
]
vc
.
uploadInfo
=
item
}
self
.
navigationController
?
.
pushViewController
(
vc
)
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHUploadContentVC.swift
View file @
3214f962
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
View file @
3214f962
...
...
@@ -68,8 +68,23 @@ class YHSupplementInfo: SmartCodable {
var
applicantName
:
String
=
""
var
nameExtra
:
YHNameExtra
=
YHNameExtra
()
var
templateInfo
:
YHTemplateInfo
=
YHTemplateInfo
()
var
auditContent
:
String
=
""
var
uploadRequirement
:
String
=
""
var
contentUrl
:
[
YHContentUrl
]
=
[]
func
getStatusName
()
->
String
{
if
checkStatus
==
YHCertificateUploadStatus
.
review
.
rawValue
{
return
"审核中"
.
local
}
else
if
checkStatus
==
YHCertificateUploadStatus
.
preUpload
.
rawValue
{
return
"待上传"
.
local
}
else
if
checkStatus
==
YHCertificateUploadStatus
.
finish
.
rawValue
{
return
"已通过"
.
local
}
else
if
checkStatus
==
YHCertificateUploadStatus
.
rejected
.
rawValue
{
return
"已驳回"
.
local
}
return
""
}
enum
CodingKeys
:
String
,
CodingKey
{
case
id
=
"id"
case
name
=
"name"
...
...
@@ -81,6 +96,8 @@ class YHSupplementInfo: SmartCodable {
case
applicantName
=
"applicant_name"
case
nameExtra
=
"name_extra"
case
templateInfo
=
"template_info"
case
auditContent
=
"audit_content"
case
uploadRequirement
=
"upload_requirement"
case
contentUrl
=
"content_url"
}
...
...
@@ -165,6 +182,13 @@ class YHTemplateInfo: SmartCodable {
var
description
:
String
=
""
var
materialPath
:
[
YHMaterialPath
]
=
[]
func
isNeedShowTemplate
()
->
Bool
{
if
self
.
description
.
isEmpty
&&
self
.
materialPath
.
isEmpty
{
return
false
}
return
true
}
required
init
()
{
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateNameCell.swift
View file @
3214f962
...
...
@@ -12,12 +12,15 @@ class YHCertificateNameCell: UITableViewCell {
static
let
cellReuseIdentifier
=
"YHCertificateNameCell"
var
editBlock
:((
YHContentUrl
)
->
())?
var
whiteView
:
UIView
!
var
iconImgV
:
UIImageView
!
var
nameLabel
:
UILabel
!
var
timeLabel
:
UILabel
!
var
editBtn
:
UIButton
!
var
contentItem
:
YHContentUrl
!
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
...
...
@@ -29,10 +32,49 @@ class YHCertificateNameCell: UITableViewCell {
}
func
updateModel
(
_
model
:
YHContentUrl
)
{
contentItem
=
model
nameLabel
.
text
=
model
.
name
timeLabel
.
text
=
"上传于
\(
model
.
updatedAt
)
"
var
suffix
=
""
var
iconImgName
=
""
if
!
model
.
url
.
pathExtension
.
isEmpty
{
suffix
=
model
.
url
.
pathExtension
}
else
{
suffix
=
model
.
suffix
}
if
suffix
==
"jpeg"
{
iconImgName
=
"my_cer_type_jpg"
}
else
if
suffix
==
"jpg"
{
iconImgName
=
"my_cer_type_jpg"
}
else
if
suffix
==
"png"
{
iconImgName
=
"my_cer_type_png"
}
else
if
suffix
==
"pdf"
{
iconImgName
=
"my_cer_type_pdf"
}
else
if
suffix
==
"doc"
||
suffix
==
"docx"
{
iconImgName
=
"my_cer_type_word"
}
else
if
suffix
==
"ppt"
||
suffix
==
"pptx"
{
iconImgName
=
"my_cer_type_ppt"
}
iconImgV
.
image
=
UIImage
(
named
:
iconImgName
)
}
@objc
func
didEditBtnClicked
()
{
if
let
editBlock
=
editBlock
{
editBlock
(
contentItem
)
}
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
...
...
@@ -60,6 +102,8 @@ class YHCertificateNameCell: UITableViewCell {
editBtn
=
UIButton
()
editBtn
.
setImage
(
UIImage
(
named
:
"my_cer_btn_edit"
),
for
:
.
normal
)
editBtn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
editBtn
.
addTarget
(
self
,
action
:
#selector(
didEditBtnClicked
)
,
for
:
.
touchUpInside
)
whiteView
.
addSubview
(
editBtn
)
whiteView
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateTemplateCell.swift
View file @
3214f962
...
...
@@ -11,14 +11,46 @@ import UIKit
class
YHCertificateTemplateCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHCertificateTemplateCell"
var
templateInfo
:
YHTemplateInfo
?
{
didSet
{
guard
let
templateInfo
=
templateInfo
else
{
contentView
.
isHidden
=
true
return
}
if
templateInfo
.
description
.
isEmpty
&&
templateInfo
.
materialPath
.
isEmpty
{
contentView
.
isHidden
=
true
return
}
contentView
.
isHidden
=
false
if
!
templateInfo
.
name
.
isEmpty
{
templateTitleLabel
.
text
=
"
\(
templateInfo
.
name
)
示例模版"
}
else
{
templateTitleLabel
.
text
=
""
}
if
!
templateInfo
.
description
.
isEmpty
{
tipsLabel
.
text
=
"注意事项:
\(
templateInfo
.
description
)
"
}
else
{
tipsLabel
.
text
=
""
}
let
noTemplate
=
templateInfo
.
materialPath
.
isEmpty
templateView
.
isHidden
=
noTemplate
templateView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
noTemplate
?
0.0
:
62.0
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
noTemplate
?
0.0
:
-
34.0
)
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
}
lazy
var
tipsLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
labelTextColor2
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
numberOfLines
=
0
label
.
text
=
"注意事项:这里是上传应该注意的事项这里是上传应该注意的事项这里是上传应该注意的事项。"
return
label
}()
...
...
@@ -27,7 +59,8 @@ class YHCertificateTemplateCell: UITableViewCell {
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
label
.
text
=
"身份证示例模版"
label
.
text
=
"示例模版"
label
.
numberOfLines
=
0
return
label
}()
...
...
@@ -49,6 +82,8 @@ class YHCertificateTemplateCell: UITableViewCell {
func
createUI
()
{
self
.
selectionStyle
=
.
none
contentView
.
addSubview
(
templateTitleLabel
)
contentView
.
addSubview
(
tipsLabel
)
contentView
.
addSubview
(
templateView
)
...
...
@@ -57,7 +92,6 @@ class YHCertificateTemplateCell: UITableViewCell {
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
height
.
equalTo
(
24.0
)
}
tipsLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateTemplateView.swift
View file @
3214f962
...
...
@@ -53,20 +53,20 @@ class YHCertificateTemplateView: UIView {
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
24
)
make
.
left
.
equalToSuperview
()
.
offset
(
64
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
64
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
12
)
}
closeBtn
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalTo
(
titleLabel
)
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
width
.
height
.
equalTo
(
24
)
}
closeBtn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
1
0
,
left
:
10
,
bottom
:
10
,
right
:
10
)
closeBtn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
1
5
,
left
:
15
,
bottom
:
15
,
right
:
15
)
line
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
height
.
equalTo
(
1
)
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
12
)
make
.
bottom
.
equalToSuperview
()
}
return
view
...
...
@@ -91,6 +91,7 @@ class YHCertificateTemplateView: UIView {
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_B
(
ofSize
:
17
)
label
.
numberOfLines
=
0
label
.
text
=
"示例模版"
return
label
}()
...
...
@@ -151,9 +152,9 @@ class YHCertificateTemplateView: UIView {
if
!
model
.
description
.
isEmpty
{
tipsLabel
.
text
=
"注意事项:
\(
model
.
description
)
"
}
templateView
.
isHidden
=
model
.
materialPath
.
isEmpty
let
topMargin
=
model
.
description
.
isEmpty
?
0
:
20
templateView
.
snp
.
updateConstraints
{
make
in
make
.
top
.
equalTo
(
tipsLabel
.
snp
.
bottom
)
.
offset
(
topMargin
)
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHFileRenameInputView.swift
View file @
3214f962
...
...
@@ -7,10 +7,10 @@
//
/*
【Usage】
let view = YHFileRenameInputView.inputView(defalutText:"adfasfsf", editBlock: {
let view = YHFileRenameInputView.inputView(defalutText:"adfasfsf")
view.editBlock = {
text in
print("\(text)")
})
}
*/
import
UIKit
...
...
@@ -18,7 +18,7 @@ import UIKit
class
YHFileRenameInputView
:
UIView
{
static
let
height
=
217.0
var
editBlock
:((
String
?)
->
()
)?
var
editBlock
:((
String
?)
->
Void
)?
lazy
var
blackMaskView
:
UIView
=
{
let
view
=
UIView
(
frame
:
UIScreen
.
main
.
bounds
)
view
.
backgroundColor
=
UIColor
(
hex
:
0x0F1214
,
alpha
:
0.5
)
...
...
@@ -66,7 +66,7 @@ class YHFileRenameInputView: UIView {
lazy
var
textField
:
UITextField
=
{
let
textField
=
UITextField
()
textField
.
backgroundColor
=
.
clear
textField
.
placeholder
=
"请输入文件名称"
textField
.
attributedPlaceholder
=
NSAttributedString
(
string
:
"请输入文件名称"
,
attributes
:
[
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
.
placeHolderColor
])
textField
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
textField
.
tintColor
=
UIColor
.
brandMainColor
textField
.
textColor
=
UIColor
.
mainTextColor
...
...
@@ -104,10 +104,9 @@ class YHFileRenameInputView: UIView {
fatalError
(
"init(coder:) has not been implemented"
)
}
static
func
inputView
(
defalutText
:
String
?
,
editBlock
:((
String
?)
->
())?
)
->
YHFileRenameInputView
{
static
func
inputView
(
defalutText
:
String
?)
->
YHFileRenameInputView
{
let
view
=
YHFileRenameInputView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
Self
.
height
))
view
.
textField
.
text
=
defalutText
view
.
editBlock
=
editBlock
return
view
}
...
...
@@ -186,10 +185,15 @@ extension YHFileRenameInputView {
}
@objc
func
didClickConfirmBtn
()
{
dismiss
()
if
isEmptyString
(
textField
.
text
)
{
YHHUD
.
flash
(
message
:
"重命名不可为空"
)
return
}
if
let
editBlock
=
editBlock
{
editBlock
(
textField
.
text
)
}
dismiss
()
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/VM/YHCertificateViewModel.swift
View file @
3214f962
...
...
@@ -137,7 +137,7 @@ class YHCertificateViewModel: YHBaseViewModel {
}
func
up
load
Certificates
(
params
:[
String
:
Any
],
isSilient
:
Bool
=
false
,
callBack
:
@escaping
((
Bool
)
->
()))
{
func
up
date
Certificates
(
params
:[
String
:
Any
],
isSilient
:
Bool
=
false
,
callBack
:
@escaping
((
Bool
)
->
()))
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Certificate
.
certificateUploadApi
...
...
pete谢兆麟
@pete
mentioned in commit
162975a9
·
Mar 20, 2024
mentioned in commit
162975a9
mentioned in commit 162975a938d1ff527b466c9b11c3f350b62818b5
Toggle commit list
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