短视频app制作开发通过手机浏览器调用三方社交软件

软件工具
0 180
function qqcao(){
            var type = undefined;
            var param = "";
            var sid = 2;
            var rawuin = <{$qq}>;
            var qsig = "undefined";
            var QQApi = {
                openURL: function(url){
                    var i = document.createElement('iframe');
                    i.style.display = 'none';
                    i.onload = function() { i.parentNode.removeChild(i); };
                    i.src = url;
                    document.body.appendChild(i);
               
                    var returnValue = QQApi.__RETURN_VALUE;
                    QQApi.__RETURN_VALUE = undefined;
                    return returnValue;
                },
                isAppInstalled: function(scheme) {
                    var parameters = {'scheme':scheme};
                    var r = QQApi.openURL('jsbridge://app/isInstalled_?p=' + encodeURIComponent(JSON.stringify(parameters)));
                    return r ? r.result : null;
                },
                isQQWebView: function(){
                    return QQApi.isAppInstalled('mqq') == true;
                },
                __RETURN_VALUE: undefined
            };
            var usa=navigator.userAgent;
            var p;
            var mobile_q_jump = {
                android:"https://play.google.com/store/apps/details?id=com.tencent.mobileqq",
                ios:"itms-apps://itunes.apple.com/cn/app/qq-2011/id444934666?mt=8",
                winphone:"http://www.windowsphone.com/zh-cn/store/app/qq/b45f0a5f-13d8-422b-9be5-c750af531762",
                pc:"http://mobile.qq.com/index.html"
            };
            var isMQ = 0;
            if(typeof type == "undefined") type = 1;
            if(usa.indexOf("Android")>-1){
                p = "android";
            }
            else if(usa.indexOf("iPhone")>-1 || usa.indexOf("iPad")>-1 || usa.indexOf("iPod")>-1){
                p = "ios";
            }
            else if(usa.indexOf("Windows Phone") > -1 || usa.indexOf("WPDesktop") > -1){
                p = "winphone";
            }
            else {
                p = "pc";
            }
            if(p == "ios"){
                //防止循环
                if(history.pushState)
                    history.pushState({},"t","#");
                isMQ = QQApi.isQQWebView();
                if (!isMQ){
                    var sc = document.createElement("script");
                    sc.src = "http://__.qq.com/api/qqapi.js";
                    sc.onload = function(){
                        if(window['iOSQQApi']){
                            isMQ =iOSQQApi.device.isMobileQQ();
                        }
                    };
                    document.body.appendChild(sc);
                }
            }
            else if(p == "pc" && qsig != "undefined"){
                window.open(qsig,"_self");
            }
            if(type == 1){//手Q
                var isSuccess = true;
                var f = document.createElement("iframe");
                f.style.display = "none";
                document.body.appendChild(f);
                f.onload = function(){
                    isSuccess = false;
                };
                if(p == "ios" && sid == 1){
                    f.src = "mqqapi://card/show_pslcard?src_type=internal&version=1&uin="+ rawuin +"&card_type=person&source=qrcode";
                }
                if(p == "ios" && sid == 2){//ios并且为群名片
                    f.src = "mqqapi://card/show_pslcard?src_type=internal&version=1&uin="+ rawuin +"&card_type=person&source=qrcode";
                }
                else if(p != "pc"){
                    var url = window.location.href.split("&");
                    f.src = "mqqopensdkapi://bizAgent/qm/qr?url=" + encodeURIComponent(url[0]);
                }
                if(p == "android" && sid == 1){
                    f.src = "mqqapi://card/show_pslcard?src_type=internal&version=1&uin="+ rawuin +"&card_type=person&source=qrcode";
                }
                if(p == "android" && sid == 2){//ios并且为群名片
                    f.src = "mqqapi://card/show_pslcard?src_type=internal&version=1&uin="+ rawuin +"&card_type=person&source=qrcode";
                }
                var now = Date.now();
                setTimeout( function(){
                    if((p == "ios" && !isMQ && Date.now() - now < 2000) || (p == "android" && !isSuccess) || ((p == "winphone" && Date.now() - now < 2000))){
                        var jumpUrl = mobile_q_jump[p];
                        if(jumpUrl) window.open(jumpUrl,"_self");
                    }
                } , 1500);
                
            }
        }


短视频app制作开发通过手机浏览器调用三方社交软件-小师傅资源网--http://bbs.small-master.com/2399.html
精选帖子
2021《人潮汹涌》电影资源TC清晰版在线看 368
你好,李焕英(TC版) 802
唐人街探案3(TC版) 468
十万人搭建支付暗道:跑分模式兴起,为赌博和洗钱提供百亿资金 591
庆余年电视剧提前观看全集 655
蚂蚁任务辅助平台怎么样?微信辅助10元~12.5元一单 815
uTools 一款极简插件化跨平台的现代桌面工具软件 819
我和我的祖国——2019国庆三部曲其三 717
攀登者——2019国庆三部曲其二 629
热门帖子
风水老师看三合贵人怎么收费的_重庆最出名风水大师名单 31
请风水先生算农村建筑风水收费价格是多少_重庆算命准的大师联系方式 18
算命师傅看个人风水收费价格是多少_重庆好的算命师去哪找 18
风水先生看结婚择日收费行情_重庆风水大师前十排名 15
靠谱的风水命理大师谁口碑最好_重庆出名的周易算命大师 13
民间算命大师哪个非常有名气_重庆算命大师最有名气的是谁 13
请人算装修动工择日如何收费_重庆算命最准的大师去哪里找 12
请人看三合派风水收费高吗_重庆看风水很准的是谁 12
陆叁荷(淼淼)-知名八字命理大师哪个有名_重庆风水大师排名第一人 12