Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
GMRouter
Project
Project
Details
Activity
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
gengmeiios
GMRouter
Commits
c209bc8b
Commit
c209bc8b
authored
Apr 28, 2021
by
侯超鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跳转H5界面的协议解析
parent
f67f0528
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
GMRouter+gm.m
GMRouter/Classes/GMRouter+gm.m
+5
-0
No files found.
GMRouter/Classes/GMRouter+gm.m
View file @
c209bc8b
...
...
@@ -98,12 +98,17 @@ static NSMutableDictionary *routeMap = nil;
NSDictionary
*
params
;
NSArray
*
array
=
[
encodeUrlScheme
componentsSeparatedByString
:
@"url="
];
if
(([
host
isEqualToString
:
@"third_webview"
]
||
[
host
isEqualToString
:
@"common_webview"
])
&&
array
.
count
>
1
)
{
//解析其他参数
NSString
*
perfixStr
=
[
array
firstObject
];
NSDictionary
*
perDict
=
[
self
urlQueryToDictionary
:
perfixStr
];
//解析URL参数
NSString
*
value
=
array
[
1
];
//拦截所有的即将调转的url(value),如果不在白名单之中,让其使用GMThirdWebViewController加载. 必须要用while 因为url部分包含 %3A gengmei://common_webview?url=http%3A//backend.paas.env/hybrid/base_wiki/item/285
while
([
value
rangeOfString
:
@"%"
].
length
!=
0
)
{
value
=
[
self
URLDecodedString
:
value
];
}
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionaryWithDictionary
:[
self
urlQueryToDictionary
:
value
]];
[
dict
setValuesForKeysWithDictionary
:
perDict
];
[
dict
setValue
:
value
forKey
:
@"url"
];
params
=
dict
;
}
else
{
...
...
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