(function(a, b) {
if (typeof define === "function" && define.amd) {
define(function() {
return b(a)
})
} else {
if (typeof exports === "object") {
module.exports = b
} else {
a.echo = b(a)
}
}
})
(window,function() {
var l = function() {};
var c = 0;
var a = 1;
var f = function() {
return "NOTREADY"
};
var e = {};
var i = navigator.userAgent.match(/hrtbrowser/);
var b = [];
var k = false;
function h(m, q) {
for (var n in q) {
if (!m.hasOwnProperty(o)) {
m[n] = q[n]
}
}
}
var j = {
ready: function(m) {
if (!i) {
m();
return
}
if (window.__WebViewJavascriptBridge__) {
m()
} else {
if (k) {
b.push(m)
} else {
b.push(m);
k = true;
document.addEventListener("hrtReady",
function() {
b.forEach(function(n) {
n()
})
},
false)
}
}
}
};
var g = l;
var d = l;
if (navigator.userAgent.match(/android/i)) {
d = function d(m) {
if (window.WebViewJavascriptBridge) {
m(WebViewJavascriptBridge)
} else {
document.addEventListener("__WebViewJavascriptBridgeReady__",
function() {
m(WebViewJavascriptBridge)
},
false)
}
};
d(function(m) {
m.init(function(p, n) {
n(data)
})
})
}
d = function d(n) {
if (window.WebViewJavascriptBridge) {
return n(WebViewJavascriptBridge)
}
if (window.WVJBCallbacks) {
return window.WVJBCallbacks.push(n)
}
window.WVJBCallbacks = [n];
var m = document.createElement("iframe");
m.style.display = "none";
m.src = "wvjbscheme://__BRIDGE_LOADED__";
document.documentElement.appendChild(m);
setTimeout(function() {
document.documentElement.removeChild(m)
},
0);
d(function(p) {})
}
}
d(function(n) {
j.getOpenToken = function(p) {
n.callHandler("getOpenToken", e,
function(q) {
q = (typeof q === "string") ? JSON.parse(q) : q;
if (q.code == c) {
p.success && p.success(q.data)
} else {
p.fail && p.fail(q)
}
p.complete && p.complete()
})
};
if (typeof Event === "function") {
var m = new Event("hrtReady");
document.dispatchEvent(m)
} else {
var m = document.createEvent("Event");
m.initEvent("hrtReady", true, true)
}
window.__WebViewJavascriptBridge__ = true
});
window.hrt = j;
return {
ready: j.ready
}
});
这是一段JS文件的代码~然后我前端想调用getOpenToken,要怎么调用