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
add56ef7
Commit
add56ef7
authored
Oct 31, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 微信上传
parent
bdd29cfb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
1 deletion
+46
-1
YHCertificateUploadContentListVC.swift
...rtificates(我的证书)/C/YHCertificateUploadContentListVC.swift
+12
-0
YHCertificateUploadSheetView.swift
...MyCertificates(我的证书)/V/YHCertificateUploadSheetView.swift
+3
-1
YHCertificateViewModel.swift
...务中心)/MyCertificates(我的证书)/VM/YHCertificateViewModel.swift
+13
-0
YHShareManager.swift
galaxy/galaxy/Classes/Tools/Analytics/YHShareManager.swift
+18
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateUploadContentListVC.swift
View file @
add56ef7
...
...
@@ -146,6 +146,11 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
}
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
sheetView
.
uploadTypeArr
=
[
YHCertificateUploadItem
(
type
:
.
camera
,
title
:
"拍照上传"
),
YHCertificateUploadItem
(
type
:
.
photo
,
title
:
"相册上传"
),
YHCertificateUploadItem
(
type
:
.
phoneFile
,
title
:
"手机文件上传"
,
subtitle
:
"从手机文件管理中上传"
),
YHCertificateUploadItem
(
type
:
.
wechatUpload
,
title
:
"微信上传"
),
YHCertificateUploadItem
(
type
:
.
cancel
,
title
:
"取消"
)]
sheetView
.
maxSelectImageCount
=
99
-
items
.
count
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
...
...
@@ -166,6 +171,13 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
self
.
requestList
()
}
}
sheetView
.
wechatUploadBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
token
=
YHLoginManager
.
shared
.
h5Token
let
path
=
"/superApp/pages/wxUpload/wxUpload?param=
\(
token
)
&id=
\(
self
.
supplementId
)
&type=my_certificate"
YHShareManager
.
shared
.
openMiniProgram
(
path
:
path
,
title
:
"微信上传"
)
}
sheetView
.
show
()
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateUploadSheetView.swift
View file @
add56ef7
...
...
@@ -68,13 +68,14 @@ class YHCertificateUploadSheetView: UIView {
YHCertificateUploadItem
(
type
:
.
camera
,
title
:
"拍照上传"
),
YHCertificateUploadItem
(
type
:
.
photo
,
title
:
"相册上传"
),
YHCertificateUploadItem
(
type
:
.
phoneFile
,
title
:
"手机文件上传"
,
subtitle
:
"从手机文件管理中上传"
),
YHCertificateUploadItem
(
type
:
.
wechatUpload
,
title
:
"微信上传"
),
YHCertificateUploadItem
(
type
:
.
cancel
,
title
:
"取消"
)]
// 上传文件
var
uploadFilesBlock
:((
URL
)
->
())?
// 上传图片
var
uploadImageBlock
:(([
YHSelectImageItem
])
->
())?
// 微信上传
var
wechatUploadBlock
:(()
->
())?
lazy
var
blackMaskView
:
UIView
=
{
let
view
=
UIView
()
...
...
@@ -604,5 +605,6 @@ extension YHCertificateUploadSheetView {
func
selectFileFromWeChatPragram
()
{
self
.
wechatUploadBlock
?()
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/VM/YHCertificateViewModel.swift
View file @
add56ef7
...
...
@@ -219,6 +219,12 @@ extension YHCertificateViewModel {
func
showUploadSheetView
(
supplementId
:
Int
,
completion
:(()
->
())?)
{
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
sheetView
.
uploadTypeArr
=
[
YHCertificateUploadItem
(
type
:
.
camera
,
title
:
"拍照上传"
),
YHCertificateUploadItem
(
type
:
.
photo
,
title
:
"相册上传"
),
YHCertificateUploadItem
(
type
:
.
phoneFile
,
title
:
"手机文件上传"
,
subtitle
:
"从手机文件管理中上传"
),
YHCertificateUploadItem
(
type
:
.
wechatUpload
,
title
:
"微信上传"
),
YHCertificateUploadItem
(
type
:
.
cancel
,
title
:
"取消"
)]
sheetView
.
maxSelectImageCount
=
9
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
...
...
@@ -235,6 +241,13 @@ extension YHCertificateViewModel {
completion
?()
}
}
sheetView
.
wechatUploadBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
token
=
YHLoginManager
.
shared
.
h5Token
let
path
=
"/superApp/pages/wxUpload/wxUpload?param=
\(
token
)
&id=
\(
supplementId
)
&type=my_certificate"
YHShareManager
.
shared
.
openMiniProgram
(
path
:
path
,
title
:
"微信上传"
)
}
sheetView
.
show
()
}
...
...
galaxy/galaxy/Classes/Tools/Analytics/YHShareManager.swift
View file @
add56ef7
...
...
@@ -249,4 +249,22 @@ extension YHShareManager {
}
}
}
// 拉起小程序
func
openMiniProgram
(
path
:
String
,
title
:
String
)
{
let
miniProgram
=
WXLaunchMiniProgramReq
.
object
()
// 小程序原始ID,小程序信息可查看,以gh_开头
miniProgram
.
userName
=
"gh_35ddbd2e68d4"
// 小程序页面路径
miniProgram
.
path
=
path
#if DEBUG
miniProgram
.
miniProgramType
=
.
preview
#elseif TESTENV
miniProgram
.
miniProgramType
=
.
preview
#else
miniProgram
.
miniProgramType
=
.
release
#endif
WXApi
.
send
(
miniProgram
)
}
}
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