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
33879c41
Commit
33879c41
authored
Oct 18, 2024
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化续签文书刷新接口逻辑,避免在上传时更新接口,但是也不影响先前跳转
parent
42661bed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
19 deletions
+8
-19
YHResignDocumentDetailViewController.swift
...ment(续签文书管理)/C/YHResignDocumentDetailViewController.swift
+8
-19
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/C/YHResignDocumentDetailViewController.swift
View file @
33879c41
...
@@ -43,10 +43,10 @@ class YHResignDocumentDetailViewController: YHBaseViewController {
...
@@ -43,10 +43,10 @@ class YHResignDocumentDetailViewController: YHBaseViewController {
private
let
docId
:
Int
private
let
docId
:
Int
private
var
name
:
String
private
var
name
:
String
private
let
uploadMaxCount
=
10
private
let
uploadMaxCount
=
10
// 进签字QMAS、信息确认等再出来就要刷新接口,而上传文件预览文件就不能刷新接口,
private
var
isEditUploadFiles
:
Bool
=
false
// 跟踪编辑状态 上传 预览 删除等
// 因此增加这个字段判断,后续如果有跳其他页面且退回该页面需要设置为true
private
var
is
EditUploadFilesDidDisappear
:
Bool
=
false
// 跟踪编辑状态 上传 预览 删除等时是否页面消失
private
var
is
NeedUpdateData
:
Bool
=
true
init
(
_
docId
:
Int
,
_
name
:
String
=
""
)
{
init
(
_
docId
:
Int
,
_
name
:
String
=
""
)
{
self
.
docId
=
docId
self
.
docId
=
docId
self
.
name
=
name
self
.
name
=
name
...
@@ -123,29 +123,18 @@ class YHResignDocumentDetailViewController: YHBaseViewController {
...
@@ -123,29 +123,18 @@ class YHResignDocumentDetailViewController: YHBaseViewController {
super
.
viewDidLoad
()
super
.
viewDidLoad
()
setupUI
()
setupUI
()
addKeyBoardNotify
()
addKeyBoardNotify
()
tableView
.
reloadData
()
}
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
super
.
viewWillAppear
(
animated
)
let
needLoading
=
isNeedShowLoading
let
needLoading
=
isNeedShowLoading
isNeedShowLoading
=
false
isNeedShowLoading
=
false
if
isEditUploadFilesDidDisappear
{
if
isNeedUpdateData
{
isEditUploadFiles
=
false
isNeedUpdateData
=
false
isEditUploadFilesDidDisappear
=
false
}
else
{
isEditUploadFiles
=
false
requestData
(
isNeedLoading
:
needLoading
)
requestData
(
isNeedLoading
:
needLoading
)
}
}
}
}
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
super
.
viewWillDisappear
(
animated
)
if
isEditUploadFiles
{
isEditUploadFilesDidDisappear
=
true
}
}
deinit
{
deinit
{
removeNotify
()
removeNotify
()
}
}
...
@@ -312,7 +301,6 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView
...
@@ -312,7 +301,6 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView
cell
.
setupCellInfo
(
title
,
cellType
:
cellType
)
cell
.
setupCellInfo
(
title
,
cellType
:
cellType
)
cell
.
editButtonClickEvent
=
{
[
weak
self
]
in
cell
.
editButtonClickEvent
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
isEditUploadFiles
=
true
let
items
:
[
YHCertificateEditItem
]
=
editTypes
.
map
{
let
items
:
[
YHCertificateEditItem
]
=
editTypes
.
map
{
YHCertificateEditItem
(
type
:
$0
,
title
:
$0
.
editName
())
YHCertificateEditItem
(
type
:
$0
,
title
:
$0
.
editName
())
}
}
...
@@ -355,7 +343,6 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView
...
@@ -355,7 +343,6 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView
guard
let
detailModel
=
self
.
detailModel
else
{
guard
let
detailModel
=
self
.
detailModel
else
{
return
return
}
}
self
.
isEditUploadFiles
=
true
let
count
=
detailModel
.
signedDocument
.
count
let
count
=
detailModel
.
signedDocument
.
count
if
count
>=
10
{
if
count
>=
10
{
YHHUD
.
flash
(
message
:
"最多上传10个图片或文件"
)
YHHUD
.
flash
(
message
:
"最多上传10个图片或文件"
)
...
@@ -477,6 +464,7 @@ extension YHResignDocumentDetailViewController {
...
@@ -477,6 +464,7 @@ extension YHResignDocumentDetailViewController {
return
return
}
}
self
.
isNeedShowLoading
=
true
self
.
isNeedShowLoading
=
true
self
.
isNeedUpdateData
=
true
let
url
=
signatureModel
.
url
let
url
=
signatureModel
.
url
// 跳签字
// 跳签字
let
vc
=
YHSignatureWebViewController
()
let
vc
=
YHSignatureWebViewController
()
...
@@ -526,6 +514,7 @@ extension YHResignDocumentDetailViewController {
...
@@ -526,6 +514,7 @@ extension YHResignDocumentDetailViewController {
printLog
(
"跳转QMAS"
)
printLog
(
"跳转QMAS"
)
if
let
param
=
YHLoginManager
.
shared
.
userModel
?
.
token
,
param
.
count
>
5
{
if
let
param
=
YHLoginManager
.
shared
.
userModel
?
.
token
,
param
.
count
>
5
{
self
.
isNeedUpdateData
=
true
printLog
(
param
)
printLog
(
param
)
var
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge.html#/guide/qmas"
var
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge.html#/guide/qmas"
//https://test-hkdiy-h5.galaxy-immi.com/superAppBridge.html#/guide/qmas?token=xx&doc_id=xx
//https://test-hkdiy-h5.galaxy-immi.com/superAppBridge.html#/guide/qmas?token=xx&doc_id=xx
...
...
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