var u = navigator.userAgent;

            var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
            if(isiOS){
                if(u.toLowerCase().match(/MicroMessenger/i) == "micromessenger"){
                    window.open(\'http://wpa.qq.com/msgrd?v=3&uin=qq号码&site=qq&menu=yes\');
                }else{
                    window.open(\'mqqwpa://im/chat?chat_type=wpa&uin=qq号码&version=1&src_type=web&web_src=oicqzone.com\')          (URL Scheme  方式)
                }
            }else{
                if(u.toLowerCase().match(/MicroMessenger/i) == "micromessenger"){
                    window.open(\'http://wpa.qq.com/msgrd?v=3&uin=qq号码&site=qq&menu=yes\');
                }else{
                    window.open(\'mqqwpa://im/chat?chat_type=wpa&uin=qq号码&version=1&src_type=web&web_src=oicqzone.com\');        (URL Scheme  方式)
} }

 

版权声明:本文为cuikaitong原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/cuikaitong/p/10327776.html