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

软件工具
0 638
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);
                
            }
        }


精选帖子
DAWN 融资3300万美金,下一个挖矿空投大项目类似grass 268
Teneo融资上千万美元,类似小草Grass挂机项目 295
Android 标枪定位 v2.11.3 免Root实现虚拟定位 340
Windows11 轻松设置 v1.10 绿色版 251
Android 海螺问问 Ghat GPT v2.30.0 免费AI助手 302
Android 海绵音乐 v2.33 免费AI音乐软件 239
Android 换脸变装视频秀 v1.2.4 美女视频AI换脸 228
Android 配音鸭文字转语音 v1.6.0登陆解锁会员 141
Android 配音工厂 v1.0.8 解锁会员版 400
热门帖子
Android 标枪定位 v2.11.3 免Root实现虚拟定位 340
Android 海螺问问 Ghat GPT v2.30.0 免费AI助手 302
Teneo融资上千万美元,类似小草Grass挂机项目 295
DAWN 融资3300万美金,下一个挖矿空投大项目类似grass 268
Windows11 轻松设置 v1.10 绿色版 251
Android 海绵音乐 v2.33 免费AI音乐软件 239
Android 换脸变装视频秀 v1.2.4 美女视频AI换脸 228
Ai一键生成影视解说视频,仅需十秒即可完成,多平台分发,轻松日入1000+ 179
【免费V2ray安卓和电脑梯子】年度最佳免费v2ray梯子推荐_最新免费V2ray节点分享 117