|
@@ -111,15 +111,37 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- init_android_bridge();
|
|
|
- init_ios_bridge(function(bridge) { });
|
|
|
+ var isMobile = {
|
|
|
+ Android: function() {
|
|
|
+ return navigator.userAgent.match(/Android/i);
|
|
|
+ },
|
|
|
+ BlackBerry: function() {
|
|
|
+ return navigator.userAgent.match(/BlackBerry/i);
|
|
|
+ },
|
|
|
+ iOS: function() {
|
|
|
+ return navigator.userAgent.match(/iPhone|iPad|iPod/i);
|
|
|
+ },
|
|
|
+ Opera: function() {
|
|
|
+ return navigator.userAgent.match(/Opera Mini/i);
|
|
|
+ },
|
|
|
+ Windows: function() {
|
|
|
+ return navigator.userAgent.match(/IEMobile/i);
|
|
|
+ },
|
|
|
+ any: function() {
|
|
|
+ return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
|
|
|
+ }
|
|
|
+ };
|
|
|
|
|
|
+ if(isMobile.iOS()) {
|
|
|
+ init_ios_bridge(function(bridge) { });
|
|
|
+ } else {
|
|
|
+ init_android_bridge();
|
|
|
+ }
|
|
|
register_js_hander('on_js_click',function(data,callback) {
|
|
|
alert('on java call ABCD');
|
|
|
callback('{"action":"groupbuy","params":null}');
|
|
|
});
|
|
|
|
|
|
- alert('1');
|
|
|
$('#count_goods_box').on('click',function()
|
|
|
{
|
|
|
alert('on webviewgggg click X');
|