移动端唤起QQ聊天

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')
                }
            }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');
                }    
            }

 

posted @ 2019-01-27 19:59  崔凯通  阅读(1622)  评论(0编辑  收藏  举报