Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
libai
/
web.yazhai.co
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dbb0421d
authored
a year ago
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
e3ea2829
master
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
32 deletions
guodongRecharge/index.html
guodongRecharge/index.html
View file @
dbb0421d
...
...
@@ -88,17 +88,7 @@
sessionStorage
.
os
=
data
.
os
;
sessionStorage
.
appversion
=
data
.
appversion
}
function
appCollaboration
(
msg
)
{
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
try
{
if
(
/iphone|ipad|ipod/
.
test
(
ua
))
{
window
.
webkit
.
messageHandlers
.
appCollaboration
.
postMessage
(
msg
);
}
else
if
(
/android/
.
test
(
ua
))
{
window
.
yazhai
.
appCollaboration
(
msg
);
}
}
catch
(
e
)
{
}
}
function
url_get_params
(
url_path
)
{
...
...
@@ -326,30 +316,17 @@ try{
appCollaboration
(
obj
)
})
//实现和客户端沟通
function
appCollaboration
(
msg
)
{
var
sUserAgent
=
navigator
.
userAgent
.
toLowerCase
();
var
bIsIpad
=
sUserAgent
.
match
(
/ipad/i
)
==
"ipad"
;
var
bIsIphoneOs
=
sUserAgent
.
match
(
/iphone os/i
)
==
"iphone os"
;
var
bIsMidp
=
sUserAgent
.
match
(
/midp/i
)
==
"midp"
;
var
bIsUc7
=
sUserAgent
.
match
(
/rv:1.2.3.4/i
)
==
"rv:1.2.3.4"
;
var
bIsUc
=
sUserAgent
.
match
(
/ucweb/i
)
==
"ucweb"
;
var
bIsAndroid
=
sUserAgent
.
match
(
/android/i
)
==
"android"
;
var
bIsCE
=
sUserAgent
.
match
(
/windows ce/i
)
==
"windows ce"
;
var
bIsWM
=
sUserAgent
.
match
(
/windows mobile/i
)
==
"windows mobile"
;
if
(
!
(
bIsIpad
||
bIsIphoneOs
||
bIsMidp
||
bIsUc7
||
bIsUc
||
bIsAndroid
||
bIsCE
||
bIsWM
))
{
}
else
if
(
bIsAndroid
)
{
window
.
yazhai
.
appCollaboration
(
msg
);
}
else
if
(
bIsIphoneOs
||
bIsIpad
)
{
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
try
{
if
(
/iphone|ipad|ipod/
.
test
(
ua
))
{
window
.
webkit
.
messageHandlers
.
appCollaboration
.
postMessage
(
msg
);
}
else
if
(
/android/
.
test
(
ua
))
{
window
.
yazhai
.
appCollaboration
(
msg
);
}
}
//客户端回调结果
function
appCallback
(
msg
)
{
console
.
log
(
msg
);
}
catch
(
e
)
{
}
}
</script>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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