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
f5d86fdf
Commit
f5d86fdf
authored
Apr 10, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签字逻辑添加
parent
1b118b8a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
1 deletion
+56
-1
YHMyDocumentsDetailViewController.swift
...Documents(我的文书)/C/YHMyDocumentsDetailViewController.swift
+8
-0
YHMyDocumentsDetailViewModel.swift
...uments(我的文书)/ViewModel/YHMyDocumentsDetailViewModel.swift
+19
-0
YHMySignatureDetailViewController.swift
...Signature(我的签字)/C/YHMySignatureDetailViewController.swift
+8
-0
YHMySignatureDetailViewModel.swift
...)/MySignature(我的签字)/VM/YHMySignatureDetailViewModel.swift
+19
-0
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+2
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/C/YHMyDocumentsDetailViewController.swift
View file @
f5d86fdf
...
...
@@ -56,6 +56,10 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
viewModel
.
requestSignBack
(
"
\(
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
id
??
0
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
getData
()
}
...
...
@@ -749,6 +753,10 @@ extension YHMyDocumentsDetailViewController: SFSafariViewControllerDelegate {
// MARK: 点击左上角的完成
func
safariViewControllerDidFinish
(
_
controller
:
SFSafariViewController
)
{
controller
.
navigationController
?
.
popViewController
()
viewModel
.
requestSignBack
(
"
\(
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
id
??
0
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
}
// MARK: 加载完成
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/ViewModel/YHMyDocumentsDetailViewModel.swift
View file @
f5d86fdf
...
...
@@ -297,6 +297,25 @@ class YHMyDocumentsDetailViewModel: YHBaseViewModel {
callBackBlock
(
false
,
err
)
}
}
func
requestSignBack
(
_
id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
// let params: [String : Any] = ["order_id": orderId]
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
signCallBack
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
let
dic
=
json
.
data
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
private
extension
YHMyDocumentsDetailViewModel
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/C/YHMySignatureDetailViewController.swift
View file @
f5d86fdf
...
...
@@ -53,6 +53,10 @@ class YHMySignatureDetailViewController: YHBaseViewController {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
viewModel
.
requestSignBack
(
"
\(
id
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
getData
()
}
...
...
@@ -643,6 +647,10 @@ extension YHMySignatureDetailViewController: SFSafariViewControllerDelegate {
// MARK: 点击左上角的完成
func
safariViewControllerDidFinish
(
_
controller
:
SFSafariViewController
)
{
controller
.
navigationController
?
.
popViewController
()
viewModel
.
requestSignBack
(
"
\(
id
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
}
// MARK: 加载完成
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/VM/YHMySignatureDetailViewModel.swift
View file @
f5d86fdf
...
...
@@ -210,4 +210,23 @@ class YHMySignatureDetailViewModel: YHBaseViewModel {
callBackBlock
(
false
,
err
)
}
}
func
requestSignBack
(
_
id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
// let params: [String : Any] = ["order_id": orderId]
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
signCallBack
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
let
dic
=
json
.
data
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
f5d86fdf
...
...
@@ -199,7 +199,8 @@ class YHAllApiName {
static
let
confirm
=
"infoflow/my-sign/confirm"
// 查看合同
static
let
look
=
"infoflow/sign/view-detail"
// 查看签署状态
static
let
signCallBack
=
"infoflow/sign/sign-callback"
}
//我的文书
...
...
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