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
29c6cda5
Commit
29c6cda5
authored
Mar 26, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的证书
parent
7b50b714
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
28 deletions
+44
-28
YHCertificateListVC.swift
...ce(服务中心)/MyCertificates(我的证书)/C/YHCertificateListVC.swift
+1
-0
YHCertificateSearchViewController.swift
...tificates(我的证书)/C/YHCertificateSearchViewController.swift
+1
-0
YHCertificateUploadContentListVC.swift
...rtificates(我的证书)/C/YHCertificateUploadContentListVC.swift
+1
-1
YHCertificateUploadSheetView.swift
...MyCertificates(我的证书)/V/YHCertificateUploadSheetView.swift
+41
-27
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateListVC.swift
View file @
29c6cda5
...
@@ -315,6 +315,7 @@ extension YHCertificateListVC {
...
@@ -315,6 +315,7 @@ extension YHCertificateListVC {
func
showUploadSheetView
(
_
supplementInfo
:
YHSupplementInfo
)
{
func
showUploadSheetView
(
_
supplementInfo
:
YHSupplementInfo
)
{
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
sheetView
.
maxSelectCount
=
9
sheetView
.
templateInfo
=
supplementInfo
.
templateInfo
sheetView
.
templateInfo
=
supplementInfo
.
templateInfo
sheetView
.
clickTemplateBlock
=
{
sheetView
.
clickTemplateBlock
=
{
[
weak
self
]
path
in
[
weak
self
]
path
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateSearchViewController.swift
View file @
29c6cda5
...
@@ -329,6 +329,7 @@ extension YHCertificateSearchViewController {
...
@@ -329,6 +329,7 @@ extension YHCertificateSearchViewController {
func
showUploadSheetView
(
_
supplementInfo
:
YHSupplementInfo
)
{
func
showUploadSheetView
(
_
supplementInfo
:
YHSupplementInfo
)
{
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
sheetView
.
maxSelectCount
=
9
sheetView
.
templateInfo
=
supplementInfo
.
templateInfo
sheetView
.
templateInfo
=
supplementInfo
.
templateInfo
sheetView
.
clickTemplateBlock
=
{
sheetView
.
clickTemplateBlock
=
{
[
weak
self
]
path
in
[
weak
self
]
path
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateUploadContentListVC.swift
View file @
29c6cda5
...
@@ -138,6 +138,7 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
...
@@ -138,6 +138,7 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
}
}
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
sheetView
.
maxSelectCount
=
99
-
items
.
count
sheetView
.
templateInfo
=
supplementInfo
.
templateInfo
sheetView
.
templateInfo
=
supplementInfo
.
templateInfo
sheetView
.
uploadFilesBlock
=
{
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
[
weak
self
]
fileUrl
in
...
@@ -145,7 +146,6 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
...
@@ -145,7 +146,6 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
print
(
fileUrl
)
print
(
fileUrl
)
uploadFile
(
fileUrl
)
uploadFile
(
fileUrl
)
}
}
sheetView
.
uploadImageBlock
=
{
sheetView
.
uploadImageBlock
=
{
[
weak
self
]
imgArr
in
[
weak
self
]
imgArr
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateUploadSheetView.swift
View file @
29c6cda5
...
@@ -42,34 +42,19 @@ enum YHCertificateUploadType: Int {
...
@@ -42,34 +42,19 @@ enum YHCertificateUploadType: Int {
class
YHCertificateUploadSheetView
:
UIView
{
class
YHCertificateUploadSheetView
:
UIView
{
static
func
sheetView
()
->
YHCertificateUploadSheetView
{
private
var
_maxSelectCount
:
Int
=
9
let
view
=
YHCertificateUploadSheetView
(
frame
:
UIScreen
.
main
.
bounds
)
var
maxSelectCount
=
9
{
return
view
didSet
{
}
if
maxSelectCount
>=
9
{
_maxSelectCount
=
9
func
calculateHeight
()
->
CGFloat
{
}
else
if
0
<
maxSelectCount
&&
maxSelectCount
<
9
{
guard
let
templateInfo
=
templateInfo
else
{
return
0.0
}
_maxSelectCount
=
maxSelectCount
}
else
{
// 注意事项文字高度
_maxSelectCount
=
0
var
descHeight
=
templateInfo
.
description
.
boundingRect
(
with
:
CGSize
(
width
:
KScreenWidth
-
40.0
,
height
:
.
greatestFiniteMagnitude
),
}
options
:
.
usesLineFragmentOrigin
,
attributes
:
[
.
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
)],
context
:
nil
)
.
size
.
height
descHeight
=
ceil
(
descHeight
)
+
20
// 所有模版高度之和
let
templatesHeight
=
82.0
*
Double
(
templateArr
.
count
)
// 底部四个操作行高度之和
let
actionsHeight
=
52.0
*
4.0
let
tableViewHeight
=
descHeight
+
templatesHeight
+
actionsHeight
// 白色View总高度
var
totalHeight
=
53.0
+
20.0
+
tableViewHeight
+
k_Height_safeAreaInsetsBottom
()
if
totalHeight
>
KScreenHeight
{
totalHeight
=
458
}
}
return
totalHeight
}
}
var
templateInfo
:
YHTemplateInfo
?
{
var
templateInfo
:
YHTemplateInfo
?
{
didSet
{
didSet
{
templateArr
.
removeAll
()
templateArr
.
removeAll
()
...
@@ -222,6 +207,12 @@ class YHCertificateUploadSheetView: UIView {
...
@@ -222,6 +207,12 @@ class YHCertificateUploadSheetView: UIView {
createUI
()
createUI
()
}
}
static
func
sheetView
()
->
YHCertificateUploadSheetView
{
let
view
=
YHCertificateUploadSheetView
(
frame
:
UIScreen
.
main
.
bounds
)
return
view
}
func
createUI
()
{
func
createUI
()
{
self
.
addSubview
(
blackMaskView
)
self
.
addSubview
(
blackMaskView
)
...
@@ -254,6 +245,29 @@ class YHCertificateUploadSheetView: UIView {
...
@@ -254,6 +245,29 @@ class YHCertificateUploadSheetView: UIView {
}
}
}
}
func
calculateHeight
()
->
CGFloat
{
guard
let
templateInfo
=
templateInfo
else
{
return
0.0
}
// 注意事项文字高度
var
descHeight
=
templateInfo
.
description
.
boundingRect
(
with
:
CGSize
(
width
:
KScreenWidth
-
40.0
,
height
:
.
greatestFiniteMagnitude
),
options
:
.
usesLineFragmentOrigin
,
attributes
:
[
.
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
)],
context
:
nil
)
.
size
.
height
descHeight
=
ceil
(
descHeight
)
+
20
// 所有模版高度之和
let
templatesHeight
=
82.0
*
Double
(
templateArr
.
count
)
// 底部四个操作行高度之和
let
actionsHeight
=
52.0
*
4.0
let
tableViewHeight
=
descHeight
+
templatesHeight
+
actionsHeight
// 白色View总高度
var
totalHeight
=
53.0
+
20.0
+
tableViewHeight
+
k_Height_safeAreaInsetsBottom
()
if
totalHeight
>
KScreenHeight
{
totalHeight
=
458
}
return
totalHeight
}
}
}
extension
YHCertificateUploadSheetView
{
extension
YHCertificateUploadSheetView
{
...
@@ -454,7 +468,7 @@ extension YHCertificateUploadSheetView: (UIImagePickerControllerDelegate & UINav
...
@@ -454,7 +468,7 @@ extension YHCertificateUploadSheetView: (UIImagePickerControllerDelegate & UINav
var
configuration
=
PHPickerConfiguration
()
var
configuration
=
PHPickerConfiguration
()
// 设置最大选择数量
// 设置最大选择数量
configuration
.
selectionLimit
=
9
configuration
.
selectionLimit
=
_maxSelectCount
// 设置选择器的过滤条件 只显示图片
// 设置选择器的过滤条件 只显示图片
configuration
.
filter
=
.
images
configuration
.
filter
=
.
images
let
picker
=
PHPickerViewController
(
configuration
:
configuration
)
let
picker
=
PHPickerViewController
(
configuration
:
configuration
)
...
...
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