好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

百度钱包ios移动端html5网页无法自动关闭问题

我们公司最近在做百度钱包的移动网页支付的一款产品,产品使用场景是当用户通过百度钱包扫描我们的产品的二维码,

下面是具体代码:

var ua = navigator.userAgent.toLowerCase();   
    //判断是否为ios设备,其他设备直接调用 BLightApp.closeWindow()关闭  
    if(ua.indexOf("apple")!=-1||ua.indexOf("mac")!=-1||ua.indexOf("iphone")!=-1)  
        {  
            var event = document.createEvent('Events');  
                event.initEvent('runtimeready', false,false);  
                document.dispatchEvent(event);  
                document.addEventListener("runtimeready", function(e) {  
                     BLightApp.closeWindow();  
                }, false);  
        }else{  
             BLightApp.closeWindow();  
        } 

以上就是 百度钱包ios移动端html5网页无法自动关闭问题的内容,更多相关内容请关注PHP中文网(www.gxlcms.com)!

查看更多关于百度钱包ios移动端html5网页无法自动关闭问题的详细内容...

  阅读:45次