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
d13d5595
Commit
d13d5595
authored
Apr 28, 2021
by
艾娇平
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'houchaoxin/dev' into 'master'
跳转H5界面的协议解析 See merge request
!7
parents
f67f0528
c209bc8b
Hide 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 @
d13d5595
...
@@ -98,12 +98,17 @@ static NSMutableDictionary *routeMap = nil;
...
@@ -98,12 +98,17 @@ static NSMutableDictionary *routeMap = nil;
NSDictionary
*
params
;
NSDictionary
*
params
;
NSArray
*
array
=
[
encodeUrlScheme
componentsSeparatedByString
:
@"url="
];
NSArray
*
array
=
[
encodeUrlScheme
componentsSeparatedByString
:
@"url="
];
if
(([
host
isEqualToString
:
@"third_webview"
]
||
[
host
isEqualToString
:
@"common_webview"
])
&&
array
.
count
>
1
)
{
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
];
NSString
*
value
=
array
[
1
];
//拦截所有的即将调转的url(value),如果不在白名单之中,让其使用GMThirdWebViewController加载. 必须要用while 因为url部分包含 %3A gengmei://common_webview?url=http%3A//backend.paas.env/hybrid/base_wiki/item/285
//拦截所有的即将调转的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
)
{
while
([
value
rangeOfString
:
@"%"
].
length
!=
0
)
{
value
=
[
self
URLDecodedString
:
value
];
value
=
[
self
URLDecodedString
:
value
];
}
}
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionaryWithDictionary
:[
self
urlQueryToDictionary
:
value
]];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionaryWithDictionary
:[
self
urlQueryToDictionary
:
value
]];
[
dict
setValuesForKeysWithDictionary
:
perDict
];
[
dict
setValue
:
value
forKey
:
@"url"
];
[
dict
setValue
:
value
forKey
:
@"url"
];
params
=
dict
;
params
=
dict
;
}
else
{
}
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