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
bb6aab00
Commit
bb6aab00
authored
Mar 25, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的证件
parent
1ba0478b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
9 deletions
+14
-9
YHCertificateListVC.swift
...ce(服务中心)/MyCertificates(我的证书)/C/YHCertificateListVC.swift
+2
-2
YHCertificateSearchViewController.swift
...tificates(我的证书)/C/YHCertificateSearchViewController.swift
+2
-2
YHCertificateUploadContentListVC.swift
...rtificates(我的证书)/C/YHCertificateUploadContentListVC.swift
+2
-2
YHFilePreviewTool.swift
...ice(服务中心)/MyCertificates(我的证书)/VM/YHFilePreviewTool.swift
+8
-3
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateListVC.swift
View file @
bb6aab00
...
@@ -115,7 +115,7 @@ extension YHCertificateListVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -115,7 +115,7 @@ extension YHCertificateListVC: UITableViewDelegate, UITableViewDataSource {
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
let
url
=
path
?
.
url
,
!
url
.
isEmpty
{
if
let
url
=
path
?
.
url
,
!
url
.
isEmpty
{
print
(
url
)
print
(
url
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
url
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
url
,
fileName
:
"预览"
)
}
}
}
}
view
.
show
()
view
.
show
()
...
@@ -318,7 +318,7 @@ extension YHCertificateListVC {
...
@@ -318,7 +318,7 @@ extension YHCertificateListVC {
if
let
url
=
path
?
.
url
,
!
url
.
isEmpty
{
if
let
url
=
path
?
.
url
,
!
url
.
isEmpty
{
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
print
(
url
)
print
(
url
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
url
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
url
,
fileName
:
"预览"
)
}
}
}
}
sheetView
.
uploadFilesBlock
=
{
sheetView
.
uploadFilesBlock
=
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateSearchViewController.swift
View file @
bb6aab00
...
@@ -153,7 +153,7 @@ extension YHCertificateSearchViewController: UITableViewDelegate, UITableViewDat
...
@@ -153,7 +153,7 @@ extension YHCertificateSearchViewController: UITableViewDelegate, UITableViewDat
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
let
url
=
path
?
.
url
,
!
url
.
isEmpty
{
if
let
url
=
path
?
.
url
,
!
url
.
isEmpty
{
print
(
url
)
print
(
url
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
url
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
url
,
fileName
:
"预览"
)
}
}
}
}
view
.
show
()
view
.
show
()
...
@@ -328,7 +328,7 @@ extension YHCertificateSearchViewController {
...
@@ -328,7 +328,7 @@ extension YHCertificateSearchViewController {
if
let
url
=
path
?
.
url
,
!
url
.
isEmpty
{
if
let
url
=
path
?
.
url
,
!
url
.
isEmpty
{
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
print
(
url
)
print
(
url
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
url
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
url
,
fileName
:
"预览"
)
}
}
}
}
sheetView
.
uploadFilesBlock
=
{
sheetView
.
uploadFilesBlock
=
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateUploadContentListVC.swift
View file @
bb6aab00
...
@@ -240,7 +240,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
...
@@ -240,7 +240,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
print
(
contentItem
.
url
)
print
(
contentItem
.
url
)
self
.
viewModel
.
getPublicImageUrl
(
contentItem
.
url
)
{
success
,
error
in
self
.
viewModel
.
getPublicImageUrl
(
contentItem
.
url
)
{
success
,
error
in
if
let
success
=
success
{
if
let
success
=
success
{
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
success
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
success
,
fileName
:
contentItem
.
name
)
}
}
}
}
}
}
...
@@ -412,7 +412,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
...
@@ -412,7 +412,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
let
path
=
templateArr
[
indexPath
.
row
]
let
path
=
templateArr
[
indexPath
.
row
]
print
(
path
.
url
)
print
(
path
.
url
)
if
!
path
.
url
.
isEmpty
{
if
!
path
.
url
.
isEmpty
{
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
path
.
url
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
path
.
url
,
fileName
:
"预览"
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/VM/YHFilePreviewTool.swift
View file @
bb6aab00
...
@@ -16,7 +16,7 @@ class YHFilePreviewTool: NSObject {
...
@@ -16,7 +16,7 @@ class YHFilePreviewTool: NSObject {
self
.
targetVC
=
targetVC
self
.
targetVC
=
targetVC
}
}
func
openXLSXRemoteFile
(
urlString
:
String
)
{
func
openXLSXRemoteFile
(
urlString
:
String
,
fileName
:
String
?
)
{
guard
let
url
=
URL
(
string
:
urlString
)
else
{
return
}
guard
let
url
=
URL
(
string
:
urlString
)
else
{
return
}
let
configuration
=
URLSessionConfiguration
.
default
let
configuration
=
URLSessionConfiguration
.
default
...
@@ -36,7 +36,7 @@ class YHFilePreviewTool: NSObject {
...
@@ -36,7 +36,7 @@ class YHFilePreviewTool: NSObject {
try
?
fileManager
.
moveItem
(
at
:
tempLocalUrl
,
to
:
destination
)
try
?
fileManager
.
moveItem
(
at
:
tempLocalUrl
,
to
:
destination
)
// 打开文件
// 打开文件
self
.
openXLSXFile
(
at
:
destination
)
self
.
openXLSXFile
(
at
:
destination
,
fileName
:
fileName
)
}
else
{
}
else
{
print
(
"Error downloading the file:
\(
error
?
.
localizedDescription
??
"Unknown error"
)
"
)
print
(
"Error downloading the file:
\(
error
?
.
localizedDescription
??
"Unknown error"
)
"
)
...
@@ -49,8 +49,13 @@ class YHFilePreviewTool: NSObject {
...
@@ -49,8 +49,13 @@ class YHFilePreviewTool: NSObject {
task
.
resume
()
task
.
resume
()
}
}
func
openXLSXFile
(
at
fileURL
:
URL
)
{
func
openXLSXFile
(
at
fileURL
:
URL
,
fileName
:
String
?)
{
let
controller
=
UIDocumentInteractionController
(
url
:
fileURL
)
let
controller
=
UIDocumentInteractionController
(
url
:
fileURL
)
// 设置标题显示
if
let
fileName
=
fileName
,
!
fileName
.
isEmpty
{
controller
.
name
=
fileName
}
controller
.
delegate
=
self
controller
.
delegate
=
self
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
controller
.
presentPreview
(
animated
:
true
)
controller
.
presentPreview
(
animated
:
true
)
...
...
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