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
8a801aa1
Commit
8a801aa1
authored
Mar 21, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的证件
parent
fe30bb3c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
27 deletions
+85
-27
YHCertificateResourceUploadVC.swift
...yCertificates(我的证书)/C/YHCertificateResourceUploadVC.swift
+2
-2
YHUploadContentVC.swift
...vice(服务中心)/MyCertificates(我的证书)/C/YHUploadContentVC.swift
+71
-16
YHCertificateModel.swift
...ice(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
+1
-1
YHCertificateNameCell.swift
...(服务中心)/MyCertificates(我的证书)/V/YHCertificateNameCell.swift
+5
-4
YHCertificateTemplateSheetView.swift
...Certificates(我的证书)/V/YHCertificateTemplateSheetView.swift
+3
-3
YHCertificateUploadSheetView.swift
...MyCertificates(我的证书)/V/YHCertificateUploadSheetView.swift
+3
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateResourceUploadVC.swift
View file @
8a801aa1
...
...
@@ -127,10 +127,10 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
let
item
=
items
[
indexPath
.
section
]
//
if item.checkStatus == YHCertificateUploadStatus.preUpload { // 待上传
if
item
.
checkStatus
==
YHCertificateUploadStatus
.
preUpload
{
// 待上传
showUploadSheetView
(
item
.
templateInfo
)
return
//
}
}
// 非待上传的进入详情
let
vc
=
YHUploadContentVC
()
vc
.
orderId
=
orderId
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHUploadContentVC.swift
View file @
8a801aa1
...
...
@@ -13,8 +13,22 @@ class YHUploadContentVC: YHBaseViewController {
var
orderId
:
Int
!
var
categoryInfo
:
YHCategoryData
!
var
uploadInfo
:
YHSupplementInfo
!
var
uploadInfo
:
YHSupplementInfo
!
{
didSet
{
templateArr
.
removeAll
()
if
let
uploadInfo
=
uploadInfo
{
if
uploadInfo
.
templateInfo
.
materialPath
.
count
>
0
{
templateArr
.
append
(
uploadInfo
.
templateInfo
.
materialPath
[
0
])
}
if
uploadInfo
.
templateInfo
.
guideFilePath
.
count
>
0
{
templateArr
.
append
(
uploadInfo
.
templateInfo
.
guideFilePath
[
0
])
}
}
self
.
tableView
.
reloadData
()
}
}
var
viewModel
:
YHCertificateViewModel
=
YHCertificateViewModel
()
var
templateArr
:[
YHMaterialPath
]
=
[]
var
items
:[
YHContentUrl
]
=
[]
var
selectEditItem
:
YHContentUrl
?
...
...
@@ -94,6 +108,7 @@ class YHUploadContentVC: YHBaseViewController {
@objc
func
didClickUploadBtn
()
{
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
sheetView
.
templateInfo
=
uploadInfo
.
templateInfo
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -154,7 +169,7 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
section
==
0
{
return
1
return
templateArr
.
count
}
return
items
.
count
}
...
...
@@ -164,12 +179,14 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
if
indexPath
.
section
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHCertificateTemplateCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificateTemplateCell
// cell.templateInfo = uploadInfo.templateInfo
cell
.
templateClick
=
{
[
weak
self
]
path
in
guard
let
self
=
self
else
{
return
}
// 查看模版 uploadInfo.templateInfo
cell
.
update
(
bottomMargin
:
20
)
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
templateArr
.
count
{
cell
.
templatePath
=
templateArr
[
indexPath
.
row
]
cell
.
templateClick
=
{
[
weak
self
]
path
in
guard
let
self
=
self
else
{
return
}
// 查看模版 uploadInfo.templateInfo
}
}
return
cell
}
...
...
@@ -221,18 +238,19 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
0
{
if
uploadInfo
.
templateInfo
.
isNeedShowTemplate
()
{
return
UITableView
.
automaticDimension
}
return
0.0
return
82.0
}
return
55.0
return
UITableView
.
automaticDimension
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
if
section
==
0
{
return
1.0
if
uploadInfo
.
templateInfo
.
isNeedShowTemplate
()
{
return
UITableView
.
automaticDimension
}
return
0.0
}
return
UITableView
.
automaticDimension
}
...
...
@@ -240,10 +258,46 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
if
section
==
0
{
return
view
if
section
==
0
{
// 证件示例模版
if
!
uploadInfo
.
templateInfo
.
isNeedShowTemplate
()
{
return
view
}
let
titlelabel
=
UILabel
()
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textAlignment
=
.
left
titlelabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
titlelabel
.
text
=
"
\(
uploadInfo
.
name
)
示例模版"
titlelabel
.
numberOfLines
=
0
view
.
addSubview
(
titlelabel
)
titlelabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
}
let
tipsLabel
=
UILabel
()
tipsLabel
.
textColor
=
UIColor
.
mainTextColor
tipsLabel
.
textAlignment
=
.
left
tipsLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
tipsLabel
.
numberOfLines
=
0
if
!
uploadInfo
.
templateInfo
.
description
.
isEmpty
{
tipsLabel
.
text
=
"注意事项:
\(
uploadInfo
.
templateInfo
.
description
)
"
}
view
.
addSubview
(
tipsLabel
)
tipsLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
titlelabel
.
snp
.
bottom
)
.
offset
(
5
)
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
20
)
}
return
view
}
// 证件标题和状态
let
titlelabel
=
UILabel
()
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textAlignment
=
.
left
...
...
@@ -256,6 +310,7 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
statusLabel
.
textAlignment
=
.
center
statusLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
10
)
statusLabel
.
layer
.
cornerRadius
=
3.0
statusLabel
.
clipsToBounds
=
true
view
.
addSubview
(
statusLabel
)
var
text
=
""
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
View file @
8a801aa1
...
...
@@ -184,7 +184,7 @@ class YHTemplateInfo: SmartCodable {
var
guideFilePath
:
[
YHMaterialPath
]
=
[]
func
isNeedShowTemplate
()
->
Bool
{
if
self
.
description
.
isEmpty
&&
self
.
materialPath
.
isEmpty
{
if
self
.
description
.
isEmpty
&&
self
.
materialPath
.
isEmpty
&&
self
.
guideFilePath
.
isEmpty
{
return
false
}
return
true
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateNameCell.swift
View file @
8a801aa1
...
...
@@ -89,6 +89,7 @@ class YHCertificateNameCell: UITableViewCell {
nameLabel
=
UILabel
()
nameLabel
.
textColor
=
UIColor
.
mainTextColor
nameLabel
.
textAlignment
=
.
left
nameLabel
.
numberOfLines
=
0
nameLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
nameLabel
.
text
=
"文档名称.doc"
whiteView
.
addSubview
(
nameLabel
)
...
...
@@ -109,8 +110,8 @@ class YHCertificateNameCell: UITableViewCell {
whiteView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
height
.
equalTo
(
55
)
make
.
top
.
equalToSuperview
()
.
offset
(
15
)
make
.
bottom
.
equalToSuperview
()
}
iconImgV
.
snp
.
makeConstraints
{
make
in
...
...
@@ -121,14 +122,14 @@ class YHCertificateNameCell: UITableViewCell {
nameLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
iconImgV
.
snp
.
right
)
.
offset
(
18
)
make
.
height
.
equalTo
(
20
)
make
.
bottom
.
equalTo
(
whiteView
.
snp
.
centerY
)
.
offset
(
-
1
)
make
.
top
.
equalToSuperview
()
.
offset
(
7
)
make
.
right
.
equalTo
(
editBtn
.
snp
.
left
)
}
timeLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
nameLabel
)
make
.
top
.
equalTo
(
whiteView
.
snp
.
centerY
)
.
offset
(
1
)
make
.
top
.
equalTo
(
nameLabel
.
snp
.
bottom
)
.
offset
(
2
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
7
)
make
.
height
.
equalTo
(
20
)
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateTemplateSheetView.swift
View file @
8a801aa1
...
...
@@ -229,7 +229,7 @@ extension YHCertificateTemplateSheetView: UITableViewDelegate, UITableViewDataSo
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHCertificateTemplateCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificateTemplateCell
cell
.
update
(
bottomMargin
:
20
)
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
templateArr
.
count
{
cell
.
templatePath
=
templateArr
[
indexPath
.
row
]
cell
.
templateClick
=
{
...
...
@@ -240,7 +240,7 @@ extension YHCertificateTemplateSheetView: UITableViewDelegate, UITableViewDataSo
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
6
2.0
return
8
2.0
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
...
...
@@ -253,7 +253,7 @@ extension YHCertificateTemplateSheetView: UITableViewDelegate, UITableViewDataSo
private
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
CGFloat
{
return
20
.0
return
1
.0
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateUploadSheetView.swift
View file @
8a801aa1
...
...
@@ -247,7 +247,9 @@ extension YHCertificateUploadSheetView: UITableViewDelegate, UITableViewDataSour
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHCertificateUploadTypeCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificateUploadTypeCell
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
uploadTypeArr
.
count
{
cell
.
item
=
uploadTypeArr
[
indexPath
.
row
]
}
return
cell
}
...
...
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