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
2f8f0c49
Commit
2f8f0c49
authored
Jul 25, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
与H5 交互的 webView
parent
1f3b3045
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
170 additions
and
56 deletions
+170
-56
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+16
-4
YHStatusAdvantageVC.swift
...laxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
+4
-2
YHLifeViewController.swift
...es/Modules/Home(首页)/Life(生活)/C/YHLifeViewController.swift
+7
-3
YHEvaluationView.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHEvaluationView.swift
+5
-2
YHServiceCenterMainViewController.swift
...ntService(服务中心)/C/YHServiceCenterMainViewController.swift
+4
-5
YHH5WebViewVC.swift
.../Classes/Modules/InteractionH5(与H5交互)/YHH5WebViewVC.swift
+87
-40
YHJsApi.swift
...galaxy/Classes/Modules/InteractionH5(与H5交互)/YHJsApi.swift
+47
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
2f8f0c49
...
@@ -504,7 +504,7 @@
...
@@ -504,7 +504,7 @@
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
;
};
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
;
};
A592FE972BA6DB340062FACA
/* YHCertificateViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
;
};
A592FE972BA6DB340062FACA
/* YHCertificateViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
;
};
A59B43C72C48F68200B28379
/* YHEvaluationView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43C62C48F68200B28379
/* YHEvaluationView.swift */
;
};
A59B43C72C48F68200B28379
/* YHEvaluationView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43C62C48F68200B28379
/* YHEvaluationView.swift */
;
};
A59B43C92C491FB100B28379
/* YH
EvaluationViewVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43C82C491FB100B28379
/* YHEvaluation
ViewVC.swift */
;
};
A59B43C92C491FB100B28379
/* YH
H5WebViewVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43C82C491FB100B28379
/* YHH5Web
ViewVC.swift */
;
};
A59B43CB2C4A151200B28379
/* YHStatusAdvantageVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43CA2C4A151200B28379
/* YHStatusAdvantageVC.swift */
;
};
A59B43CB2C4A151200B28379
/* YHStatusAdvantageVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43CA2C4A151200B28379
/* YHStatusAdvantageVC.swift */
;
};
A59B43CD2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43CC2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift */
;
};
A59B43CD2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43CC2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift */
;
};
A59B43CF2C4B5AD100B28379
/* YHShareViewOnTablebarView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43CE2C4B5AD100B28379
/* YHShareViewOnTablebarView.swift */
;
};
A59B43CF2C4B5AD100B28379
/* YHShareViewOnTablebarView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43CE2C4B5AD100B28379
/* YHShareViewOnTablebarView.swift */
;
};
...
@@ -578,6 +578,7 @@
...
@@ -578,6 +578,7 @@
A5EF21372BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF21362BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift */
;
};
A5EF21372BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF21362BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift */
;
};
A5EF213B2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF213A2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift */
;
};
A5EF213B2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EF213A2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift */
;
};
A5F8AC082B9F414000A21EFA
/* YHCustomTextView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5F8AC072B9F414000A21EFA
/* YHCustomTextView.swift */
;
};
A5F8AC082B9F414000A21EFA
/* YHCustomTextView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5F8AC072B9F414000A21EFA
/* YHCustomTextView.swift */
;
};
A5FD45232C523DD300908AD9
/* YHJsApi.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD45222C523DD300908AD9
/* YHJsApi.swift */
;
};
A5FD63BD2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD63BC2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift */
;
};
A5FD63BD2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD63BC2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift */
;
};
A5FD63BF2B6250BC00D1D9DA
/* YHInformationPerfectCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD63BE2B6250BC00D1D9DA
/* YHInformationPerfectCell.swift */
;
};
A5FD63BF2B6250BC00D1D9DA
/* YHInformationPerfectCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD63BE2B6250BC00D1D9DA
/* YHInformationPerfectCell.swift */
;
};
A5FD63C12B62616D00D1D9DA
/* YHInformationPerfectModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD63C02B62616D00D1D9DA
/* YHInformationPerfectModel.swift */
;
};
A5FD63C12B62616D00D1D9DA
/* YHInformationPerfectModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5FD63C02B62616D00D1D9DA
/* YHInformationPerfectModel.swift */
;
};
...
@@ -1130,7 +1131,7 @@
...
@@ -1130,7 +1131,7 @@
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryCell.swift
;
sourceTree
=
"<group>"
;
};
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryCell.swift
;
sourceTree
=
"<group>"
;
};
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateViewModel.swift
;
sourceTree
=
"<group>"
;
};
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateViewModel.swift
;
sourceTree
=
"<group>"
;
};
A59B43C62C48F68200B28379
/* YHEvaluationView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEvaluationView.swift
;
sourceTree
=
"<group>"
;
};
A59B43C62C48F68200B28379
/* YHEvaluationView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEvaluationView.swift
;
sourceTree
=
"<group>"
;
};
A59B43C82C491FB100B28379
/* YH
EvaluationViewVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEvaluation
ViewVC.swift
;
sourceTree
=
"<group>"
;
};
A59B43C82C491FB100B28379
/* YH
H5WebViewVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHH5Web
ViewVC.swift
;
sourceTree
=
"<group>"
;
};
A59B43CA2C4A151200B28379
/* YHStatusAdvantageVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHStatusAdvantageVC.swift
;
sourceTree
=
"<group>"
;
};
A59B43CA2C4A151200B28379
/* YHStatusAdvantageVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHStatusAdvantageVC.swift
;
sourceTree
=
"<group>"
;
};
A59B43CC2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHStatusAdvantageBottomView.swift
;
sourceTree
=
"<group>"
;
};
A59B43CC2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHStatusAdvantageBottomView.swift
;
sourceTree
=
"<group>"
;
};
A59B43CE2C4B5AD100B28379
/* YHShareViewOnTablebarView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHShareViewOnTablebarView.swift
;
sourceTree
=
"<group>"
;
};
A59B43CE2C4B5AD100B28379
/* YHShareViewOnTablebarView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHShareViewOnTablebarView.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -1205,6 +1206,7 @@
...
@@ -1205,6 +1206,7 @@
A5EF21362BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHQuestionAndAnswerModel.swift
;
sourceTree
=
"<group>"
;
};
A5EF21362BA6E2D1005027E6
/* YHQuestionAndAnswerModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHQuestionAndAnswerModel.swift
;
sourceTree
=
"<group>"
;
};
A5EF213A2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHQuestionAndAnswerCell.swift
;
sourceTree
=
"<group>"
;
};
A5EF213A2BA6EC98005027E6
/* YHQuestionAndAnswerCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHQuestionAndAnswerCell.swift
;
sourceTree
=
"<group>"
;
};
A5F8AC072B9F414000A21EFA
/* YHCustomTextView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCustomTextView.swift
;
sourceTree
=
"<group>"
;
};
A5F8AC072B9F414000A21EFA
/* YHCustomTextView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCustomTextView.swift
;
sourceTree
=
"<group>"
;
};
A5FD45222C523DD300908AD9
/* YHJsApi.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHJsApi.swift
;
sourceTree
=
"<group>"
;
};
A5FD63BC2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationPerfectListVC.swift
;
sourceTree
=
"<group>"
;
};
A5FD63BC2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationPerfectListVC.swift
;
sourceTree
=
"<group>"
;
};
A5FD63BE2B6250BC00D1D9DA
/* YHInformationPerfectCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationPerfectCell.swift
;
sourceTree
=
"<group>"
;
};
A5FD63BE2B6250BC00D1D9DA
/* YHInformationPerfectCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationPerfectCell.swift
;
sourceTree
=
"<group>"
;
};
A5FD63C02B62616D00D1D9DA
/* YHInformationPerfectModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationPerfectModel.swift
;
sourceTree
=
"<group>"
;
};
A5FD63C02B62616D00D1D9DA
/* YHInformationPerfectModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationPerfectModel.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2730,7 +2732,6 @@
...
@@ -2730,7 +2732,6 @@
04213B282C48EF5200797900
/* YHHomeInformationViewController.swift */
,
04213B282C48EF5200797900
/* YHHomeInformationViewController.swift */
,
04213B2E2C49154900797900
/* YHHomeInfoDetailContainerViewController.swift */
,
04213B2E2C49154900797900
/* YHHomeInfoDetailContainerViewController.swift */
,
04213B302C4917BD00797900
/* YHHomeInfoDetailViewController.swift */
,
04213B302C4917BD00797900
/* YHHomeInfoDetailViewController.swift */
,
A59B43C82C491FB100B28379
/* YHEvaluationViewVC.swift */
,
A59B43CA2C4A151200B28379
/* YHStatusAdvantageVC.swift */
,
A59B43CA2C4A151200B28379
/* YHStatusAdvantageVC.swift */
,
);
);
path
=
C
;
path
=
C
;
...
@@ -3078,6 +3079,7 @@
...
@@ -3078,6 +3079,7 @@
A5ACE91B2B4564F7002C94D2
/* Modules */
=
{
A5ACE91B2B4564F7002C94D2
/* Modules */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
A5FD45212C523D3200908AD9
/* InteractionH5(与H5交互) */
,
F8BAADA12C4FAE820074D6C3
/* UatModule(灰度功能) */
,
F8BAADA12C4FAE820074D6C3
/* UatModule(灰度功能) */
,
044D0BE82C2019AC00C5CF5E
/* Community(社区) */
,
044D0BE82C2019AC00C5CF5E
/* Community(社区) */
,
0499E3012C05B73D0037E646
/* AppleLogin(苹果登录) */
,
0499E3012C05B73D0037E646
/* AppleLogin(苹果登录) */
,
...
@@ -3198,6 +3200,15 @@
...
@@ -3198,6 +3200,15 @@
path
=
radar
;
path
=
radar
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
A5FD45212C523D3200908AD9
/* InteractionH5(与H5交互) */
=
{
isa
=
PBXGroup
;
children
=
(
A5FD45222C523DD300908AD9
/* YHJsApi.swift */
,
A59B43C82C491FB100B28379
/* YHH5WebViewVC.swift */
,
);
path
=
"InteractionH5(与H5交互)"
;
sourceTree
=
"<group>"
;
};
F8BAADA12C4FAE820074D6C3
/* UatModule(灰度功能) */
=
{
F8BAADA12C4FAE820074D6C3
/* UatModule(灰度功能) */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -3627,6 +3638,7 @@
...
@@ -3627,6 +3638,7 @@
0499E3002C056EE30037E646
/* YHOneKeyLoginView.swift in Sources */
,
0499E3002C056EE30037E646
/* YHOneKeyLoginView.swift in Sources */
,
043D2C8C2C0F037B00172438
/* YHServiceOrderSearchViewModel.swift in Sources */
,
043D2C8C2C0F037B00172438
/* YHServiceOrderSearchViewModel.swift in Sources */
,
0468D4262B495A5400CFB916
/* YHPickPhoneAddressViewController.swift in Sources */
,
0468D4262B495A5400CFB916
/* YHPickPhoneAddressViewController.swift in Sources */
,
A5FD45232C523DD300908AD9
/* YHJsApi.swift in Sources */
,
04213B292C48EF5300797900
/* YHHomeInformationViewController.swift in Sources */
,
04213B292C48EF5300797900
/* YHHomeInformationViewController.swift in Sources */
,
048B2A4D2BC7DAE800A93BF0
/* YHMyLikeViewModel.swift in Sources */
,
048B2A4D2BC7DAE800A93BF0
/* YHMyLikeViewModel.swift in Sources */
,
04C693622B723AB8004C1758
/* YHMySettingViewController.swift in Sources */
,
04C693622B723AB8004C1758
/* YHMySettingViewController.swift in Sources */
,
...
@@ -3658,7 +3670,7 @@
...
@@ -3658,7 +3670,7 @@
A53B61192BB3C9960010B573
/* YHMyDocListHeaderView.swift in Sources */
,
A53B61192BB3C9960010B573
/* YHMyDocListHeaderView.swift in Sources */
,
A567E5B22BD7643D00D5D5A0
/* YHHomeBannerCollectionViewCell.swift in Sources */
,
A567E5B22BD7643D00D5D5A0
/* YHHomeBannerCollectionViewCell.swift in Sources */
,
045EEF082B9F171A0022A143
/* YHBasicInfoCellModel.swift in Sources */
,
045EEF082B9F171A0022A143
/* YHBasicInfoCellModel.swift in Sources */
,
A59B43C92C491FB100B28379
/* YH
Evaluation
ViewVC.swift in Sources */
,
A59B43C92C491FB100B28379
/* YH
H5Web
ViewVC.swift in Sources */
,
0488518F2BF5FD1500C4E32D
/* YHOSSManager.swift in Sources */
,
0488518F2BF5FD1500C4E32D
/* YHOSSManager.swift in Sources */
,
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
,
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
,
0419A09C2C48FBCB00A5FCFA
/* YHInvitationWithGiftsHeadView.swift in Sources */
,
0419A09C2C48FBCB00A5FCFA
/* YHInvitationWithGiftsHeadView.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
View file @
2f8f0c49
...
@@ -125,8 +125,10 @@ private extension YHStatusAdvantageVC {
...
@@ -125,8 +125,10 @@ private extension YHStatusAdvantageVC {
bottomHoldView
.
block
=
{
tag
in
bottomHoldView
.
block
=
{
tag
in
if
tag
==
0
{
if
tag
==
0
{
//快速测评
//跳转测评页
let
vc
=
YHEvaluationViewVC
()
let
vc
=
YHH5WebViewVC
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge/evaluation?from=app"
vc
.
isRightShareItemShareFlag
=
true
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
tag
==
1
{
}
else
if
tag
==
1
{
if
self
.
isQrInfoOk
{
if
self
.
isQrInfoOk
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/Life(生活)/C/YHLifeViewController.swift
View file @
2f8f0c49
...
@@ -139,12 +139,16 @@ extension YHLifeViewController: UITableViewDelegate, UITableViewDataSource {
...
@@ -139,12 +139,16 @@ extension YHLifeViewController: UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
model
=
self
.
viewModel
.
detailModel
.
products
[
indexPath
.
row
]
let
model
=
self
.
viewModel
.
detailModel
.
products
[
indexPath
.
row
]
let
vc
=
YHEvaluationViewVC
()
let
vc
=
YHH5WebViewVC
()
// todo 谢
// TODO: - 谢
vc
.
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"articleDetail.html"
+
"?id=
\(
model
.
id
)
"
vc
.
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"articleDetail.html"
+
"?id=
\(
model
.
id
)
"
vc
.
isWithBottomViewFlag
=
true
vc
.
isShareToMiniProgramFlag
=
true
vc
.
shareMiniPath
=
""
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
extension
YHLifeViewController
:
JXSegmentedListContainerViewListDelegate
{
extension
YHLifeViewController
:
JXSegmentedListContainerViewListDelegate
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHEvaluationView.swift
View file @
2f8f0c49
...
@@ -65,8 +65,11 @@ class YHEvaluationView: UIView {
...
@@ -65,8 +65,11 @@ class YHEvaluationView: UIView {
extension
YHEvaluationView
{
extension
YHEvaluationView
{
@objc
func
tapButton
(
gestureRecognizer
:
UITapGestureRecognizer
)
{
@objc
func
tapButton
(
gestureRecognizer
:
UITapGestureRecognizer
)
{
let
vc
=
YHEvaluationViewVC
()
//跳转测评页
self
.
parentViewController
?
.
navigationController
?
.
pushViewController
(
vc
)
let
vc
=
YHH5WebViewVC
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge/evaluation?from=app"
vc
.
isRightShareItemShareFlag
=
true
parentViewController
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
func
setupUI
()
{
func
setupUI
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHServiceCenterMainViewController.swift
View file @
2f8f0c49
...
@@ -89,12 +89,11 @@ class YHServiceCenterMainViewController: YHBaseViewController {
...
@@ -89,12 +89,11 @@ class YHServiceCenterMainViewController: YHBaseViewController {
noDataView
.
clickBackBtnClickBlock
=
{[
weak
self
]
in
noDataView
.
clickBackBtnClickBlock
=
{[
weak
self
]
in
guard
self
!=
nil
else
{
return
}
guard
self
!=
nil
else
{
return
}
// let vc = YHHomeWebViewController()
// vc.vcTitle = "香港身份测评码"
// vc.showSavePicBottomFlag = true
// vc.url = "https://cdn-public.galaxy-immi.com/app/cepingma.png"
let
vc
=
YHEvaluationViewVC
()
//跳转测评页
let
vc
=
YHH5WebViewVC
()
vc
.
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge/evaluation?from=app"
vc
.
isRightShareItemShareFlag
=
true
self
?
.
navigationController
?
.
pushViewController
(
vc
)
self
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
noDataView
.
clickShowBtnClickBlock
=
{
noDataView
.
clickShowBtnClickBlock
=
{
...
...
galaxy/galaxy/Classes/Modules/
Home(首页)/C/YHEvaluation
ViewVC.swift
→
galaxy/galaxy/Classes/Modules/
InteractionH5(与H5交互)/YHH5Web
ViewVC.swift
View file @
2f8f0c49
//
//
// YH
Evaluation
ViewVC.swift
// YH
H5Web
ViewVC.swift
// galaxy
// galaxy
//
//
// Created by davidhuangA on 2024/7/18.
// Created by davidhuangA on 2024/7/18.
...
@@ -11,13 +11,13 @@ import WebKit
...
@@ -11,13 +11,13 @@ import WebKit
import
dsBridge
import
dsBridge
/*
/*
快速测评 及
需要
与H5交互的界面
快速测评 及
其他
与H5交互的界面
*/
*/
class
YH
Evaluation
ViewVC
:
YHBaseViewController
,
WKUIDelegate
,
WKNavigationDelegate
{
class
YH
H5Web
ViewVC
:
YHBaseViewController
,
WKUIDelegate
,
WKNavigationDelegate
{
var
webview
=
DWKWebView
()
var
webview
=
DWKWebView
()
var
progBar
=
UIProgressView
()
var
progBar
=
UIProgressView
()
var
url
=
"https://
www.baidu.com/
"
var
url
=
"https://
test-hkdiy-h5.galaxy-immi.com/superAppBridge/evaluation?from=app
"
lazy
var
noNetWorkTipsView
:
YHEmptyDataView
=
{
lazy
var
noNetWorkTipsView
:
YHEmptyDataView
=
{
let
view
=
YHEmptyDataView
.
createView
(
"无网络"
,
kNotNetWorkBgName
)
let
view
=
YHEmptyDataView
.
createView
(
"无网络"
,
kNotNetWorkBgName
)
view
.
topMargin
=
222
view
.
topMargin
=
222
...
@@ -31,43 +31,93 @@ class YHEvaluationViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelega
...
@@ -31,43 +31,93 @@ class YHEvaluationViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelega
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
setupUI
()
}
deinit
{
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
NotificationCenter
.
default
.
removeObserver
(
self
)
}
//右上角分享按钮
var
isRightShareItemShareFlag
:
Bool
=
false
//底部分享view
var
isWithBottomViewFlag
:
Bool
=
false
lazy
var
shareView
:
YHShareViewOnTablebarView
=
{
let
view
=
YHShareViewOnTablebarView
()
view
.
isHidden
=
true
return
view
}()
//分享到H5或者小程序
var
isShareToMiniProgramFlag
:
Bool
=
false
//是否分享到小程序 默认分享到h5
var
shareMiniPath
:
String
?
//分享到小程序时的 path
//分享到H5的情况
var
shareH5Title
:
String
=
"20秒极速测分"
var
shareH5Describe
:
String
=
"您的朋友邀请您进行香港优才测评,来试试吧"
}
// MARK: - 内部方法
private
extension
YHH5WebViewVC
{
func
setupUI
()
{
gk_navBarAlpha
=
1.0
gk_navBarAlpha
=
1.0
gk_navLineHidden
=
false
gk_navLineHidden
=
false
#if DEBUG
// gk_navTitle = "快速测评"
#endif
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
updateNetWorkUI
)
,
name
:
.
reachabilityChanged
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
updateNetWorkUI
)
,
name
:
.
reachabilityChanged
,
object
:
nil
)
view
.
backgroundColor
=
.
white
view
.
backgroundColor
=
.
white
//获取导航栏高度
//获取导航栏高度
let
navHeight
=
self
.
navigationController
?
.
navigationBar
.
frame
.
height
let
navHeight
=
self
.
navigationController
?
.
navigationBar
.
frame
.
height
//获取状态栏高度
let
statusHeight
=
k_Height_statusBar
()
// 创建wkwebview
if
isWithBottomViewFlag
{
webview
=
DWKWebView
(
frame
:
CGRect
(
x
:
0
,
y
:
statusHeight
+
navHeight
!
,
width
:
self
.
view
.
frame
.
width
,
height
:
self
.
view
.
frame
.
height
-
statusHeight
-
navHeight
!
-
59
-
k_Height_safeAreaInsetsBottom
()))
view
.
addSubview
(
shareView
)
}
shareView
.
block
=
{
tag
in
if
tag
==
0
{
//分享
self
.
share
()
}
else
{
//预约咨询
// TODO: - for test hjl
// let codeUrl = model.codeUrl
// let downloadUrl = model.downloadUrl
// YHConsultantQRCodeView.codeView(codeUrl, downloadUrl: downloadUrl).show()
}
}
// 创建wkwebview
webview
=
DWKWebView
(
frame
:
.
zero
)
webview
.
scrollView
.
contentInsetAdjustmentBehavior
=
.
never
webview
.
navigationDelegate
=
self
webview
.
navigationDelegate
=
self
// 创建网址
if
url
.
isYHEmpty
()
{
webview
.
addJavascriptObject
(
YHJsApi
(),
namespace
:
nil
)
url
=
"https://www.baidu.com/"
}
let
url
=
NSURL
(
string
:
url
)
let
url
=
NSURL
(
string
:
url
)
// 创建请求
let
request
=
NSURLRequest
(
url
:
url
!
as
URL
)
let
request
=
NSURLRequest
(
url
:
url
!
as
URL
)
// 加载请求
webview
.
load
(
request
as
URLRequest
)
webview
.
load
(
request
as
URLRequest
)
// 添加wkwebview
view
.
addSubview
(
webview
)
self
.
view
.
addSubview
(
webview
)
webview
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
webview
.
scrollView
.
contentInsetAdjustmentBehavior
=
.
never
if
isWithBottomViewFlag
{
view
.
addSubview
(
shareView
)
shareView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHShareViewOnTablebarView
.
viewH
)
}
webview
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
shareView
.
snp
.
top
)
}
}
else
{
webview
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
}
// 加载网页的进度条
// 加载网页的进度条
progBar
=
UIProgressView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
self
.
view
.
frame
.
width
,
height
:
30
))
progBar
=
UIProgressView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
self
.
view
.
frame
.
width
,
height
:
30
))
...
@@ -85,15 +135,6 @@ class YHEvaluationViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelega
...
@@ -85,15 +135,6 @@ class YHEvaluationViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelega
updateNetWorkStatusUI
(
needReload
:
false
)
updateNetWorkStatusUI
(
needReload
:
false
)
}
}
deinit
{
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
NotificationCenter
.
default
.
removeObserver
(
self
)
}
}
// MARK: - 内部方法
private
extension
YHEvaluationViewVC
{
func
addRightItems
()
{
func
addRightItems
()
{
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"share_item"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
share
)
)
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"share_item"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
share
)
)
gk_navRightBarButtonItem
=
rightButtonItem
gk_navRightBarButtonItem
=
rightButtonItem
...
@@ -102,7 +143,13 @@ private extension YHEvaluationViewVC {
...
@@ -102,7 +143,13 @@ private extension YHEvaluationViewVC {
@objc
func
share
()
{
@objc
func
share
()
{
YHShareManager
.
shared
.
sendLinkContent
(
"20秒极速测分"
,
"您的朋友邀请您进行香港优才测评,来试试吧"
,
UIImage
(
named
:
"AppIcon"
)
??
UIImage
(),
link
:
url
)
if
self
.
isShareToMiniProgramFlag
{
if
let
path
=
self
.
shareMiniPath
,
!
path
.
isEmpty
{
YHShareManager
.
shared
.
shareToMiniProgram
(
path
:
path
,
shareTitle
:
"请查看"
)
}
}
else
{
YHShareManager
.
shared
.
sendLinkContent
(
self
.
shareH5Title
,
self
.
shareH5Describe
,
UIImage
(
named
:
"AppIcon"
)
??
UIImage
(),
link
:
self
.
url
)
}
}
}
@objc
func
updateNetWorkUI
()
{
@objc
func
updateNetWorkUI
()
{
...
@@ -132,7 +179,6 @@ private extension YHEvaluationViewVC {
...
@@ -132,7 +179,6 @@ private extension YHEvaluationViewVC {
}
}
// MARK: - webview function
// MARK: - webview function
@objc
func
toBack
()
{
@objc
func
toBack
()
{
if
webview
.
canGoBack
{
if
webview
.
canGoBack
{
webview
.
goBack
()
webview
.
goBack
()
...
@@ -144,13 +190,11 @@ private extension YHEvaluationViewVC {
...
@@ -144,13 +190,11 @@ private extension YHEvaluationViewVC {
webview
.
goForward
()
webview
.
goForward
()
}
}
}
}
}
}
// MARK: - WKNavigationDelegate
// MARK: - WKNavigationDelegate
extension
YH
Evaluation
ViewVC
{
extension
YH
H5Web
ViewVC
{
override
func
observeValue
(
forKeyPath
keyPath
:
String
?,
of
object
:
Any
?,
change
:
[
NSKeyValueChangeKey
:
Any
]?,
context
:
UnsafeMutableRawPointer
?)
{
override
func
observeValue
(
forKeyPath
keyPath
:
String
?,
of
object
:
Any
?,
change
:
[
NSKeyValueChangeKey
:
Any
]?,
context
:
UnsafeMutableRawPointer
?)
{
if
keyPath
==
"estimatedProgress"
{
if
keyPath
==
"estimatedProgress"
{
self
.
progBar
.
alpha
=
1.0
self
.
progBar
.
alpha
=
1.0
...
@@ -169,8 +213,11 @@ extension YHEvaluationViewVC {
...
@@ -169,8 +213,11 @@ extension YHEvaluationViewVC {
override
class
func
observeValue
(
forKeyPath
keyPath
:
String
?,
of
object
:
Any
?,
change
:
[
NSKeyValueChangeKey
:
Any
]?,
context
:
UnsafeMutableRawPointer
?)
{
override
class
func
observeValue
(
forKeyPath
keyPath
:
String
?,
of
object
:
Any
?,
change
:
[
NSKeyValueChangeKey
:
Any
]?,
context
:
UnsafeMutableRawPointer
?)
{
}
}
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
addRightItems
()
if
isRightShareItemShareFlag
{
addRightItems
()
}
}
}
func
webView
(
_
webView
:
WKWebView
,
createWebViewWith
configuration
:
WKWebViewConfiguration
,
for
navigationAction
:
WKNavigationAction
,
windowFeatures
:
WKWindowFeatures
)
->
WKWebView
?
{
func
webView
(
_
webView
:
WKWebView
,
createWebViewWith
configuration
:
WKWebViewConfiguration
,
for
navigationAction
:
WKNavigationAction
,
windowFeatures
:
WKWindowFeatures
)
->
WKWebView
?
{
...
...
galaxy/galaxy/Classes/Modules/InteractionH5(与H5交互)/YHJsApi.swift
0 → 100644
View file @
2f8f0c49
//
// YHJsApi.swift
// dsbridgedemo
//
// Created by du on 2018/9/7.
// Copyright © 2018年 杜文. All rights reserved.
//
import
Foundation
typealias
JSCallback
=
(
String
,
Bool
)
->
Void
typealias
JSDicCallback
=
([
String
:
Any
],
Bool
)
->
Void
class
YHJsApi
:
NSObject
{
//MUST use "_" to ignore the first argument name explicitly。
@objc
func
testSyn
(
_
arg
:
String
)
{
printLog
(
arg
)
}
@objc
func
testSynDic
(
_
arg
:[
String
:
Any
])
{
print
(
arg
)
return
}
@objc
func
testAsyn
(
_
arg
:
String
,
handler
:
JSCallback
)
{
handler
(
String
(
format
:
"%@[Swift async call:%@]"
,
arg
,
"test"
),
true
)
}
//同步方法
@objc
func
appMethodForJsSyn
(
_
arg
:[
String
:
Any
])
{
}
//异步方法
@objc
func
appMethodForJsAsyn
(
_
arg
:[
String
:
Any
],
handler
:
JSDicCallback
){
handler
([
"msg"
:
1
],
true
)
}
}
extension
YHJsApi
{
}
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