var
Native = {
URL_LIST: {
// example URL_MEETING_LIST : "URL_MEETING_LIST"
},
// usage: Native.mwJumpToPage(Native.URL_LIST.URL_MEETING_LIST)
JumpToPage :
function (
url) {
//url: str
if (
/(iPhone|
iPad|
iPod|
iOS)/
i.
test(
navigator.
userAgent)) {
//判断iPhone|iPad|iPod|iOS
window.
webkit.
messageHandlers.
JUMP_PAGE.
postMessage(
url);
}
else
if (
/(Android)/
i.
test(
navigator.
userAgent)) {
//判断Android
NATIVE.
JUMP_PAGE(
url);
}
},
DownLoad :
function (
url) {
//url: str
if (
/(iPhone|
iPad|
iPod|
iOS)/
i.
test(
navigator.
userAgent)) {
//判断iPhone|iPad|iPod|iOS
window.
webkit.
messageHandlers.
DOWNLOAD.
postMessage(
url);
}
else
if (
/(Android)/
i.
test(
navigator.
userAgent)) {
//判断Android
NATIVE.
DOWNLOAD(
url);
}
},
ClosePage :
function () {
if (
/(iPhone|
iPad|
iPod|
iOS)/
i.
test(
navigator.
userAgent)) {
//判断iPhone|iPad|iPod|iOS
window.
webkit.
messageHandlers.
PAGE_CLOSE.
postMessage(
url);
}
else
if (
/(Android)/
i.
test(
navigator.
userAgent)) {
//判断Android
NATIVE.
PAGE_CLOSE(
url);
}
}
};