Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
geek-contract-h5
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
刘春鲜
geek-contract-h5
Commits
4c5906d7
Commit
4c5906d7
authored
Jul 13, 2021
by
刘春鲜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
+62
-0
index.html
index.html
+35
-0
util.js
util.js
+27
-0
No files found.
index.html
0 → 100644
View file @
4c5906d7
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
合同签订
</title>
<script
src=
"util.js"
></script>
</head>
<body>
<div>
合同签订中...
</div>
<script>
window
.
onload
=
function
()
{
const
studentId
=
getQueryString
(
'studentId'
)
const
schoolAreaId
=
getQueryString
(
'schoolAreaId'
)
const
type
=
getQueryString
(
'type'
)
if
(
studentId
&&
schoolAreaId
)
{
sendMessage
({
type
:
'batchPageUrl'
,
__callback__
:
'__callback__'
,
data
:
{
studentId
,
schoolAreaId
}})
}
if
(
type
)
{
sendMessage
({
type
:
type
||
'contract'
})
}
window
.
$geek_excuteJS
=
(
params
)
=>
{
const
{
data
}
=
JSON
.
parse
(
params
)
if
(
data
)
{
window
.
location
.
href
=
data
}
}
}
</script>
</body>
</html>
\ No newline at end of file
util.js
0 → 100644
View file @
4c5906d7
const
isAndroid
=
()
=>
{
const
u
=
navigator
.
userAgent
;
const
android
=
u
.
indexOf
(
"Android"
)
>
-
1
||
u
.
indexOf
(
"Adr"
)
>
-
1
;
return
android
;
}
const
sendMessage
=
(
data
)
=>
{
if
(
isAndroid
())
{
window
.
ReactNativeWebView
&&
window
.
ReactNativeWebView
.
onMessage
&&
window
.
ReactNativeWebView
.
onMessage
(
JSON
.
stringify
(
data
));
}
window
.
ReactNativeWebView
&&
window
.
ReactNativeWebView
.
postMessage
&&
window
.
ReactNativeWebView
.
postMessage
(
JSON
.
stringify
(
data
))
}
const
getQueryString
=
(
name
)
=>
{
const
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
);
const
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
return
unescape
(
r
[
2
]);
}
return
null
;
}
\ No newline at end of file
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