Mobile phone to use QQ temporary session code

Source: Internet
Author: User

function Qqcao () {
var type = undefined;
var param = "";
var sid = 2;
var Rawuin = ' qq number ';
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") {
Prevent loops
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) {//Hand 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 and for group business cards
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 and for group business cards
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);

}
}


Pc

tencent://message/? UIN=QQ number &websitename=www.cn-mcn.com&menu=yes

PC with picture
<a target= "_blank" href= "Http://wpa.qq.com/msgrd?v=3&uin=QQ number &site=qq&menu=yes" ></a>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.