master
kira 6 years ago
parent 999df149c0
commit 89cbea2602

@ -1,10 +1,11 @@
(function (){
$(function (){
var callbacks = {};
var functions = {};
window.RPayPlus = {
// 向Native端发送消息用于实现JS->Native
send: function(methodName, param, callback) {
alert(2);
var thisId = 0;
if(callback){
thisId = new Date().getTime();; // 获取唯一id
@ -16,7 +17,7 @@
callbackId: thisId // 传到 Native 端
};
var msg = JSON.stringify(json);
alert(msg);
var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if(isiOS){
@ -55,4 +56,4 @@
window.RPayPlus.send("jsCallback", data, null);
}
};
})();
});
Loading…
Cancel
Save