本帖最后由 remiliacn 于 2018-1-18 09:31 编辑
- function pluginBegin() {
- if (!$.sso_loadComplete) try {
- $.checkNPPlugin()
- } catch (t) {}
- $.sso_loadComplete = !0, $.report.setSpeedPoint($.plugin_isd_flag, 1, (new Date).getTime()), window.setTimeout(function(t) {
- $.report.isdSpeed($.plugin_isd_flag, .05)
- }, 2e3)
- }
- function ptui_qlogin_CB(t, e, n) {
- pt.qlogin.redirect(pt.ptui.target, e)
- }!window.console && (window.console = {
- log: function() {},
- warn: function() {},
- error: function() {}
- });
- var $ = window.Simple = function(t) {
- return "string" == typeof t ? document.getElementById(t) : t
- };
- $.cookie = {
- get: function(t) {
- var e;
- return function(t) {
- if (!t) return t;
- for (; t != unescape(t);) t = unescape(t);
- for (var e = ["<", ">", "'", '"', "%3c", "%3e", "%27", "%22", "%253c", "%253e", "%2527", "%2522"], n = ["<", ">", "'", """, "%26%23x3c%3B", "%26%23x3e%3B", "%26%23x27%3B", "%26%23x22%3B", "%2526%2523x3c%253B", "%2526%2523x3e%253B", "%2526%2523x27%253B", "%2526%2523x22%253B"], i = 0; i < e.length; i++) t = t.replace(new RegExp(e[i], "gi"), n[i]);
- return t
- }((e = document.cookie.match(RegExp("(^|;\\s*)" + t + "=([^;]*)(;|$)"))) ? unescape(e[2]) : "")
- },
- set: function(t, e, n, i, o) {
- var r = new Date;
- o ? (r.setTime(r.getTime() + 36e5 * o), document.cookie = t + "=" + e + "; expires=" + r.toGMTString() + "; path=" + (i || "/") + "; " + (n ? "domain=" + n + ";" : "")) : document.cookie = t + "=" + e + "; path=" + (i || "/") + "; " + (n ? "domain=" + n + ";" : "")
- },
- del: function(t, e, n) {
- document.cookie = t + "=; expires=Mon, 26 Jul 1997 05:00:00 GMT; path=" + (n || "/") + "; " + (e ? "domain=" + e + ";" : "")
- },
- uin: function() {
- var t = $.cookie.get("uin");
- return t ? parseInt(t.substring(1, t.length), 10) : null
- }
- }, $.http = {
- getXHR: function() {
- return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest
- },
- ajax: function(url, para, cb, method, type) {
- var xhr = $.http.getXHR();
- return xhr.open(method, url), xhr.onreadystatechange = function() {
- 4 == xhr.readyState && (xhr.status >= 200 && xhr.status < 300 || 304 === xhr.status || 1223 === xhr.status || 0 === xhr.status ? void 0 === type && xhr.responseText ? cb(eval("(" + xhr.responseText + ")")) : (cb(xhr.responseText), !xhr.responseText && $.badjs._smid && $.badjs("HTTP Empty[xhr.status]:" + xhr.status, url, 0, $.badjs._smid)) : $.badjs._smid && $.badjs("HTTP Error[xhr.status]:" + xhr.status, url, 0, $.badjs._smid), xhr = null)
- }, xhr.send(para), xhr
- },
- post: function(t, e, n, i) {
- var o = "";
- for (var r in e) o += "&" + r + "=" + e[r];
- return $.http.ajax(t, o, n, "POST", i)
- },
- get: function(t, e, n, i) {
- var o = [];
- for (var r in e) o.push(r + "=" + e[r]);
- return -1 == t.indexOf("?") && (t += "?"), t += o.join("&"), $.http.ajax(t, null, n, "GET", i)
- },
- jsonp: function(t) {
- var e = document.createElement("script");
- e.src = t, document.getElementsByTagName("head")[0].appendChild(e)
- },
- loadScript: function(t, e, n) {
- var i = document.createElement("script");
- i.onload = i.onreadystatechange = function() {
- this.readyState && "loaded" !== this.readyState && "complete" !== this.readyState || ("function" == typeof e && e(), i.onload = i.onreadystatechange = null, i.parentNode && i.parentNode.removeChild(i))
- }, i.src = t, document.getElementsByTagName("head")[0].appendChild(i)
- },
- preload: function(t) {
- var e = document.createElement("img");
- e.src = t, e = null
- }
- }, $.get = $.http.get, $.post = $.http.post, $.jsonp = $.http.jsonp, $.browser = function(t) {
- if (void 0 === $.browser.info) {
- var e = {
- type: ""
- },
- n = navigator.userAgent.toLowerCase();
- /webkit/.test(n) ? e = {
- type: "webkit",
- version: /webkit[\/ ]([\w.]+)/
- } : /opera/.test(n) ? e = {
- type: "opera",
- version: /version/.test(n) ? /version[\/ ]([\w.]+)/ : /opera[\/ ]([\w.]+)/
- } : /msie/.test(n) ? e = {
- type: "msie",
- version: /msie ([\w.]+)/
- } : /mozilla/.test(n) && !/compatible/.test(n) && (e = {
- type: "ff",
- version: /rv:([\w.]+)/
- }), e.version = (e.version && e.version.exec(n) || [0, "0"])[1], $.browser.info = e
- }
- return $.browser.info[t]
- }, $.e = {
- _counter: 0,
- _uid: function() {
- return "h" + $.e._counter++
- },
- add: function(t, e, n) {
- if ("object" != typeof t && (t = $(t)), document.addEventListener) t.addEventListener(e, n, !1);
- else if (document.attachEvent) {
- if (-1 != $.e._find(t, e, n)) return;
- var i = function(e) {
- e || (e = window.event);
- var i = {
- _event: e,
- type: e.type,
- target: e.srcElement,
- currentTarget: t,
- relatedTarget: e.fromElement ? e.fromElement : e.toElement,
- eventPhase: e.srcElement == t ? 2 : 3,
- clientX: e.clientX,
- clientY: e.clientY,
- screenX: e.screenX,
- screenY: e.screenY,
- altKey: e.altKey,
- ctrlKey: e.ctrlKey,
- shiftKey: e.shiftKey,
- keyCode: e.keyCode,
- data: e.data,
- origin: e.origin,
- stopPropagation: function() {
- this._event.cancelBubble = !0
- },
- preventDefault: function() {
- this._event.returnValue = !1
- }
- };
- Function.prototype.call ? n.call(t, i) : (t._currentHandler = n, t._currentHandler(i), t._currentHandler = null)
- };
- t.attachEvent("on" + e, i);
- var o = {
- element: t,
- eventType: e,
- handler: n,
- wrappedHandler: i
- },
- r = t.document || t,
- a = r.parentWindow,
- s = $.e._uid();
- a._allHandlers || (a._allHandlers = {}), a._allHandlers[s] = o, t._handlers || (t._handlers = []), t._handlers.push(s), a._onunloadHandlerRegistered || (a._onunloadHandlerRegistered = !0, a.attachEvent("onunload", $.e._removeAllHandlers))
- }
- },
- remove: function(t, e, n) {
- if (document.addEventListener) t.removeEventListener(e, n, !1);
- else if (document.attachEvent) {
- var i = $.e._find(t, e, n);
- if (-1 == i) return;
- var o = t.document || t,
- r = o.parentWindow,
- a = t._handlers[i],
- s = r._allHandlers[a];
- t.detachEvent("on" + e, s.wrappedHandler), t._handlers.splice(i, 1), delete r._allHandlers[a]
- }
- },
- _find: function(t, e, n) {
- var i = t._handlers;
- if (!i) return -1;
- for (var o = t.document || t, r = o.parentWindow, a = i.length - 1; a >= 0; a--) {
- var s = i[a],
- c = r._allHandlers[s];
- if (c.eventType == e && c.handler == n) return a
- }
- return -1
- },
- _removeAllHandlers: function() {
- var t = this;
- for (id in t._allHandlers) {
- var e = t._allHandlers[id];
- e.element.detachEvent("on" + e.eventType, e.wrappedHandler), delete t._allHandlers[id]
- }
- },
- src: function(t) {
- return t ? t.target : event.srcElement
- },
- stopPropagation: function(t) {
- t ? t.stopPropagation() : event.cancelBubble = !0
- },
- trigger: function(t, e) {
- var n = {
- HTMLEvents: "abort,blur,change,error,focus,load,reset,resize,scroll,select,submit,unload",
- UIEevents: "keydown,keypress,keyup",
- MouseEvents: "click,mousedown,mousemove,mouseout,mouseover,mouseup"
- };
- if (document.createEvent) {
- var i = "";
- "mouseleave" == e && (e = "mouseout"), "mouseenter" == e && (e = "mouseover");
- for (var o in n)
- if (n[o].indexOf(e)) {
- i = o;
- break
- }
- var r = document.createEvent(i);
- r.initEvent(e, !0, !1), t.dispatchEvent(r)
- } else document.createEventObject && t.fireEvent("on" + e)
- }
- }, $.bom = {
- query: function(t) {
- var e = window.location.search.match(new RegExp("(\\?|&)" + t + "=([^&]*)(&|$)"));
- return e ? decodeURIComponent(e[2]) : ""
- },
- getHash: function(t) {
- var e = window.location.hash.match(new RegExp("(#|&)" + t + "=([^&]*)(&|$)"));
- return e ? decodeURIComponent(e[2]) : ""
- }
- }, $.winName = {
- set: function(t, e) {
- var n = window.name || "";
- n.match(new RegExp(";" + t + "=([^;]*)(;|$)")) ? window.name = n.replace(new RegExp(";" + t + "=([^;]*)"), ";" + t + "=" + e) : window.name = n + ";" + t + "=" + e
- },
- get: function(t) {
- var e = window.name || "",
- n = e.match(new RegExp(";" + t + "=([^;]*)(;|$)"));
- return n ? n[1] : ""
- },
- clear: function(t) {
- var e = window.name || "";
- window.name = e.replace(new RegExp(";" + t + "=([^;]*)"), "")
- }
- }, $.localData = function() {
- function t() {
- var t = document.createElement("link");
- return t.style.display = "none", t.id = o, document.getElementsByTagName("head")[0].appendChild(t), t.addBehavior("#default#userdata"), t
- }
- function e() {
- if (void 0 === i)
- if (window.localStorage) i = localStorage;
- else try {
- i = t(), i.load(o)
- } catch (t) {
- return i = !1, !1
- }
- return !0
- }
- function n(t) {
- return "string" == typeof t && r.test(t)
- }
- var i, o = "ptlogin2.qq.com",
- r = /^[0-9A-Za-z_-]*$/;
- return {
- set: function(t, r) {
- var a = !1;
- if (n(t) && e()) try {
- r += "", window.localStorage ? (i.setItem(t, r), a = !0) : (i.setAttribute(t, r), i.save(o), a = i.getAttribute(t) === r)
- } catch (t) {}
- return a
- },
- get: function(t) {
- if (n(t) && e()) try {
- return window.localStorage ? i.getItem(t) : i.getAttribute(t)
- } catch (t) {}
- return null
- },
- remove: function(t) {
- if (n(t) && e()) try {
- return window.localStorage ? i.removeItem(t) : i.removeAttribute(t), !0
- } catch (t) {}
- return !1
- }
- }
- }(), $.str = function() {
- var htmlDecodeDict = {
- quot: '"',
- lt: "<",
- gt: ">",
- amp: "&",
- nbsp: " ",
- "#34": '"',
- "#60": "<",
- "#62": ">",
- "#38": "&",
- "#160": " "
- },
- htmlEncodeDict = {
- '"': "#34",
- "<": "#60",
- ">": "#62",
- "&": "#38",
- " ": "#160"
- };
- return {
- decodeHtml: function(t) {
- return t += "", t.replace(/&(quot|lt|gt|amp|nbsp);/gi, function(t, e) {
- return htmlDecodeDict[e]
- }).replace(/&#u([a-f\d]{4});/gi, function(t, e) {
- return String.fromCharCode(parseInt("0x" + e))
- }).replace(/&#(\d+);/gi, function(t, e) {
- return String.fromCharCode(+e)
- })
- },
- encodeHtml: function(t) {
- return t += "", t.replace(/["<>& ]/g, function(t) {
- return "&" + htmlEncodeDict[t] + ";"
- })
- },
- trim: function(t) {
- t += "";
- for (var t = t.replace(/^\s+/, ""), e = /\s/, n = t.length; e.test(t.charAt(--n)););
- return t.slice(0, n + 1)
- },
- uin2hex: function(str) {
- var maxLength = 16;
- str = parseInt(str);
- for (var hex = str.toString(16), len = hex.length, i = len; i < maxLength; i++) hex = "0" + hex;
- for (var arr = [], j = 0; j < maxLength; j += 2) arr.push("\\x" + hex.substr(j, 2));
- var result = arr.join("");
- return eval('result="' + result + '"'), result
- },
- bin2String: function(t) {
- for (var e = [], n = 0, i = t.length; n < i; n++) {
- var o = t.charCodeAt(n).toString(16);
- 1 == o.length && (o = "0" + o), e.push(o)
- }
- return e = "0x" + e.join(""), e = parseInt(e, 16)
- },
- str2bin: function(str) {
- for (var arr = [], i = 0; i < str.length; i += 2) arr.push(eval("'\\x" + str.charAt(i) + str.charAt(i + 1) + "'"));
- return arr.join("")
- },
- utf8ToUincode: function(t) {
- var e = "";
- try {
- var n = t.length,
- o = [];
- for (i = 0; i < n; i += 2) o.push("%" + t.substr(i, 2));
- e = decodeURIComponent(o.join("")), e = $.str.decodeHtml(e)
- } catch (t) {
- e = ""
- }
- return e
- },
- json2str: function(t) {
- var e = "";
- if ("undefined" != typeof JSON) e = JSON.stringify(t);
- else {
- var n = [];
- for (var i in t) n.push('"' + i + '":"' + t[i] + '"');
- e = "{" + n.join(",") + "}"
- }
- return e
- },
- time33: function(t) {
- for (var e = 0, n = 0, i = t.length; n < i; n++) e = (33 * e + t.charCodeAt(n)) % 4294967296;
- return e
- },
- hash33: function(t) {
- for (var e = 0, n = 0, i = t.length; n < i; ++n) e += (e << 5) + t.charCodeAt(n);
- return 2147483647 & e
- }
- }
- }(), $.css = function() {
- var t = document.documentElement;
- return {
- getComputedStyle: function(t) {
- return window.getComputedStyle ? window.getComputedStyle(t) : t.currentStyle
- },
- getCurrentPixelStyle: function(t, e) {
- if (window.getComputedStyle) var n = parseInt(window.getComputedStyle(t)[e]);
- else {
- var n = t.currentStyle[e] || 0;
- if ("auto" === n) switch (e || "") {
- case "width":
- case "height":
- return t.offsetHeight
- }
- var i = t.style.left,
- o = t.runtimeStyle.left;
- t.runtimeStyle.left = t.currentStyle.left, t.style.left = "fontSize" === e ? "1em" : n, n = t.style.pixelLeft + "px", t.style.left = i, t.runtimeStyle.left = o
- }
- return parseInt(n)
- },
- getPageScrollTop: function() {
- return window.pageYOffset || t.scrollTop || document.body.scrollTop || 0
- },
- getPageScrollLeft: function() {
- return window.pageXOffset || t.scrollLeft || document.body.scrollLeft || 0
- },
- getOffsetPosition: function(e) {
- e = $(e);
- var n = 0,
- i = 0;
- if (t.getBoundingClientRect && e.getBoundingClientRect) {
- var o = e.getBoundingClientRect(),
- r = t.clientTop || document.body.clientTop || 0,
- a = t.clientLeft || document.body.clientLeft || 0;
- n = o.top + this.getPageScrollTop() - r, i = o.left + this.getPageScrollLeft() - a
- } else
- do {
- n += e.offsetTop || 0, i += e.offsetLeft || 0, e = e.offsetParent
- } while (e);
- return {
- left: i,
- top: n
- }
- },
- getWidth: function(t) {
- return $(t).offsetWidth
- },
- getHeight: function(t) {
- return $(t).offsetHeight
- },
- show: function(t) {
- t.style.display = "block"
- },
- hide: function(t) {
- t.style.display = "none"
- },
- hasClass: function(t, e) {
- if (!t.className) return !1;
- for (var n = t.className.split(" "), i = 0, o = n.length; i < o; i++)
- if (e == n[i]) return !0;
- return !1
- },
- addClass: function(t, e) {
- $.css.updateClass(t, e, !1)
- },
- removeClass: function(t, e) {
- $.css.updateClass(t, !1, e)
- },
- updateClass: function(t, e, n) {
- for (var i = t.className.split(" "), o = {}, r = 0, a = i.length; r < a; r++) i[r] && (o[i[r]] = !0);
- if (e) {
- var s = e.split(" ");
- for (r = 0, a = s.length; r < a; r++) s[r] && (o[s[r]] = !0)
- }
- if (n) {
- var c = n.split(" ");
- for (r = 0, a = c.length; r < a; r++) c[r] && delete o[c[r]]
- }
- var l = [];
- for (var u in o) l.push(u);
- t.className = l.join(" ")
- },
- setClass: function(t, e) {
- t.className = e
- }
- }
- }(), $.animate = {
- fade: function(t, e, n, i, o) {
- if (t = $(t)) {
- t.effect || (t.effect = {});
- var r = Object.prototype.toString.call(e),
- a = 100;
- isNaN(e) ? "[object Object]" == r && e && e.to && (isNaN(e.to) || (a = e.to), isNaN(e.from) || (t.style.opacity = e.from / 100, t.style.filter = "alpha(opacity=" + e.from + ")")) : a = e, void 0 === t.effect.fade && (t.effect.fade = 0), window.clearInterval(t.effect.fade);
- var n = n || 1,
- i = i || 20,
- s = window.navigator.userAgent.toLowerCase(),
- c = function(t) {
- var e;
- if (-1 != s.indexOf("msie")) {
- var n = (t.currentStyle || {}).filter || "";
- e = n.indexOf("opacity") >= 0 ? parseFloat(n.match(/opacity=([^)]*)/)[1]) + "" : "100"
- } else {
- var i = t.ownerDocument.defaultView;
- i = i && i.getComputedStyle, e = 100 * (i && i(t, null).opacity || 1)
- }
- return parseFloat(e)
- }(t),
- l = c < a ? 1 : -1; - 1 != s.indexOf("msie") && i < 15 && (n = Math.floor(15 * n / i), i = 15);
- var u = function() {
- c += n * l, (Math.round(c) - a) * l >= 0 ? (t.style.opacity = a / 100, t.style.filter = "alpha(opacity=" + a + ")", window.clearInterval(t.effect.fade), "function" == typeof o && o(t)) : (t.style.opacity = c / 100, t.style.filter = "alpha(opacity=" + c + ")")
- };
- t.effect.fade = window.setInterval(u, i)
- }
- },
- animate: function(t, e, n, i, o) {
- if (t = $(t)) {
- t.effect || (t.effect = {}), void 0 === t.effect.animate && (t.effect.animate = 0);
- for (var r in e) e[r] = parseInt(e[r]) || 0;
- window.clearInterval(t.effect.animate);
- var n = n || 10,
- i = i || 20,
- a = function(t) {
- return {
- left: t.offsetLeft,
- top: t.offsetTop
- }
- }(t),
- s = {
- width: t.clientWidth,
- height: t.clientHeight,
- left: a.left,
- top: a.top
- },
- c = [];
- if (-1 == window.navigator.userAgent.toLowerCase().indexOf("msie") || "BackCompat" != document.compatMode) {
- var l = document.defaultView ? document.defaultView.getComputedStyle(t, null) : t.currentStyle,
- u = e.width || 0 == e.width ? parseInt(e.width) : null,
- p = e.height || 0 == e.height ? parseInt(e.height) : null;
- "number" == typeof u && (c.push("width"), e.width = u - l.paddingLeft.replace(/\D/g, "") - l.paddingRight.replace(/\D/g, "")), "number" == typeof p && (c.push("height"), e.height = p - l.paddingTop.replace(/\D/g, "") - l.paddingBottom.replace(/\D/g, "")), i < 15 && (n = Math.floor(15 * n / i), i = 15)
- }
- var d = e.left || 0 == e.left ? parseInt(e.left) : null,
- f = e.top || 0 == e.top ? parseInt(e.top) : null;
- "number" == typeof d && (c.push("left"), t.style.position = "absolute"), "number" == typeof f && (c.push("top"), t.style.position = "absolute");
- for (var g = [], h = c.length, r = 0; r < h; r++) g[c[r]] = s[c[r]] < e[c[r]] ? 1 : -1;
- var m = t.style,
- v = function() {
- for (var i = !0, r = 0; r < h; r++) s[c[r]] = s[c[r]] + g[c[r]] * Math.abs(e[c[r]] - s[c[r]]) * n / 100, (Math.round(s[c[r]]) - e[c[r]]) * g[c[r]] >= 0 ? (i = i && !0, m[c[r]] = e[c[r]] + "px") : (i = i && !1, m[c[r]] = s[c[r]] + "px");
- i && (window.clearInterval(t.effect.animate), "function" == typeof o && o(t))
- };
- t.effect.animate = window.setInterval(v, i)
- }
- },
- animate2: function(t, e, n, i, o) {
- var r = n || 1,
- a = i || 20,
- s = $(t),
- c = $.css.getComputedStyle(s),
- l = {},
- u = {};
- for (var p in e) l[p] = c[p].replace(/[-\d\s]/g, "") || e[p].replace(/[-\d\s]/g, "") || "", e[p] = parseFloat(e[p]), u[p] = parseFloat(c[p]);
- var d = 100 / r,
- f = 0,
- g = setInterval(function() {
- if (f++ >= d) return void clearInterval(g);
- for (var t in e) s.style[t] = (e[t] - u[t]) * f / d + u[t] + l[t]
- }, a)
- }
- }, $.check = {
- isHttps: function() {
- return "https:" == document.location.protocol
- },
- isSsl: function() {
- return /^ssl./i.test(document.location.host)
- },
- isIpad: function() {
- return /ipad/i.test(navigator.userAgent.toLowerCase())
- },
- isQQ: function(t) {
- return /^[1-9]{1}\d{4,9}$/.test(t)
- },
- isQQMail: function(t) {
- return /^[1-9]{1}\d{4,9}@qq\.com$/.test(t)
- },
- isNullQQ: function(t) {
- return /^\d{1,4}$/.test(t)
- },
- isNick: function(t) {
- return /^[a-zA-Z]{1}([a-zA-Z0-9]|[-_]){0,19}$/.test(t)
- },
- isName: function(t) {
- return "<请输入帐号>" != t && /[\u4E00-\u9FA5]{1,8}/.test(t)
- },
- isPhone: function(t) {
- return /^(?:86|886|)1\d{10}\s*$/.test(t)
- },
- isSeaPhone: function(t) {
- return /^(00)?(?:852|853|886(0)?\d{1})\d{8}$/.test(t)
- },
- isMail: function(t) {
- return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(t)
- },
- isQiyeQQ800: function(t) {
- return /^(800)\d{7}$/.test(t)
- },
- isPassword: function(t) {
- return t && t.length >= 16
- },
- isForeignPhone: function(t) {
- return /^00\d{7,}/.test(t)
- },
- needVip: function(t) {
- for (var e = ["21001601", "21000110", "21000121", "46000101", "716027609", "716027610", "549000912", "637009801"], n = !0, i = 0, o = e.length; i < o; i++)
- if (e[i] == t) {
- n = !1;
- break
- }
- return n
- },
- isPaipai: function() {
- return /paipai.com$/.test(window.location.hostname)
- },
- is_weibo_appid: function(t) {
- return 46000101 == t || 607000101 == t || 558032501 == t || 682023901 == t
- }
- }, $.report = {
- monitor: function(t, e) {
- if (!(Math.random() > (e || 1))) try {
- var n = location.protocol + "//ui.ptlogin2.qq.com/cgi-bin/report?id=" + t;
- $.http.preload(n)
- } catch (t) {}
- },
- nlog: function(t, e, n, i) {
- if (!(Math.random() >= (n || 1))) try {
- var o = "//ui.ptlogin2.qq.com/cgi-bin/report?",
- r = encodeURIComponent(t + "|_|" + location.href + "|_|" + window.navigator.userAgent);
- e = e || 0, i && (o += "u=" + i + "&"), o += "id=" + e + "&msg=" + r + "&v=" + Math.random(), $.http.preload(o)
- } catch (t) {}
- },
- simpleIsdSpeed: function(t, e) {
- if (Math.random() < (e || 1)) {
- var n = "http://isdspeed.qq.com/cgi-bin/r.cgi?";
- $.check.isHttps() && (n = "https://huatuospeed.weiyun.com/cgi-bin/r.cgi?"), n += t, $.http.preload(n)
- }
- },
- isdSpeed: function(t, e) {
- var n = !1,
- i = "http://isdspeed.qq.com/cgi-bin/r.cgi?";
- if ($.check.isHttps() && (i = "https://huatuospeed.weiyun.com/cgi-bin/r.cgi?"), i += t, Math.random() < (e || 1)) {
- var o = $.report.getSpeedPoints(t);
- for (var r in o) o[r] && o[r] < 3e4 && (i += "&" + r + "=" + o[r], n = !0);
- i += "&v=" + Math.random(), n && $.http.preload(i)
- }
- $.report.setSpeedPoint(t)
- },
- speedPoints: {},
- basePoint: {},
- setBasePoint: function(t, e) {
- $.report.basePoint[t] = e
- },
- setSpeedPoint: function(t, e, n) {
- e ? ($.report.speedPoints[t] || ($.report.speedPoints[t] = {}), $.report.speedPoints[t][e] = n - $.report.basePoint[t]) : $.report.speedPoints[t] = {}
- },
- setSpeedPoints: function(t, e) {
- $.report.speedPoints[t] = e
- },
- getSpeedPoints: function(t) {
- return $.report.speedPoints[t]
- }
- }, $.sso_ver = 0, $.sso_state = 0, $.plugin_isd_flag = "", $.nptxsso = null, $.activetxsso = null, $.sso_loadComplete = !0, $.np_clock = 0, $.loginQQnum = 0, $.suportActive = function() {
- var t = !0;
- try {
- window.ActiveXObject || window.ActiveXObject.prototype ? (t = !0, window.ActiveXObject.prototype && !window.ActiveXObject && $.report.nlog("activeobject 判断有问题")) : t = !1
- } catch (e) {
- t = !1
- }
- return t
- }, $.getLoginQQNum = function() {
- try {
- var t = 0;
- if ($.suportActive()) {
- $.plugin_isd_flag = "flag1=7808&flag2=1&flag3=20", $.report.setBasePoint($.plugin_isd_flag, new Date);
- var e = new ActiveXObject("SSOAxCtrlForPTLogin.SSOForPTLogin2");
- $.activetxsso = e;
- var n = e.CreateTXSSOData();
- e.InitSSOFPTCtrl(0, n);
- t = e.DoOperation(2, n).GetArray("PTALIST").GetSize();
- try {
- var i = e.QuerySSOInfo(1);
- $.sso_ver = i.GetInt("nSSOVersion")
- } catch (t) {
- $.sso_ver = 0
- }
- } else if (navigator.mimeTypes["application/nptxsso"])
- if ($.plugin_isd_flag = "flag1=7808&flag2=1&flag3=21", $.report.setBasePoint($.plugin_isd_flag, (new Date).getTime()), $.nptxsso || ($.nptxsso = document.createElement("embed"), $.nptxsso.type = "application/nptxsso", $.nptxsso.style.width = "0px", $.nptxsso.style.height = "0px", document.body.appendChild($.nptxsso)), "function" != typeof $.nptxsso.InitPVANoST) $.sso_loadComplete = !1, $.report.nlog("没有找到插件的InitPVANoST方法", 269929);
- else {
- var o = $.nptxsso.InitPVANoST();
- o && (t = $.nptxsso.GetPVACount(), $.sso_loadComplete = !0);
- try {
- $.sso_ver = $.nptxsso.GetSSOVersion()
- } catch (t) {
- $.sso_ver = 0
- }
- }
- else $.report.nlog("插件没有注册成功", 263744), $.sso_state = 2
- } catch (t) {
- var r = null;
- try {
- r = $.http.getXHR()
- } catch (t) {
- return 0
- }
- var a = t.message || t;
- return /^pt_windows_sso/.test(a) ? (/^pt_windows_sso_\d+_3/.test(a) ? $.report.nlog("QQ插件不支持该url" + t.message, 326044) : $.report.nlog("QQ插件抛出内部错误" + t.message, 325361), $.sso_state = 1) : r && "msie" == $.browser("type") ? "Win64" != window.navigator.platform ? ($.report.nlog("可能没有安装QQ" + t.message, 322340), $.sso_state = 2) : $.report.nlog("使用64位IE" + t.message, 343958) : ($.report.nlog("获取登录QQ号码出错" + t.message, 263745), window.ActiveXObject && "Win32" == window.navigator.platform && ($.sso_state = 1)), 0
- }
- return $.loginQQnum = t, t
- }, $.checkNPPlugin = function() {
- var t = 10;
- window.clearInterval($.np_clock), $.np_clock = window.setInterval(function() {
- "function" == typeof $.nptxsso.InitPVANoST || 0 == t ? (window.clearInterval($.np_clock), "function" == typeof $.nptxsso.InitPVANoST && pt.plogin.auth()) : t--
- }, 200)
- }, $.guanjiaPlugin = null, $.initGuanjiaPlugin = function() {
- try {
- window.ActiveXObject ? $.guanjiaPlugin = new ActiveXObject("npQMExtensionsIE.Basic") : navigator.mimeTypes["application/qqpcmgr-extensions-mozilla"] && ($.guanjiaPlugin = document.createElement("embed"), $.guanjiaPlugin.type = "application/qqpcmgr-extensions-mozilla", $.guanjiaPlugin.style.width = "0px", $.guanjiaPlugin.style.height = "0px", document.body.appendChild($.guanjiaPlugin));
- var t = $.guanjiaPlugin.QMGetVersion().split(".");
- 4 == t.length && t[2] >= 9319 || ($.guanjiaPlugin = null)
- } catch (t) {
- $.guanjiaPlugin = null
- }
- },
- function() {
- "" != $.cookie.get("nohost_guid") && $.http.loadScript("/nohost_htdocs/js/SwitchHost.js", function() {
- var t = window.SwitchHost && window.SwitchHost.init;
- t && t()
- })
- }(), setTimeout(function() {
- $.report.setBasePoint("flag1=7808&flag2=1&flag3=9", 0), void 0 !== window.postMessage ? $.report.setSpeedPoint("flag1=7808&flag2=1&flag3=9", 1, 2e3) : $.report.setSpeedPoint("flag1=7808&flag2=1&flag3=9", 1, 1e3), $.report.isdSpeed("flag1=7808&flag2=1&flag3=9", .01)
- }, 500), document.getElementsByClassName || (document.getElementsByClassName = function(t) {
- for (var e = [], n = new RegExp("(^| )" + t + "( |$)"), i = document.getElementsByTagName("*"), o = 0, r = i.length; o < r; o++) n.test(i[o].className) && e.push(i[o]);
- return e
- }), pt.setHeader = function(t) {
- for (var e in t) "" != e && ($("img_" + e) ? t[e] && t[e].indexOf("sys.getface.qq.com") > -1 ? $("img_" + e).src = pt.plogin.dftImg : $("img_" + e).src = t[e] || pt.plogin.dftImg : t[e] && t[e].indexOf("sys.getface.qq.com") > -1 ? $("auth_face").src = pt.plogin.dftImg : $("auth_face").src = t[e] || pt.plogin.dftImg)
- }, pt.qlogin = function() {
- var t = {
- 24: 3
- },
- e = {
- 24: 260
- },
- n = [],
- i = [],
- o = 9,
- r = '<a hidefocus=true draggable=false href="javascript:void(0);" tabindex="#tabindex#" uin="#uin#" type="#type#" onclick="pt.qlogin.imgClick(this);return false;" onfocus="pt.qlogin.imgFocus(this);" onblur="pt.qlogin.imgBlur(this);" onmouseover="pt.qlogin.imgMouseover(this);" onmousedown="pt.qlogin.imgMouseDowm(this)" onmouseup="pt.qlogin.imgMouseUp(this)" onmouseout="pt.qlogin.imgMouseUp(this)" class="face" > <img id="img_#uin#" uin="#uin#" type="#type#" src="#src#" onerror="pt.qlogin.imgErr(this);" /> <span id="mengban_#uin#"></span> <span class="uin_menban"></span> <span class="uin">#uin#</span> <span id="img_out_#uin#" uin="#uin#" type="#type#" class="img_out" ></span> <span id="nick_#uin#" class="#nick_class#">#nick#</span> <span class="#vip_logo#"></span> </a>',
- a = !1,
- s = 1,
- c = t[pt.ptui.style],
- l = e[pt.ptui.style],
- u = 1,
- p = null,
- d = $.check.isHttps() ? "https://ui.ptlogin2.qq.com/style/0/images/1.gif" : "http://imgcache.qq.com/ptlogin/v4/style/0/images/1.gif",
- f = function(t) {
- try {
- window.external.Sogou_ThirdPageLoaded(t)
- } catch (t) {}
- },
- g = function() {
- try {
- window.external.Sogou_ThirdLogging()
- } catch (t) {}
- },
- h = function(t) {
- function e() {
- $("qlogin_list").style.left = 1 == t ? a * o - u * i + "px" : (2 - u) * i - a * o + 2 + "px", ++a > r && window.clearInterval(n)
- }
- if (!(1 == t && u <= 1 || 2 == t && u >= s)) {
- var n = 0,
- i = $("qlogin_show").offsetWidth || l,
- o = 10,
- r = Math.ceil(i / o),
- a = 0;
- 1 == t ? (u--, u <= 1 ? ($.css.hide($("prePage")), $.css.show($("nextPage"))) : ($.css.show($("nextPage")), $.css.show($("prePage")))) : (u++, u >= s ? ($.css.hide($("nextPage")), $.css.show($("prePage"))) : ($.css.show($("nextPage")), $.css.show($("prePage")))), n = window.setInterval(e, 1)
- }
- },
- m = function() {
- if (i.length = 0, $.suportActive()) try {
- var t = new ActiveXObject("SSOAxCtrlForPTLogin.SSOForPTLogin2"),
- e = t.CreateTXSSOData();
- t.InitSSOFPTCtrl(0, e);
- var n = t.DoOperation(1, e);
- if (null == n) return;
- for (var r = n.GetArray("PTALIST"), a = r.GetSize(), s = 0; s < a; s++) {
- var c = r.GetData(s),
- l = c.GetDWord("dwSSO_Account_dwAccountUin"),
- u = c.GetDWord("dwSSO_Account_dwAccountUin"),
- p = "",
- d = c.GetByte("cSSO_Account_cAccountType"),
- f = l;
- if (1 == d) try {
- p = c.GetArray("SSO_Account_AccountValueList"), f = p.GetStr(0)
- } catch (t) {}
- var g = 0;
- try {
- g = c.GetWord("wSSO_Account_wFaceIndex")
- } catch (t) {
- g = 0
- }
- var h = "";
- try {
- h = c.GetStr("strSSO_Account_strNickName")
- } catch (t) {
- h = ""
- }
- for (var m = (c.GetBuf("bufGTKey_PTLOGIN"), c.GetBuf("bufST_PTLOGIN")), v = "", w = m.GetSize(), y = 0; y < w; y++) {
- var _ = m.GetAt(y).toString("16");
- 1 == _.length && (_ = "0" + _), v += _
- }
- var x = c.GetDWord("dwSSO_Account_dwUinFlag"),
- S = {
- uin: l,
- name: f,
- uinString: u,
- type: d,
- face: g,
- nick: h,
- flag: x,
- key: v,
- loginType: 2
- };
- i.push(S)
- }
- } catch (t) {
- $.report.nlog("IE获取快速登录信息失败:" + t.message, "391626")
- } else try {
- $.nptxsso || ($.nptxsso = document.createElement("embed"), $.nptxsso.type = "application/nptxsso", $.nptxsso.style.width = "0px", $.nptxsso.style.height = "0px", document.body.appendChild($.nptxsso));
- var b = $.nptxsso;
- if (0 != b.InitPVA()) {
- for (var P = b.GetPVACount(), y = 0; y < P; y++) {
- var T = b.GetUin(y),
- A = b.GetAccountName(y),
- u = b.GetUinString(y),
- I = b.GetFaceIndex(y),
- C = b.GetNickname(y),
- E = (b.GetGender(y), b.GetUinFlag(y)),
- k = (b.GetGTKey(y), b.GetST(y)),
- S = {
- uin: T,
- name: A,
- uinString: u,
- type: 0,
- face: I,
- nick: C,
- flag: E,
- key: k,
- loginType: 2
- };
- i.push(S)
- }
- "function" == typeof b.GetKeyIndex && (o = b.GetKeyIndex())
- }
- } catch (t) {
- $.report.nlog("非IE获取快速登录信息失败:" + (t.message || t), "391627")
- }
- },
- v = function(t) {
- for (var e = 0, n = i.length; e < n; e++) {
- var o = i[e];
- if (o.uinString == t) return o
- }
- return null
- },
- w = function() {
- m();
- var t = [],
- e = i.length,
- o = $.cookie.get("pt2gguin");
- o = o ? parseInt(o.substring(1, o.length), 10) : null;
- for (var r, a = 0; a < e; a++) {
- var s = i[a];
- if (o && s.uinString == o ? r = s : t.push(s), 5 == t.length) break
- }
- return r && t.length < 5 && t.push(r), n = t, t
- },
- y = function() {
- var t = "",
- e = w(),
- n = $("qlogin_list");
- if (null != n) {
- var i = e.length > 5 ? 5 : e.length;
- if (0 != i) {
- s = Math.ceil(i / c), s >= 2 && $.css.show($("nextPage"));
- for (var o = 0; o < i; o++) {
- var u = e[o],
- p = $.str.encodeHtml(u.uinString + ""),
- f = $.str.encodeHtml(u.nick);
- "" == $.str.trim(u.nick) && (f = p);
- var g = u.flag,
- h = 4 == (4 & g),
- m = d;
- t += r.replace(/#uin#/g, p).replace(/#nick#/g, function() {
- return f
- }).replace(/#nick_class#/, h ? "nick red" : "nick").replace(/#vip_logo#/, h ? "vip_logo" : "").replace(/#type#/g, u.loginType).replace(/#src#/g, m).replace(/#tabindex#/, o + 1).replace(/#class#/g, 1 == u.loginType ? "auth" : "hide")
- }
- n.innerHTML = t, n.style.width = (1 == s ? $("qlogin_show").offsetWidth || l : ($("qlogin_show").offsetWidth || l) / c * i) + "px", a = !0, j()
- }
- }
- },
- _ = function(t, e) {
- switch (t + "") {
- case "0":
- location.href = e;
- break;
- case "1":
- top.location.href = e;
- break;
- default:
- top.location.href = e
- }
- },
- x = function(t) {
- if (g(), t) {
- m();
- var e = v(t);
- if (null == e) $.report.monitor(231544, 1), _(pt.ptui.target, pt.ptui.s_url);
- else {
- var n = S(e);
- $.http.loadScript(n)
- }
- }
- },
- S = function(t) {
- var e = (pt.ptui.isHttps ? "https://ssl.ptlogin2." : "http://ptlogin2.") + pt.ptui.domain + "/" + (pt.ptui.jumpname || "jump") + "?";
- return e += "clientuin=" + t.uin + "&clientkey=" + t.key + "&keyindex=" + o + "&pt_aid=" + pt.ptui.appid + (pt.ptui.daid ? "&daid=" + pt.ptui.daid : "") + "&u1=" + encodeURIComponent(pt.ptui.s_url), "0" != pt.ptui.csimc && pt.ptui.csimc && (e += "&csimc=" + pt.ptui.csimc + "&csnum=" + pt.ptui.csnum + "&authid=" + pt.ptui.authid), "1" == pt.ptui.pt_qzone_sig && (e += "&pt_qzone_sig=1"), "1" == pt.ptui.pt_light && (e += "&pt_light=1"), pt.ptui.pt_3rd_aid && (e += "&pt_3rd_aid=" + pt.ptui.pt_3rd_aid), e += "&ptopt=1"
- },
- b = function() {
- var t = getAuthLoginSubmitUrl();
- pt.plogin.redirect(pt.ptui.target, t)
- },
- P = function(t) {
- return t.onerror = null, t.src != d && (t.src = d), !1
- },
- T = function(t) {
- var e = t.getAttribute("type"),
- n = t.getAttribute("uin");
- switch (e) {
- case "1":
- b();
- break;
- case "2":
- x(n)
- }
- },
- A = function(t) {
- if (t) {
- var e = t.getAttribute("uin");
- e && ($("img_out_" + e).className = "img_out_focus")
- }
- },
- I = function(t) {
- if (t) {
- var e = t.getAttribute("uin");
- e && ($("img_out_" + e).className = "img_out")
- }
- },
- C = function(t) {
- t && (p != t && (I(p), p = t), A(t))
- },
- E = function(t) {
- if (t) {
- var e = t.getAttribute("uin"),
- n = $("mengban_" + e);
- n && (n.className = "face_mengban")
- }
- },
- k = function(t) {
- if (t) {
- var e = t.getAttribute("uin"),
- n = $("mengban_" + e);
- n && (n.className = "")
- }
- },
- j = function() {
- var t = $("qlogin_list"),
- e = t.getElementsByTagName("a");
- e.length > 0 && (p = e[0])
- },
- H = function() {
- try {
- p.focus()
- } catch (t) {}
- },
- O = function() {
- var t = $("prePage"),
- e = $("nextPage");
- t && $.e.add(t, "click", function(t) {
- h(1)
- }), e && $.e.add(e, "click", function(t) {
- h(2)
- }), $.e.add(window, "load", function() {
- H()
- })
- },
- q = function() {
- pt.ptui.isHttps;
- for (var t = n.length, e = 0; e < t; e++) $.http.loadScript((pt.ptui.isHttps ? "https://ssl.ptlogin2." : "http://ptlogin2.") + pt.ptui.domain + "/getface?appid=" + pt.ptui.appid + "&imgtype=3&encrytype=0&devtype=0&keytpye=0&uin=" + n[e].uinString + "&r=" + Math.random())
- },
- N = function() {
- pt.ptui.isHttps = $.check.isHttps(), O(), y(), f(n.length > 0 ? 0 : 1), q()
- };
- return N(), {
- qloginInit: N,
- hasBuildQlogin: a,
- buildQloginList: y,
- imgClick: T,
- imgFocus: A,
- imgBlur: I,
- imgMouseover: C,
- imgMouseDowm: E,
- imgMouseUp: k,
- imgErr: P,
- focusHeader: H,
- initFace: q,
- authLoginSubmit: b,
- redirect: _
- }
- }();
复制代码 |