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
f349e07c
Commit
f349e07c
authored
Jun 21, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信分享小程序部分代码
parent
22724ec7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
92 additions
and
10 deletions
+92
-10
YHMyDocumentsDetailViewController.swift
...Documents(我的文书)/C/YHMyDocumentsDetailViewController.swift
+16
-1
YHMyDocumentsListViewController.swift
...MyDocuments(我的文书)/C/YHMyDocumentsListViewController.swift
+3
-0
YHDocumentToActionTableViewCell.swift
...MyDocuments(我的文书)/V/YHDocumentToActionTableViewCell.swift
+22
-1
YHMySignatureDetailViewController.swift
...Signature(我的签字)/C/YHMySignatureDetailViewController.swift
+14
-0
YHMySignatureListViewController.swift
...MySignature(我的签字)/C/YHMySignatureListViewController.swift
+2
-0
YHMyFileMethodTableViewCell.swift
...中心)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
+3
-1
YHShareManager.swift
galaxy/galaxy/Classes/Tools/Analytics/YHShareManager.swift
+10
-7
Contents.json
...ts/ServiceCenter/我的文书/my_doc_share.imageset/Contents.json
+22
-0
my_doc_share@2x.png
...viceCenter/我的文书/my_doc_share.imageset/my_doc_share@2x.png
+0
-0
my_doc_share@3x.png
...viceCenter/我的文书/my_doc_share.imageset/my_doc_share@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/C/YHMyDocumentsDetailViewController.swift
View file @
f349e07c
...
@@ -23,7 +23,9 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
...
@@ -23,7 +23,9 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
var
oldUrl
:
String
?
var
oldUrl
:
String
?
var
type
:
Int
=
0
var
type
:
Int
=
0
var
isSign
:
Bool
=
false
var
isSign
:
Bool
=
false
var
isAuth
:
Bool
=
true
//小程序分享字段
var
fileType
:
String
=
"sign"
var
orderID
:
Int
=
0
lazy
var
blackMaskView
:
UIView
=
{
lazy
var
blackMaskView
:
UIView
=
{
let
view
=
UIView
(
frame
:
UIScreen
.
main
.
bounds
)
let
view
=
UIView
(
frame
:
UIScreen
.
main
.
bounds
)
view
.
backgroundColor
=
UIColor
(
hex
:
0x0F1214
,
alpha
:
0.5
)
view
.
backgroundColor
=
UIColor
(
hex
:
0x0F1214
,
alpha
:
0.5
)
...
@@ -376,6 +378,18 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
...
@@ -376,6 +378,18 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
}
}
}
}
func
getMiniPath
()
->
String
{
var
isAuthString
=
""
if
isAuth
{
isAuthString
=
"true"
}
else
{
isAuthString
=
"false"
}
// let path = "/serviceHousekeeper/pages/documentEdit/documentEdit?id=\(self.id)&docType=\(self.fileType)&signId=\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)&auth=\(isAuthString)&order_id=\(orderID)"
let
path
=
"/serviceHousekeeper/pages/documentEdit/documentEdit?id=
\(
self
.
id
)
&docType=doc&signId=
\(
self
.
viewModel
.
mainModel
?
.
writing_document
.
doc_sign
.
id
??
0
)
&auth=
\(
isAuthString
)
&order_id=
\(
orderID
)
"
return
path
}
deinit
{
deinit
{
removeNotify
()
removeNotify
()
}
}
...
@@ -453,6 +467,7 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
...
@@ -453,6 +467,7 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHDocumentToActionTableViewCell
.
self
)
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHDocumentToActionTableViewCell
.
self
)
cell
.
dataSource
=
self
.
viewModel
.
mainModel
cell
.
dataSource
=
self
.
viewModel
.
mainModel
cell
.
isSign
=
self
.
isSign
cell
.
isSign
=
self
.
isSign
cell
.
nimiPath
=
getMiniPath
()
if
self
.
type
==
5
||
self
.
type
==
4
{
if
self
.
type
==
5
||
self
.
type
==
4
{
cell
.
isSign
=
true
cell
.
isSign
=
true
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/C/YHMyDocumentsListViewController.swift
View file @
f349e07c
...
@@ -356,6 +356,9 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
...
@@ -356,6 +356,9 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
}
else
{
}
else
{
let
vc
=
YHMyDocumentsDetailViewController
()
let
vc
=
YHMyDocumentsDetailViewController
()
vc
.
id
=
model
.
id
vc
.
id
=
model
.
id
vc
.
isAuth
=
viewModel
?
.
mainModel
?
.
user_info
.
is_auth
??
true
vc
.
fileType
=
model
.
file_type
vc
.
orderID
=
orderId
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocumentToActionTableViewCell.swift
View file @
f349e07c
...
@@ -18,10 +18,13 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
...
@@ -18,10 +18,13 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
var
bottomLeftLineView
:
UIView
!
var
bottomLeftLineView
:
UIView
!
var
bottomRightLineView
:
UIView
!
var
bottomRightLineView
:
UIView
!
var
fileImageView
:
UIImageView
!
var
fileImageView
:
UIImageView
!
var
fileNameLabel
:
UILabel
!
var
fileNameLabel
:
UILabel
!
var
shareButton
:
UIButton
!
var
editButton
:
UIButton
!
var
editButton
:
UIButton
!
var
submitButton
:
UIButton
!
var
submitButton
:
UIButton
!
var
lookButton
:
UIButton
!
var
lookButton
:
UIButton
!
var
nimiPath
:
String
=
""
var
dataSource
:
YHMyDocumentDetailModel
?
{
var
dataSource
:
YHMyDocumentDetailModel
?
{
didSet
{
didSet
{
updateAllViews
()
updateAllViews
()
...
@@ -97,6 +100,20 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
...
@@ -97,6 +100,20 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
make
.
top
.
equalTo
(
52
)
make
.
top
.
equalTo
(
52
)
}
}
shareButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setBackgroundImage
(
UIImage
(
named
:
"share_mini_program"
),
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
shareButtonClick
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
shareButton
)
shareButton
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
24
)
make
.
height
.
equalTo
(
20
)
make
.
width
.
equalTo
(
80
)
}
bottomView
=
{
bottomView
=
{
let
view
=
UIView
()
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
view
.
backgroundColor
=
UIColor
.
separatorColor
...
@@ -253,6 +270,10 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
...
@@ -253,6 +270,10 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
}
}
}
}
@objc
func
shareButtonClick
()
{
YHShareManager
.
shared
.
sendMiniProgram
(
path
:
nimiPath
)
}
func
updataButton
()
{
func
updataButton
()
{
if
isSign
{
if
isSign
{
bottomLeftLineView
.
isHidden
=
true
bottomLeftLineView
.
isHidden
=
true
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/C/YHMySignatureDetailViewController.swift
View file @
f349e07c
...
@@ -21,6 +21,8 @@ class YHMySignatureDetailViewController: YHBaseViewController {
...
@@ -21,6 +21,8 @@ class YHMySignatureDetailViewController: YHBaseViewController {
var
oldUrl
:
String
?
var
oldUrl
:
String
?
var
type
:
Int
=
0
var
type
:
Int
=
0
var
isSign
:
Bool
=
false
var
isSign
:
Bool
=
false
var
isAuth
:
Bool
=
true
//小程序分享字段
var
orderID
:
Int
=
0
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
let
tool
=
YHFilePreviewTool
(
targetVC
:
self
)
let
tool
=
YHFilePreviewTool
(
targetVC
:
self
)
return
tool
return
tool
...
@@ -332,6 +334,17 @@ class YHMySignatureDetailViewController: YHBaseViewController {
...
@@ -332,6 +334,17 @@ class YHMySignatureDetailViewController: YHBaseViewController {
}
}
}
}
func
getMiniPath
()
->
String
{
var
isAuthString
=
""
if
isAuth
{
isAuthString
=
"true"
}
else
{
isAuthString
=
"false"
}
let
path
=
"/serviceHousekeeper/pages/documentEdit/documentEdit?id=
\(
self
.
id
)
&docType=sign&signId=
\(
self
.
id
)
&auth=
\(
isAuthString
)
&order_id=
\(
orderID
)
"
return
path
}
deinit
{
deinit
{
removeNotify
()
removeNotify
()
}
}
...
@@ -353,6 +366,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
...
@@ -353,6 +366,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHSignatureToActionTableViewCell
.
self
)
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHSignatureToActionTableViewCell
.
self
)
cell
.
dataSource
=
self
.
viewModel
.
mainModel
cell
.
dataSource
=
self
.
viewModel
.
mainModel
cell
.
isSign
=
self
.
isSign
cell
.
isSign
=
self
.
isSign
cell
.
nimiPath
=
getMiniPath
()
if
self
.
type
==
5
||
self
.
type
==
4
{
if
self
.
type
==
5
||
self
.
type
==
4
{
cell
.
isSign
=
true
cell
.
isSign
=
true
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/C/YHMySignatureListViewController.swift
View file @
f349e07c
...
@@ -341,6 +341,8 @@ extension YHMySignatureListViewController: UITableViewDelegate, UITableViewDataS
...
@@ -341,6 +341,8 @@ extension YHMySignatureListViewController: UITableViewDelegate, UITableViewDataS
}
else
{
}
else
{
let
vc
=
YHMySignatureDetailViewController
()
let
vc
=
YHMySignatureDetailViewController
()
vc
.
id
=
model
.
id
vc
.
id
=
model
.
id
vc
.
isAuth
=
viewModel
.
mainModel
?
.
user_info
.
is_auth
??
true
vc
.
orderID
=
orderId
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
View file @
f349e07c
...
@@ -34,6 +34,8 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
...
@@ -34,6 +34,8 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
var
editButton
:
UIButton
!
var
editButton
:
UIButton
!
var
submitButton
:
UIButton
!
var
submitButton
:
UIButton
!
var
lookButton
:
UIButton
!
var
lookButton
:
UIButton
!
var
nimiPath
:
String
=
""
var
dataSource
:
YHMySignatureDetailModel
?
{
var
dataSource
:
YHMySignatureDetailModel
?
{
didSet
{
didSet
{
updateAllViews
()
updateAllViews
()
...
@@ -281,7 +283,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
...
@@ -281,7 +283,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
}
}
@objc
func
shareButtonClick
()
{
@objc
func
shareButtonClick
()
{
YHShareManager
.
shared
.
sendMiniProgram
()
YHShareManager
.
shared
.
sendMiniProgram
(
path
:
nimiPath
)
}
}
func
updataButton
()
{
func
updataButton
()
{
...
...
galaxy/galaxy/Classes/Tools/Analytics/YHShareManager.swift
View file @
f349e07c
...
@@ -202,23 +202,26 @@ extension YHShareManager {
...
@@ -202,23 +202,26 @@ extension YHShareManager {
}
}
}
}
func
sendMiniProgram
()
{
func
sendMiniProgram
(
path
:
String
)
{
guard
WXApi
.
isWXAppInstalled
()
else
{
guard
WXApi
.
isWXAppInstalled
()
else
{
YHHUD
.
flash
(
message
:
"拉起微信失败"
)
YHHUD
.
flash
(
message
:
"拉起微信失败"
)
return
return
}
}
let
iamge
=
UIImage
(
named
:
"my_doc_share"
)
??
UIImage
()
let
message
=
WXMediaMessage
()
let
message
=
WXMediaMessage
()
//发送的小程序
//发送的小程序
let
object
=
WXMiniProgramObject
()
let
object
=
WXMiniProgramObject
()
object
.
path
=
""
object
.
path
=
path
object
.
webpageUrl
=
""
object
.
webpageUrl
=
""
object
.
userName
=
"gh_35ddbd2e68d4"
object
.
userName
=
"gh_35ddbd2e68d4"
object
.
miniProgramType
=
.
preview
message
.
mediaObject
=
object
message
.
mediaObject
=
object
message
.
title
=
"智汇银河"
message
.
title
=
"有文书分享转发给您,需要您帮忙签署,快来看看吧~"
message
.
description
=
"小程序"
message
.
description
=
"有文书分享转发给您,需要您帮忙签署,快来看看吧~"
message
.
thumbData
=
nil
// message.thumbData = nil
message
.
setThumbImage
(
iamge
)
let
req
=
SendMessageToWXReq
()
let
req
=
SendMessageToWXReq
()
req
.
bText
=
false
req
.
bText
=
false
req
.
message
=
message
req
.
message
=
message
...
...
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/我的文书/my_doc_share.imageset/Contents.json
0 → 100644
View file @
f349e07c
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"my_doc_share@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"my_doc_share@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/我的文书/my_doc_share.imageset/my_doc_share@2x.png
0 → 100644
View file @
f349e07c
479 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/我的文书/my_doc_share.imageset/my_doc_share@3x.png
0 → 100644
View file @
f349e07c
479 KB
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