1var is_video_vip, is_login, is_office_vip; 2var _kstat_lock = false; 3var Phonersg = /^1\d{10}$/; // ææºå·æ£å表达å¼1 4var Codersg = /^\d{6}$/; // éªè¯ç æ£åè¡¨è¾¾å¼ 5const ENT_TIME_OVER = 11; 6const ENT_NOT_IDENTIFY = 12; 7const ENT_MEMBER_OVER = 13; 8const ENT_SELF_EMPLOYED = 14; //ä¸ªä½æ·ä¸è½½è¢«éå¶æ¨¡å 9// æ»åæå¨ 10var Login = { 11 /** 12 * @desc çº¯ææºæ³¨åç»å½æ¡æ¾ç¤º 13 */ 14 phoneRegister: function () { 15 $(".down-limit").hide(); 16 $("#user-register").parent().show(); //æ³¨åæ¡æ¾ç¤º 17 }, 18 phoneLogin: function () { 19 $(".down-limit").hide(); 20 $("#user-login").parent().find(".qq-wechatLogin").show(); 21 $("#user-login").parent().find(".phone-loginbox").hide(); 22 $("#user-login").parent().show(); //ææºç»å½æ¡æ¾ç¤º 23 $(".wxLogin-box,.phoneLogin-box,.mainLogin-box").hide(); 24 $(".mainLogin-box").show(); 25 current_step = 0; //ææºçº¯ç»å½æä½ 26 }, 27 phoneSingleLogin: function () { //çº¯ææºç»å½ 28 $(".down-limit").hide(); 29 $("#user-login").parent().find(".qq-wechatLogin").hide(); 30 $("#user-login").parent().find(".phone-loginbox").show(); 31 $("#user-login").parent().find(".phone-loginbox").find("input").val(' '); 32 $("#user-login").parent().find(".phone-loginbox").find(".login-btn").removeClass("on"); 33 $("#user-login").parent().find(".phone-loginbox").find(".send-code").html('ç¹å»åé'); 34 $("#user-login").parent().show(); //ææºç»å½æ¡æ¾ç¤º 35 }, 36 userBindPhone: function () { 37 $(".down-limit").hide(); 38 $("#user-bind").parent().find(".qq-wechatLogin").hide(); 39 $("#user-bind").parent().find(".phone-loginbox").show(); 40 $("#user-bind").parent().find(".phone-loginbox").find("input").val(' '); 41 $("#user-bind").parent().find(".phone-loginbox").find(".login-btn").removeClass("on"); 42 $("#user-bind").parent().find(".phone-loginbox").find(".send-code").html('ç¹å»åé'); 43 $("#user-bind").parent().show(); //æ°ç¨æ·ç»å®ææºå· 44 current_step = 1; //æ°ç¨æ·ç»å®ææºå· 45 } 46} 47/*ææºç»éjs*/ 48var phone_test = []; //ææºå·ç éªè¯ 49phone_test[0] = 0; //çº¯ææºç»å½ 50phone_test[1] = 0; //çº¯ææºç»å® 51 52var phone_send = []; //ææºå鿬¡æ° 53phone_send[0] = 0; //çº¯ææºç»å½ 54phone_send[1] = 0; //çº¯ææºç»å®ææº 55 56var current_step = 0; //ç®åå¤å¨çæ¥éª¤ 57var is_send = true; //æ¯å¦å¯ä»¥åéçä¿¡ 58var send_message_num = 0; //åéçä¿¡çæ¬¡æ° 59 60//ç叿µjs 61(function (e, t, n) { "use strict"; var r = t.event, i; r.special.smartresize = { setup: function () { t(this).bind("resize", r.special.smartresize.handler) }, teardown: function () { t(this).unbind("resize", r.special.smartresize.handler) }, handler: function (e, t) { var n = this, s = arguments; e.type = "smartresize", i && clearTimeout(i), i = setTimeout(function () { r.dispatch.apply(n, s) }, t === "execAsap" ? 0 : 100) } }, t.fn.smartresize = function (e) { return e ? this.bind("smartresize", e) : this.trigger("smartresize", ["execAsap"]) }, t.Mason = function (e, n) { this.element = t(n), this._create(e), this._init() }, t.Mason.settings = { isResizable: !0, isAnimated: !1, animationOptions: { queue: !1, duration: 500 }, gutterWidth: 0, isRTL: !1, isFitWidth: !1, containerStyle: { position: "relative" } }, t.Mason.prototype = { _filterFindBricks: function (e) { var t = this.options.itemSelector; return t ? e.filter(t).add(e.find(t)) : e }, _getBricks: function (e) { var t = this._filterFindBricks(e).css({ position: "absolute" }).addClass("masonry-brick"); return t }, _create: function (n) { this.options = t.extend(!0, {}, t.Mason.settings, n), this.styleQueue = []; var r = this.element[0].style; this.originalStyle = { height: r.height || "" }; var i = this.options.containerStyle; for (var s in i) this.originalStyle[s] = r[s] || ""; this.element.css(i), this.horizontalDirection = this.options.isRTL ? "right" : "left"; var o = this.element.css("padding-" + this.horizontalDirection), u = this.element.css("padding-top"); this.offset = { x: o ? parseInt(o, 10) : 0, y: u ? parseInt(u, 10) : 0 }, this.isFluid = this.options.columnWidth && typeof this.options.columnWidth == "function"; var a = this; setTimeout(function () { a.element.addClass("masonry") }, 0), this.options.isResizable && t(e).bind("smartresize.masonry", function () { a.resize() }), this.reloadItems() }, _init: function (e) { this._getColumns(), this._reLayout(e) }, option: function (e, n) { t.isPlainObject(e) && (this.options = t.extend(!0, this.options, e)) }, layout: function (e, t) { for (var n = 0, r = e.length; n < r; n++)this._placeBrick(e[n]); var i = {}; i.height = Math.max.apply(Math, this.colYs); if (this.options.isFitWidth) { var s = 0; n = this.cols; while (--n) { if (this.colYs[n] !== 0) break; s++ }
61 i.width = (this.cols - s) * this.columnWidth - this.options.gutterWidth } this.styleQueue.push({ $el: this.element, style: i }); var o = this.isLaidOut ? this.options.isAnimated ? "animate" : "css" : "css", u = this.options.animationOptions, a; for (n = 0, r = this.styleQueue.length; n < r; n++)a = this.styleQueue[n], a.$el[o](a.style, u); this.styleQueue = [], t && t.call(e), this.isLaidOut = !0 }, _getColumns: function () { var e = this.options.isFitWidth ? this.element.parent() : this.element, t = e.width(); this.columnWidth = this.isFluid ? this.options.columnWidth(t) : this.options.columnWidth || this.$bricks.outerWidth(!0) || t, this.columnWidth += this.options.gutterWidth, this.cols = Math.floor((t + this.options.gutterWidth) / this.columnWidth), this.cols = Math.max(this.cols, 1) }, _placeBrick: function (e) { var n = t(e), r, i, s, o, u; r = Math.ceil(n.outerWidth(!0) / this.columnWidth), r = Math.min(r, this.cols); if (r === 1) s = this.colYs; else { i = this.cols + 1 - r, s = []; for (u = 0; u < i; u++)o = this.colYs.slice(u, u + r), s[u] = Math.max.apply(Math, o) } var a = Math.min.apply(Math, s), f = 0; for (var l = 0, c = s.length; l < c; l++)if (s[l] === a) { f = l; break } var h = { top: a + this.offset.y }; h[this.horizontalDirection] = this.columnWidth * f + this.offset.x, this.styleQueue.push({ $el: n, style: h }); var p = a + n.outerHeight(!0), d = this.cols + 1 - c; for (l = 0; l < d; l++)this.colYs[f + l] = p }, resize: function () { var e = this.cols; this._getColumns(), (this.isFluid || this.cols !== e) && this._reLayout() }, _reLayout: function (e) { var t = this.cols; this.colYs = []; while (t--) this.colYs.push(0); this.layout(this.$bricks, e) }, reloadItems: function () { this.$bricks = this._getBricks(this.element.children()) }, reload: function (e) { this.reloadItems(), this._init(e) }, appended: function (e, t, n) { if (t) { this._filterFindBricks(e).css({ top: this.element.height() }); var r = this; setTimeout(function () { r._appended(e, n) }, 1) } else this._appended(e, n) }, _appended: function (e, t) { var n = this._getBricks(e); this.$bricks = this.$bricks.add(n), this.layout(n, t) }, remove: function (e) { this.$bricks = this.$bricks.not(e), e.remove() }, destroy: function () { this.$bricks.removeClass("masonry-brick").each(function () { this.style.position = "", this.style.top = "", this.style.left = "" }); var n = this.element[0].style; for (var r in this.originalStyle) n[r] = this.originalStyle[r]; this.element.unbind(".masonry").removeClass("masonry").removeData("masonry"), t(e).unbind(".masonry") } }, t.fn.imagesLoaded = function (e) { function u() { e.call(n, r) } function a(e) { var n = e.target; n.src !== s && t.inArray(n, o) === -1 && (o.push(n), --i <= 0 && (setTimeout(u), r.unbind(".imagesLoaded", a))) } var n = this, r = n.find("img").add(n.filter("img")), i = r.length, s = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==", o = []; return i || u(), r.bind("load.imagesLoaded error.imagesLoaded", a).each(function () { var e = this.src; this.src = s, this.src = e }), n }; var s = function (t) { e.console && e.console.error(t) }; t.fn.masonry = function (e) { if (typeof e == "string") { var n = Array.prototype.slice.call(arguments, 1); this.each(function () { var r = t.data(this, "masonry"); if (!r) { s("cannot call methods on masonry prior to initialization; attempted to call method '" + e + "'"); return } if (!t.isFunction(r[e]) || e.charAt(0) === "_") { s("no such method '" + e + "' for masonry instance"); return } r[e].apply(r, n) }) } else this.each(function () { var n = t.data(this, "masonry"); n ? (n.option(e || {}), n._init()) : t.data(this, "masonry", new t.Mason(e, this)) }); return this } })(window, jQuery);/**********jquery.masonry.min.js end*************/ 62$("#element").masonry({ 63 64 itemSelector: ".flow-box", 65 66 singleMode: true, 67 68 isAnimated: true, 69 70 resizeable: true, 71 //cloumnWidth:1 72 //gutterWidth:1, 73 74}); 75$(".home-flow").masonry({ 76 77 itemSelector: ".heart-flow-box", 78 79 singleMode: true, 80 81 isAnimated: true, 82 83 resizeable: true, 84 //cloumnWidth:1 85 //gutterWidth:1, 86 87}); 88 89/*! 90 * SuperSlide v2.1.1 91 */ 92 93!function (a) { a.fn.slide = function (b) { return a.fn.slide.defaults = { type: "slide", effect: "fade", autoPlay: !1, delayTime: 500, interTime: 2500, triggerTime: 150, defaultIndex: 0, titCell: ".hd li", mainCell: ".bd", targetCell: null, trigger: "mouseover", scroll: 1, vis: 1, titOnClassName: "on", autoPage: !1, prevCell: ".prev", nextCell: ".next", pageStateCell: ".pageState", opp: !1, pnLoop: !0, easing: "swing", startFun: null, endFun: null, switchLoad: null, playStateCell: ".playState", mouseOverStop: !0, defaultPlay: !0, returnDefault: !1 }, this.each(function () { var c = a.extend({}, a.fn.slide.defaults, b), d = a(this), e = c.effect, f = a(c.prevCell, d), g = a(c.nextCell, d), h = a(c.pageStateCell, d), i = a(c.playStateCell, d), j = a(c.titCell, d), k = j.size(), l = a(c.mainCell, d), m = l.children().size(), n = c.switchLoad, o = a(c.targetCell, d), p = parseInt(c.defaultIndex), q = parseInt(c.delayTime), r = parseInt(c.interTime); parseInt(c.triggerTime); var Q, t = parseInt(c.scroll), u = parseInt(c.vis), v = "false" == c.autoPlay || 0 == c.autoPlay ? !1 : !0, w = "false" == c.opp || 0 == c.opp ? !1 : !0, x = "false" == c.autoPage || 0 == c.autoPage ? !1 : !0, y = "false" == c.pnLoop || 0 == c.pnLoop ? !1 : !0, z = "false" == c.mouseOverStop || 0 == c.mouseOverStop ? !1 : !0, A = "false" == c.defaultPlay || 0 == c.defaultPlay ? !1 : !0, B = "false" == c.returnDefault || 0 == c.returnDefault ? !1 : !0, C = 0, D = 0, E = 0, F = 0, G = c.easing, H = null, I = null, J = null, K = c.titOnClassName, L = j.index(d.find("." + K)), M = p = -1 == L ? p : L, N = p, O = p, P = m >= u ? 0 != m % t ? m % t : t : 0, R = "leftMarquee" == e || "topMarquee" == e ? !0 : !1, S = function () { a.isFunction(c.startFun) && c.startFun(p, k, d, a(c.titCell, d), l, o, f, g) }, T = function () { a.isFunction(c.endFun) && c.endFun(p, k, d, a(c.titCell, d), l, o, f, g) }, U = function () { j.removeClass(K), A && j.eq(N).addClass(K) }; if ("menu" == c.type) return A && j.removeClass(K).eq(p).addClass(K), j.hover(function () { Q = a(this).find(c.targetCell); var b = j.index(a(this)); I = setTimeout(function () { switch (p = b, j.removeClass(K).eq(p).addClass(K), S(), e) { case "fade": Q.stop(!0, !0).animate({ opacity: "show" }, q, G, T); break; case "slideDown": Q.stop(!0, !0).animate({ height: "show" }, q, G, T) } }, c.triggerTime) }, function () { switch (clearTimeout(I), e) { case "fade": Q.animate({ opacity: "hide" }, q, G); break; case "slideDown": Q.animate({ height: "hide" }, q, G) } }), B && d.hover(function () { clearTimeout(J) }, function () { J = setTimeout(U, q) }), void 0; if (0 == k && (k = m), R && (k = 2), x) { if (m >= u) if ("leftLoop" == e || "topLoop" == e) k = 0 != m % t ? (0 ^ m / t) + 1 : m / t; else { var V = m - u; k = 1 + parseInt(0 != V % t ? V / t + 1 : V / t), 0 >= k && (k = 1) } else k = 1; j.html(""); var W = ""; if (1 == c.autoPage || "true" == c.autoPage) for (var X = 0; k > X; X++)W += "<li>" + (X + 1) + "</li>"; else for (var X = 0; k > X; X++)W += c.autoPage.replace("$", X + 1); j.html(W); var j = j.children() } if (m >= u) { l.children().each(function () { a(this).width() > E && (E = a(this).width(), D = a(this).outerWidth(!0)), a(this).height() > F && (F = a(this).height(), C = a(this).outerHeight(!0)) }); var Y = l.children(), Z = function () { for (var a = 0; u > a; a++)Y.eq(a).clone().addClass("clone").appendTo(l); for (var a = 0; P > a; a++)Y.eq(m - a - 1).clone().addClass("clone").prependTo(l) }; switch (e) { case "fold": l.css({ position: "relative", width: D, height: C }).children().css({ position: "absolute", width: E, left: 0, top: 0, display: "none" }); break; case "top": l.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; height:' + u * C + 'px"></div>').css({ top: -(p * t) * C, position: "relative", padding: "0", margin: "0" }).children().css({ height: F }); break;
93 case "left": l.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; width:' + u * D + 'px"></div>').css({ width: m * D, left: -(p * t) * D, position: "relative", overflow: "hidden", padding: "0", margin: "0" }).children().css({ "float": "left", width: E }); break; case "leftLoop": case "leftMarquee": Z(), l.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; width:' + u * D + 'px"></div>').css({ width: (m + u + P) * D, position: "relative", overflow: "hidden", padding: "0", margin: "0", left: -(P + p * t) * D }).children().css({ "float": "left", width: E }); break; case "topLoop": case "topMarquee": Z(), l.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; height:' + u * C + 'px"></div>').css({ height: (m + u + P) * C, position: "relative", padding: "0", margin: "0", top: -(P + p * t) * C }).children().css({ height: F }) } } var $ = function (a) { var b = a * t; return a == k ? b = m : -1 == a && 0 != m % t && (b = -m % t), b }, _ = function (b) { var c = function (c) { for (var d = c; u + c > d; d++)b.eq(d).find("img[" + n + "]").each(function () { var b = a(this); if (b.attr("src", b.attr(n)).removeAttr(n), l.find(".clone")[0]) for (var c = l.children(), d = 0; d < c.size(); d++)c.eq(d).find("img[" + n + "]").each(function () { a(this).attr(n) == b.attr("src") && a(this).attr("src", a(this).attr(n)).removeAttr(n) }) }) }; switch (e) { case "fade": case "fold": case "top": case "left": case "slideDown": c(p * t); break; case "leftLoop": case "topLoop": c(P + $(O)); break; case "leftMarquee": case "topMarquee": var d = "leftMarquee" == e ? l.css("left").replace("px", "") : l.css("top").replace("px", ""), f = "leftMarquee" == e ? D : C, g = P; if (0 != d % f) { var h = Math.abs(0 ^ d / f); g = 1 == p ? P + h : P + h - 1 } c(g) } }, ab = function (a) { if (!A || M != p || a || R) { if (R ? p >= 1 ? p = 1 : 0 >= p && (p = 0) : (O = p, p >= k ? p = 0 : 0 > p && (p = k - 1)), S(), null != n && _(l.children()), o[0] && (Q = o.eq(p), null != n && _(o), "slideDown" == e ? (o.not(Q).stop(!0, !0).slideUp(q), Q.slideDown(q, G, function () { l[0] || T() })) : (o.not(Q).stop(!0, !0).hide(), Q.animate({ opacity: "show" }, q, function () { l[0] || T() }))), m >= u) switch (e) { case "fade": l.children().stop(!0, !0).eq(p).animate({ opacity: "show" }, q, G, function () { T() }).siblings().hide(); break; case "fold": l.children().stop(!0, !0).eq(p).animate({ opacity: "show" }, q, G, function () { T() }).siblings().animate({ opacity: "hide" }, q, G); break; case "top": l.stop(!0, !1).animate({ top: -p * t * C }, q, G, function () { T() }); break; case "left": l.stop(!0, !1).animate({ left: -p * t * D }, q, G, function () { T() }); break; case "leftLoop": var b = O; l.stop(!0, !0).animate({ left: -($(O) + P) * D }, q, G, function () { -1 >= b ? l.css("left", -(P + (k - 1) * t) * D) : b >= k && l.css("left", -P * D), T() }); break; case "topLoop": var b = O; l.stop(!0, !0).animate({ top: -($(O) + P) * C }, q, G, function () { -1 >= b ? l.css("top", -(P + (k - 1) * t) * C) : b >= k && l.css("top", -P * C), T() }); break; case "leftMarquee": var c = l.css("left").replace("px", ""); 0 == p ? l.animate({ left: ++c }, 0, function () { l.css("left").replace("px", "") >= 0 && l.css("left", -m * D) }) : l.animate({ left: --c }, 0, function () { l.css("left").replace("px", "") <= -(m + P) * D && l.css("left", -P * D) }); break; case "topMarquee": var d = l.css("top").replace("px", ""); 0 == p ? l.animate({ top: ++d }, 0, function () { l.css("top").replace("px", "") >= 0 && l.css("top", -m * C) }) : l.animate({ top: --d }, 0, function () { l.css("top").replace("px", "") <= -(m + P) * C && l.css("top", -P * C) }) }j.removeClass(K).eq(p).addClass(K), M = p, y || (g.removeClass("nextStop"), f.removeClass("prevStop"), 0 == p && f.addClass("prevStop"), p == k - 1 && g.addClass("nextStop")), h.html("<span>" + (p + 1) + "</span>/" + k) } }; A && ab(!0), B && d.hover(function () { clearTimeout(J) }, function () { J = setTimeout(function () { p = N, A ? ab() : "slideDown" == e ? Q.slideUp(q, U) : Q.animate({ opacity: "hide" }, q, U), M = p }, 300) }); var bb = function (a) { H = setInterval(function () { w ? p-- : p++, ab() }, a ? a : r) }, cb = function (a) { H = setInterval(ab, a ? a : r) }, db = function () { z || (clearInterval(H), bb()) }, eb = function () { (y || p != k - 1) && (p++, ab(), R || db()) }, fb = function () { (y || 0 != p) && (p--, ab(), R || db()) }, gb = function () { clearInterval(H), R ? cb() : bb(), i.removeClass("pauseState") }, hb = function () { clearInterval(H), i.addClass("pauseState") }; if (v ? R ? (w ? p-- : p++, cb(), z && l.hover(hb, gb)) : (bb(), z && d.hover(hb, gb)) : (R && (w ? p-- : p++), i.addClass("pauseState")), i.click(function () { i.hasClass("pauseState") ? gb() : hb() }), "mouseover" == c.trigger ? j.hover(function () { var a = j.index(this); I = setTimeout(function () { p = a, ab(), db() }, c.triggerTime) }, function () { clearTimeout(I) }) : j.click(function () { p = j.index(this), ab(), db() }), R) { if (g.mousedown(eb), f.mousedown(fb), y) { var ib, jb = function () { ib = setTimeout(function () { clearInterval(H), cb(0 ^ r / 10) }, 150) }, kb = function () { clearTimeout(ib), clearInterval(H), cb() }; g.mousedown(jb), g.mouseup(kb), f.mousedown(jb), f.mouseup(kb) } "mouseover" == c.trigger && (g.hover(eb, function () { }), f.hover(fb, function () { })) } else g.click(eb), f.click(fb) }) } }(jQuery), jQuery.easing.jswing = jQuery.easing.swing, jQuery.extend(jQuery.easing, { def: "easeOutQuad", swing: function (a, b, c, d, e) { return jQuery.easing[jQuery.easing.def](a, b, c, d, e) }, easeInQuad: function (a, b, c, d, e) { return d * (b /= e) * b + c }, easeOutQuad: function (a, b, c, d, e) { return -d * (b /= e) * (b - 2) + c }, easeInOutQuad: function (a, b, c, d, e) { return (b /= e / 2) < 1 ? d / 2 * b * b + c : -d / 2 * (--b * (b - 2) - 1) + c }, easeInCubic: function (a, b, c, d, e) { return d * (b /= e) * b * b + c }, easeOutCubic: function (a, b, c, d, e) { return d * ((b = b / e - 1) * b * b + 1) + c }, easeInOutCubic: function (a, b, c, d, e) { return (b /= e / 2) < 1 ? d / 2 * b * b * b + c : d / 2 * ((b -= 2) * b * b + 2) + c }, easeInQuart: function (a, b, c, d, e) { return d * (b /= e) * b * b * b + c }, easeOutQuart: function (a, b, c, d, e) { return -d * ((b = b / e - 1) * b * b * b - 1) + c }, easeInOutQuart: function (a, b, c, d, e) { return (b /= e / 2) < 1 ? d / 2 * b * b * b * b + c : -d / 2 * ((b -= 2) * b * b * b - 2) + c }, easeInQuint: function (a, b, c, d, e) { return d * (b /= e) * b * b * b * b + c }, easeOutQuint: function (a, b, c, d, e) { return d * ((b = b / e - 1) * b * b * b * b + 1) + c }, easeInOutQuint: function (a, b, c, d, e) { return (b /= e / 2) < 1 ? d / 2 * b * b * b * b * b + c : d / 2 * ((b -= 2) * b * b * b * b + 2) + c }, easeInSine: function (a, b, c, d, e) { return -d * Math.cos(b / e * (
93Math.PI / 2)) + d + c }, easeOutSine: function (a, b, c, d, e) { return d * Math.sin(b / e * (Math.PI / 2)) + c }, easeInOutSine: function (a, b, c, d, e) { return -d / 2 * (Math.cos(Math.PI * b / e) - 1) + c }, easeInExpo: function (a, b, c, d, e) { return 0 == b ? c : d * Math.pow(2, 10 * (b / e - 1)) + c }, easeOutExpo: function (a, b, c, d, e) { return b == e ? c + d : d * (-Math.pow(2, -10 * b / e) + 1) + c }, easeInOutExpo: function (a, b, c, d, e) { return 0 == b ? c : b == e ? c + d : (b /= e / 2) < 1 ? d / 2 * Math.pow(2, 10 * (b - 1)) + c : d / 2 * (-Math.pow(2, -10 * --b) + 2) + c }, easeInCirc: function (a, b, c, d, e) { return -d * (Math.sqrt(1 - (b /= e) * b) - 1) + c }, easeOutCirc: function (a, b, c, d, e) { return d * Math.sqrt(1 - (b = b / e - 1) * b) + c }, easeInOutCirc: function (a, b, c, d, e) { return (b /= e / 2) < 1 ? -d / 2 * (Math.sqrt(1 - b * b) - 1) + c : d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c }, easeInElastic: function (a, b, c, d, e) { var f = 1.70158, g = 0, h = d; if (0 == b) return c; if (1 == (b /= e)) return c + d; if (g || (g = .3 * e), h < Math.abs(d)) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return -(h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g)) + c }, easeOutElastic: function (a, b, c, d, e) { var f = 1.70158, g = 0, h = d; if (0 == b) return c; if (1 == (b /= e)) return c + d; if (g || (g = .3 * e), h < Math.abs(d)) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return h * Math.pow(2, -10 * b) * Math.sin((b * e - f) * 2 * Math.PI / g) + d + c }, easeInOutElastic: function (a, b, c, d, e) { var f = 1.70158, g = 0, h = d; if (0 == b) return c; if (2 == (b /= e / 2)) return c + d; if (g || (g = e * .3 * 1.5), h < Math.abs(d)) { h = d; var f = g / 4 } else var f = g / (2 * Math.PI) * Math.asin(d / h); return 1 > b ? -.5 * h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) + c : .5 * h * Math.pow(2, -10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) + d + c }, easeInBack: function (a, b, c, d, e, f) { return void 0 == f && (f = 1.70158), d * (b /= e) * b * ((f + 1) * b - f) + c }, easeOutBack: function (a, b, c, d, e, f) { return void 0 == f && (f = 1.70158), d * ((b = b / e - 1) * b * ((f + 1) * b + f) + 1) + c }, easeInOutBack: function (a, b, c, d, e, f) { return void 0 == f && (f = 1.70158), (b /= e / 2) < 1 ? d / 2 * b * b * (((f *= 1.525) + 1) * b - f) + c : d / 2 * ((b -= 2) * b * (((f *= 1.525) + 1) * b + f) + 2) + c }, easeInBounce: function (a, b, c, d, e) { return d - jQuery.easing.easeOutBounce(a, e - b, 0, d, e) + c }, easeOutBounce: function (a, b, c, d, e) { return (b /= e) < 1 / 2.75 ? d * 7.5625 * b * b + c : 2 / 2.75 > b ? d * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c : 2.5 / 2.75 > b ? d * (7.5625 * (b -= 2.25 / 2.75) * b + .9375) + c : d * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c }, easeInOutBounce: function (a, b, c, d, e) { return e / 2 > b ? .5 * jQuery.easing.easeInBounce(a, 2 * b, 0, d, e) + c : .5 * jQuery.easing.easeOutBounce(a, 2 * b - e, 0, d, e) + .5 * d + c } }); 94 95 96/*å»¶è¿å è½½*/ 97(function ($, window, document, undefined) { 98 var $window = $(window); 99 100 $.fn.lazyload = function (options) { 101 var elements = this; 102 var $container; 103 var settings = { 104 threshold: 0, 105 failure_limit: 0, 106 event: "scroll", 107 effect: "show", 108 container: window, 109 data_attribute: "original", 110 skip_invisible: true, 111 appear: null, 112 load: null, 113 placeholder: "//js-oss.588ku.com/imgPath/public/images/lz.jpg" 114 }; 115 116 function update() { 117 var counter = 0; 118 119 elements.each(function () { 120 var $this = $(this); 121 if (settings.skip_invisible && !$this.is(":visible")) { 122 return; 123 } 124 if ($.abovethetop(this, settings) || 125 $.leftofbegin(this, settings)) { 126 /* Nothing. */ 127 } else if (!$.belowthefold(this, settings) && 128 !$.rightoffold(this, settings)) { 129 $this.trigger("appear"); 130 /* if we found an image we'll load, reset the counter */ 131 counter = 0; 132 } else { 133 if (++counter > settings.failure_limit) { 134 return false; 135 } 136 } 137 }); 138 139 } 140 141 if (options) { 142 /* Maintain BC for a couple of versions. */ 143 if (undefined !== options.failurelimit) { 144 options.failure_limit = options.failurelimit; 145 delete options.failurelimit; 146 } 147 if (undefined !== options.effectspeed) { 148 options.effect_speed = options.effectspeed; 149 delete options.effectspeed; 150 } 151 152 $.extend(settings, options); 153 } 154 155 /* Cache container as jQuery as object. */ 156 $container = (settings.container === undefined || 157 settings.container === window) ? $window : $(settings.container); 158 159 /* Fire one scroll event per scroll. Not one scroll event per image. */ 160 if (0 === settings.event.indexOf("scroll")) { 161 $container.bind(settings.event, function () {
vendor: 6,412 bytes, lines 162-321
162 return update(); 163 }); 164 } 165 166 this.each(function () { 167 var self = this; 168 var $self = $(self); 169 170 self.loaded = false; 171 172 /* If no src attribute given use data:uri. */ 173 if ($self.attr("src") === undefined || $self.attr("src") === false) { 174 if ($self.is("img")) { 175 $self.attr("src", settings.placeholder); 176 } 177 } 178 179 /* When appear is triggered load original image. */ 180 $self.one("appear", function () { 181 if (!this.loaded) { 182 if (settings.appear) { 183 var elements_left = elements.length; 184 settings.appear.call(self, elements_left, settings); 185 } 186 $("<img />") 187 .bind("load", function () { 188 189 var original = $self.attr("data-" + settings.data_attribute); 190 $self.hide(); 191 if ($self.is("img")) { 192 $self.attr("src", original); 193 } else { 194 $self.css("background-image", "url('" + original + "')"); 195 } 196 $self[settings.effect](settings.effect_speed); 197 198 self.loaded = true; 199 200 /* Remove image from array so it is not looped next time. */ 201 var temp = $.grep(elements, function (element) { 202 return !element.loaded; 203 }); 204 elements = $(temp); 205 206 if (settings.load) { 207 var elements_left = elements.length; 208 settings.load.call(self, elements_left, settings); 209 } 210 }) 211 .attr("src", $self.attr("data-" + settings.data_attribute)); 212 } 213 }); 214 215 /* When wanted event is triggered load original image */ 216 /* by triggering appear. */ 217 if (0 !== settings.event.indexOf("scroll")) { 218 $self.bind(settings.event, function () { 219 if (!self.loaded) { 220 $self.trigger("appear"); 221 } 222 }); 223 } 224 }); 225 226 /* Check if something appears when window is resized. */ 227 $window.bind("resize", function () { 228 update(); 229 }); 230 231 /* With IOS5 force loading images when navigating with back button. */ 232 /* Non optimal workaround. */ 233 if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) { 234 $window.bind("pageshow", function (event) { 235 if (event.originalEvent && event.originalEvent.persisted) { 236 elements.each(function () { 237 $(this).trigger("appear"); 238 }); 239 } 240 }); 241 } 242 243 /* Force initial check if images should appear. */ 244 $(document).ready(function () { 245 update(); 246 }); 247 248 return this; 249 }; 250 251 /* Convenience methods in jQuery namespace. */ 252 /* Use as $.belowthefold(element, {threshold : 100, container : window}) */ 253 254 $.belowthefold = function (element, settings) { 255 var fold; 256 257 if (settings.container === undefined || settings.container === window) { 258 fold = (window.innerHeight ? window.innerHeight : $window.height()) + $window.scrollTop(); 259 } else { 260 fold = $(settings.container).offset().top + $(settings.container).height(); 261 } 262 263 return fold <= $(element).offset().top - settings.threshold; 264 }; 265 266 $.rightoffold = function (element, settings) { 267 var fold; 268 269 if (settings.container === undefined || settings.container === window) { 270 fold = $window.width() + $window.scrollLeft(); 271 } else { 272 fold = $(settings.container).offset().left + $(settings.container).width(); 273 } 274 275 return fold <= $(element).offset().left - settings.threshold; 276 }; 277 278 $.abovethetop = function (element, settings) { 279 var fold; 280 281 if (settings.container === undefined || settings.container === window) { 282 fold = $window.scrollTop(); 283 } else { 284 fold = $(settings.container).offset().top; 285 } 286 287 return fold >= $(element).offset().top + settings.threshold + $(element).height(); 288 }; 289 290 $.leftofbegin = function (element, settings) { 291 var fold; 292 293 if (settings.container === undefined || settings.container === window) { 294 fold = $window.scrollLeft(); 295 } else { 296 fold = $(settings.container).offset().left; 297 } 298 299 return fold >= $(element).offset().left + settings.threshold + $(element).width(); 300 }; 301 302 $.inviewport = function (element, settings) { 303 return !$.rightoffold(element, settings) && !$.leftofbegin(element, settings) && 304 !$.belowthefold(element, settings) && !$.abovethetop(element, settings); 305 }; 306 307 /* Custom selectors for your convenience. */ 308 /* Use as $("img:below-the-fold").something() or */ 309 /* $("img").filter(":below-the-fold").something() which is faster */ 310 311 $.extend($.expr[":"], { 312 "below-the-fold": function (a) { return $.belowthefold(a, { threshold: 0 }); }, 313 "above-the-top": function (a) { return !$.belowthefold(a, { threshold: 0 }); }, 314 "right-of-screen": function (a) { return $.rightoffold(a, { threshold: 0 }); }, 315 "left-of-screen": function (a) { return !$.rightoffold(a, { threshold: 0 }); }, 316 "in-viewport": function (a) { return $.inviewport(a, { threshold: 0 }); }, 317 /* Maintain BC for couple of versions. */ 318 "above-the-fold": function (a) { return !$.belowthefold(a, { threshold: 0 }); }, 319 "right-of-fold": function (a) { return $.rightoffold(a, { threshold: 0 }); }, 320 "left-of-fold": function (a) { return !$.rightoffold(a, { threshold: 0 }); } 321 });
322 323})(jQuery, window, document); 324 325 326/*åºç¡å ¬å ±js*/ 327 328 329/***********************************************/ 330function qqLogin(sign) { 331 var top = 300, left = 200, width = 750, height = 500, offsetLeft = 100, offsetTop = 80; 332 var screenWidth = window.innerWidth; 333 var scale = screenWidth < 1920 ? 1 : 1920 / window.innerWidth; 334 var e = window.event; 335 if (e) { top = e.pageY || top; left = e.pageX || left; } 336 var resTop = (top - height / 2 - offsetTop) * scale; 337 var resLeft = (left - width - offsetLeft) * scale; 338 resTop = resTop < 0 ? 0 : resTop; 339 resLeft = resLeft < 0 ? 0 : resLeft; 340 window.open("//588ku.com/index.php?m=login&a=snsLogin&type=qq&source=" + sign, "", 341 [ 342 'width=' + width, 343 'height=' + height, 344 'top=' + resTop, 345 'left=' + resLeft, 346 ].join() 347 ) 348} 349 350 351/*å¼¹åºqq微信*/ 352function qqweixin(event) { 353 354 if (event) { 355 event.stopPropagation(); 356 event.preventDefault(); 357 } 358 359 // $("#gai").show(); 360 // $("#login").show(); 361 Login.phoneLogin(); 362} 363 364/*å ¬å ±å¼æ¥å è½½*/ 365 366 367/*æ¶æ¯ç¸å ³js*/ 368function newsRead(newsId) { 369 $.ajax({
370 url: '//ajax.588ku.com/?m=ajax&a=newsRead', 371 data: { newsId: newsId }, 372 dataType: 'jsonp', 373 xhrFields: { widthCredentials: true }, 374 success: function (data) { 375 } 376 }) 377} 378/*åååç¨ç¹å»æ¡ç¹å»æ¬¡æ°js*/ 379function ycCollect(classtype, style) { 380 $.ajax({ 381 url: '//ajax.588ku.com/?m=ajax&a=ycCollect', 382 data: { classtype: classtype, style: style }, 383 dataType: 'jsonp', 384 xhrFields: { widthCredentials: true }, 385 success: function (data) { 386 } 387 }) 388} 389$(".action-wrap").hover(function () { 390 $.ajax({ 391 url: "//ajax.588ku.com/?m=news", 392 dataType: 'jsonp', 393 jsonp: 'callback', 394 jsonpCallback: 'getName', 395 xhrFields: { withCredentials: true }, 396 success: function (data) { 397 $('.action-wrap .newsList').remove(); 398 for (i = 0; i < data.length; i++) { 399 if (data[i]['is_read'] == 1) { 400 var li = '<li class="list newsList"><a href="' + data[i]['url'] + '" onclick="newsRead(' + data[i]['id'] + ');$(this).children(' + "'em'" + ').remove();" target="_blank"><em class="news-circle"></em>' + data[i]['title'] + '</a></li>' 401 $('.news-drop-icon').after(li); 402 } else { 403 var li = '<li class="list newsList"><a class="isRead" href="' + data[i]['url'] + '" onclick="newsRead(' + data[i]['id'] + ')" target="_blank">' + data[i]['title'] + '</a></li>' 404 $('.news-drop-icon').after(li); 405 } 406 } 407 } 408 }); 409 $(this).find('.news-drop').show(); 410}, 411 function () { 412 $('.news-drop').hide(); 413 }); 414$(function () { 415 // Time20Login(); 416 headbggif(); 417 /* $('.udesk-btn').click(function(){ 418 var newTab=window.open('about:blank'); 419 var nonce = $(this).attr('data-nonce'); 420 var signature = $(this).attr('data-signature'); 421 var timestamp = $(this).attr('data-timestamp'); 422 var web_token = $(this).attr('data-webtoken'); 423 var uid = $(this).attr('data-uid'); 424 var flag = $(this).attr('data-flag'); 425 if(flag == 1){ 426 newTab.location.href="https://qiankuwang.udesk.cn/im_client/?web_plugin_id=54456&nonce="+nonce+"&signature="+signature+"×tamp="+timestamp+"&web_token="+web_token+"&c_cf_ååºIDå·="+uid; 427 }else{ 428 newTab.location.href="https://qiankuwang.udesk.cn/im_client/?web_plugin_id=54456"; 429 } 430 }); */ 431 432 //å³ä¾§å¯¼èª 433 $('body').on('click', '.globalRSideB .ractBtn', function () { 434 $('.globalRSideB').addClass('sh'); 435 }) 436 $('body').on('click', '.globalRSideB .shBtn', function () { 437 $('.globalRSideB').removeClass('sh'); 438 }) 439 440 441 //æé¿æ´»å¨å¤´å䏿æ¶é´éå¶ start 442 if ($('.user-drop-listV1 .actTimeBox') && $('.user-drop-listV1 .actTimeBox').length > 0) { 443 actheadListTime(); 444 } 445 function actheadListTime() { 446 var endTime, nowTime, leftTime, d, h, m, s; 447 var e = $('.actTimeBox').attr('data-date'); 448 if (e) { 449 endTime = new Date(e); 450 //var $hour = $('.actTimeBox .athour'); 451 //var $minute = $('.actTimeBox .atminute'); 452 //var $second = $('.actTimeBox .atsecond'); 453 var actheadTime; 454 function run() { 455 //nowTime = new Date(); 456 leftTime = endTime.getTime() - new Date().getTime(); 457 if (leftTime < 0) { 458 clearInterval(actheadTime); 459 $('.acthead-listbox').parent('li').hide(); 460 } 461 d = Math.floor(leftTime / 1000 / 60 / 60 / 24); 462 h = Math.floor(leftTime / 1000 / 60 / 60 % 24); 463 m = Math.floor(leftTime / 1000 / 60 % 60); 464 s = Math.floor(leftTime / 1000 % 60);//(leftTime / 1000 % 60 ).toFixed(0); 465 if (d >= 1) { 466 467 $('.actTimeBox').html('<span>' + (parseInt(actcompleteZero(d, 2)) + 1) + '天</span>'); 468 } else { 469 $('.actTimeBox').html('<span>' + actcompleteZero(h, 2) + '</span>:<span>' + actcompleteZero(m, 2) + '</span>:<span>' + actcompleteZero(s, 2) + '</span>'); 470 } 471 //$hour.text(actcompleteZero(h, 2));
472 //$minute.text(actcompleteZero(m, 2)); 473 //$second.text(actcompleteZero(s, 2)); 474 } 475 476 run(); 477 actheadTime = setInterval(run, 60); 478 } 479 480 } 481 482 function actcompleteZero(num, length) { 483 return (Array(length).join("0") + num).slice(-length); 484 } 485 //æé¿æ´»å¨å¤´å䏿æ¶é´éå¶ end 486}) 487function headbggif() { 488 if ($('.compyheadrt-link .vip-icon').length > 0) { 489 var compyheadrttime = new Date().getTime(); 490 $('.compyheadrt-link .vip-icon').css('background', "url('//js-oss.588ku.com/imgPath/public/images/compyheadrtgif.gif?v=" + compyheadrttime + "')no-repeat center/100%"); 491 492 } 493 if ($('.allvipheadrt-link .vip-icon').length > 0) { 494 var allvipheadrttime = new Date().getTime(); 495 $('.allvipheadrt-link .vip-icon').css('background', "url('//js-oss.588ku.com/imgPath/public/images/allviphrefrtgif.gif?v=" + allvipheadrttime + "')no-repeat center/100%"); 496 497 } 498} 499function Time20Login() { 500 if (!globaluid || globaluid == 0) { 501 var Time20Logint = setTimeout(function () { 502 503 504 if ($('.smsauth').length > 0 && $('.smsauth').css('display') === 'none') { 505 if ($('.applyServerBox').length > 0 && $('.applyServerBox').css('display') == 'block') { 506 507 } else { 508 Login.phoneLogin(); 509 } 510 511 } 512 clearTimeout(Time20Logint); 513 }, 10000); 514 } 515} 516 517$(".actionWrapV1").hover(function () { 518 $.ajax({
519 url: "//ajax.588ku.com/?m=news", 520 dataType: 'jsonp', 521 jsonp: 'callback', 522 jsonpCallback: 'getName', 523 xhrFields: { withCredentials: true }, 524 success: function (data) { 525 $('.actionWrapV1 .newsList').remove(); 526 if (!globaluid || globaluid == 0) { 527 for (i = 0; i < data.length; i++) { 528 var li = '<li class="list newsList"><a class="" href="' + data[i]['url'] + '" onclick="" target="_blank">' + data[i]['title'] + '</a></li>' 529 $('.news-drop-icon').after(li); 530 } 531 } else if (globaluid) { 532 for (i = 0; i < data.length; i++) { 533 if (data[i]['is_read'] == 1) { 534 var li = '<li class="list newsList"><a href="' + data[i]['url'] + '" onclick="newsRead(' + data[i]['id'] + ');$(this).children(' + "'em'" + ').remove();" target="_blank"><em class="news-circle"></em>' + data[i]['title'] + '</a></li>' 535 $(this).find('.news-drop-icon').after(li); 536 } else { 537 var li = '<li class="list newsList"><a class="isRead" href="' + data[i]['url'] + '" onclick="newsRead(' + data[i]['id'] + ')" target="_blank">' + data[i]['title'] + '</a></li>' 538 $(this).find('.news-drop-icon').after(li); 539 } 540 } 541 } 542 } 543 }); 544 $(this).find('.news-drop').show(); 545}, 546 function () { 547 $('.news-drop').hide(); 548 }); 549 550/*设计å¸è°æ¥js*/ 551$(".questionnaire-wd .next-ask").click(function () { 552 $(this).parent().parent().hide(); 553 $.ajax({
554 url: '//ajax.588ku.com/?m=ajax&a=question', 555 dataType: 'json', 556 xhrFields: { withCredentials: true }, 557 success: function (data) { 558 } 559 }) 560}) 561$(".questionnaire-wd .go-action").click(function () { 562 $.ajax({ 563 url: '//ajax.588ku.com/?m=ajax&a=questionAdd', 564 dataType: 'json', 565 xhrFields: { withCredentials: true }, 566 success: function (data) { 567 } 568 }) 569}) 570 571//åºé¨è½®æjs 572$(document).ready(function () { 573 $.ajax({ 574 url: '//588ku.com/?m=PartControl&a=getBarrageData', 575 dataType: 'json', 576 success: function (data) { 577 if (data.status == 1 && data.data != null) { 578 str = ''; 579 var dataList = data.data; 580 for (var i = dataList.length - 1; i >= 0; i--) { 581 str += '<li class="clearfix"><a class="userHead-icon fl" href = "' + dataList[i].link + '" ><img src="' + dataList[i].thumb + '" width="48" height="48" /></a><div class="userContent fl"> <a href="' + dataList[i].link + '"><span class="user-name">' + dataList[i].username + '</span>' + dataList[i].text + '</a><em class="close-btn"></em></div></li>'; 582 } 583 if (window.location.href.indexOf('http://588ku.com/?m=SponsorN') < 0) { // å å¼é¡µé¢ä¸å±ç¤ºå¼¹å¹ 584 $('#barrage ul').html(str); 585 } 586 var leftW = 0; 587 588 jQuery.fn.extend({ 589 pic_scroll: function () { 590 $(this).each(function () { 591 var _this = $(this); //åå¨å¯¹è±¡ 592 var ul = _this.find("ul"); //è·åul对象 593 var li = ul.find("li"); //è·åææå¾çææçli 594 var w = li.size() * (li.width() + 224); //ç»è®¡å¾ççé¿åº¦ 595 li.clone().prependTo(ul); //å éå¾çä¸ä»½æ¾å ¥ulé 596 ul.width(4 * w); //设置ulçé¿åº¦ï¼ä½¿ææå¾çææä¸æ 597 var i = 1; 598 $("#barrage li").on("mouseout", function () { 599 i = 1; 600 }); 601 $("#barrage li").on("mouseover", function () { 602 i = 0; 603 }); 604 605 606 setInterval(function () { 607 if (1 == i) { 608 leftW -= 2; 609 if (leftW > -w) { 610 _this.css('left', leftW + 'px'); 611 } else { 612 leftW = 0; 613 _this.css('left', '0px'); 614 } 615 } 616 }, 20); 617 }) 618 } 619 }); 620 $('#barrage').pic_scroll(); 621 $("#barrage").find('li').find('.close-btn').click(function () { 622 $(this).parent().parent().parent().parent().remove(); 623 $.ajax({
624 url: '//588ku.com/?m=index&a=indextest', 625 dataType: 'json', 626 success: function (data) { } 627 }) 628 }) 629 } 630 } 631 }) 632}) 633 634/** 635 *红å å¼¹åºå ³éJS 636 */ 637$('.hb_close').on('click', function () { 638 $('.down-limit').hide(); 639}); 640$('.hb_kk').on('click', function () { 641 $('.down-limit').hide(); 642}); 643 644function baiduTongji() { 645 _hmt.push(['_trackEvent', 'nav', 'click', 'literature']); 646} 647 648/** 649 * æ£æ¥å符串æ¯å¦ä¸ºåæ³QQå·ç 650 * @param {String} å符串 651 * @return {bool} æ¯å¦ä¸ºåæ³QQå·ç 652 */ 653function isQQ(aQQ) { 654 var bValidate = RegExp(/^[1-9][0-9]{4,10}$/).test(aQQ); 655 if (bValidate) { 656 return true; 657 } 658 else 659 return false; 660} 661 662// $(document).ready(function(){ 663// var url = window.location.href; 664// var refer = document.referrer; 665// $.ajax({ 666// url:'//ajax.588ku.com/?m=ajaxUserTime&a=ajaxTimers', 667// dataType:'json', 668// data: {refer,url}, 669// // jsonp:'callback', 670// // jsonpCallback:'getName', 671// xhrFields:{withCredentials:true}, 672// success:function(data){ 673// 674// } 675// }) 676// }); 677 678 679$('.header-detail-wrap').hover(function () { 680 $(".header-detail-wrap #download-action").stop().slideDown(100); 681}, function () { 682 $(".header-detail-wrap #download-action").stop().slideUp(300); 683}); 684// $(".down-limit-content").css({ 685// left: ($(window).width() - 611) / 2 + "px", 686// top: ($(window).height() - 414) / 2 + "px" 687// }); 688$('.down-limit-close-btn').bind('click', function () { 689 $('.down-limit').hide(); 690}) 691 692function vip(type, stype) { 693 if (!stype) stype = 0; 694 $.ajax({
695 url: '/index.php?m=ajaxone&a=vipClick', 696 data: "type=" + type + "&stype=" + stype, 697 async: false, 698 success: function () { 699 } 700 }); 701} 702 703function headVip() { 704 $.ajax({ 705 url: '/index.php?m=ajaxone&a=headVip', 706 async: false, 707 success: function () { 708 } 709 }); 710} 711 712//ä¼ä¸VIPç¹å»æ¬¡æ° 713$(function () { 714 $(".companytotal").click(function () { 715 716 $.ajax({ 717 url: '/index.php?m=ajaxone&a=companytotalclick', 718 async: false, 719 success: function () { 720 } 721 }); 722 }) 723}) 724 725 726 727function picfind(type) { 728 $.ajax({ 729 url: '/index.php?m=ajax&a=picFindClick', 730 data: "type=" + type, 731 async: false, 732 success: function () { 733 } 734 }); 735} 736 737$(function () { 738 /*å ¨ç«img å±è½*/ 739 $('img').bind("contextmenu", function (e) { return false; }); 740 741 /*login-limit*/ 742 $(".login-limit-content-b-sure").bind('click', function () { 743 $.ajax({ url: '/index.php?m=login&a=relogin', dataType: 'json', type: 'get' }) 744 .success(function (data) { 745 if (data.status == 0) { 746 $("#login-limit-pane").closest('.down-limit').hide(); 747 } else { 748 $("#login-limit-pane").closest('.down-limit').hide(); 749 } 750 }) 751 .fail(function (data) { 752 753 }) 754 }); 755 if (typeof login_limit_status != 'undefined' && login_limit_status) { 756 $("#login-limit-pane").closest('.down-limit').show(); 757 } 758 /*å ³ææ¶èç½ç«æç¤º*/ 759 $('.coll-net-close').bind('click', function () { 760 $('.coll-net-close').closest('.down-limit').hide(); 761 $.ajax({
762 url: '//ajax.588ku.com/?m=ajax&a=collNetClose', 763 dataType: 'jsonp', 764 xhrFields: { withCredentials: true }, 765 success: function (data) { 766 } 767 }) 768 }) 769 770 //头é¨ä¸ªäººä¿¡æ¯ä¸ææ¡ 771 $('.user-info').hover(function () { 772 $('.user-info .user-drop').stop().slideDown(100); 773 }, function () { 774 $('.user-info .user-drop').stop().slideUp(300); 775 }); 776 777 //å å ¥vipæ¡æ¬æ 778 $(window).scroll(function () { 779 var scrollTop = $(document).scrollTop(); 780 if (scrollTop > 335) { 781 $(".top-nav").addClass("vip-fixed"); 782 } 783 else { 784 $(".top-nav").removeClass("vip-fixed"); 785 } 786 }) 787 788 //æç´¢æ¡ä¸ççé¨æç´¢å±å¼ä¸éè 789 $('.hot-more').click(function () { 790 $(this).parents('.hot-search').siblings().toggle(); 791 }) 792 793 //é¦é¡µå°å¾çåè¡¨å¥æ°å³æµ®å¨ 794 $('.small-pic-box .pic-list:odd').css('float', 'right'); 795 796 //å ³éå¼¹åºæ¡ 797 $(".switch,.off,.orange").click(function () { 798 $('.down-limit').fadeOut(500); 799 }); 800 801 //æç´¢åæ¢å ³é®è¯ 802 $(".search-left").on('mouseenter', function () { 803 $('.select-list').show(); 804 805 }); 806 807 //æ¶ç´¢ä¸æå¼å§ 808 $(".search-left").on('mouseleave', function () { 809 $('.select-list').hide(); 810 }); 811 $("body").on("click", function (e) { 812 if (!$(e.target).hasClass('select-list') && !$(e.target).hasClass('current-select') && !$(e.target).hasClass('btn-select-search')) { 813 $('.select-list').slideUp(100); 814 } 815 }); 816 $(".select-list a").on('click', function () { 817 var title = $(this).attr('data-title'); 818 var num = $(this).attr('data-num'); 819 var text = $(this).attr('data-text'); 820 var index = $(this).attr('data-index'); 821 $('.current-select').html(title); 822 $('.current-select').attr('data-index', index); 823 $('#mask-topkeyword .num').html(num); 824 $('#mask-topkeyword .text').html(text); 825 $(".select-list a.active").removeClass('active'); 826 $(this).addClass('active'); 827 }); 828 //æç´¢ä¸æç»æ 829 830 831 /*æ°å¼¹çªéªè¯*/ 832 $("#inspect .inspect-cont").find('.list').on('click', function () { 833 if ($(this).hasClass('on')) { 834 $(this).removeClass("on") 835 $(this).find('input').val(''); 836 837 } else { 838 $(this).addClass('on'); 839 if ($(this).find('input').attr('id') != 'designer_F') { 840 $(this).find('input').val(1); 841 } 842 //åæåé 843 $(this).siblings().removeClass('on'); 844 $(this).siblings().find('input').val(''); 845 } 846 }); 847 $('#inspect .cont-close,#inspect .sc-close').on('click', function () { 848 $("#inspect").fadeOut(); 849 }); 850 $('#inspect .sureBtn').on('click', function () { 851 //å¤éæ¡æ£æµ 852 var chk_value = []; 853 var designer = ''; 854 $(".list").find("input").each(function () { 855 if ($(this).val() != '') { 856 chk_value.push($(this).attr('datasort')); 857 } 858 }); 859 if (chk_value.length <= 0 || (chk_value == 'F' && $('#designer_F').val() == '')) { 860 alert('è䏿ªéæ©!'); 861 return false; 862 } 863 designer = chk_value.join(','); 864 //qqæ£æµ
865 var qq = $('#inspect_qq').val(); 866 qq = qq.replace(/\s+/g, ""); 867 if (qq.length <= 0) { 868 alert('QQå·ç æªå¡«å!'); 869 return false; 870 } 871 if (!isQQ(qq)) { 872 alert('QQå·ç é误!'); 873 return false; 874 } 875 describe = $('#designer_F').val(); 876 877 $.ajax({ 878 url: '//588ku.com/index.php?m=ajax&a=survey', 879 type: 'post', 880 dataType: 'json', 881 data: { designer: designer, qq: qq, describe: describe } 882 }) 883 .success(function (data) { 884 if (data.status == 0) { 885 $(".cm-form").css('display', 'none'); 886 $(".cont-top").css('display', 'none'); 887 $('.cm-succ').css('display', 'block'); 888 } 889 }) 890 .fail(function (data) { 891 892 }); 893 }); 894 // $(function() { 895 // $(".scClose,.scOK-close").click(function() { 896 // $(".survey").fadeOut() 897 // }) 898 899 // $(".scDcitem").click(function() { 900 901 // if($(this).find("i").hasClass('checked')) { 902 // $(this).find("i").removeClass('checked') 903 // $(this).css({ 904 // border: "1px solid #d4d4d4", 905 // margin: "0px 10px 10px 0px" 906 // }) 907 // } else { 908 // $(this).find("i").addClass("checked"); 909 // $(this).css({ 910 // border: "2px solid #169dea", 911 // margin: "-1px 9px 9px -1px" 912 // }) 913 // } 914 // }); 915 916 917 // $("#scSub").bind('click',function(){ 918 919 // //å¤éæ¡æ£æµ 920 // var chk_value =[]; 921 // var designer = ''; 922 // $('.scDcitem i[class="checked"]').each(function(){ 923 // chk_value.push($(this).next().val()); 924 // }); 925 926 // if (chk_value.length <= 0) { 927 // $(".scdesigner .scNotice").show(); 928 // //setTimeout('$(".diaocha-designer-title .notice").hide();',2000); 929 // return false; 930 // }else{ 931 // $(".scdesigner .scNotice").hide(); 932 // } 933 // designer = chk_value.join(','); 934 935 // var describe = $('.otherInput').val(); 936 937 // //qqæ£æµ 938 // var qq = $('.diaocha-qq').val(); 939 // qq = qq.replace(/\s+/g, ""); 940 // if (qq.length <= 0) { 941 // $(".screla .scNotice").show(); 942 // //setTimeout('$(".diaocha-qq-title .notice").hide();',2000); 943 // return false; 944 // } 945 // if (!isQQ(qq)) { 946 // $(".screla .scNotice").text('qqæ ¼å¼ä¸æ£ç¡®').show(); 947 // //setTimeout('$(".diaocha-qq-title .notice").hide();',2000); 948 // return false; 949 // } 950 951 // $.ajax({url:'//588ku.com/index.php?m=ajax&a=survey',type:'post',dataType:'json',data:{designer:designer,qq:qq,describe:describe}}) 952 // .success(function(data){ 953 954 // if (data.status == 0) { 955 // // $(".diaocha-content-item").hide(); 956 // $(".scDchoise").remove(); 957 // $('.scSubmit').remove(); 958 // $('.scHead').remove(); 959 // $(".diaocha-content-ok").show(); 960 // } 961 // }) 962 // .fail(function(data){ 963 964 // }); 965 // }); 966 // }) 967 //è°æ¥jsç»æ 968 969 970 //å¤´é¨æç´¢å·¦ä¾§ä¸æéæ© 971 $('body').on('click', '.downList ul li', function () { 972 var that = $(this); 973 var texta = $.trim($(this).text()); 974 975 var type = $(this).attr('data-type'); 976 var index = $(this).attr('data-index'); 977 $(this).parents('.downListinput').find('.keytext').text(texta); 978 if ($(this).parents('.in-search-boxV1').length >= 0 && $(this).parents('#searchNav').length <= 0) { 979 var thisindex = $(this).attr('data-index'); 980 if (thisindex == '99') { 981 $(this).parents('.downList').find('.keytext').text('å ¨é¨'); 982 $(this).parents('.in-search-boxV1').find('.searchBtn>span').text('å ¨é¨'); 983 } else if (thisindex == '15') { 984 $(this).parents('.downList').find('.keytext').text('è§é¢'); 985 $(this).parents('.in-search-boxV1').find('.searchBtn>span').text('è§é¢'); 986 } 987 988 } 989 990 991 var obj = $(this).parents('.downListinput').find('.dListinput'); 992 var objbox = $(this).parents('.downListinput'); 993 var objbtn = $(this).parents('.downListinput').find('.dListsearchbtn'); 994 //that.siblings().show(); 995 //that.hide(); 996 997 var videoSearchPopular = true; 998 999 if (obj) { 1000 obj.prop('placeholder', 'æç´¢å ¨ç« 800ä¸+ ç´ æï¼åä½ä¹è·¯ ä¸èµ·è¿æ¥'); 1001 /*if(texta=="UIçé¢"){texta="UI"}*/ 1002 obj.attr('data-type', type); obj.attr('data-index', index); 1003 /*if(index == 5) { 1004 //obj.prop('placeholder','æå æ PNGå ç´ '); 1005 obj.prop('placeholder','æç´¢200ä¸+å¼ ç´ æï¼å æ 设计 ä¸é®å é'); 1006 }else if(index == 99){ 1007 obj.prop('placeholder','æçæåç¨ç´ æåº');//å ¨é¨åç±» 1008 }else if(index == 11){ 1009 //obj.prop('placeholder','æå¹³é¢ï¼çµåï¼åå¡è®¾è®¡æ¨¡æ¿'); 1010 obj.prop('placeholder','æç´¢100ä¸+å¼ ç´ æï¼å©ååä½ è®¾è®¡æ å¿§'); 1011 }else if(index == 30){ 1012 //obj.prop('placeholder','æappãwebçé¢ï¼å¾æ icon'); 1013 obj.prop('placeholder','æç´¢100ä¸+å¼ ç´ æï¼å©ååä½ è®¾è®¡æ å¿§'); 1014 }else if(index == 24){ 1015 //obj.prop('placeholder','æååæç»'); 1016 obj.prop('placeholder','æç´¢200ä¸+å¼ ç´ æï¼ç®å设计 è½»æ¾åºå¾'); 1017 }else if(index == 13){ 1018 //obj.prop('placeholder','æPPT/Word/æææ¥/Excel'); 1019 obj.prop('placeholder','æç´¢æµ·éppt/word/excel模æ¿ï¼å©æ¨é«æåå ¬'); 1020 }else if(index == 15){ 1021 //obj.prop('placeholder','æ£çææè§é¢ç´ æï¼æ¾å¿åç¨'); 1022 obj.prop('placeholder','æç´¢100ä¸+å¼ ç´ æï¼ç®ååè§é¢ ä½ ä¹æ¯å¤§ç¥'); 1023 }else if(index == 28){ 1024 //obj.prop('placeholder','æGIFå¨å¾'); 1025 obj.prop('placeholder','æç´¢200ä¸+å¼ ç´ æï¼å æ 设计 ä¸é®å é'); 1026 }else if(index == 31){ 1027 obj.prop('placeholder','æ£çææé³ä¹ç´ æï¼æ¾å¿åç¨'); 1028 videoSearchPopular = false; 1029 }else if(index == 33){ 1030 obj.prop('placeholder','æ£çææé³æç´ æï¼æ¾å¿åç¨'); 1031 videoSearchPopular = false; 1032 }else if(index == 40){ 1033 obj.prop('placeholder','æµ·éçæç´ æå¨çº¿ç¼è¾-5ç§å¿«éåºå¾'); 1034 videoSearchPopular = false; 1035 }else if(index == 104){ 1036 //obj.prop('placeholder','æ3Dç´ æ'); 1037 obj.prop('placeholder','æç´¢50ä¸+å¼ ç´ æï¼æ½®æµåæé£æ ¼å³å»æ¥æ'); 1038 videoSearchPopular = false; 1039 }else if(index == 23){ 1040 obj.prop('placeholder','æç´¢200ä¸+å¼ ç´ æï¼å æ 设计 ä¸é®å é'); 1041 videoSearchPopular = false; 1042 }else if(index == 1){ 1043 obj.prop('placeholder','æç´¢200ä¸+å¼ ç´ æï¼ç®å设计 è½»æ¾åºå¾'); 1044 videoSearchPopular = false; 1045 }else if(index == 32){ 1046 obj.prop('placeholder','æç´¢200ä¸+å¼ ç´ æï¼ç®å设计 è½»æ¾åºå¾'); 1047 videoSearchPopular = false; 1048 }else { 1049 texta = texta.replace(/\s*!/g,""); 1050 obj.prop('placeholder','æ'+texta); 1051 }*/ 1052 1053 1054 // é³è§é¢é¦é¡µéæ©é³é¢æ¶ éèçé¨æç´¢ 1055 if ($('.video-search-popular').length > 0 && videoSearchPopular) { 1056 $('.video-search-popular').show(); 1057 } else if ($('.video-search-popular').length > 0 && !videoSearchPopular) { 1058 $('.video-search-popular').hide(); 1059 } 1060 1061 } 1062 if (objbtn) { 1063 objbtn.removeClass('all ys bg model illus art office gif ui photo video audio edit'); 1064 objbox.removeClass('all ys bg model illus art office gif ui photo video audio edit'); 1065 objbtn.attr('data-index', index); 1066 objbtn.addClass(that.attr('data-btnclass')); objbox.addClass(that.attr('data-btnclass')); 1067 } 1068 if ($(this).parents('.searchlistDlV1').length > 0) { 1069 $("#btn-search-float").click(); 1070 } 1071 });
1072}); 1073 1074$(document).ready(function () { 1075 $('.bglist').bind("contextmenu", function (e) { 1076 return false; 1077 }); 1078 $('.dibu a.remeng').mouseover(function () { 1079 $(this).addClass('colo').siblings().removeClass('colo'); 1080 $('.dldd').eq($(this).index()).show().siblings('.dldd').hide(); 1081 }) 1082}); 1083 1084 1085//头鍿¶æ¯ä¸å¿ä¸ææ¡ 1086 1087/*å¹¿åæµè§çæ§*/ 1088function totalAdIp(webcode, partcode) { 1089 $.getJSON("//ajax.588ku.com/index.php?m=adIpTotal&webcode=" + webcode + "&partcode=" + partcode + "&callback=?", function (e) { 1090 }); 1091} 1092 1093$(function () { 1094 //æç´¢åæ¢å ³é®è¯ 1095 $(".current-select,.trangle").on('mouseenter', function () { 1096 $('.select-list').show(); 1097 $('.select-list').addClass('shown'); 1098 }); 1099 1100 $(".btn-select-search").on('mouseleave', function () { 1101 $('.select-list').hide(); 1102 $('.select-list').removeClass('shown'); 1103 }); 1104 1105 $("body").on("click", function (e) { 1106 if (!$(e.target).hasClass('select-list') && !$(e.target).hasClass('current-select') && !$(e.target).hasClass('btn-select-search')) { 1107 $('.select-list').slideUp(100); 1108 $('.select-list').removeClass('shown'); 1109 } 1110 }); 1111 1112 1113 $(".select-list a").on('click', function () { 1114 var title = $(this).attr('data-title'); 1115 var num = $(this).attr('data-num'); 1116 var text = $(this).attr('data-text'); 1117 var index = $(this).attr('data-index'); 1118 $('.current-select').html(title); 1119 $('.current-select').attr('data-index', index); 1120 $('#mask-topkeyword .num').html(num); 1121 $('#mask-topkeyword .text').html(text); 1122 $(".select-list a.active").removeClass('active'); 1123 $(this).addClass('active'); 1124 }); 1125 1126}) 1127/*æç´¢åæ¢ç»æ*/ 1128 1129/*æç´¢å¯¼èª*/ 1130$(function () { 1131 /*$(".search-sug").on("click",".sokeyup_1",function() { 1132 var G = $(this).find(".sokeyup_2").text(); 1133 $("#topkeyword").val(G);//è¾å ¥å°inputæ¡ 1134 $("#btn-search").click();//æäº¤æ°æ® 1135 $(".search-sug").hide(); 1136 });*/ 1137 $(".search-sug").on("click", ".sokeyup_1", function () { 1138 //var G = $(this).find(".sokeyup_2").text(); 1139 var G = $(this).find(".sokeyup_2") 1140 .clone() //å¤å¶å ç´ 1141 .children() //è·åææåå ç´ 1142 .remove() //å 餿æåå ç´ 1143 .end() //åå°éæ©çå ç´ 1144 .text();//è·åææ¬å¼ 1145 $("#topkeyword").val(G);//è¾å ¥å°inputæ¡ 1146 $("#btn-search").click();//æäº¤æ°æ® 1147 $(".search-sug").hide(); 1148 }) 1149 // å»èºæ¯ååºæç´¢ 1150 $(".search-sug").on("click", ".go-wordart-search", function () { 1151 var val = $("#topkeyword").val(); 1152 doSearch(val, 23); 1153 }); 1154 $(".search-sug-float").on("click", ".go-wordart-search", function () { 1155 var val = $("#topkeyword_float").val(); 1156 doSearch(val, 23); 1157 }); 1158 $(".search-sug-float1").on("click", ".go-wordart-search", function () { 1159 var val = $("#topkeyword_float1").val(); 1160 doSearch(val, 23); 1161 }); 1162 $("#topkeyword").keyup(function (J) { 1163 // var SI = $('.current-select').attr('data-index'); 1164 var SI = $(this).attr('data-index'); 1165 var sType = $(this).attr('data-type'); 1166 if (!sType) { 1167 sType = ""; 1168 } 1169 1170 if (window.event) { 1171 var H = window.event.keyCode; 1172 } else { 1173 var H = J.which; 1174 } 1175 var I = $("#topkeyword"); 1176 var G = I.width(); 1177 if (H != 38 && H != 40 && H != 13) { 1178 var K = I.val(); 1179 if (K.indexOf("ä¹ ") !== -1 || K.indexOf("è¿") !== -1 || K.indexOf("å¹³") !== -1) { 1180 return false; 1181 } 1182 if (!K || K == "") { 1183 var htmls = $("#hot-search").html(); 1184 if (htmls) { 1185 $(".search-sug").html(htmls).show(); 1186 } 1187 return false; 1188 } 1189 var L = "//ajax2.588ku.com/index.php?m=searchtips&a=search&kw=" + K + "&select_index=" + SI + "&type=" + sType + "&callback=?"; 1190 $.getJSON(L, function (M) { 1191 if (M != "") { 1192 $(".search-sug").html(M).show(); 1193 } else { 1194 $(".search-sug").hide(); 1195 } 1196 }); 1197 } 1198 });
1199 1200 $("#topkeyword").click(function () { 1201 if ($(".search-sug").text() != "" && $(".search-sug").text() != "æè¿æç´¢") { 1202 $(".search-sug").show(); 1203 } else { 1204 var I = $("#topkeyword"); 1205 var K = I.val(); 1206 if (K == "") { 1207 var htmls = $("#hot-search").html(); 1208 if (htmls) { 1209 $(".search-sug").html(htmls).show(); 1210 } 1211 } else { 1212 // var SI = $('.current-select').attr('data-index'); 1213 var SI = $(this).attr('data-index'); 1214 var sType = $(this).attr('data-type'); 1215 if (!sType) { 1216 sType = ""; 1217 } 1218 if (K.indexOf("ä¹ ") !== -1 || K.indexOf("è¿") !== -1 || K.indexOf("å¹³") !== -1) { 1219 return false; 1220 } 1221 var L = "//ajax2.588ku.com/index.php?m=searchtips&a=search&kw=" + K + "&select_index=" + SI + "&type=" + sType + "&callback=?"; 1222 $.getJSON(L, function (M) { 1223 if (M != "") { 1224 $(".search-sug").html(M).show(); 1225 } else { 1226 $(".search-sug").hide(); 1227 } 1228 }); 1229 } 1230 } 1231 }); 1232 1233 $("#topkeyword").blur(function () { 1234 setTimeout('$(".search-sug").hide();', 500); 1235 }); 1236 1237 1238 var D = 0; 1239 $("#topkeyword").keyup(function (H) { 1240 if (window.event) { 1241 var G = window.event.keyCode; 1242 } else { 1243 var G = H.which; 1244 } 1245 if (G != 38 && G != 40 && G != 13) { 1246 D = 0; 1247 } else { 1248 if ($(".search-sug").css("display") == "block") { 1249 var I = $(".search-sug ul").length; 1250 if (G == 38) { 1251 D--; 1252 if (D < 1) { 1253 D = I; 1254 C(D); 1255 F(1); 1256 } else { 1257 F(D + 1); 1258 C(D); 1259 } 1260 $(".search-sug #l_" + D).parents('.sokeyup_1').addClass('select').siblings().removeClass('select'); 1261 var keysrc = $(".search-sug #l_" + D).clone() //å¤å¶å ç´ 1262 .children() //è·åææåå ç´ 1263 .remove() //å 餿æåå ç´ 1264 .end() //åå°éæ©çå ç´ 1265 .text();//è·åææ¬å¼;; 1266 $("#topkeyword").val(keysrc); 1267 return false; 1268 } 1269 if (G == 40) { 1270 D++; 1271 if (D > I) { 1272 D = 1; 1273 C(1); 1274 F(I); 1275 } else { 1276 F(D - 1); 1277 C(D); 1278 } 1279 $(".search-sug #l_" + D).parents('.sokeyup_1').addClass('select').siblings().removeClass('select'); 1280 var keysrc = $(".search-sug #l_" + D).clone() //å¤å¶å ç´ 1281 .children() //è·åææåå ç´ 1282 .remove() //å 餿æåå ç´ 1283 .end() //åå°éæ©çå ç´ 1284 .text();//è·åææ¬å¼;; 1285 $("#topkeyword").val(keysrc); 1286 return false; 1287 } 1288 } else { 1289 D = 0; 1290 } 1291 } 1292 }); 1293 1294 function C(G) { 1295 $("#u_" + G).addClass("changeColor"); 1296 $("#l_" + G).addClass("changeColor"); 1297 $("#r_" + G).addClass("changeColor"); 1298 } 1299 function F(G) { 1300 $("#u_" + G).removeClass("changeColor"); 1301 $("#l_" + G).removeClass("changeColor"); 1302 $("#r_" + G).removeClass("changeColor"); 1303 } 1304}); 1305 1306/*æç´¢ä¸è½½js*/ 1307/******************search**********************/ 1308$(function () { 1309 1310 //æå ç´ ç¹å»æé® 1311 $("body").on("click", "#btn-search", function () { 1312 var val = $("#topkeyword").val(); //æç´¢è¯ 1313 var index = parseInt($(this).attr('data-index'));//跳转ç龿¥ //å ç´ 1314 var industry_id = parseInt($(this).attr('data-industryId')); 1315 1316 doSearch(val, index, null, null, industry_id); 1317 var headPlace = parseInt($(this).attr('data-headPlace')); 1318 var headPosition = parseInt($(this).attr('data-headPosition')); 1319 if (headPlace > 0 && headPosition > 0) { 1320 headStatist(headPlace, headPosition); 1321 } 1322 }) 1323 1324 //第äºä¸ªæé® ç¹å»æé® 1325 $('#btn-search-back').click(function () { 1326 var val = $("#topkeyword").val(); //æç´¢è¯ 1327 var index = parseInt($(this).data('index'));//跳转ç龿¥ //å ç´ 1328 //æèæ¯ï¼å¹¶ä¸æç´¢è¯ä¸ºç©ºæ¶ 1329 if ((index == 0) && (typeof val == 'undefined' || val == null || val == '')) { 1330 window.location.href = "//588ku.com/beijing/"; 1331 } else { 1332 doSearch(val, index); // å ¨é¨èæ¯ 1333 } 1334 1335 });
1336 1337 1338 $("#topkeyword").on("keydown", function (e) { 1339 if (e.which == 13) { 1340 var val = $(this).val(); 1341 var index = parseInt($(this).data('index'));//跳转ç龿¥ //å ç´ 1342 var industry_id = parseInt($(this).attr('data-industryId')); 1343 1344 doSearch(val, index, null, e.which, industry_id); 1345 } 1346 }); 1347 1348 1349}); 1350 1351 1352var CookieHandle = { 1353 setCookie: function (name, value, days) { 1354 var exp = new Date(); 1355 var days = arguments[2] ? arguments[2] : 1; 1356 exp.setTime(exp.getTime() + days * 24 * 60 * 60 * 1000); 1357 document.cookie = name + "=" + escape(value) + ";domain=.588ku.com;expires=" + exp.toGMTString() + ";path=/"; 1358 }, 1359 setSecCookie: function (name, value, sec) { 1360 var exp = new Date(); 1361 var days = arguments[2] ? arguments[2] : 1; 1362 exp.setTime(exp.getTime() + sec * 1000); 1363 document.cookie = name + "=" + escape(value) + ";domain=.588ku.com;expires=" + exp.toGMTString() + ";path=/"; 1364 }, 1365 getCookie: function (name) { 1366 var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); 1367 if (arr = document.cookie.match(reg)) { 1368 return unescape(arr[2]); 1369 } else { 1370 return null; 1371 } 1372 }, 1373 unsetCookie: function (name) { 1374 var exp = new Date(); 1375 exp.setTime(exp.getTime() - 1); 1376 var cval = this.getCookie(name); alert(cval); 1377 if (cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString(); 1378 } 1379} 1380 1381/*å 弿¼æåç¹*/ 1382function _kstat(e) { 1383 if (!e) { 1384 return false 1385 } 1386 var d = "//ajax.588ku.com/?m=Tag"; 1387 if (navigator.sendBeacon) { 1388 var f = new FormData(); 1389 f.append("stat", e); 1390 navigator.sendBeacon(d, f) 1391 } else { 1392 $.ajax({
1393 url: d, dataType: "json", data: { stat: e }, type: "post", success: function (a) { 1394 } 1395 }) 1396 } 1397} 1398 1399$(function () { 1400 $("[data-stat]").on("click", function () { 1401 var e = $(this).attr("data-stat"); 1402 _kstat(e); 1403 CookieHandle.setCookie("stat_str", e); 1404 }) 1405 $("[data-ent]").on("click", function () { 1406 var pinyin = $(this).attr("data-ent"); 1407 let module = $(this).attr("data-module"); 1408 if (module === '4') { 1409 window.open("//588ku.com/qiye/list/" + pinyin + "-4-1-0-0-0-0-default-1.html") 1410 } else { 1411 window.open("//588ku.com/qiye/list/" + pinyin + "-0-1-0-0-0-0-default-1.html") 1412 } 1413 }) 1414}); 1415 1416if (!Object.create) { 1417 Object.create = function (o, properties) { 1418 if (typeof o !== 'object' && typeof o !== 'function') throw new TypeError('Object prototype may only be an Object: ' + o); 1419 else if (o === null) throw new Error("This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument."); 1420 1421 if (typeof properties != 'undefined') throw new Error("This browser's implementation of Object.create is a shim and doesn't support a second argument."); 1422 1423 function F() { } 1424 1425 F.prototype = o; 1426 1427 return new F(); 1428 }; 1429} 1430var Cookie = Object.create(CookieHandle); 1431/*******************æ¶è+ä¸å欢+ä¸è½½**********/ 1432$(function () { 1433 $('body').on('click', '.down-big-img,.nonofav,.unlike,.down-big-y,.recollect-a,.collect-a,.unlikeon,.favon,.favonV2,.nonofavV2,.favonV3,.nonofavV3', function (event) { 1434 event.stopPropagation(); 1435 if (!globaluid) { 1436 qqweixin(); 1437 return false; 1438 } 1439 1440 if ($(this).hasClass("down-big-img")) { 1441 //ä¸è½½åå¾ 1442 var id = $(this).attr('data'); 1443 var tab = $(this).attr('data-from'); 1444 var type = $(this).attr('type'); 1445 var pro = $(this).attr("data-pro"); 1446 // add by zhihong.zhang @2016-11-28èæ¯æ¨¡åæå类信æ¯ä¼ å ¥ç»è®¡ 1447 var pictype = $(this).attr('pictype'); 1448 var refererUrl = document.referrer; 1449 if (type == 1) { 1450 if (typeof (tab) == "undefined") { 1451 if (typeof (pictype) == "undefined") { 1452 picDown(rootUrl + "?m=back&a=down&id=" + id, refererUrl); 1453 } else { 1454 var cookiePictype = Cookie.getCookie('search_word_to_type'); 1455 var cookieKeyword = Cookie.getCookie('back_search_keyword'); 1456 if (cookiePictype) { 1457 var cookePictypeArr = cookiePictype.split('_'); 1458 if (cookePictypeArr[0] == cookieKeyword) { 1459 pictype = cookePictypeArr[1]; 1460 } 1461 } 1462 picDown(rootUrl + "?m=back&a=down&id=" + id + "&pictype=" + pictype, refererUrl); 1463 } 1464 } else { 1465 picDown(rootUrl + "?m=back&a=down&id=" + id + "&tab=" + tab + "&pro=" + pro, refererUrl);//ç»è®¡å¤äºä¸ªåæ°ï¼åºåæ¯æå¥å ¥å£ä¸è½½ç 1466 } 1467 } else if (type == 13) { 1468 picDown('/index.php?m=Download&a=downtempletIMG&id=' + id, refererUrl); 1469 } else if (type == 3) { 1470 picDown('/index.php?m=Download&a=peituDownLoad&id=' + id, refererUrl); 1471 } else if (type == 6) { 1472 picDown('/?m=Video&a=download&id=' + id, refererUrl); 1473 } else if (type == 10) { 1474 picDown('/?m=Audio&a=download&id=' + id, refererUrl); 1475 } else if (type == 7) { 1476 if (isOriginalVip) { 1477 picDown('/?m=Original&a=download&id=' + id, refererUrl); 1478 } else { 1479 var comb = $(this).attr('data-comb'); 1480 originalSingle(id, 'img', comb); 1481 } 1482 } else if (type == 23) { 1483 1484 picDown('/?m=WordArt&a=download&id=' + id, refererUrl); 1485 1486 } else if (type == 24) { 1487 var ddown = $(this).attr('data-down'); 1488 picDown('/?m=Illus&a=down&id=' + id + "&data_type=" + ddown, refererUrl); 1489 } else if (type == 25) { 1490 picDown(rootUrl + "?m=PhotoGram&a=down&id=" + id, refererUrl); 1491 } else { 1492 if (typeof (tab) == 'undefined') { 1493 picDown(rootUrl + "?m=element&a=down&id=" + id, refererUrl); 1494 } else { 1495 picDown(rootUrl + "?m=element&a=down&id=" + id + "&tab=" + tab + "&pro=" + pro, refererUrl);//ç»è®¡å¤äºä¸ªåæ°ï¼åºåæ¯æå¥å ¥å£ä¸è½½ç 1496 } 1497 } 1498 return false; 1499 1500 } else if ($(this).hasClass("down-big-y")) { 1501 //ä¸è½½psd 1502 var id = $(this).attr('data'); 1503 var tab = $(this).attr('data-from'); 1504 var type = $(this).attr('type'); 1505 // add by zhihong.zhang @2016-11-28èæ¯æ¨¡åæå类信æ¯ä¼ å ¥ç»è®¡ 1506 var pictype = $(this).attr('pictype'); 1507 var refererUrl = document.referrer; 1508 if (type == 1) { 1509 if (typeof (pictype) == "undefined") { 1510 picDown(rootUrl + "?m=back&a=downpsd&id=" + id, refererUrl); 1511 } else { 1512 var cookiePictype = Cookie.getCookie('search_word_to_type'); 1513 var cookieKeyword = Cookie.getCookie('back_search_keyword'); 1514 if (cookiePictype) { 1515 var cookePictypeArr = cookiePictype.split('_'); 1516 if (cookePictypeArr[0] == cookieKeyword) {
1517 pictype = cookePictypeArr[1]; 1518 } 1519 } 1520 picDown(rootUrl + "?m=back&a=downpsd&id=" + id + "&pictype=" + pictype, refererUrl); 1521 } 1522 } else if (type == 2) { 1523 picDown('/index.php?m=Download&a=downloadPSD&id=' + id + '&picType=' + pictype, refererUrl); 1524 } else if (type == 3) { 1525 picDown('/?m=Download&a=downloadOffice&id=' + id + '&picType=' + pictype, refererUrl); 1526 } else if (type == 5) { 1527 picDown('/index.php?m=Download&a=peituDownLoadPsd&id=' + id + '&picType=' + pictype, refererUrl); 1528 } else if (type == 7) { 1529 if (isOriginalVip) { 1530 picDown('/?m=Original&a=downloadPsd&id=' + id, refererUrl); 1531 } else { 1532 var comb = $(this).attr('data-comb'); 1533 originalSingle(id, 'zip', comb); 1534 } 1535 } else if (type == 23) { 1536 1537 picDown('/?m=WordArt&a=downloadPSD&id=' + id, refererUrl); 1538 1539 } else if (type == 24) { 1540 picDown('/?m=Illus&a=downPsd&id=' + id, refererUrl); 1541 } else { 1542 if (typeof (tab) == 'undefined') { 1543 picDown(rootUrl + "?m=element&a=downpsd&id=" + id, refererUrl); 1544 } else { 1545 picDown(rootUrl + "?m=element&a=downpsd&id=" + id + "&tab=" + tab, refererUrl); 1546 } 1547 } 1548 return false; 1549 } else if ($(this).hasClass("nonofav")) { 1550 var id = $(this).attr('data'); 1551 var type = $(this).attr('type'); 1552 if (type == 1) { 1553 picCollect(rootUrl + '?m=backp&a=collect_ajax', id); 1554 } else if (type == 2) { 1555 picCollect('/?m=Templetp&a=collect_add_ajax', id); 1556 } else if (type == 3) { 1557 picCollect('/?m=peitup&a=collect_add_ajax', id); 1558 } else if (type == 4) { 1559 picCollect('/?m=Office&a=collect_add_ajax', id); 1560 } else if (type == 5) { 1561 picCollect('/?m=Video&a=collect', id); 1562 } else if (type == 7) { 1563 picCollect('/?m=Original&a=collect', id); 1564 } else if (type == 23) { 1565 picCollect(rootUrl + '?m=WordArt&a=collect_add_ajax', id); 1566 } else if (type == 24) { 1567 var obj = $(this); 1568 var id = $(this).attr('data-id'); 1569 var typec = $(this).attr('data-collect'); 1570 var data = { 1571 type: typec, 1572 collect: id 1573 } 1574 picCollectch('/?m=Illus&a=collect', data, function (res) { 1575 if (res.status == 1) { 1576 obj.text('å·²æ¶è'); 1577 obj.addClass('favon').removeClass('nonofav'); 1578 obj.attr('data-collect', '2'); 1579 } 1580 }); 1581 } else { 1582 picCollect(rootUrl + '?m=elementp&a=ajaxAddCollectList', id); 1583 } 1584 return false; 1585 } else if ($(this).hasClass("nonofavV2")) { 1586 var id = $(this).attr('data'); 1587 var type = $(this).attr('type'); 1588 if (type == 1) { 1589 picCollectV2(rootUrl + '?m=backp&a=collect_ajax', id); 1590 } else if (type == 2) { 1591 picCollectV2Alter('/?m=Templetp&a=collect_add_ajax', id); 1592 } else if (type == 12) { 1593 picCollectV2('/?m=Templetp&a=collect_add_ajax', id); 1594 } else if (type == 3) { 1595 picCollectV2('/?m=peitup&a=collect_add_ajax', id); 1596 } else if (type == 4) { 1597 picCollectV2Alter('/?m=Office&a=collect_add_ajax', id); 1598 } else if (type == 5) { 1599 picCollectV2('/?m=Video&a=collect', id); 1600 } else if (type == 7) { 1601 picCollectV2('/?m=Original&a=collect', id); 1602 } else if (type == 9) { 1603 picCollectV2('/?m=WebUi&a=collect_add_ajax', id); 1604 } else if (type == 10) { 1605 picCollectV2('/?m=Audio&a=collectAudio', id); 1606 } else if (type == 23) { 1607 picCollectV2(rootUrl + '?m=WordArt&a=collect_add_ajax', id); 1608 } else if (type == 24) { 1609 var obj = $(this); 1610 var id = $(this).attr('data-id'); 1611 var typec = $(this).attr('data-collect'); 1612 var data = { 1613 type: typec, 1614 collect: id 1615 } 1616 picCollectch('/?m=Illus&a=collect', data, function (res) { 1617 if (res.status == 1) { 1618 if (typec == '1') { 1619 obj.addClass('favonV2'); 1620 obj.attr('data-collect', '2'); 1621 } else { 1622 obj.removeClass('favonV2').addClass('nonofavV2'); 1623 obj.attr('data-collect', '1'); 1624 } 1625 } 1626 }); 1627 } else if (type == 25) { 1628 picCollectV2(rootUrl + '?m=PhotoGram&a=collect_ajax', id); 1629 } else if (type == 28) { 1630 picCollectV2(rootUrl + '?m=Gif&a=collect_add_ajax', id); 1631 } else { 1632 picCollectV2(rootUrl + '?m=elementp&a=ajaxAddCollectList', id
1632); 1633 } 1634 return false; 1635 } else if ($(this).hasClass("nonofavV3")) { 1636 var id = $(this).attr('data'); 1637 var type = $(this).attr('type'); 1638 if (type == 1) { 1639 picCollectV3(rootUrl + '?m=backp&a=collect_ajax', id); 1640 } else if (type == 2) { 1641 picCollectV3('/?m=Templetp&a=collect_add_ajax', id); 1642 } else if (type == 3) { 1643 picCollectV3('/?m=peitup&a=collect_add_ajax', id); 1644 } else if (type == 4) { 1645 picCollectWpV3('/?m=Office&a=collect_add_ajax', id); 1646 } else if (type == 5) { 1647 picCollectV3('/?m=Video&a=collect', id); 1648 } else if (type == 7) { 1649 picCollectV3('/?m=Original&a=collect', id); 1650 } else if (type == 10) { 1651 picCollectV3('/?m=Audio&a=collectAudio', id); 1652 } else if (type == 23) { 1653 picCollectV3(rootUrl + '?m=WordArt&a=collect_add_ajax', id); 1654 } else if (type == 25) { 1655 picCollectV3(rootUrl + '?m=WebUi&a=collect_add_ajax', id); 1656 } else if (type == 24) { 1657 var obj = $(this); 1658 var id = $(this).attr('data-id'); 1659 var typec = $(this).attr('data-collect'); 1660 var data = { 1661 type: typec, 1662 collect: id 1663 } 1664 picCollectch('/?m=Illus&a=collect', data, function (res) { 1665 var pnum = parseInt(obj.children('b').text()); 1666 if (res.status == 1) { 1667 if (typec == '1') { 1668 obj.addClass('on favonV3'); 1669 obj.attr('data-collect', '2'); 1670 //obj.children('b').text(pnum+1); 1671 obj.find('.collectT').text('å·²æ¶è'); 1672 } else { 1673 obj.removeClass('on favonV3').addClass('nonofavV3'); 1674 obj.attr('data-collect', '1'); 1675 //obj.children('b').text(pnum-1); 1676 obj.find('.collectT').text('æ¶è'); 1677 1678 } 1679 } 1680 }); 1681 } else { 1682 picCollectV3(rootUrl + '?m=elementp&a=ajaxAddCollectList', id); 1683 } 1684 return false; 1685 } else if ($(this).hasClass("unlike")) { 1686 //ä¸å欢 1687 var id = $(this).attr('data'); 1688 var type = $(this).attr('type'); 1689 if (type == 1) { 1690 picUnlike(rootUrl + '?m=backp&a=unlike_ajax', id); 1691 } else { 1692 picUnlike(rootUrl + '?m=elementp&a=unlike_ajax', id); 1693 } 1694 return false; 1695 } else if ($(this).hasClass('favon')) { 1696 //åæ¶æ¶è 1697 var id = $(this).attr('data'); 1698 var type = $(this).attr('type'); 1699 if (type == 1) { 1700 picRemoveCollect(rootUrl + '?m=backp&a=remove_collect', id); 1701 } else if (type == 2) { 1702 picRemoveCollect('/?m=Templetp&a=remove_collect', id); 1703 } else if (type == 4) { 1704 picRemoveCollect('/?m=Office&a=remove_collect', id); 1705 } else if (type == 23) { 1706 picRemoveCollect(rootUrl + '?m=WordArt&a=remove_collect', id); 1707 } else if (type == 24) { 1708 var obj = $(this); 1709 var id = $(this).attr('data-id'); 1710 var typec = $(this).attr('data-collect'); 1711 var data = { 1712 type: typec, 1713 collect: id 1714 } 1715 picCollectch('/?m=Illus&a=collect', data, function (res) { 1716 if (res.status == 1) { 1717 obj.text('æ¶è'); 1718 obj.addClass('nonofav').removeClass('favon'); 1719 obj.attr('data-collect', '1'); 1720 } 1721 }); 1722 } else { 1723 picRemoveCollect(rootUrl + '?m=elementp&a=remove_collect', id); 1724 } 1725 return false; 1726 } else if ($(this).hasClass('favonV2')) { 1727 //åæ¶æ¶è 1728 var id = $(this).attr('data'); 1729 var type = $(this).attr('type'); 1730 if (type == 1) { 1731 picRemoveCollectV2(rootUrl + '?m=backp&a=remove_collect', id); 1732 } else if (type == 2) { 1733 picRemoveCollectV2Alter('/?m=Templetp&a=remove_collect', id); 1734 } else if (type == 12) { 1735 picRemoveCollectV2('/?m=Templetp&a=remove_collect', id); 1736 } else if (type == 4) { 1737 picRemoveCollectV2Alter('/?m=Office&a=remove_collect', id); 1738 } else if (type == 5) { 1739 picRemoveCollectV2('/?m=Video&a=removeCollect', id); 1740 } else if (type == 9) { 1741 picRemoveCollectV2('/?m=WebUi&a=remove_collect', id); 1742 } else if (type == 10) { 1743 picRemoveCollectV2('/?m=Audio&a=collectAudio', id); 1744 } else if (type == 23) { 1745 picRemoveCollectV2(rootUrl + '?m=WordArt&a=remove_collect', id); 1746 } else if (type == 24) { 1747 var obj = $(this); 1748 var id = $(this).attr('data-id'); 1749 var typec = $(this).attr('data-collect'); 1750 var data = { 1751 type: typec, 1752 collect: id 1753 } 1754 picCollectch('/?m=Illus&a=collect', data, function (res) { 1755 if (res.status == 1) { 1756 if (typec == '1') { 1757 obj.addClass('favonV2'); 1758 obj.attr('data-collect', '2'); 1759 } else { 1760 obj.removeClass('favonV2').addClass('nonofavV2'); 1761 obj.attr('data-collect', '1'); 1762 } 1763 } 1764 }); 1765 } else if (type == 25) { 1766 //picCollectV2(rootUrl + '?m=PhotoGram&a=collect_ajax', id); 1767 picRemoveCollectV2(rootUrl + '?m=PhotoGram&a=remove_collect', id); 1768 } else if (type == 28) { 1769 picRemoveCollectV2(rootUrl + '?m=Gif&a=remove_collect', id); 1770 } else { 1771 picRemoveCollectV2(rootUrl + '?m=elementp&a=remove_collect', id); 1772 } 1773 return false; 1774 } else if ($(this).hasClass('favonV3')) { 1775 //åæ¶æ¶è 1776 var id = $(this).attr('data'); 1777 var type = $(this).attr('type'); 1778 if (type == 1) { 1779 picRemoveCollectV3(rootUrl + '?m=backp&a=remove_collect', id); 1780 } else if (type == 2) { 1781 picRemoveCollectV3('/?m=Templetp&a=remove_collect', id); 1782 } else if (type == 4) { 1783 picRemoveCollectV3('/?m=Office&a=remove_collect', id); 1784 } else if (type == 5) { 1785 picRemoveCollectV3('/?m=Video&a=removeCollect', id); 1786 } else if (type == 10) { 1787 picRemoveCollectV2('/?m=Audio&a=collectAudio', id); 1788 } else if (type == 23) { 1789 picRemoveCollectV3(rootUrl + '?m=WordArt&a=remove_collect', id); 1790 } else if (type == 25) { 1791 picRemoveCollectV3(rootUrl + '?m=WebUi&a=remove_collect', id); 1792 } else { 1793 picRemoveCollectV3(rootUrl + '?m=elementp&a=remove_collect', id); 1794 } 1795 return false; 1796 } else if ($(this).hasClass('unlikeon')) { 1797 //åæ¶ä¸å欢 1798 var id = $(this).attr('data'); 1799 var type = $(this).attr('type'); 1800 if (type == 1) { 1801 picRemoveUnlike(rootUrl + '?m=backp&a=remove_unlike', id); 1802 } else { 1803 picRemoveUnlike(rootUrl + '?m=elementp&a=remove_unlike', id); 1804 } 1805 return false; 1806 } else if ($(this).hasClass("collect-a")) { 1807 //æ¶èä¸è¾ 1808 //$("body").on("click",".collect-a",function(){ 1809 var id = $(this).attr('data'); 1810 $.post(rootUrl + "?m=elementp&a=collect_special", { id: id }, function (data) { 1811 $('.element-list' + id).find(".collect-a").text('å·²æ¶è').addClass('recollect-a').removeClass('collect-a'); 1812 $('.ts-coll').show(); 1813 }) 1814 //}) 1815 return false; 1816 } else if ($(this).hasClass('recollect-a')) { 1817 var id = $(this).attr('data'); 1818 $.post(rootUrl + "?m=elementp&a=remove_collect_special", { id: id }, function (data) { 1819 $('.element-list' + id).find(".recollect-a").text('æ¶èä¸è¾').addClass('collect-a').removeClass('recollect-a'); 1820 $('.ts-coll').hide(); 1821 }) 1822 return false; 1823 } 1824 });
1825 1826 //åæ¶ä¸å欢 1827 $("body").on("mouseover mouseout", '.unlikeon', function (event) { 1828 if (event.type == "mouseover") { 1829 //é¼ æ æ¬æµ® 1830 $(this).text('åæ¶'); 1831 } else if (event.type == "mouseout") { 1832 $(this).text('å·²ä¸å欢'); 1833 } 1834 }); 1835 $("body").on("click", ".unlikeon", function () { 1836 var id = $(this).attr('data'); 1837 //廿æä¸å欢 1838 $.post(rootUrl + "?m=backp&a=remove_unlike", { id: id }, function (data) { 1839 if (data.status == 0) { 1840 $(".bglist_" + id).find(".unlikeon").text('ä¸å欢').addClass('unlike').removeClass('unlikeon'); 1841 } else { 1842 alert(data.info); 1843 } 1844 }, 'json'); 1845 }); 1846 //åæ¶æ¶è 1847 $("body").on("mouseover mouseout", '.favon', function (event) { 1848 if (event.type == "mouseover") { 1849 //é¼ æ æ¬æµ® 1850 $(this).text('åæ¶æ¶è'); 1851 } else if (event.type == "mouseout") { 1852 $(this).text('å·²æ¶è'); 1853 } 1854 }); 1855 1856 /* 1857 $("body").on("click",".favon",function(){ 1858 var id = $(this).attr('data'); 1859 //廿æ¶è 1860 $.post(rootUrl+"?m=backp&a=remove_collect",{id:id},function(data){ 1861 if (data.status == 0) { 1862 $(".bglist_"+id).find(".favon").text('æ¶è').addClass('nonofav').removeClass('favon'); 1863 } else { 1864 alert(data.info); 1865 } 1866 },'json'); 1867 }); 1868 */ 1869 1870}); 1871 1872/******************function******************/ 1873function getBrowser() { 1874 var userAgent = navigator.userAgent; 1875 var isOpera = userAgent.indexOf("Opera") > -1; 1876 var isIE = userAgent.indexOf("compatible") > -1 1877 && userAgent.indexOf("MSIE") > -1 && !isOpera; 1878 var isEdge = userAgent.indexOf("Edge") > -1; 1879 var isFF = userAgent.indexOf("Firefox") > -1; 1880 var isSafari = userAgent.indexOf("Safari") > -1 1881 && userAgent.indexOf("Chrome") == -1; 1882 var isChrome = userAgent.indexOf("Chrome") > -1 1883 && userAgent.indexOf("Safari") > -1; 1884 if (isIE) { 1885 var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); 1886 reIE.test(userAgent); 1887 var fIEVersion = parseFloat(RegExp["$1"]); 1888 if (fIEVersion == 7) { 1889 return "IE7"; 1890 } else if (fIEVersion == 8) { 1891 return "IE8"; 1892 } else if (fIEVersion == 9) { 1893 return "IE9"; 1894 } else if (fIEVersion == 10) { 1895 return "IE10"; 1896 } else if (fIEVersion == 11) { 1897 return "IE11"; 1898 } else { 1899 return "0"; 1900 } 1901 return "IE"; 1902 } 1903 if (isOpera) { 1904 return "Opera"; 1905 } 1906 if (isEdge) { 1907 return "Edge"; 1908 } 1909 if (isFF) { 1910 return "FF"; 1911 } 1912 if (isSafari) { 1913 return "Safari"; 1914 } 1915 if (isChrome) { 1916 return "Chrome"; 1917 } 1918} 1919window.moduleNameDict={ 1920 15:'è§é¢', 1921 5:'å ç´ ', 1922 1:'èæ¯å¾', 1923 0:'å ¨é¨èæ¯', 1924 11:'模æ¿', 1925 30:'UI设计', 1926 32:'æå½±å¾', 1927 23:'èºæ¯å', 1928 31:'é³é¢', 1929 24:'æç»', 1930 13:'ppt', 1931 14:'word', 1932 25:'excel', 1933 26:'æææ¥', 1934 28:'GIF', 1935 33:'鳿', 1936 99:'å ¨é¨åç±»', 1937 101:'å ç´ åº', 1938 102:'å¾çåº', 1939 103:'模æ¿åº', 1940 104:'3D模å', 1941 40:'å¨çº¿ç¼è¾', 1942 34:'è¡ä¸è§£å³æ¹æ¡', 1943} 1944function doSearch(val, index, button, keycode, indusry_id) { 1945 //gaç»è®¡-æç´¢ ãå ³é®è¯-ä½ç½®-åç±»ã-å½åç¼åæ°æ®ä¸åè¯·æ± 1946 var gtagParams={search_term: `${val}-${window.gaPageName||'å ¶ä»'}-${moduleNameDict[index]}`}; 1947 val&&localStorage.setItem('gaSearchCache',JSON.stringify(gtagParams)); 1948 // keycodeç¨ä»¥å¤ææ¯å¦æ¯å¿«æ·é® 1949 var reurl; 1950 var doSearchtype = 'post'; 1951 if (typeof index == 'undefined') { 1952 index = $('.current-select').attr('data-index'); 1953 } 1954 if (typeof val == 'undefined' || val == null || val == '') { 1955 if (index == 15) {//è§é¢ 1956 reurl = '//588ku.com/video/0-0-0-0-pr-0-0-0-0-0/'; 1957 } else if (index == 5) {//å ç´ 1958 reurl = '//588ku.com/sucai/0-default-0-0-0-0-1/'; 1959 } else if (index == 1) {//èæ¯ 1960 reurl = '//588ku.com/beijing/0-0-default-0-8-0-0-0-0-1/'; 1961 } else if (index == 0) {//å ¨é¨èæ¯ 1962 reurl = '//588ku.com/beijing/0-0-default-0-8-0-0-0-0-1/'; 1963 } else if (index == 11) {//æ¨¡æ¿ 1964 reurl = '//588ku.com/moban/0-default-0-0-0-0-0-0-1/'; 1965 } else if (index == 30) {//webUI 1966 reurl = '//588ku.com/ui/0-0-default-0-0-0-1/'; 1967 } else if (index == 32) {//æå½±å¾ 1968 reurl = '//588ku.com/sheyingtu/0-0-default-0-1/'; 1969 } else if (index == 23) {//èºæ¯å 1970 reurl = '//588ku.com/yishuzi/0-default-0-0-0-0-0-1/'; 1971 } else if (index == 31) {//é³é¢ 1972 reurl = '//588ku.com/audio/0-0-0-0-0-0-default-1/'; 1973 } else if (index == 24) {//æç» 1974 reurl = '//588ku.com/chahua/0-0-default-0-0/'; 1975 } else if (index == 13) {//ppt 1976 reurl = '//588ku.com/ppt/0-default-0-0-0-0-0-0-1/'; 1977 } else if (index == 14) {//word 1978 reurl = '//588ku.com/resume/0-default-0-0-0-0-0-0-1/'; 1979 } else if (index == 25) {//excel 1980 reurl = '//588ku.com/excel/0-default-0-0-0-0-0-0-1/'; 1981 } else if (index == 26) {//æææ¥ 1982 reurl = '//588ku.com/scb/0-default-0-0-0-0-0-0-1/'; 1983 } else if (index == 28) {//GIF 1984 reurl = '//588ku.com/gif/0-0-0-default-1/'; 1985 } else if (index == 33) {//鳿 1986 reurl = '//588ku.com/music/0-0-0-0-0-0-default-1/'; 1987 } else if (index == 99) {//å ¨é¨åç±» 1988 reurl = '//588ku.com/so/'; 1989 } else if (index == 101) {//å ç´ åº 1990 reurl = '//588ku.com/so/0-0-0-0-42-1/'; 1991 } else if (index == 102) {//å¾çåº
1992 reurl = '//588ku.com/so/0-0-0-0-48-1/'; 1993 } else if (index == 103) {//模æ¿åº 1994 reurl = '//588ku.com/so/0-0-0-0-49-1/'; 1995 } else if (index == 104) {//3D模å 1996 reurl = '//588ku.com/so/0-0-0-0-50-1/'; 1997 } else if (index == 40) {//å¨çº¿ç¼è¾ 1998 reurl = '//editor.588ku.com/muban/0-0-0-0-0-null-0_0_0_0-0-0-0-0.html?origin=_search'; 1999 } else if (index == 34) { //è¡ä¸è§£å³æ¹æ¡ 2000 reurl = '//588ku.com/industry/0-0-' + indusry_id + '-0-0-default-1/'; 2001 } else { 2002 reurl = ''; 2003 } 2004 if (reurl) { 2005 if (index == 40) { 2006 if (navigator.userAgent.indexOf("Firefox") > 0) { 2007 window.location.href = reurl; 2008 } else { 2009 var newTab = window.open('about:blank'); 2010 newTab.location.href = reurl; 2011 } 2012 } else { 2013 window.location.href = reurl; 2014 } 2015 } else { 2016 alert("请è¾å ¥æ¥æ¾çå ³é®è¯"); 2017 } 2018 return false; 2019 } 2020 2021 var btypez = $("#bTypeZ").val(); 2022 var chs = encodeURI(val); 2023 var url = rootUrl + '?m=search&a=pinYin&keyword=' + val + '&stype=' + index + '&drawingz=' + btypez + '&chsKeyword=' + chs; 2024 2025 if (index == 40) { 2026 2027 url = 'https://editor.588ku.com/site/qk-zh2py?keyword=' + val; 2028 //url = 'https://editor.588ku.com/zh2py?keyword='+val+'&type=1'; 2029 doSearchtype = 'get'; 2030 } 2031 2032 /*3 banner 4 详æ é¡µæµ·æ¥ 2 ä¸»å¾ 0 èæ¯å ¨é¨ 6 æå¥ 7-> åæå¾ 8->H5 9-> åºéº 10-> å°å· 5å ç´ 11->æ¨¡æ¿ 12->é å¾ 13->PPT 18ååå ç´ 19ååèæ¯ 20åå髿¸ æå½±å¾ 23 èºæ¯å*/ 2033 2034 if (index == 5) { 2035 reurl = '//588ku.com/image/'; 2036 } else if (index == 6) { 2037 reurl = '//588ku.com/image/'; 2038 } else if (index == 2) { 2039 reurl = '//588ku.com/tuku/'; 2040 } else if (index == 12) { 2041 reurl = '//588ku.com/pt/'; 2042 } else if (index == 13) { 2043 reurl = '//588ku.com/ppt/'; 2044 } else if (index == 14) { 2045 reurl = '//588ku.com/resume/'; 2046 } else if (index == 15 || index == 21 || index == 22) { 2047 reurl = '//588ku.com/video/'; 2048 } else if (index == 23) { 2049 reurl = '//588ku.com/yishuzi/'; 2050 } else if (index == 24) { 2051 reurl = '//588ku.com/chahua/'; 2052 } else if (index == 16) { 2053 reurl = '//588ku.com/?m=Video&a=searchDv&keyword='; 2054 } else if (index == 17) { 2055 reurl = '//588ku.com/?m=Video&a=audioCateList&keyword='; 2056 } else if (index == 18 || index == 19 || index == 20) { 2057 reurl = '//588ku.com/original/'; 2058 } else if (index == 25) { 2059 reurl = '//588ku.com/excel/'; 2060 } else if (index == 26) { 2061 reurl = '//588ku.com/scb/'; 2062 } else if (index == 28) { 2063 reurl = '//588ku.com/gif/'; 2064 } else if (index == 30) { 2065 reurl = '//588ku.com/ui/'; 2066 } else if (index == 31) { 2067 reurl = '//588ku.com/audio/'; 2068 } else if (index == 33) { 2069 reurl = '//588ku.com/music/'; 2070 } else if (index == 99 || (index >= 101 && index <= 104)) {//å ¨é¨åç±» 2071 reurl = '//588ku.com/so/'; 2072 } else if (index == 40) { 2073 reurl = '//editor.588ku.com/muban/'; 2074 } else if (index == 34) { //è¡ä¸è§£å³æ¹æ¡ 2075 reurl = '//588ku.com/industry/'; 2076 } else { 2077 reurl = '//588ku.com/tuku/'; 2078 } 2079 2080 var zstrUrl; 2081 2082 if (btypez == 4) { 2083 zstrUrl = '-collect.html'; 2084 } else if (btypez == 3) { 2085 zstrUrl = '-square.html'; 2086 } else if (btypez == 2) { 2087 zstrUrl = '-vertical.html'; 2088 } else if (btypez == 1) { 2089 zstrUrl = '-cross.html'; 2090 } else { 2091 zstrUrl = '.html'; 2092 } 2093 if (globaluid == 0 && CookieHandle.getCookie('huke_popup_lock') != 1 && CookieHandle.getCookie('non_search_first') != 1 && CookieHandle.getCookie('user_source') != 'sem') { 2094 CookieHandle.setCookie('non_search_first', 1); 2095 } 2096 $.ajax({
2097 type: doSearchtype, 2098 url: url, 2099 data: {}, 2100 dataType: 'JSON', 2101 async: false, 2102 success: function (data) { 2103 if (data.status == 0) { 2104 if (data.noshow == 1) { 2105 reurl = reurl + 'n-'; 2106 zstrUrl = '.html'; 2107 } 2108 if (index == 0) { 2109 if (typeof zstrUrl == 'undefined') { 2110 zstrUrl = '.html'; 2111 } 2112 reurl = reurl + data.res + zstrUrl; 2113 } 2114 // else if(index == 2){ 2115 // reurl = reurl+data.res+zstrUrl; 2116 // }else if(index == 4){ 2117 // reurl = reurl+data.res+'-cross.html'; 2118 // } 2119 else if (index == 5) { 2120 reurl = reurl + data.res + '.html'; 2121 } 2122 // else if(index == 6){ 2123 // reurl = reurl+data.res+'-png.html'; 2124 // }else if(index == 8){ 2125 // reurl = reurl+data.res+'-vertical.html'; 2126 // }else if(index == 9){ 2127 // reurl = reurl+data.res+'-vertical.html'; 2128 // }else if(index == 10){ 2129 // reurl = reurl+data.res+'-vertical.html'; 2130 // }else if(index == 3){ 2131 // reurl = reurl+data.res+'-cross.html'; 2132 // } 2133 // else if(index == 7){ 2134 // reurl = reurl+data.res+'-photo.html'; 2135 // } 2136 else if (index == 11) { 2137 reurl = reurl + data.res + '-moban.html'; 2138 } else if (index == 12) { 2139 reurl = reurl + data.res + '.html'; 2140 } else if (index == 13) { 2141 reurl = reurl + data.res + '.html'; 2142 } else if (index == 14) { 2143 reurl = reurl + data.res + '.html'; 2144 } else if (index == 18) { 2145 reurl = reurl + data.res + '-1.html'; 2146 } else if (index == 18 || index == 15) { 2147 reurl = '//588ku.com/video/0-' + data.res + '-0-0-pr-0-0-0-0-0/'; 2148 } else if (index == 19 || index == 21) { 2149 reurl = reurl + data.res + '-2.html'; 2150 } else if (index == 20 || index == 22) { 2151 reurl = reurl + data.res + '-3.html'; 2152 } else if (index == 23) { 2153 reurl = reurl + data.res + '.html'; 2154 } else if (index == 24) { 2155 reurl = reurl + data.res + '.html'; 2156 } else if (index == 25 || index == 26 || index == 28) { 2157 reurl = reurl + data.res + '.html'; 2158 } else if (index == 32) { 2159 reurl = '//588ku.com/sheyingtu/' + data.res + '-0-default-0-1/'; 2160 } else if (index == 40) { 2161 reurl = reurl + data.pinyin + '.html'; 2162 } else if (index == 99) { 2163 reurl = reurl + data.res + '/'; 2164 } else if (index == 101) { 2165 reurl = reurl + data.res + '-0-0-0-42-1/'; 2166 } else if (index == 102) { 2167 reurl = reurl + data.res + '-0-0-0-48-1/'; 2168 } else if (index == 103) { 2169 reurl = reurl + data.res + '-0-0-0-49-1/'; 2170 } else if (index == 104) { 2171 reurl = reurl + data.res + '-0-0-0-50-1/'; 2172 } else if (index == 34) { //è¡ä¸è§£å³æ¹æ¡ 2173 reurl = reurl + data.res + '-0-' + indusry_id + '-0-0-default-1/'; 2174 } else { 2175 reurl = reurl + data.res + zstrUrl; 2176 } 2177 2178 // do statistical request add by zhihong.zhang @2016.11.11 2179 // $.get('//ajax.588ku.com/?m=search&a=recordBGStatisicalData&uid=' + data.uid + '&guid=' + data.guid + '&keyword=' + val + '&pinyin=' + data.res + '&index=' + index); 2180 if (navigator.sendBeacon) { 2181 var url = '//ajax.588ku.com/?m=search&a=recordBGStatisicalData&_=beacon'; 2182 var _dat = new FormData(); 2183 _dat.append('uid', data.uid); 2184 _dat.append('guid', data.guid); 2185 _dat.append('keyword', val); 2186 _dat.append('pinyin', data.res); 2187 _dat.append('index', index); 2188 _dat.append('browser', getBrowser()); 2189 navigator.sendBeacon(url, _dat); 2190 } else { 2191 $.ajax({
2192 url: "//ajax.588ku.com/?m=search&a=recordBGStatisicalData&_=xhr", 2193 dataType: 'jsonp', 2194 data: { uid: data.uid, guid: data.guid, keyword: val, pinyin: data.res, index: index }, 2195 type: 'get', 2196 jsonp: 'callback', 2197 jsonpCallback: 'getName', 2198 xhrFields: { withCredentials: true }, 2199 success: function (data) { 2200 } 2201 }); 2202 } 2203 Cookie.setCookie('search_word_to_type', val + '_' + $('.down-big-img').attr('pictype')); 2204 Cookie.setCookie('back_search_keyword', val); 2205 2206 if (index == 40) { 2207 if (navigator.userAgent.indexOf("Firefox") > 0) { 2208 window.location.href = reurl; 2209 } else { 2210 var newTab = window.open('about:blank'); 2211 newTab.location.href = reurl; 2212 } 2213 } else { 2214 window.location.href = reurl; 2215 } 2216 } else if (data.status == 2) { 2217 window.location.href = data.url; 2218 } else if (data.status == 3) { 2219 window.location.href = '//588ku.com/tuku/' + data.url + zstrUrl; 2220 } 2221 }, 2222 error: function (e) { 2223 2224 } 2225 }); 2226 // $.post(url,{},function(data){ 2227 2228 // },'json'); 2229} 2230 2231// å ¼å®¹ieæµè§å¨ä¸è½½ 2232function gotoUrl(url) { 2233 if (window.VBArray) { 2234 var gotoLink = document.createElement('a'); 2235 gotoLink.href = url; 2236 document.body.appendChild(gotoLink); 2237 gotoLink.click(); 2238 } else { 2239 window.location.href = url; 2240 } 2241} 2242 2243 2244function picDown(url, refUrl) { 2245 $.ajax({
2246 url: url, 2247 data: { refererUrl: refUrl }, 2248 dataType: 'json', 2249 type: 'get', 2250 async: false, 2251 dataFilter: function (data, type) { 2252 var r_type = typeof data; 2253 if (r_type != type) { 2254 //å«æä¿®æ¹ 2255 var SCRIPT_REGEX = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; 2256 data = data.replace(SCRIPT_REGEX, ""); //æ£åæ¿æ¢ä¸ºç©º 2257 return data; 2258 } 2259 }, 2260 success: function (data) { 2261 var vipType; 2262 var vipclass; 2263 if (data.type == 1) { 2264 vipType = '#online'; 2265 vipclass = '.bg'; 2266 } else if (data.type == 3) { 2267 vipType = '#template'; 2268 vipclass = '.model'; 2269 } else if (data.type == 4) { 2270 vipType = '#ppt'; 2271 vipclass = '.ppt'; 2272 } else if (data.type == 6) { 2273 vipType = '#video'; 2274 vipclass = '.video'; 2275 } else if (data.type == 10) { 2276 vipType = '#video'; 2277 vipclass = '.video'; 2278 } else if (data.type == 9) { 2279 vipType = '#original'; 2280 vipclass = '.original'; 2281 } else if (data.type == 13) { 2282 vipType = '#wordart'; 2283 vipclass = '.wordart'; 2284 } else if (data.type == 21) { 2285 vipType = '#illus'; 2286 vipclass = '.illus'; 2287 } else if (data.type == 25) { 2288 vipType = '#photo'; 2289 vipclass = '.photo'; 2290 } else { 2291 vipType = '#element' 2292 vipclass = '.element'; 2293 } 2294 if (data.status == 0) { 2295 window.location.href = data.url; 2296 if (data.pic_class == 1) { 2297 $.ajax({
2298 url: "//ajax.588ku.com/?m=downStatist&a=backDownStatist", 2299 dataType: 'jsonp', 2300 data: { uid: data.uid, isvip: data.isvip, create_time: data.create_time, id: data.id, type: data.type, pictype: data.pictype, keyword: data.keyword }, 2301 type: 'get', 2302 jsonp: 'callback', 2303 jsonpCallback: 'getName', 2304 xhrFields: { withCredentials: true }, 2305 success: function (data) { 2306 } 2307 }); 2308 2309 if (data.hasOwnProperty("is_free_down")) { 2310 2311 if (data.is_free_down == 1) { 2312 2313 $('.bg-novip-limit').closest('.down-limit').show(); 2314 $('.bg-limit-box').show(); 2315 $.get('//588ku.com/index.php?m=back&a=freeNewDialog', {}, function () { }, "json"); 2316 } 2317 } 2318 2319 } else if (data.pic_class == 2) { 2320 $.ajax({
2321 url: "//ajax.588ku.com/?m=downStatist&a=elementDownStatist", 2322 dataType: 'jsonp', 2323 data: { uid: data.uid, isvip: data.isvip, create_time: data.create_time, id: data.id, keyword: data.keyword }, 2324 type: 'get', 2325 jsonp: 'callback', 2326 jsonpCallback: 'getName', 2327 xhrFields: { withCredentials: true }, 2328 success: function (data) { 2329 } 2330 }); 2331 2332 if (data.hasOwnProperty("is_free_down")) { 2333 2334 if (data.is_free_down == 1) { 2335 2336 $('.element-novip-limit').closest('.down-limit').show(); 2337 $('.element-limit-box').show(); 2338 $.get('//588ku.com/index.php?m=element&a=freeNewDialog', {}, function () { }, "json"); 2339 } 2340 } 2341 2342 } else if (data.pic_class == 13) { 2343 $.ajax({
2344 url: "//ajax.588ku.com/?m=downStatist&a=yishuziDownStatist", 2345 dataType: 'jsonp', 2346 data: { uid: data.uid, isvip: data.isvip, create_time: data.create_time, id: data.id, keyword: data.keyword }, 2347 type: 'get', 2348 jsonp: 'callback', 2349 jsonpCallback: 'getName', 2350 xhrFields: { withCredentials: true }, 2351 success: function (data) { 2352 } 2353 }); 2354 } else if (data.pic_class == 4) { 2355 $.ajax({ 2356 url: "//ajax.588ku.com/?m=downStatist&a=peituDownStatist", 2357 dataType: 'jsonp', 2358 data: { uid: data.uid, create_time: data.create_time, id: data.id, keyword: data.keyword }, 2359 type: 'get', 2360 jsonp: 'callback', 2361 jsonpCallback: 'getName', 2362 xhrFields: { withCredentials: true }, 2363 success: function (data) { 2364 } 2365 }); 2366 } else if (data.pic_class == 9) { 2367 $.ajax({
2368 url: "//ajax.588ku.com/?m=downStatist&a=originalDownStatist", 2369 dataType: 'jsonp', 2370 data: { id: data.id }, 2371 type: 'get', 2372 jsonp: 'callback', 2373 jsonpCallback: 'getName', 2374 xhrFields: { withCredentials: true }, 2375 success: function (data) { 2376 } 2377 }); 2378 } else if (data.pic_class == 6) { 2379 $.ajax({ 2380 url: "//ajax.588ku.com/?m=downStatist&a=videoDownStatic", 2381 dataType: 'jsonp', 2382 data: { vid: data.vid }, 2383 type: 'get', 2384 jsonp: 'callback', 2385 jsonpCallback: 'getName', 2386 xhrFields: { withCredentials: true }, 2387 success: function (data) { 2388 } 2389 }); 2390 } else if (data.pic_class == 10) { 2391 $.ajax({
2392 url: "//ajax.588ku.com/?m=downStatist&a=audioDownStatic", 2393 dataType: 'jsonp', 2394 data: { id: data.audio_id }, 2395 type: 'get', 2396 jsonp: 'callback', 2397 jsonpCallback: 'getName', 2398 xhrFields: { withCredentials: true }, 2399 success: function (data) { 2400 } 2401 }); 2402 } else if (data.pic_class == 25) { 2403 $.ajax({ 2404 url: "//ajax.588ku.com/?m=downStatist&a=photoDownStatic", 2405 dataType: 'jsonp', 2406 data: { uid: data.uid, isvip: data.isvip, create_time: data.create_time, id: data.id, type: data.type, pictype: data.pictype, keyword: data.keyword }, 2407 type: 'get', 2408 jsonp: 'callback', 2409 jsonpCallback: 'getName', 2410 xhrFields: { withCredentials: true }, 2411 success: function (data) { 2412 } 2413 }); 2414 } 2415 } else if (data.status == -1) { 2416 $("#login-limit-pane").closest('.down-limit').show(); 2417 } else if (data.status == -10) { 2418 $(vipclass + '-same-limit').closest('.down-limit').show(); 2419 $(vipclass + '-same-limit').show(); 2420 if (data.type == 4) { 2421 picrecharge(picidone, 4, 2, 2); 2422 } 2423 } else if (data.status == -11) { 2424 $(vipType + '-pro-vip-limit-pane').parent('.down-limit').find('.blue-num').text(data.dsdowncnt); 2425 $(vipType + '-pro-vip-limit-pane').closest('.down-limit').show(); 2426 } else if (data.status == -14) { 2427 $(vipType + '-down-limit-pane').parent('.down-limit').find('.blue-num').text(data.dsdowncnt); 2428 $(vipType + "-down-limit-pane").closest('.down-limit').show(); 2429 } else if (data.status == -21) { 2430 $(".script-abnormal-wd").show(); 2431 $(".script-abnormal-wd").closest('.down-limit').show(); 2432 } else if (data.status == -15) { 2433 $(vipclass + '-ip-limit').closest('.down-limit').show(); 2434 $(vipclass + '-ip-limit').show(); 2435 } else if (data.status == -35) { 2436 $(vipclass + '-psd-free-limit').closest('.down-limit').show(); 2437 $(vipclass + '-psd-free-limit').show(); 2438 } else if (data.status == -12) { 2439 $(vipclass + '-free-limit').closest('.down-limit').show(); 2440 $(vipclass + '-free-limit').show(); 2441 if (vipclass == '.model') { 2442 // 模æ¿ä¸è½½é嶿鿬¡æ°è®°å½ 2443 $.get('//ajax.588ku.com/?m=SponsorFunnel&a=update&mod=1&type=1&uid=' + globaluid); 2444 modelPay(); 2445 } 2446 if (data.type == 4) { 2447 picrecharge(picidone, 4, 2, 1); 2448 } 2449 } else if (data.status == -17 && data.type == 1) { 2450 // èæ¯æºæä»¶ä¸è½½éå¶ 2451 $(vipclass + '-source-limit').closest('.down-limit').show(); 2452 $(vipclass + '-source-limit').show(); 2453 } else if (data.status == -18 && data.type == 25) { 2454 // æå½±å¾æºæä»¶ä¸è½½éå¶ 2455 $(vipclass + '-source-limit').closest('.down-limit').show(); 2456 $(vipclass + '-source-limit').show(); 2457 } else if (data.status == -38) { 2458 if (data.hasOwnProperty("is_free_down")) { 2459 2460 if (data.is_free_down == 1 || data.is_free_down == 2) { 2461 $(vipclass + '-noycvip-limit1').closest('.down-limit').show(); 2462 $(vipclass + '-noycvip-limit1 b').show(); 2463 if (data.is_free_down == 1) { 2464 $(vipclass + '-noycvip-limit-num').html(1); 2465 } 2466 $(vipclass + '-noycvip-limit1').show(); 2467 } else { 2468 $(vipclass + '-noycvip-limits').closest('.down-limit').show(); 2469 $(vipclass + '-noycvip-limits b').show(); 2470 $(vipclass + '-noycvip-limits').show(); 2471 } 2472 } 2473 2474 2475 2476 } else if (data.status == -36 && data.type == 1) { 2477 // èæ¯åå¾ä¸è½½éå¶ 2478 $(vipclass + '-pic-limit').closest('.down-limit').show(); 2479 $(vipclass + '-pic-limit').show(); 2480 } else if (data.status == -17 && (data.type == 6 || data.type == 10)) { 2481 if (data.type == 10) { 2482 $('#audio_popup').hide(); 2483 } 2484 $(vipclass + '-source-limit').closest('.down-limit').show(); 2485 $(vipclass + '-source-limit').show().parent().show(); 2486 } else if (data.status == -33 && data.type == 1) { 2487 // åéæä»¶ä¸è½½éå¶ 2488 $(vipclass + '-collect-limit').closest('.down-limit').show(); 2489 $(vipclass + '-collect-limit').show(); 2490 } else if (data.status == -2) { 2491 // $('.diaocha').show();// cancelled by zhihong.zhang 2492 $('#inspect').show(); 2493 } else if (data.status == -3) { 2494 $('#fixed').after(data.html); 2495 $('#fixed').attr('data-id', data.id); 2496 $('#fixed').attr('type', data.type); 2497 $('#fixed').attr('down_type', data.down_type); 2498 } else if (data.status == -4) { 2499 $("#collect_network").closest('.down-limit').show(); 2500 } else if (data.status == -18) { 2501 $("#origin-vip-limit").closest('.down-limit').show(); 2502 $("#origin-vip-limit").show(); 2503 } else if (data.status == -19) { 2504 $("#origin-num-limit").closest('.down-limit').show(); 2505 $("#origin-num-limit").show(); 2506 } else if (data.status == -22 && data.type == 21) { 2507 $(".illus-day2-limit").closest('.down-limit').show(); 2508 $(".illus-day2-limit").show(); 2509 } else if (data.status == -23 && data.type == 21) { 2510 $(".illus-Jurisd-limit").closest('.down-limit').show(); 2511 $(".illus-Jurisd-limit").show(); 2512 } else { 2513 alert('ä¸è½½å¤±è´¥'); 2514 } 2515 }, 2516 }) 2517} 2518 2519function picrecharge(pic, vlpclass, style, limit) { 2520 $.ajax({
2521 url: '//ajax.588ku.com/?m=ajaxrecharge&a=pic', 2522 data: { pic: pic, vipclass: vlpclass, style: style, limit: limit }, 2523 dataType: 'jsonp', 2524 xhrFields: { widthCredentials: true }, 2525 success: function (data) { 2526 } 2527 }) 2528} 2529 2530 2531function picCollect(url, id) { 2532 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2533 .success(function (data) { 2534 if (data.status == 0) { 2535 //$("#collect-btn").addClass('on'); 2536 //$("#collect-btn").addClass('favon').removeClass('nonofav'); 2537 //$('#collect-btn').find('b').text(data.num); 2538 2539 $(".bglist_" + id).find(".nonofav").text('å·²æ¶è').addClass('favon').removeClass('nonofav'); 2540 } else { 2541 //alert(data.info); 2542 } 2543 }) 2544 .fail(function (data) { 2545 2546 }); 2547} 2548//æç»æ¶è 2549function picCollectch(url, data, fn) { 2550 $.ajax({ url: url, data: data, dataType: 'json', type: 'post' }) 2551 .success(function (data) { 2552 fn(data); 2553 }) 2554 .fail(function (data) { }); 2555} 2556function picCollectV2(url, id) { 2557 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2558 .success(function (data) { 2559 if (data.status == 0) { 2560 $(".bglist_" + id).find(".nonofavV2").addClass('favonV2').removeClass('nonofavV2'); 2561 } 2562 }) 2563 .fail(function (data) { }); 2564} 2565 2566function picCollectV2Alter(url, id) { 2567 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2568 .success(function (data) { 2569 if (data.status == 0) { 2570 //$(".bglist_" + id).find(".nonofavV2").text('å·²æ¶è').addClass('favonV2').removeClass('nonofavV2'); 2571 $(".bglist_" + id).find(".nonofavV2").addClass('favonV2').removeClass('nonofavV2'); 2572 } 2573 }) 2574 .fail(function (data) { }); 2575} 2576 2577function picCollectV3(url, id) { 2578 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2579 .success(function (data) { 2580 if (data.status == 0) { 2581 $("#collect-btn").addClass('on'); 2582 $("#collect-btn").addClass('favonV3').removeClass('nonofavV3'); 2583 $('#collect-btn').find('b').text(data.num); 2584 $('#collect-btn').find('.collectT').text('å·²æ¶è'); 2585 2586 //$(".bglist_"+id).find(".nonofav").text('å·²æ¶è').addClass('favon').removeClass('nonofav'); 2587 } else { 2588 //alert(data.info); 2589 } 2590 }) 2591 .fail(function (data) { 2592 2593 }); 2594} 2595 2596// åå ¬æè¡æ¦æ¶è 2597function picCollectWpV3(url, id) { 2598 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2599 .success(function (data) { 2600 if (data.status == 0) { 2601 $(".bglist_" + id).find(".nonofavV3").addClass('favonV3').removeClass('nonofavV3'); 2602 } else { 2603 //alert(data.info); 2604 } 2605 }) 2606 .fail(function (data) { 2607 2608 }); 2609} 2610 2611function picUnlike(url, id) { 2612 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2613 .success(function (data) { 2614 if (data.status == 0) { 2615 $(".bglist_" + id).find(".unlike").text('å·²ä¸å欢').addClass('unlikeon').removeClass('unlike'); 2616 } else { 2617 alert(data.info); 2618 } 2619 }) 2620 .fail(function (data) { 2621 2622 }); 2623} 2624 2625function picRemoveCollect(url, id) { 2626 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2627 .success(function (data) { 2628 if (data.status == 0) { 2629 //$("#collect-btn").removeClass('on'); 2630 //$("#collect-btn").addClass('nonofav').removeClass('favon'); 2631 $(".bglist_" + id).find(".favon").text('æ¶è').addClass('nonofav').removeClass('favon'); 2632 } else { 2633 alert(data.info); 2634 } 2635 }) 2636 .fail(function (data) { 2637 2638 }); 2639} 2640 2641function picRemoveCollectV2(url, id) { 2642 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2643 .success(function (data) { 2644 if (data.status == 0) { 2645 $(".bglist_" + id).find(".favonV2").addClass('nonofavV2').removeClass('favonV2'); 2646 } else { 2647 alert(data.info); 2648 } 2649 }) 2650 .fail(function (data) { } 2651 ); 2652} 2653// åæ¶æ¶è并䏿¾ç¤ºä¸ºæ¶è 2654function picRemoveCollectV2Alter(url, id) { 2655 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2656 .success(function (data) { 2657 if (data.status == 0) { 2658 $(".bglist_" + id).find(".favonV2").addClass('nonofavV2').removeClass('favonV2'); 2659 } else { 2660 alert(data.info); 2661 } 2662 }) 2663 .fail(function (data) { } 2664 ); 2665} 2666 2667function picRemoveCollectV3(url, id) { 2668 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2669 .success(function (data) { 2670 if (data.status == 0) { 2671 $("#collect-btn").removeClass('on'); 2672 $("#collect-btn").addClass('nonofavV3').removeClass('favonV3'); 2673 $('#collect-btn').find('.collectT').text('æ¶è'); 2674 //$(".bglist_"+id).find(".favon").text('æ¶è').addClass('nonofav').removeClass('favon'); 2675 } else { 2676 alert(data.info); 2677 } 2678 }) 2679 .fail(function (data) { 2680 2681 }); 2682} 2683 2684function picRemoveUnlike(url, id) { 2685 $.ajax({ url: url, data: { id: id }, dataType: 'json', type: 'post' }) 2686 .success(function (data) { 2687 if (data.status == 0) { 2688 $(".bglist_" + id).find(".unlikeon").text('ä¸å欢').addClass('unlike').removeClass('unlikeon'); 2689 } else { 2690 alert(data.info); 2691 } 2692 }) 2693 .fail(function (data) { 2694 2695 }); 2696} 2697// å¤äººç»å½æç¤º 2698var multiClient = CookieHandle.getCookie('MULTI_LOGIN_FLAG'); 2699if (multiClient) { 2700 $.post("/?m=ajax&a=checkMultiClient", function (data) { 2701 if (data.status == 1) { 2702 // $("#login-limit-pane").parent().parent().show(); 2703 alert("æ¨çè´¦å·å·²å¨å ¶ä»å°æ¹ç»éãè¥éæ¬äººæä½ï¼è¯·æ³¨æè´¦å·å®å ¨ã"); 2704 } 2705 }, 'json'); 2706} 2707//åå°é¡¶é¨jså¼å§ 2708function goTopEx() { 2709 window.onscroll = function () { 2710 var obj = document.getElementById("right_goTopBtn"); 2711 if (!obj) { return; } 2712 if (window.navigator.userAgent.indexOf("Chrome") >= 0) { 2713 if (document.body.scrollTop > 300) { 2714 obj.style.display = ""; 2715 obj.style.height = obj.offsetHeight + "px"; 2716 } else { 2717 obj.style.display = "none"; 2718 } 2719 } else { 2720 if (window.navigator.userAgent.indexOf("Safari") > -1) { 2721 window.pageYOffset > 300 ? obj.style.display = "" : obj.style.display = "none"; 2722 } else { 2723 document.documentElement.scrollTop > 300 ? obj.style.display = "" : obj.style.display = "none"; 2724 } 2725 } 2726 } 2727} 2728goTopEx();
2729if (document.getElementById("right_goTopBtn")) { 2730 document.getElementById("right_goTopBtn").style.display = "none"; 2731} 2732$("#right_goTopBtn").click(function () { 2733 $("html,body").animate({ 2734 scrollTop: 0 2735 }, 500); 2736}); 2737 2738 2739//å³ä¾§äºç»´ç 2740$('.side-barBox .wechat').hover(function () { 2741 $('.side-barBox .wechat .introduce').append('<img src="//js-oss.588ku.com/comp/rightbtn/images/qr-code.png" />'); 2742}, function () { 2743 $('.side-barBox .wechat .introduce').html(''); 2744}); 2745function goTopExNew() { 2746 window.onscroll = function () { 2747 var obj = document.getElementById("right_goTopBtn_new"); 2748 if (!obj) { return; } 2749 if (document.body.scrollTop > 300) { 2750 obj.style.display = "block"; 2751 } else { 2752 obj.style.display = "none"; 2753 } 2754 2755 } 2756} 2757goTopExNew(); 2758 2759$("#right_goTopBtn_new").click(function () { 2760 $("html,body").animate({ 2761 scrollTop: 0 2762 }, 500); 2763}); 2764 2765 2766$(".button-qq-group").on('mouseenter', function () { 2767 $("#qq-group-detail").show(); 2768}) 2769$(".button-qq-group").on('mouseleave', function () { 2770 $("#qq-group-detail").hide(); 2771}); 2772$(".weixin-group").on('mouseenter', function () { 2773 $("#weixin-detail").show(); 2774}) 2775$(".weixin-group").on('mouseleave', function () { 2776 $("#weixin-detail").hide(); 2777}); 2778//åå°é¡¶é¨jsç»æ 2779 2780/******æ°çæ¶è******/ 2781 2782// $(function(){ 2783// //å ³éå¼¹åºæ¡ 2784// $(".colt-clsbtn").click(function(){ 2785// $('#collect-element').fadeOut(500); 2786// }); 2787// //䏿æ¡çæ¾ç¤ºä¸éè 2788// $('.addTypes').click(function(event) { 2789// event.stopPropagation();
2790// $('.addTypes .selectType-drop').hide(); 2791// $(this).find('.selectType-drop').show(); 2792// }) 2793// $('.selectType-drop').hover(function(){},function(){ 2794// $('.addTypes .selectType-drop').hide(); 2795// }) 2796// //䏿æ¡èµå¼ç»input 2797// $('.selectType-drop').on('click', 'a', function(event) { 2798// event.stopPropagation(); 2799// $(this).parents('.selectType-drop').siblings('label').find("input").val($(this).text()).attr('data-id', $(this).attr('data-id')); 2800// $(this).parents('.selectType-drop').hide(); 2801// }); 2802 2803// $('.coltto-add-btn').click(function(){ 2804// collectResetAll(); 2805// var txt = $('.addNewName').val(); 2806// $('.coltto-add-btn').hide(); 2807// $('.error-show').show(); 2808// $('.coltName').val(txt); 2809// $('.addNewName').parents(".selectType-drop").hide(); 2810// $('.change-collect').hide(); 2811// $('.add-collect').show(); 2812// $('.coltto-btn a').text('å建并æ¶è'); 2813// }) 2814// $('.element-collect').click(function(){ 2815// submitCollect = true; 2816// var _self = $(this), 2817// dataId, 2818// img, 2819// title, 2820// html; 2821// collectResetAll(); 2822// $('.coltto-add-btn').show(); 2823// $('.error-show').hide(); 2824// $.post('/?m=elementp&a=ajaxCollectList',{name:'test'}, function(data){ 2825// if(0 == data.isError){ 2826// $('#collect-element').show(); 2827// dataId = _self.attr('data'); 2828// img = _self.parent().prev('a').find('img').attr('src'); 2829// if(typeof(img) == "undefined"){ 2830// img = _self.parents('.img-box').find('img').attr('src'); 2831// } 2832// title = _self.parent().prev('a').find('img').attr('title'); 2833// $('#collect-element .viewImg-info img').attr('src', img); 2834// $('#collect-element .viewImg-info .viewImg-intro').text(title); 2835// $('.coltto-btn a').attr('data-id', dataId); 2836// $('.coltto-btn-list a').attr('data-id', dataId); 2837// if(null == data.list){ 2838// $('.change-collect').hide(); 2839// $('.add-collect').show(); 2840// $('.coltto-btn a').text('å建并æ¶è'); 2841// } else { 2842// $('.coltto-btn a').text('æ¶èå°ä¸è¾'); 2843// $('.add-collect').hide(); 2844// $('.change-collect').show(); 2845// $('.defaulName').val(data.list[0].title).attr('data-id', data.list[0].id); 2846// html = ''; 2847// for(var i in data.list){ 2848// html += '<a href="javascript:;" data-id="' + data.list[i].id + '">' + data.list[i].title + '</a>'; 2849// } 2850 2851// $('.change-collect .selectType-drop').html(html); 2852// } 2853// } else if(1 == data.isError) { 2854// alert(data.message); 2855// } 2856// },'json') 2857// }) 2858// $('.coltto-btn-list a').click(function(){ 2859// var dataId = $(this).attr('data-id'); 2860// $.post('/?m=elementp&a=ajaxAddCollectList', {id:dataId}, function(data){ 2861// if(1 == data.isError){ 2862// alert(data.message); 2863// } else if(0 == data.isError) { 2864// $('.coltto-btn-list a').text('æ¶èæå'); 2865// $('#collect-element').fadeOut(500); 2866// } 2867// }, 'json') 2868// }); 2869// var submitCollect = true; 2870// $('.coltto-btn a').click(function(){ 2871// if(submitCollect == true){ 2872// submitCollect = false; 2873// var collectName = $('.coltName').val(), 2874// defaulName = $('.defaulName').attr('data-id'), 2875// collectSort = $('.selectSort').attr('data-id'), 2876// collectType = $('.selectType').attr('data-id') 2877// dataId = $(this).attr('data-id'); 2878 2879// if(collectName && collectSort && collectType){ 2880// if(!collectName)return $('.error-show').text('请填åä¸è¾åç§°'); 2881// if(!collectSort)return $('.error-show').text('请填ååç±»'); 2882// if(!collectType)return $('.error-show').text('请填åç´ æç±»å«'); 2883// $.post('/?m=elementp&a=ajaxAddSp',{id:dataId, collectName:collectName, collectSort:collectSort, collectType:collectType}, function(data){ 2884// if(1 == data.isError){ 2885// alert(data.message); 2886// } else if(0 == data.isError) { 2887// $('.coltto-btn a').text('æ¶èæå'); 2888// $('#collect-element').fadeOut(500); 2889// } 2890// }, 'json'); 2891// } else if(defaulName){
2892// $.post('/?m=elementp&a=ajaxAddCollect',{id:dataId, defaulName:defaulName}, function(data){ 2893// if(1 == data.isError){ 2894// alert(data.message); 2895// } else if(0 == data.isError) { 2896// $('.coltto-btn a').text('æ¶èæå'); 2897// $('#collect-element').fadeOut(500); 2898// } 2899// }, 'json'); 2900// } else { 2901// alert('è¯·éæ©æè å建ä¸è¾'); 2902// } 2903// } 2904// }) 2905// }) 2906 2907// an eye for an eye 2908function nzdszjc() { 2909 setTimeout('$("#qtvip-dl").remove()', 1e3); 2910 setTimeout('$("#qtvip-dl").remove()', 1.02e3); 2911 setTimeout('$("#qtvip-dl").remove()', 1010); 2912 setTimeout('$("#qtvip-dl").remove()', 1050); 2913 setTimeout('$("#qtvip-dl").remove()', 1100); 2914 $(".ikrong-musicdownload").remove(); 2915 $("#play11").remove(); 2916 $("#down11").remove(); 2917} 2918 2919function collectResetAll() { 2920 $('.error-show').text(''); 2921 $('.coltName').val(''); 2922 $('.defaulName').removeAttr('data-id'); 2923 $('.selectSort').val(''); 2924 $('.selectSort').removeAttr('data-id'); 2925 $('.selectType').val(''); 2926 $('.selectType').removeAttr('data-id'); 2927 $('.coltto-btn a').text('æ¶èå°ä¸è¾'); 2928 $('.coltto-btn-list a').text('æ¶èå ç´ '); 2929} 2930 2931// var CookieHandle = { 2932// setCookie: function (name, value) { 2933// var exp = new Date(); 2934// var days = arguments[2]?arguments[2]:1; 2935// exp.setTime(exp.getTime() + days*24*60*60*1000); 2936// document.cookie = name + "="+ escape(value) + ";domain=.588ku.com;expires=" + exp.toGMTString() + ";path=/"; 2937// }, 2938// getCookie: function (name) { 2939// var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); 2940// if(arr = document.cookie.match(reg)) { 2941// return unescape(arr[2]); 2942// } else { 2943// return null; 2944// } 2945// }, 2946// unsetCookie: function (name) { 2947// var exp = new Date(); 2948// exp.setTime(exp.getTime() - 1); 2949// var cval = this.getCookie(name);alert(cval); 2950// if(cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString(); 2951// } 2952// } 2953 2954var URLHandle = (function (urlhandle) { 2955 var objURL = function (url) { 2956 this.ourl = url || window.location.href; 2957 this.href = "";//?åé¢é¨å 2958 this.params = {};//urlåæ°å¯¹è±¡ 2959 this.jing = "";//#ååé¢é¨å 2960 this.init(); 2961 } 2962 //åæurl,å¾å°?åé¢åå ¥this.href,åæ°è§£æä¸ºthis.params对象ï¼#å·ååé¢åå ¥this.jing 2963 objURL.prototype.init = function () { 2964 var str = this.ourl; 2965 var index = str.indexOf("#"); 2966 if (index > 0) { 2967 this.jing = str.substr(index); 2968 str = str.substring(0, index); 2969 } 2970 index = str.indexOf("?"); 2971 if (index > 0) { 2972 this.href = str.substring(0, index); 2973 str = str.substr(index + 1); 2974 var parts = str.split("&"); 2975 for (var i = 0; i < parts.length; i++) { 2976 var kv = parts[i].split("="); 2977 this.params[kv[0]] = kv[1]; 2978 } 2979 } 2980 else { 2981 this.href = this.ourl; 2982 this.params = {}; 2983 } 2984 } 2985 //åªæ¯ä¿®æ¹this.params 2986 objURL.prototype.set = function (key, val) { 2987 this.params[key] = val; 2988 } 2989 //åªæ¯è®¾ç½®this.params 2990 objURL.prototype.remove = function (key) { 2991 this.params[key] = undefined; 2992 } 2993 //æ ¹æ®ä¸é¨åç»ææä½åçurl 2994 objURL.prototype.url = function () { 2995 var strurl = this.href; 2996 var objps = [];//è¿éç¨æ°ç»ç»ç»,ååjoinæä½ 2997 for (var k in this.params) { 2998 if (this.params[k]) { 2999 objps.push(k + "=" + this.params[k]); 3000 } 3001 } 3002 if (objps.length > 0) { 3003 strurl += "?" + objps.join("&"); 3004 } 3005 if (this.jing.length > 0) { 3006 strurl += this.jing; 3007 } 3008 return strurl; 3009 } 3010 //å¾å°åæ°å¼ 3011 objURL.prototype.get = function (key) { 3012 return this.params[key]; 3013 } 3014 urlhandle.URL = objURL; 3015 return urlhandle; 3016}(URLHandle || {})); 3017var Urlobj = new URLHandle.URL(window.location.href); 3018 3019// 模æ¿ä¸è½½éå¶ è´ä¹°å ¨ç«VIPæç¤ºç¹å»è®°å½ 3020$('.down-limit .all-noLimit').on('click', function () { 3021 $.get('//ajax.588ku.com/?m=SponsorFunnel&a=update&mod=1&type=2&uid=' + globaluid); 3022}) 3023
3024// 模æ¿ä¸è½½éå¶ ä¼ä¸VIPç¹å»è´ä¹°æç¤ºç¹å»è®°å½ 3025$('#compay').on('click', function () { 3026 if (Urlobj.get('mod') == 1) { 3027 $.get('//ajax.588ku.com/?m=SponsorFunnel&a=update&mod=1&type=4&uid=' + globalUid); 3028 } 3029}); 3030 3031 3032//VIP彿æé 3033$(function () { 3034 // å ³évipå°ææé 3035 $(".expire-hint .switch-close-vip").on("click", function () { 3036 $("#vip-expire-hint").css("bottom", "-260px").hide(100); 3037 }) 3038 3039 $('body').on('click', '.down-big-img,.down-big-y', function () { 3040 if (!globaluid || globaluid === '0') { 3041 qqweixin(); return false; 3042 } 3043 var cate_name = ''; 3044 var cate_date = ''; 3045 var cate_url = ''; 3046 var cate_type = 0; 3047 var type = $(this).attr('type'); 3048 3049 var myDate = new Date(); 3050 var date = myDate.toLocaleDateString(); 3051 3052 var is_com_vip = parseInt($("#vip-expire-hint").find(".hidden-companyvip-hint").val()); 3053 3054 if (is_com_vip == 1) { 3055 if (type == 1) { 3056 cate_type = 2; 3057 cate_name = 'èæ¯VIP'; 3058 cate_date = parseInt($("#vip-expire-hint").find(".hidden-dsvip-hint").val()); 3059 cate_url = '//588ku.com/?m=ProSponsorN&t=2&proType=2&cj=11'; 3060 var cookie_key = 'dsvip' + date; 3061 var is_show_vip_drop = CookieHandle.getCookie(cookie_key); 3062 if (cate_date <= 7) { 3063 if (is_show_vip_drop) { 3064 } else { 3065 completeVipHint(cate_type, cate_name, cate_date, cate_url); 3066 $(".expire-hint").stop().show().animate({ "bottom": "0" }); 3067 CookieHandle.setCookie(cookie_key, 1); 3068 } 3069 } 3070 3071 } else if (type == 2) { //æ¨¡æ¿ 3072 cate_type = 3; 3073 cate_name = '模æ¿VIP'; 3074 cate_date = parseInt($("#vip-expire-hint").find(".hidden-mbvip-hint").val()); 3075 cate_url = '//588ku.com/?m=ProSponsorN&t=3&proType=2&cj=11'; 3076 var cookie_key = 'mbvip' + date; 3077 var is_show_vip_drop = CookieHandle.getCookie(cookie_key); 3078 if (cate_date <= 7) { 3079 if (is_show_vip_drop) { 3080 } else { 3081 completeVipHint(cate_type, cate_name, cate_date, cate_url); 3082 $(".expire-hint").stop().show().animate({ "bottom": "0" }); 3083 CookieHandle.setCookie(cookie_key, 1); 3084 } 3085 } 3086 3087 } else { //å ç´ 3088 cate_type = 1; 3089 cate_name = 'å ç´ VIP'; 3090 cate_date = parseInt($("#vip-expire-hint").find(".hidden-ysvip-hint").val()); 3091 cate_url = '//588ku.com/?m=ProSponsorN&proType=2&cj=11'; 3092 var cookie_key = 'ysvip' + date; 3093 var is_show_vip_drop = CookieHandle.getCookie(cookie_key); 3094 if (cate_date <= 7) { 3095 if (is_show_vip_drop) { 3096 } else { 3097 completeVipHint(cate_type, cate_name, cate_date, cate_url); 3098 $(".expire-hint").stop().show().animate({ "bottom": "0" }); 3099 CookieHandle.setCookie(cookie_key, 1); 3100 } 3101 } 3102 } 3103 } 3104 }); 3105 3106}) 3107 3108//模æ¿å ¼å®¹ä¸è½½æé® 3109 3110$('body').on('click', '#download-btn,.download-newPPT', function (event) { 3111 event.stopPropagation(); 3112 if (!globaluid) { 3113 qqweixin(); return false; 3114 } 3115 var is_com_vip = parseInt($("#vip-expire-hint").find(".hidden-companyvip-hint").val()); 3116 3117 if (is_com_vip == 1) { 3118 var myDate = new Date(); 3119 var date = myDate.toLocaleDateString(); 3120 var cate_name = ''; 3121 var cate_date = ''; 3122 var cate_url = ''; 3123 var cate_type = 0; 3124 cate_type = 3; 3125 cate_name = '模æ¿VIP'; 3126 cate_date = parseInt($("#vip-expire-hint").find(".hidden-mbvip-hint").val()); 3127 cate_url = '//588ku.com/?m=ProSponsorN&t=3&proType=2&cj=11'; 3128 var cookie_key = 'mbvip' + date; 3129 var is_show_vip_drop = CookieHandle.getCookie(cookie_key); 3130 if (cate_date <= 7) { 3131 if (is_show_vip_drop) { 3132 } else { 3133 completeVipHint(cate_type, cate_name, cate_date, cate_url); 3134 $(".expire-hint").stop().show().animate({ "bottom": "0" }); 3135 CookieHandle.setCookie(cookie_key, 1); 3136 } 3137 } 3138 } 3139}); 3140 3141/*æéæ¾ç¤º*/ 3142function completeVipHint(cate_type, cate_name, cate_date, cate_url) { 3143 $("#vip-expire-hint").find(".vip-cate-name").html(cate_name); 3144 $("#vip-expire-hint").find(".vip-cate-date").html(cate_date); 3145 $("#vip-expire-hint").find(".renew-btn").attr('href', cate_url); 3146 $.ajax({
3147 url: '//ajax.588ku.com/?m=BruthAjax&a=vipTotal', 3148 data: { 'vip_type': cate_type }, 3149 dataType: 'jsonp', 3150 xhrFields: { widthCredentials: true }, 3151 success: function (data) { 3152 } 3153 }) 3154} 3155 3156/*æç´¢é¡µå³ä¾§åæµå¹¿åjs*/ 3157$(function () { 3158 /*å±å¹å¤§äº1850åºç°å¹¿å*/ 3159 $(window).resize(function () { 3160 var _width = $(document).width(); 3161 if (_width >= 1850) { 3162 $(".advert-sideBar").show(); 3163 } else { 3164 $(".advert-sideBar").hide(); 3165 } 3166 }) 3167 $('body').on('click', '.advert-sideBar .close-btn', function () { 3168 $('.advert-sideBar').hide(); 3169 var cookie_key = 'closead'; 3170 CookieHandle.setCookie(cookie_key, 1, 86400); 3171 }) 3172}) 3173/*å³ä¾§js*/ 3174$(function () { 3175 window.onload = function () { 3176 resizeWindow(); 3177 3178 // window.dataLayer = window.dataLayer || []; 3179 // function gtag(){dataLayer.push(arguments);} 3180 // gtag('js', new Date()); 3181 3182 // gtag('config', 'UA-139867171-1'); 3183 }; 3184 $(window).resize(function () { 3185 resizeWindow(); 3186 }); 3187 function resizeWindow() { 3188 var winH = $(window).height(); 3189 var sideBar = $(".side-barBox").height(); 3190 $(".side-barBox").css('height', winH + 'px'); 3191 $(".bar-menu-top").css('top', winH - 'px'); 3192 if (sideBar <= 720) { 3193 $(".bar-menu-top").addClass("fix"); 3194 } else { 3195 $(".bar-menu-top").removeClass("fix"); 3196 } 3197 } 3198}) 3199 3200/*ä¸è½½å¼¹çªéå¶js*/ 3201$(function () { 3202 $(".down-limitPublic .cancel,.upload-vip").on("click", function () { 3203 $(this).parent().hide(); 3204 $('.down-limit').hide(); 3205 }) 3206 $(".down-limitPublic .know-btn").on("click", function () { 3207 $(this).parent().hide(); 3208 $('.down-limit').hide(); 3209 }) 3210 $(".script-warn-wd").on("click", function () { 3211 $(this).hide(); 3212 $('.down-limit').hide(); 3213 }) 3214}) 3215 3216 3217$(function () { 3218 3219 // Login.userBindPhone(); 3220 3221 3222 //jsè¿è¡60ç§åè®¡æ¶ 3223 function jssendMessageTime(obj) { 3224 var time = 60; 3225 is_send = false; 3226 var t = setInterval(function () { 3227 time--; 3228 obj.html(time + 'såéæ°åé'); 3229 if (time == 0) { 3230 clearInterval(t); 3231 obj.html("éæ°åé"); 3232 is_send = true; 3233 } 3234 }, 1000) 3235 3236 } 3237 //å è½½å¾æ 3238 function changeStatus(obj, txt, addition) { 3239 if (addition) { 3240 obj.html('<em class="loading-icon"></em>'); 3241 } else { 3242 obj.html(txt); 3243 } 3244 } 3245 3246 3247 //ææºå·è¾å ¥éªè¯ 3248 $(".phone-input").blur(function () { 3249 var registerB = /^[1][34578][0-9]{9}$/; 3250 var putVal = $(this).val(); 3251 if (!registerB.test(putVal)) { 3252 $(this).siblings(".error-info").html("<em></em>请è¾å ¥ææçææºå·ç ").show(); 3253 } else { 3254 $(this).siblings(".error-info").hide(); //ææºè¾å ¥æå 3255 } 3256 }); 3257 3258 3259 //ç»å½ éªè¯ç ç¹å» 3260 $("#user-login-box .send-code").click(function () { 3261 var that = $(this); 3262 var phone = that.parent().parent().find(".phone-input").val(); //ææºå· 3263 var error_obj = that.parent().parent().find(".error-info"); 3264 var registerB = /^[1][34578][0-9]{9}$/; 3265 3266 if (!registerB.test(phone)) { 3267 error_obj.html("<em></em>请è¾å ¥ææçææºå·ç ").show(); 3268 console.log(phone); 3269 } else { 3270 console.log(1111); 3271 error_obj.hide(); //ææºè¾å ¥æå 3272 if (is_send) { //å¯ä»¥åé 3273 3274 $.ajax({
3275 type: "post", 3276 url: "/index.php?m=LoginPhoneNew&a=sendMessageLogin", //å è½½å°å¯¹åºç模å 3277 data: { 'phone': phone }, 3278 dataType: 'json', 3279 success: function (data) { // 3280 console.log(data); 3281 if (data.status == 1) { 3282 //ç¬¬äºæ¥éªè¯ 3283 jssendMessageTime(that); 3284 that.parent().find(".correct-info").show(); //çä¿¡å·²ç»åéæç¤º 3285 } 3286 if (data.status <= 0) { 3287 error_obj.html("<em></em>" + data.info).show(); 3288 } 3289 if (data.status == 10) { 3290 console.log(1111); 3291 console.log(data.status); 3292 console.log(data.info); 3293 console.log(222); 3294 error_obj.html(data.info + "<a class='return-qqWx-hint' href='javascript:;' onclick=Login.phoneLogin();>è¿åQQ/微信ç»å½</a>").show(); 3295 } 3296 } 3297 }); 3298 3299 } 3300 } 3301 }); 3302 3303 //ç´æ¥ç»å½æé®ç¹å» 3304 $("#user-login-box .login-btn").click(function () { 3305 var that = $(this); 3306 var cango = $(this).hasClass("on"); 3307 var phone = that.parent().find(".phone-input").val(); //ææºå· 3308 var code = that.parent().find(".code-input").val(); //éªè¯ç 3309 var error_obj = that.parent().find(".error-info"); 3310 if (cango) { 3311 3312 changeStatus(that, 'ç»å½', 1); 3313 $.ajax({
3314 type: "post", 3315 url: "/index.php?m=LoginPhoneNew&a=userLogin", //å è½½å°å¯¹åºç模å 3316 data: { 'phone': phone, 'code': code }, 3317 dataType: 'json', 3318 success: function (data) { // 3319 // console.log(data); 3320 if (data.status == 1) { 3321 location.reload(); 3322 } 3323 if (data.status <= 0) { 3324 error_obj.html("<em></em>" + data.info).show(); 3325 changeStatus(that, 'ç»å½', 0); 3326 } 3327 } 3328 }); 3329 } 3330 }); 3331 3332 3333 //ç»å®ææºå· 3334 //ç»å½ éªè¯ç ç¹å» 3335 $("#user-bind-box .send-code").click(function () { 3336 var that = $(this); 3337 var phone = that.parent().parent().find(".phone-input").val(); //ææºå· 3338 var error_obj = that.parent().parent().find(".error-info"); 3339 var registerB = /^[1][34578][0-9]{9}$/; 3340 3341 if (!registerB.test(phone)) { 3342 error_obj.html("<em></em>请è¾å ¥ææçææºå·ç ").show(); 3343 } else { 3344 error_obj.hide(); //ææºè¾å ¥æå 3345 if (is_send) { //å¯ä»¥åé 3346 3347 $.ajax({
3348 type: "post", 3349 url: "/index.php?m=LoginPhoneNew&a=sendMessageBind", //å è½½å°å¯¹åºç模å 3350 data: { 'phone': phone }, 3351 dataType: 'json', 3352 success: function (data) { // 3353 // console.log(data); 3354 if (data.status == 1) { 3355 //ç¬¬äºæ¥éªè¯ 3356 jssendMessageTime(that); 3357 that.parent().find(".correct-info").show(); //çä¿¡å·²ç»åéæç¤º 3358 } 3359 if (data.status <= 0) { 3360 error_obj.html("<em></em>" + data.info).show(); 3361 } 3362 3363 } 3364 }); 3365 3366 } 3367 } 3368 }); 3369 3370 3371 //ç»å®æé®ç»å½ 3372 $("#user-bind-box .login-btn").click(function () { 3373 var that = $(this); 3374 var cango = $(this).hasClass("on"); 3375 var phone = that.parent().find(".phone-input").val(); //ææºå· 3376 var code = that.parent().find(".code-input").val(); //éªè¯ç 3377 var uid = that.attr('data-uid'); //éªè¯ç 3378 var error_obj = that.parent().find(".error-info"); 3379 if (cango) { 3380 3381 changeStatus(that, 'æäº¤', 1); 3382 $.ajax({
3383 type: "post", 3384 url: "/index.php?m=LoginPhoneNew&a=userBind", //å è½½å°å¯¹åºç模å 3385 data: { 'phone': phone, 'code': code, 'uid': uid }, 3386 dataType: 'json', 3387 success: function (data) { // 3388 // console.log(data); 3389 if (data.status == 1) { 3390 location.reload(); 3391 } 3392 if (data.status <= 0) { 3393 error_obj.html("<em></em>" + data.info).show(); 3394 changeStatus(that, 'æäº¤', 0); 3395 } 3396 } 3397 }); 3398 } 3399 }); 3400 3401 3402 //éªè¯ç è¾å ¥ æ¯ä¸é¢çæé®äº® 3403 $(".code-input").keyup(function () { 3404 var securityC = $(this).val().length; 3405 if (securityC == 6) { 3406 $(this).parent().parent().find(".login-btn").addClass("on"); 3407 } else { 3408 $(this).parent().parent().find(".login-btn").removeClass("on"); 3409 } 3410 }) 3411 3412 //è¾å ¥æ¡è·å¾ç¦ç¹ 3413 $(".phone-loginbox input").focus(function () { 3414 $(this).css("border-color", "#0063cd"); 3415 }); 3416 3417 // 失å»ç¦ç¹è¾¹æ¡åè² 3418 $(".phone-loginbox input").blur(function () { 3419 $(this).css("border-color", "#dddddd"); 3420 }) 3421 3422 //å ³éÃå·æé® 3423 $(".switch-close").on("click", function () { 3424 $(this).parent().parent().parent().hide(); 3425 Cookie.setCookie('temp_login_flag2', null); 3426 }) 3427 //仿æºç»å½æ¡ è¿åqq微信ç»å½ 3428 $(".return-qqWechat").on("click", function () { 3429 Login.phoneLogin(); 3430 }) 3431 3432 //qq微信ç»å½æ¡å°ææºç»å½æ¡ 3433 $(".phone-login").on("click", function () { 3434 Login.phoneSingleLogin(); 3435 }) 3436 3437 3438 //æç´¢æ¬æµ®æ¡js start 3439 $(function () { 3440 if (modelName == 'BackgroundGallery') { 3441 if (isindex == 1) { 3442 $(function () { 3443 $(".search-tab li").on("click", function () { 3444 var element = $(this).hasClass("element-search"); 3445 var background = $(this).hasClass("background-search"); 3446 var model = $(this).hasClass("model-search"); 3447 var wordart = $(this).hasClass("wordart-search"); 3448 var val = $("#topkeyword").val(); 3449 var isSearchTab = true; 3450 $(this).addClass("selected").siblings().removeClass("selected"); 3451 if (element) { 3452 3453 $(".element-h2").show().siblings().hide(); 3454 $(".search-con .search-btnTab .element").show().siblings().hide(); 3455 $(".search-con .search").removeClass("background model wordart").addClass("element"); 3456 $(".search-con .search-sug").removeClass("background model wordart").addClass("element"); 3457 $('#topkeyword').attr('placeholder', "æå ç´ "); 3458 $('#topkeyword').attr('data-index', 5); 3459 3460 $('#btn-search').html('<i></i>æå ç´ '); 3461 $('#btn-search').addClass('element'); 3462 $('#btn-search').removeClass('background model'); 3463 $('#btn-search').css('background-color', '#0082df'); 3464 $('#btn-search').attr('data-index', 5); 3465 3466 $.getJSON(domainUrl + '/?m=element&a=searchHistory', function (result) { 3467 reloadHotWords(result, 'element'); 3468 }); 3469 doSearch(val, 5, isSearchTab); 3470 } else if (background) { 3471 3472 $(".background-h2").show().siblings().hide(); 3473 $(".search-con .search-btnTab .background").show().siblings().hide(); 3474 $(".search-con .search").removeClass("element model wordart").addClass("background"); 3475 $(".search-con .search-sug").removeClass("element model wordart").addClass("background"); 3476 $('#topkeyword').attr('data-index', "0"); 3477 $('#topkeyword').attr('placeholder', "æèæ¯"); 3478 $('#btn-search').html('<i></i>æèæ¯'); 3479 $('#btn-search').addClass('background'); 3480 $('#btn-search').removeClass('element model'); 3481 $('#btn-search').css('background-color', '#dd0000'); 3482 $('#btn-search').attr('data-index', "0"); 3483 3484 $.getJSON(domainUrl + '/?m=Backgroun
3484dGallery&a=searchHistory', function (result) { 3485 reloadHotWords(result, 'background'); 3486 }); 3487 doSearch(val, 0, isSearchTab); 3488 } else if (model) { 3489 3490 $(".model-h2").show().siblings().hide(); 3491 $(".search-con .search-btnTab .model").show().siblings().hide(); 3492 $(".search-con .search").removeClass("element background wordart").addClass("model"); 3493 $(".search-con .search-sug").removeClass("element background wordart").addClass("model"); 3494 $('#topkeyword').attr('placeholder', "ææ¨¡æ¿"); 3495 $('#topkeyword').attr('data-index', 11); 3496 3497 $('#btn-search').html('<i></i>ææ¨¡æ¿'); 3498 $('#btn-search').addClass('model'); 3499 $('#btn-search').removeClass('element background'); 3500 $('#btn-search').css('background-color', '#ff7200'); 3501 $('#btn-search').attr('data-index', 11); 3502 3503 $.getJSON(domainUrl + '/?m=Templet&a=searchHistory', function (result) { 3504 reloadHotWords(result, 'templet'); 3505 }); 3506 doSearch(val, 11, isSearchTab); 3507 } else if (wordart) { 3508 3509 $(".wordart-h2").show().siblings().hide(); 3510 $(".search-con .search-btnTab .wordart").show().siblings().hide(); 3511 $(".search-con .search").removeClass("background model element").addClass("wordart"); 3512 $(".search-con .search-sug").removeClass("background model element").addClass("wordart"); 3513 $('#topkeyword').attr('placeholder', "æèºæ¯å"); 3514 $('#topkeyword').attr('data-index', 23); 3515 3516 $('#btn-search').html('<i></i>æèºæ¯å'); 3517 $('#btn-search').addClass('wordart'); 3518 $('#btn-search').removeClass('background model element'); 3519 $('#btn-search').css('background-color', '#009eb9'); 3520 $('#btn-search').attr('data-index', 23); 3521 3522 $.getJSON(domainUrl + '/?m=WordArt&a=searchHistory', function (result) { 3523 reloadHotWords(result, 'wordart'); 3524 }); 3525 doSearch(val, 23, isSearchTab); 3526 } else { 3527 return; 3528 } 3529 }) 3530 // æ°çæç´¢æ¡å级æéå ³é 3531 $(".new-search-opacityBox a").on("click", function () { 3532 $(this).parents(".new-search-opacityBox").hide(); 3533 }) 3534 3535 function reloadHotWords(data, type) { 3536 var retStr = stype = lastm = ''; 3537 if (data.data.search_log.length != 0) { 3538 if (type == 'element') { 3539 stype = 'image'; 3540 } else if (type == 'wordart') { 3541 3542 stype = 'yishuzi'; 3543 3544 } else if (type == 'illus') { 3545 stype = 'chahua'; 3546 } else { 3547 stype = 'tuku'; 3548 } 3549 if (type == 'templet') { 3550 lastm = '-moban'; 3551 } 3552 var searchLog = data.data.search_log; 3553 retStr = '<div class="search-log"><ul class="clearfix"><li class="recent-search">æè¿æç´¢ï¼</li>'; 3554 for (var i in searchLog) { 3555 retStr += '<li><a href="' + domainUrl + '/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '.html" onclick="search_static(1)">' + searchLog[i]['keyword'] + '</a></li>'; 3556 } 3557 retStr += '</ul></div>'; 3558 } 3559 if (data.data.hotwords) { 3560 var hotwords = data.data.hotwords; 3561 for (var j in hotwords) { 3562 var extendw = addone = ''; 3563 if (j > 8) { 3564 break; 3565 } 3566 if (j <= 2) { 3567 extendw = 'hot'; 3568 } 3569 addone = (j + 1); 3570 retStr += '<ul class="sokeyup_1 ' + extendw + ' data-id="' + addone + '" id="u_' + addone + '"><li class="sokeyup_2" id="l_' + addone + '">' + hotwords[j]['hot_word'] + '</li>'; 3571 3572 // retStr += '<li class="sokeyup_3" id="r_' + addone + '">' + hotwords[j]['total'] + ' ç»æ</li>'; 3573 3574 retStr += '</ul>'; 3575 } 3576 } 3577 $('#hot-search').html(retStr); 3578 $('.search-sug').html(retStr); 3579 } 3580 }) 3581 } else { 3582 $(function () { 3583 $(".search-tab li").on("click", function () { 3584 var element = $(this).hasClass("element-search"); 3585 var background = $(this).hasClass("background-search"); 3586 var model = $(this).hasClass("model-search"); 3587 var wordart = $(this).hasClass("wordart-search"); 3588 var val = $("#topkeyword").val(); 3589 var isSearchTab = true; 3590 $(this).addClass("selected").siblings().removeClass("selected"); 3591 if (element) { 3592 3593 $(".element-h2").show().siblings().hide(); 3594 $(".search-con .search-btnTab .element").show().siblings().hide(); 3595 $(".search-con .search").removeClass("background model wordart").addClass("element"); 3596 $(".search-con .search-sug").removeClass("background model wordart").addClass("element"); 3597 $('#topkeyword').attr('placeholder', "æå ç´ "); 3598 $('#topkeyword').attr('data-index', 5); 3599 3600 $('#btn-search').html('<i></i>æå ç´ '); 3601 $('#btn-search').addClass('element'); 3602 $('#btn-search').removeClass('background model'); 3603 $('#btn-search').css('background-color', '#0082df'); 3604 $('#btn-search').attr('data-index', 5); 3605 3606 $.getJSON(domainUrl + '/?m=element&a=searchHistory', function (result) { 3607 reloadHotWords(result, 'element'); 3608 }); 3609 doSearch(val, 5, isSearchTab); 3610 } else if (background) { 3611 3612 $(".background-h2").show().siblings().hide(); 3613 $(".search-con .search-btnTab .background").show().siblings().hide(); 3614 $(".search-con .search").removeClass("element model wordart").addClass("background"); 3615 $(".search-con .search-sug").removeClass("element model wordart").addClass("background"); 3616 $('#topkeyword').attr('placeholder', "æèæ¯"); 3617 $('#topkeyword').attr('data-index', "{$searchIndex}"); 3618 3619 $('#btn-search').html('<i></i>æèæ¯') 3620 $('#btn-search').addClass('background'); 3621 $('#btn-search').removeClass('element model'); 3622 $('#btn-search').css('background-color', '#dd0000'); 3623 $('#btn-search').attr('data-index', "{$searchIndex}"); 3624 3625 $.getJSON(domainUrl + '/?m=Backgroun
3625dGallery&a=searchHistory', function (result) { 3626 reloadHotWords(result, 'background'); 3627 }); 3628 doSearch(val, 0, isSearchTab); 3629 } else if (model) { 3630 3631 $(".model-h2").show().siblings().hide(); 3632 $(".search-con .search-btnTab .model").show().siblings().hide(); 3633 $(".search-con .search").removeClass("element background wordart").addClass("model"); 3634 $(".search-con .search-sug").removeClass("element background wordart").addClass("model"); 3635 $('#topkeyword').attr('placeholder', "ææ¨¡æ¿"); 3636 $('#topkeyword').attr('data-index', 11); 3637 3638 $('#btn-search').html('<i></i>ææ¨¡æ¿'); 3639 $('#btn-search').addClass('model'); 3640 $('#btn-search').removeClass('element background'); 3641 $('#btn-search').css('background-color', '#ff7200'); 3642 $('#btn-search').attr('data-index', 11); 3643 3644 $.getJSON(domainUrl + '/?m=Templet&a=searchHistory', function (result) { 3645 reloadHotWords(result, 'templet'); 3646 }); 3647 doSearch(val, 11, isSearchTab); 3648 } else if (wordart) { 3649 3650 $(".wordart-h2").show().siblings().hide(); 3651 $(".search-con .search-btnTab .wordart").show().siblings().hide(); 3652 $(".search-con .search").removeClass("background model element").addClass("wordart"); 3653 $(".search-con .search-sug").removeClass("background model element").addClass("wordart"); 3654 $('#topkeyword').attr('placeholder', "æèºæ¯å"); 3655 $('#topkeyword').attr('data-index', 23); 3656 3657 $('#btn-search').html('<i></i>æèºæ¯å'); 3658 $('#btn-search').addClass('wordart'); 3659 $('#btn-search').removeClass('background model element'); 3660 $('#btn-search').css('background-color', '#009eb9'); 3661 $('#btn-search').attr('data-index', 23); 3662 3663 $.getJSON(domainUrl + '/?m=WordArt&a=searchHistory', function (result) { 3664 reloadHotWords(result, 'wordart'); 3665 }); 3666 doSearch(val, 23, isSearchTab); 3667 } else { 3668 return; 3669 } 3670 }) 3671 // æ°çæç´¢æ¡å级æéå ³é 3672 $(".new-search-opacityBox a").on("click", function () { 3673 $(this).parents(".new-search-opacityBox").hide(); 3674 }) 3675 3676 function reloadHotWords(data, type) { 3677 var retStr = stype = lastm = ''; 3678 if (data.data.search_log.length != 0) { 3679 if (type == 'element') { 3680 stype = 'image'; 3681 } else if (type == 'wordart') { 3682 3683 stype = 'yishuzi'; 3684 3685 } else if (type == 'illus') { 3686 stype = 'chahua'; 3687 } else { 3688 stype = 'tuku'; 3689 } 3690 if (type == 'templet') { 3691 lastm = '-moban'; 3692 } 3693 var searchLog = data.data.search_log; 3694 retStr = '<div class="search-log"><ul class="clearfix"><li class="recent-search">æè¿æç´¢ï¼</li> '; 3695 for (var i in searchLog) { 3696 retStr += '<li><a href="' + domainUrl + '/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '.html" onclick="search_static(1)">' + searchLog[i]['keyword'] + '</a></li>'; 3697 } 3698 retStr += '</ul></div>'; 3699 } 3700 if (data.data.hotwords) { 3701 var hotwords = data.data.hotwords; 3702 for (var j in hotwords) { 3703 var extendw = addone = ''; 3704 if (j > 8) { 3705 break; 3706 } 3707 if (j <= 2) { 3708 extendw = 'hot'; 3709 } 3710 addone = (j + 1); 3711 retStr += '<ul class="sokeyup_1 ' + extendw + ' data-id="' + addone + '" id="u_' + addone + '"><li class="sokeyup_2" id="l_' + addone + '">' + hotwords[j]['hot_word'] + '</li>'; 3712 3713 // retStr += '<li class="sokeyup_3" id="r_' + addone + '">' + hotwords[j]['total'] + ' ç»æ</li>'; 3714 3715 retStr += '</ul>'; 3716 } 3717 } 3718 $('#hot-search').html(retStr); 3719 $('.search-sug').html(retStr); 3720 } 3721 }) 3722 } 3723 } else if (modelName == 'Templet') { 3724 $(function () { 3725 $(".search-tab li").on("click", function () { 3726 var element = $(this).hasClass("element-search"); 3727 var background = $(this).hasClass("background-search"); 3728 var model = $(this).hasClass("model-search"); 3729 var wordart = $(this).hasClass("wordart-search"); 3730 var val = $("#topkeyword").val(); 3731 var isSearchTab = true; 3732 $(this).addClass("selected").siblings().removeClass("selected"); 3733 if (element) { 3734 $(".element-h2").show().siblings().hide(); 3735 $(".search-con .search-btnTab .element").show().siblings().hide(); 3736 $(".search-con .search").removeClass("background model wordart").addClass("element"); 3737 $(".search-con .search-sug").removeClass("background model wordart").addClass("element"); 3738 $('#topkeyword').attr('placeholder', "æå ç´ "); 3739 $('#topkeyword').attr('data-index', 5); 3740 3741 $('#btn-search').html('<i></i>æå ç´ '); 3742 $('#btn-search').addClass('element'); 3743 $('#btn-search').removeClass('background model'); 3744 $('#btn-search').css('background-color', '#0082df'); 3745 $('#btn-search').attr('data-index', 5); 3746 3747 $.getJSON(domainUrl + '/?m=element&a=searchHistory', function (result) { 3748 reloadHotWords(result, 'element'); 3749 }); 3750 doSearch(val, 5, isSearchTab); 3751 } else if (background) { 3752 $(".background-h2").show().siblings().hide(); 3753 $(".search-con .search-btnTab .background").show().siblings().hide(); 3754 $(".search-con .search").removeClass("element model wordart").addClass("background"); 3755 $(".search-con .search-sug").removeClass("element model wordart").addClass("background"); 3756 $('#topkeyword').attr('placeholder', "æèæ¯"); 3757 $('#topkeyword').attr('data-index', 0); 3758 3759 $('#btn-search').html('<i></i>æèæ¯') 3760 $('#btn-search').addClass('background'); 3761 $('#btn-search').removeClass('element model'); 3762 $('#btn-search').css('background-color', '#dd0000'); 3763 $('#btn-search').attr('data-index', 0); 3764
3765 $.getJSON(domainUrl + '/?m=BackgroundGallery&a=searchHistory', function (result) { 3766 reloadHotWords(result, 'background'); 3767 }); 3768 doSearch(val, 0, isSearchTab); 3769 } else if (model) { 3770 $(".model-h2").show().siblings().hide(); 3771 $(".search-con .search-btnTab .model").show().siblings().hide(); 3772 $(".search-con .search").removeClass("element background wordart").addClass("model"); 3773 $(".search-con .search-sug").removeClass("element background wordart").addClass("model"); 3774 $('#topkeyword').attr('placeholder', "ææ¨¡æ¿"); 3775 $('#topkeyword').attr('data-index', 11); 3776 3777 $('#btn-search').html('<i></i>ææ¨¡æ¿'); 3778 $('#btn-search').addClass('model'); 3779 $('#btn-search').removeClass('element background'); 3780 $('#btn-search').css('background-color', '#ff7200'); 3781 $('#btn-search').attr('data-index', 11); 3782 3783 $.getJSON(domainUrl + '/?m=Templet&a=searchHistory', function (result) { 3784 reloadHotWords(result, 'templet'); 3785 }); 3786 doSearch(val, 11, isSearchTab); 3787 } else if (wordart) { 3788 $(".wordart-h2").show().siblings().hide(); 3789 $(".search-con .search-btnTab .wordart").show().siblings().hide(); 3790 $(".search-con .search").removeClass("background model element").addClass("wordart"); 3791 $(".search-con .search-sug").removeClass("background model element").addClass("wordart"); 3792 $('#topkeyword').attr('placeholder', "æèºæ¯å"); 3793 $('#topkeyword').attr('data-index', 23); 3794 3795 $('#btn-search').html('<i></i>æèºæ¯å'); 3796 $('#btn-search').addClass('wordart'); 3797 $('#btn-search').removeClass('background model element'); 3798 $('#btn-search').css('background-color', '#009eb9'); 3799 $('#btn-search').attr('data-index', 23); 3800 3801 $.getJSON(domainUrl + '/?m=WordArt&a=searchHistory', function (result) { 3802 reloadHotWords(result, 'wordart'); 3803 }); 3804 doSearch(val, 23, isSearchTab); 3805 } else { 3806 return; 3807 } 3808 }) 3809 // æ°çæç´¢æ¡å级æéå ³é 3810 $(".new-search-opacityBox a").on("click", function () { 3811 $(this).parents(".new-search-opacityBox").hide(); 3812 }) 3813 3814 function reloadHotWords(data, type) { 3815 var retStr = stype = lastm = ''; 3816 if (data.data.search_log.length != 0) { 3817 if (type == 'element') { 3818 stype = 'image'; 3819 } else if (type == 'office') { 3820 stype = 'ppt'; 3821 } else if (type == 'wordart') { 3822 3823 stype = 'yishuzi'; 3824 3825 } else if (type == 'illus') { 3826 stype = 'chahua'; 3827 } else { 3828 stype = 'tuku'; 3829 } 3830 if (type == 'templet') { 3831 lastm = '-moban'; 3832 } 3833 var searchLog = data.data.search_log; 3834 retStr = '<div class="search-log"><ul class="clearfix"><li class="recent-search">æè¿æç´¢ï¼</li> '; 3835 for (var i in searchLog) { 3836 retStr += '<li><a href="' + domainUrl + '/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '.html" onclick="search_static(1)">' + searchLog[i]['keyword'] + '</a></li>'; 3837 } 3838 retStr += '</ul></div>'; 3839 } 3840 if (data.data.hotwords) { 3841 var hotwords = data.data.hotwords; 3842 for (var j in hotwords) { 3843 var extendw = addone = ''; 3844 if (j > 8) { 3845 break; 3846 } 3847 if (j <= 2) { 3848 extendw = 'hot'; 3849 } 3850 addone = (j + 1); 3851 retStr += '<ul class="sokeyup_1 ' + extendw + ' data-id="' + addone + '" id="u_' + addone + '"><li class="sokeyup_2" id="l_' + addone + '">' + hotwords[j]['hot_word'] + '</li>'; 3852 3853 // retStr += '<li class="sokeyup_3" id="r_' + addone + '">' + hotwords[j]['total'] + ' ç»æ</li>'; 3854 3855 retStr += '</ul>'; 3856 } 3857 } 3858 $('#hot-search').html(retStr); 3859 $('.search-sug').html(retStr); 3860 } 3861 }) 3862 } else { 3863 $(function () { 3864 $(".search-tab li").on("click", function () { 3865 var element = $(this).hasClass("element-search"); 3866 var background = $(this).hasClass("background-search"); 3867 var model = $(this).hasClass("model-search"); 3868 var office = $(this).hasClass("office-search"); 3869 var wordart = $(this).hasClass("wordart-search"); 3870 var val = $("#topkeyword").val(); 3871 var isSearchTab = true; 3872 $(this).addClass("selected").siblings().removeClass("selected"); 3873 if (element) { 3874 $(".element-h2").show().siblings().hide(); 3875 $(".search-con .search-btnTab .element").show().siblings().hide(); 3876 $(".search-con .search").removeClass("background model office wordart").addClass("element"); 3877 $(".search-con .search-sug").removeClass("background model office wordart").addClass("element"); 3878 $('#topkeyword').attr('placeholder', "æå ç´ "); 3879 $('#topkeyword').attr('data-index', 5); 3880 3881 $('#btn-search').html('<i></i>æå ç´ '); 3882 $('#btn-search').addClass('element'); 3883 $('#btn-search').removeClass('background model office'); 3884 $('#btn-search').css('background-color', '#0082df'); 3885 $('#btn-search').attr('data-index', 5); 3886 3887 $.getJSON(domainUrl + '/?m=element&a=searchHistory', function (result) { 3888 reloadHotWords(result, 'element'); 3889 }); 3890 doSearch(val, 5, isSearchTab); 3891 } else if (background) { 3892 $(".background-h2").show().siblings().hide(); 3893 $(".search-con .search-btnTab .background").show().siblings().hide(); 3894 $(".search-con .search").removeClass("element model office wordart").addClass("background"); 3895 $(".search-con .search-sug").removeClass("element model office wordart").addClass("background"); 3896 $('#topkeyword').attr('placeholder', "æèæ¯"); 3897 $('#topkeyword').attr('data-index', 0); 3898 3899 $('#btn-search').html('<i></i>æèæ¯') 3900 $('#btn-search').addClass('background'); 3901 $('#btn-search').removeClass('element model office'); 3902 $('#btn-search').css('background-color', '#dd0000'); 3903 $('#btn-search').attr('data-index', 0); 3904
3905 $.getJSON(domainUrl + '/?m=BackgroundGallery&a=searchHistory', function (result) { 3906 reloadHotWords(result, 'background'); 3907 }); 3908 doSearch(val, 0, isSearchTab); 3909 } else if (model) { 3910 $(".model-h2").show().siblings().hide(); 3911 $(".search-con .search-btnTab .model").show().siblings().hide(); 3912 $(".search-con .search").removeClass("element background office wordart").addClass("model"); 3913 $(".search-con .search-sug").removeClass("element background office wordart").addClass("model"); 3914 $('#topkeyword').attr('placeholder', "ææ¨¡æ¿"); 3915 $('#topkeyword').attr('data-index', 11); 3916 3917 $('#btn-search').html('<i></i>ææ¨¡æ¿'); 3918 $('#btn-search').addClass('model'); 3919 $('#btn-search').removeClass('element background office'); 3920 $('#btn-search').css('background-color', '#ff7200'); 3921 $('#btn-search').attr('data-index', 11); 3922 3923 $.getJSON(domainUrl + '/?m=Templet&a=searchHistory', function (result) { 3924 reloadHotWords(result, 'templet'); 3925 }); 3926 doSearch(val, 11, isSearchTab); 3927 } else if (office) { 3928 $(".office-h2").show().siblings().hide(); 3929 $(".search-con .search-btnTab .office").show().siblings().hide(); 3930 $(".search-con .search").removeClass("element background model wordart").addClass("office"); 3931 $(".search-con .search-sug").removeClass("element background model wordart").addClass("office"); 3932 3933 $('#topkeyword').attr('data-index', 13); 3934 3935 $('#btn-search').html('<i></i>'); 3936 $('#btn-search').addClass('office'); 3937 $('#btn-search').removeClass('element background model'); 3938 $('#btn-search').css('background-color', '#ffc000'); 3939 $('#btn-search').attr('data-index', 13); 3940 3941 $.getJSON(domainUrl + '/?m=Office&a=searchHistory', function (result) { 3942 reloadHotWords(result, 'office'); 3943 }); 3944 doSearch(val, 13, isSearchTab); 3945 } else if (wordart) { 3946 $(".wordart-h2").show().siblings().hide(); 3947 $(".search-con .search-btnTab .wordart").show().siblings().hide(); 3948 $(".search-con .search").removeClass("background model element office").addClass("wordart"); 3949 $(".search-con .search-sug").removeClass("background model element office").addClass("wordart"); 3950 $('#topkeyword').attr('placeholder', "æèºæ¯å"); 3951 $('#topkeyword').attr('data-index', 23); 3952 3953 $('#btn-search').html('<i></i>æèºæ¯å'); 3954 $('#btn-search').addClass('wordart'); 3955 $('#btn-search').removeClass('background model element'); 3956 $('#btn-search').css('background-color', '#009eb9'); 3957 $('#btn-search').attr('data-index', 23); 3958 3959 $.getJSON(domainUrl + '/?m=WordArt&a=searchHistory', function (result) { 3960 reloadHotWords(result, 'wordart'); 3961 }); 3962 doSearch(val, 23, isSearchTab); 3963 } else { 3964 return; 3965 } 3966 }) 3967 // æ°çæç´¢æ¡å级æéå ³é 3968 $(".new-search-opacityBox a").on("click", function () { 3969 $(this).parents(".new-search-opacityBox").hide(); 3970 }) 3971 3972 function reloadHotWords(data, type) { 3973 var retStr = stype = lastm = ''; 3974 if (data.data.search_log.length != 0) { 3975 if (type == 'element') { 3976 stype = 'image'; 3977 } else if (type == 'wordart') { 3978 3979 stype = 'yishuzi'; 3980 3981 } else if (type == 'illus') { 3982 stype = 'chahua'; 3983 } else { 3984 stype = 'tuku'; 3985 } 3986 if (type == 'templet') { 3987 lastm = '-moban'; 3988 } 3989 var searchLog = data.data.search_log; 3990 retStr = '<div class="search-log"><ul class="clearfix"><li class="recent-search">æè¿æç´¢ï¼</li> '; 3991 for (var i in searchLog) { 3992 retStr += '<li><a href="' + domainUrl + '/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '.html" onclick="search_static(1)">' + searchLog[i]['keyword'] + '</a></li>'; 3993 } 3994 retStr += '</ul></div>'; 3995 } 3996 if (data.data.hotwords) { 3997 var hotwords = data.data.hotwords; 3998 for (var j in hotwords) { 3999 var extendw = addone = ''; 4000 if (j > 8) { 4001 break; 4002 } 4003 if (j <= 2) { 4004 extendw = 'hot'; 4005 } 4006 addone = (j + 1); 4007 retStr += '<ul class="sokeyup_1 ' + extendw + ' data-id="' + addone + '" id="u_' + addone + '"><li class="sokeyup_2" id="l_' + addone + '">' + hotwords[j]['hot_word'] + '</li>'; 4008 //retStr += '<li class="sokeyup_3" id="r_' + addone + '">' + hotwords[j]['total'] + ' ç»æ</li>'; 4009 retStr += '</ul>'; 4010 } 4011 } 4012 $('#hot-search').html(retStr); 4013 $('.search-sug').html(retStr); 4014 } 4015 }) 4016 } 4017 4018 function reloadHotWords(data, type) { 4019 var retStr = stype = lastm = ''; 4020 if (data.data.search_log.length != 0) { 4021 if (type == 'element') { 4022 stype = 'image'; 4023 } else if (type == 'wordart') { 4024 4025 stype = 'yishuzi'; 4026 4027 } else if (type == 'illus') { 4028 stype = 'chahua'; 4029 } else { 4030 stype = 'tuku'; 4031 } 4032 if (type == 'templet') { 4033 lastm = '-moban'; 4034 } 4035 var searchLog = data.data.search_log; 4036 retStr = '<div class="search-log"><ul class="clearfix"><li class="recent-search">æè¿æç´¢ï¼</li> '; 4037 for (var i in searchLog) { 4038 retStr += '<li><a href="' + domainUrl + '/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '.html" onclick="search_static(1)">' + searchLog[i]['keyword'] + '</a></li>'; 4039 } 4040 retStr += '</ul></div>'; 4041 } 4042 if (data.data.hotwords) { 4043 var hotwords = data.data.hotwords; 4044 for (var j in hotwords) { 4045 var extendw = addone = ''; 4046 if (j > 8) { 4047 break; 4048 } 4049 if (j <= 2) { 4050 extendw = 'hot'; 4051 } 4052 addone = (j + 1); 4053 retStr += '<ul class="sokeyup_1 ' + extendw + ' data-id="' + addone + '" id="u_' + addone + '"><li class="sokeyup_2" id="l_' + addone + '">' + hotwords[j]['hot_word'] + '</li>'; 4054 //retStr += '<li class="sokeyup_3" id="r_' + addone + '">' + hotwords[j]['total'] + ' ç»æ</li>'; 4055 retStr += '</ul>'; 4056 } 4057 } 4058 $('#hot-search').html(retStr); 4059 $('.search-sug').html(retStr); 4060 } 4061 });
4062 4063 4064 /*æç´¢å表页æç´¢ä¸ææ¡æè¿æç´¢è¯è·åstart*/ 4065 $(function () { 4066 $('body').on('click', '.searchlistDl .downList ul li', function () { 4067 var type = $(this).attr('data-index'); 4068 getHotWords(type); 4069 }); 4070 }); 4071 function getHotWords(type) { 4072 var classn = ''; 4073 if (type == '5') { 4074 classn = 'element'; 4075 } 4076 if (type == '24') { 4077 classn = 'Illus'; 4078 } 4079 if (type == '23') { 4080 classn = 'WordArt'; 4081 } 4082 if (type == '1') { 4083 classn = 'BackgroundGallery'; 4084 } 4085 if (type == '11') { 4086 classn = 'Templet'; 4087 } 4088 if (type == 30) { 4089 $('.search-popular').hide(); 4090 $('.search-sug .sokeyup_1').hide(); 4091 var len = $('.search-sug .search-log').length; 4092 if (!len || len == 0) { 4093 $('.search-sug').html(''); 4094 } 4095 } else { 4096 $('.search-popular').show(); 4097 $.getJSON(domainUrl + '/?m=' + classn + '&a=searchHistory', function (result) { 4098 reloadHotWordsV1(result, type); 4099 }); 4100 } 4101 } 4102 4103 function reloadHotWordsV1(data, type) { 4104 var retStr = resStr = stype = lastm = ''; 4105 if (type == '5') { 4106 stype = 'image'; 4107 } else if (type == '23') { 4108 stype = 'yishuzi'; 4109 } else if (type == '24') { 4110 stype = 'chahua'; 4111 } else { 4112 stype = 'tuku'; 4113 } 4114 if (type == '11') { 4115 lastm = '-moban'; 4116 } 4117 if (data.data.search_log.length != 0) { 4118 4119 var searchLog = data.data.search_log; 4120 retStr = '<div class="search-log"><ul class="clearfix"><li class="recent-search">æè¿æç´¢ï¼</li>'; 4121 for (var i in searchLog) { 4122 retStr += '<li><a href="' + domainUrl + '/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '.html" onclick="search_static(1)">' + searchLog[i]['keyword'] + '</a></li>'; 4123 } 4124 retStr += '</ul></div>'; 4125 } 4126 4127 if (data.data.hotwords) { 4128 var hotwords = data.data.hotwords; 4129 for (var j in hotwords) { 4130 var extendw = addone = ''; 4131 if (j > 8) { 4132 break; 4133 } 4134 addone = (parseInt(j) + 1); 4135 if (j <= 2) { 4136 extendw = 'hot hot' + addone; 4137 } 4138 resStr += '<li><a href="' + domainUrl + '/' + stype + '/' + hotwords[j]['pinyin'] + lastm + '.html" data-pinyin="xinnian" target="_blank">' + hotwords[j]['hot_word'] + '</a></li>'; 4139 retStr += '<ul class="sokeyup_1 ' + extendw + ' data-id="' + addone + '" id="u_' + addone + '"><li class="sokeyup_2" id="l_' + addone + '"><em class="list-num">' + addone + '</em>' + hotwords[j]['hot_word'] + '</li>'; 4140 retStr += '</ul>'; 4141 } 4142 } 4143 $('.searchlistDl .search-sug').html(retStr); 4144 //$('.searchPopularList').show(); 4145 //$('.searchPopularList').html(resStr); 4146 } 4147 4148 /*æç´¢å表页æç´¢ä¸ææ¡æè¿æç´¢è¯è·åend*/ 4149 $(function () { 4150 $(".search-left").hover(function () { 4151 $(this).children(".current-selectOther").stop().slideDown('fast'); 4152 }, function () { 4153 $(this).children(".current-selectOther").stop().slideUp('fast'); 4154 }); 4155 // $(".search-left").mouseout(function(){ 4156 // $(this).children(".current-selectOther").stop().slideUp('fast'); 4157 // }) 4158 /*èµå¼ç»ææ¬æ¡*/ 4159 $(".current-selectOther li").click(function () { 4160 $('#topkeyword_float').attr('data-index', $(this).attr('data-index')); 4161 $('#btn-search-float').attr('data-index', $(this).attr('data-index')); 4162 4163 if ($('#topkeyword_float').attr('data-index') == 0) { 4164 $('.search-sug-float').removeClass("element model wordart").addClass('background');
4165 if (modelName == 'BackgroundGallery') { 4166 if (isindex == 1) { 4167 $('#topkeyword_float').attr('placeholder', ""); 4168 } else { 4169 $('#topkeyword_float').attr('placeholder', ""); 4170 } 4171 } else if (modelName == 'Templet') { 4172 $('#topkeyword_float').attr('placeholder', ""); 4173 } else { 4174 $('#topkeyword_float').attr('placeholder', ""); 4175 } 4176 } else if ($('#topkeyword_float').attr('data-index') == 5) { 4177 $('.search-sug-float').removeClass("model background wordart").addClass('element'); 4178 if (modelName == 'BackgroundGallery') { 4179 if (isindex == 1) { 4180 $('#topkeyword_float').attr('placeholder', ""); 4181 } else { 4182 $('#topkeyword_float').attr('placeholder', ""); 4183 } 4184 } else if (modelName == 'Templet') { 4185 $('#topkeyword_float').attr('placeholder', ""); 4186 } else { 4187 $('#topkeyword_float').attr('placeholder', ""); 4188 } 4189 } else if ($('#topkeyword_float').attr('data-index') == 11) { 4190 $('.search-sug-float').removeClass("element background wordart").addClass('model'); 4191 if (modelName == 'BackgroundGallery') { 4192 if (isindex == 1) { 4193 $('#topkeyword_float').attr('placeholder', ""); 4194 } else { 4195 $('#topkeyword_float').attr('placeholder', ""); 4196 } 4197 } else if (modelName == 'Templet') { 4198 $('#topkeyword_float').attr('placeholder', ""); 4199 } else { 4200 $('#topkeyword_float').attr('placeholder', ""); 4201 } 4202 } else if ($('#topkeyword_float').attr('data-index') == 23) { 4203 $('.search-sug-float').removeClass("element background model").addClass('wordart'); 4204 if (modelName == 'WordArt') { 4205 if (isindex == 1) { 4206 $('#topkeyword_float').attr('placeholder', ""); 4207 } else { 4208 $('#topkeyword_float').attr('placeholder', ""); 4209 } 4210 } else if (modelName == 'Templet') { 4211 $('#topkeyword_float').attr('placeholder', ""); 4212 } else { 4213 $('#topkeyword_float').attr('placeholder', ""); 4214 } 4215 } 4216 4217 $(this).parent().hide(); 4218 var value = $(this).html(); 4219 var valtag = $(".current-select").html(); 4220 $(".current-select").html(value); 4221 $(this).hide().siblings().show(); 4222 var ele = $(this).hasClass("element"); 4223 var bg = $(this).hasClass("background"); 4224 var mod = $(this).hasClass("model"); 4225 var wa = $(this).hasClass("wordart"); 4226 if (ele) { 4227 $(".search-fixTop .search").removeClass("background model wordart").addClass("element"); 4228 $(".search-fixTop .search-but").removeClass("background model wordart").addClass("element"); 4229 $(".search-fixTop .search-sug").removeClass("background model wordart").addClass("element"); 4230 } else if (bg) { 4231 $(".search-fixTop .search").removeClass("element model wordart").addClass("background"); 4232 $(".search-fixTop .search-but").removeClass("element model wordart").addClass("background"); 4233 $(".search-fixTop .search-sug").removeClass("element model wordart").addClass("background"); 4234 } else if (mod) { 4235 $(".search-fixTop .search").removeClass("element background wordart").addClass("model"); 4236 $(".search-fixTop .search-but").removeClass("element background wordart").addClass("model"); 4237 $(".search-fixTop .search-sug").removeClass("element background wordart").addClass("model"); 4238 } else if (wa) { 4239 $(".search-fixTop .search").removeClass("element background model").addClass("wordart"); 4240 $(".search-fixTop .search-but").removeClass("element background model").addClass("wordart"); 4241 $(".search-fixTop .search-sug").removeClass("element background model").addClass("wordart"); 4242 } else { 4243 return; 4244 } 4245 }) 4246 }) 4247 4248 $(function () { 4249 (function ($) { 4250 var tools = { 4251 TimeOutRun: function (obj, Event, callBack, time) { 4252 var timeOutId = "", 4253 reStart = true; 4254 obj.on(Event, function () { 4255 clearTimeout(timeOutId); 4256 if (reStart) { 4257 timeOutRun(time) 4258 } 4259 }); 4260 function timeOutRun(time) { 4261 reStart = false; 4262 var timeOutId = setTimeout(function () { 4263 reStart = true; 4264 callBack() 4265 }, time); 4266 } 4267 }, 4268 log: function (log) { 4269 if (window.console) { } 4270 } 4271 }; 4272 function FixedPointShow($el, config) { 4273 var def = { 4274 zIndex: 100, //Zè½´ 4275 st: 200 //æ»å¨å¤å°è·ç¦»çæ¶ååºç°å¯¼èª 4276 }; 4277 this.opts = $.extend(true, def, config); 4278 this.el = $el; 4279 } 4280 FixedPointShow.prototype = { 4281 scrollNav: function () { 4282 var isOpen = false, This = this, 4283 fixTopH = This['el'].outerHeight(); 4284 4285 This['el'].css({ "z-index": this.opts.zIndex }); 4286 4287 tools.TimeOutRun($(window), "scroll", function () { 4288 var st = $(this).scrollTop(); 4289 if (st > This.opts.st) { 4290 !isOpen && This.el.stop().animate({ "top": 0 }, 400, function () { 4291 $(this).show(); 4292 isOpen = true; 4293 }); 4294 } else { 4295 This.el.stop().animate({ "top": -fixTopH - 140 }, 400, function () { 4296 $(this).hide(); 4297 isOpen = false; 4298 }); 4299 } 4300 tools.log(st) 4301 }, 200) 4302 } 4303 }; 4304 FixedPointShow.prototype.constructor = FixedPointShow; 4305 $.extend($.fn, { 4306 fixedPointShow: function (config) { 4307 //IE6 è¿å 4308 if (!("maxHeight" in document.createElement("div").style)) { 4309 $(this).remove(); 4310 return 4311 } 4312 var fixedPointNav = new FixedPointShow($(this)); 4313 fixedPointNav.scrollNav(); 4314 return this; 4315 } 4316 }); 4317 }(jQuery)); 4318 $('#btn-search-float').click(function () { 4319 var val = $("#topkeyword_float").val(); 4320 var index = parseInt($(this).data('index')); 4321 4322 doSearch(val, index); 4323 var headPlace = parseInt($(this).attr('data-headPlace')); 4324 var headPosition = parseInt($(this).attr('data-headPosition')); 4325 if (headPlace > 0 && headPosition > 0) { 4326 headStatist(headPlace, headPosition); 4327 } 4328 // ç¹å»æç´¢æ¶ï¼å 为æ¯å¨å½å页é¢å·æ°æä½ï¼è®°å½äºé¦é¡µçæ»å¨é«åº¦ï¼æä»¥æ¸ 空 4329 setTimeout(function () { 4330 localStorage.removeItem('scrollTop'); 4331 console.log('æå é¤äºtop') 4332 }, 10) 4333 4334 }); 4335 $(".search-sug-float").on("click", ".sokeyup_1", function () { 4336 var G = $(this).find(".sokeyup_2") 4337 .clone() //å¤å¶å ç´ 4338 .children() //è·åææåå ç´ 4339 .remove() //å 餿æåå ç´ 4340 .end() //åå°éæ©çå ç´ 4341 .text();//è·åææ¬å¼ 4342 $("#topkeyword_float").val(G);//è¾å ¥å°inputæ¡ 4343 $("#btn-search-float").click();//æäº¤æ°æ® 4344 $(".search-sug-float").hide(); 4345 }) 4346 $("#topkeyword_float").click(function () { 4347 if ($(".search-sug-float").text() != "") { 4348 $(".search-sug-float").show(); 4349 } else { 4350 var I = $("#topkeyword_float"); 4351 var K = I.val(); 4352 if (K == "") { 4353 var htmls = $("#hot-search-float").html(); 4354 if (htmls) { 4355 $(".search-sug-float").html(htmls).show(); 4356 } 4357 } else { 4358 if (K.indexOf("ä¹ ") !== -1 || K.indexOf("è¿") !== -1 || K.indexOf("å¹³") !== -1) { 4359 return false; 4360 } 4361 // var SI = $('.current-select').attr('data-index'); 4362 var SI = $(this).attr('data-index'); 4363 var sType = $(this).attr('data-type'); 4364 if (!sType) { 4365 sType = ""; 4366 } 4367 var L = "//ajax2.588ku.com/index.php?m=searchtips&a=search&kw=" + K + "&select_index=" + SI + "&type=" + sType + "&callback=?"; 4368 $.getJSON(L, function (M) { 4369 if (M != "") { 4370 $(".search-sug-float").html(M).show(); 4371 } else { 4372 $(".search-sug-float").hide(); 4373 } 4374 }); 4375 } 4376 } 4377 }); 4378 $("#topkeyword_float").keyup(function (J) { 4379 var SI = $(this).attr('data-index'); 4380 var sType = $(this).attr('data-type'); 4381 if (!sType) { 4382 sType = ""; 4383 } 4384 if (window.event) { 4385 var H = window.event.keyCode; 4386 } else { 4387 var H = J.which; 4388 } 4389 var I = $("#topkeyword_float"); 4390 var G = I.width(); 4391 if (H != 38 && H != 40 && H != 13) { 4392 /* var K = I.val(); 4393 if (K == "") { 4394 return false; 4395 } */ 4396 var K = I.val(); 4397 if (!K || K == "") { 4398 var htmls = $("#hot-search-float").html(); 4399 if (htmls) { 4400 $(".search-sug-float").html(htmls).show(); 4401 } 4402 return false; 4403 } 4404 if (K.indexOf("ä¹ ") !== -1 || K.indexOf("è¿") !== -1 || K.indexOf("å¹³") !== -1) { 4405 return false; 4406 } 4407 var L = "//ajax2.588ku.com/index.php?m=searchtips&a=search&kw=" + K + "&select_index=" + SI + "&type=" + sType + "&callback=?"; 4408 $.getJSON(L, function (M) { 4409 if (M != "") { 4410 $(".search-sug-float").html(M).show(); 4411 } else { 4412 $(".search-sug-float").hide(); 4413 } 4414 }); 4415 } 4416 }); 4417 $("#topkeyword_float").blur(function () { 4418 setTimeout('$(".search-sug-float").hide();', 500); 4419 }); 4420 var D = 0; 4421 $("#topkeyword_float").keyup(function (H) { 4422 if (window.event) { 4423 var G = window.event.keyCode; 4424 } else { 4425 var G = H.which; 4426 } 4427 if (G != 38 && G != 40 && G != 13) { 4428 D = 0; 4429 } else { 4430 if (G == 13) { 4431 var val = $("#topkeyword_float").val(); 4432 var index = parseInt($('#btn-search-float').data('index')); 4433 4434 doSearch(val, index); 4435 } 4436 if ($(".search-sug-float").css("display") == "block") { 4437 var I = $(".search-sug-float ul").length; 4438 if (G == 38) { 4439 D--; 4440 if (D < 1) { 4441 D = I; 4442 C(D); 4443 F(1); 4444 } else { 4445 F(D + 1); 4446 C(D); 4447 } 4448 $("#topkeyword_float").val($("#l_" + D).html()); 4449 return false; 4450 } 4451 if (G == 40) { 4452 D++; 4453 if (D > I) { 4454 D = 1; 4455 C(1); 4456 F(I); 4457 } else { 4458 F(D - 1); 4459 C(D); 4460 } 4461 $("#topkeyword_float").val($("#l_" + D).html()); 4462 return false; 4463 } 4464 4465 } else { 4466 D = 0; 4467 } 4468 } 4469 }); 4470 4471 $('#btn-search-float1').click(function () { 4472 var val = $("#topkeyword_float1").val(); 4473 var index = parseInt($(this).attr('data-index')); 4474 console.log($(this), val, index, 'index') 4475 4476 doSearch(val, index); 4477 var headPlace = parseInt($(this).attr('data-headPlace')); 4478 var headPosition = parseInt($(this).attr('data-headPosition')); 4479 if (headPlace > 0 && headPosition > 0) { 4480 headStatist(headPlace, headPosition); 4481 } 4482 }); 4483 $(".search-sug-float1").on("click", ".sokeyup_1", function () { 4484 var G = $(this).find(".sokeyup_2") 4485 .clone() //å¤å¶å ç´ 4486 .children() //è·åææåå ç´ 4487 .remove() //å 餿æåå ç´ 4488 .end() //åå°éæ©çå ç´ 4489 .text();//è·åææ¬å¼ 4490 $("#topkeyword_float1").val(G);//è¾å ¥å°inputæ¡ 4491 $("#btn-search-float1").click();//æäº¤æ°æ® 4492 $(".search-sug-float1").hide(); 4493 }) 4494 $("#topkeyword_float1").keyup(function (J) { 4495 var SI = $(this).attr('data-index'); 4496 var sType = $(this).attr('data-type'); 4497 if (!sType) { 4498 sType = ""; 4499 } 4500 if (window.event) { 4501 var H = window.event.keyCode; 4502 } else { 4503 var H = J.which; 4504 } 4505 var I = $("#topkeyword_float1"); 4506 var G = I.width(); 4507 if (H != 38 && H != 40 && H != 13) { 4508 var K = I.val(); 4509 if (K == "") { 4510 return false; 4511 } 4512 var L = "//ajax2.588ku.com/index.php?m=searchtips&a=search&kw=" + K + "&select_index=" + SI + "&type=" + sType + "&callback=?"; 4513 $.getJSON(L, function (M) { 4514 if (M != "") { 4515 $(".search-sug-float1").html(M).show(); 4516 } else { 4517 $(".search-sug-float1").hide(); 4518 } 4519 }); 4520 } 4521 }); 4522 $("#topkeyword_float1").blur(function () { 4523 setTimeout('$(".search-sug-float1").hide();', 500); 4524 }); 4525 4526 var D1 = 0; 4527 $("#topkeyword_float1").keyup(function (H) { 4528 if (window.event) { 4529 var G = window.event.keyCode; 4530 } else { 4531 var G = H.which; 4532 } 4533 if (G != 38 && G != 40 && G != 13) { 4534 D1 = 0; 4535 } else { 4536 if (G == 13) { 4537 var val = $
4537("#topkeyword_float1").val(); 4538 var index = parseInt($('#btn-search-float1').attr('data-index')); 4539 console.log(val, index, 'indexkkkkkkkkkk') 4540 4541 doSearch(val, index); 4542 } 4543 if ($(".search-sug-float1").css("display") == "block") { 4544 var I = $(".search-sug-float1 ul").length; 4545 if (G == 38) { 4546 D1--; 4547 if (D1 < 1) { 4548 D1 = I; 4549 C(D1); 4550 F(1); 4551 } else { 4552 F(D1 + 1); 4553 C(D1); 4554 } 4555 $("#topkeyword_float1").val($("#l_" + D1).html()); 4556 return false; 4557 } 4558 if (G == 40) { 4559 D1++; 4560 if (D1 > I) { 4561 D1 = 1; 4562 C(1); 4563 F(I); 4564 } else { 4565 F(D1 - 1); 4566 C(D1); 4567 } 4568 $("#topkeyword_float1").val($("#l_" + D1).html()); 4569 return false; 4570 } 4571 4572 } else { 4573 D1 = 0; 4574 } 4575 } 4576 }); 4577 }); 4578 4579 $(function () { 4580 // 顶鍿¬æµ®æç´¢æ¡ 4581 $(".search-fixTop").fixedPointShow({ 4582 zIndex: 100, 4583 st: 200 4584 }); 4585 //$(window).scroll(function(){ 4586 // if ($('.search-fixTop').offset().top < 200) { 4587 // $('.search-sug-float').slideUp(); 4588 // } 4589 //}) 4590 }) 4591 //æç´¢æ¬æµ®æ¡end 4592}) 4593 4594$.fn.extend({ 4595 searchFixTop: function () { 4596 var $this = $(this); 4597 $(window).scroll(function () { 4598 if ($this.offset().top < 200) { 4599 $('.search-sug-float').slideUp(); 4600 } 4601 }); 4602 } 4603}); 4604 4605//VIPå°ææéå¼¹çª 4606$(function () { 4607 $(".vip-expire-wd .close-btn").click(function () { 4608 $(this).parent().parent().parent().hide(); 4609 var vip_class = $(this).attr('data-id'); 4610 $.ajax({
4611 url: '/?m=ajax&a=cookievipexpire', 4612 data: { vip_class: vip_class }, 4613 type: "post", 4614 dataType: 'json', 4615 success: function (data) { } 4616 4617 }) 4618 }) 4619 //åºé¨åå ¬å级弹çªå ³é 4620 $("#wpDialog .close-wppay").click(function () { 4621 $.ajax({ 4622 url: '/?m=ajax&a=officedivprorecharhe', 4623 type: "post", 4624 dataType: 'json', 4625 success: function (data) { } 4626 4627 }) 4628 }) 4629 // å·¦å³ä¾§è¾¹æ 4630 $(window).scroll(function () { 4631 if ($(window).scrollTop() > 100) { 4632 $(".return-top").stop().fadeIn(500); 4633 } else { 4634 $(".return-top").stop().fadeOut(500); 4635 } 4636 }) 4637 $("body").on("click", ".return-top", function () { 4638 var speed = 400; 4639 $("body,html").stop().animate({ 4640 scrollTop: 0 4641 }, speed); 4642 return false; 4643 }) 4644}) 4645function judgeScrollTop(num) { 4646 if ($(window).scrollTop() > num) { 4647 $("#left-slideBar").fadeIn(150); 4648 } else { 4649 $("#left-slideBar").fadeOut(150); 4650 } 4651} 4652function _judgeScrollTop(num) { 4653 return function () { 4654 judgeScrollTop(num); 4655 } 4656} 4657 4658function rnzszzmc() { 4659 setTimeout('$(".qtvip-dl-btn").remove()', 1e3); 4660 setTimeout('$(".qtvip-dl-btn").remove()', 1.02e3); 4661 setTimeout('$(".qtvip-dl-btn").remove()', 1010); 4662 setTimeout('$(".qtvip-dl-btn").remove()', 1050); 4663 setTimeout('$(".qtvip-dl-btn").remove()', 1100); 4664 $(".ikrong-musicdownload").remove(); 4665 $("#play11").remove(); 4666 $("#down11").remove(); 4667} 4668 4669// ç»è®¡qqå ç¾¤äººæ° 4670function joinqqGroupStat() { 4671 $.post('/?m=ajax&a=clickAddGroup', function () { 4672 return true; 4673 }, 'json'); 4674} 4675$(".regCheckBtn").on("click", function () { 4676 var obj = $(this).parents('.regCheckTipBox').find(".regCheckHint"); 4677 obj.show(); 4678 //$(".regCheckHint").show(); 4679 var objtime = setTimeout(function () { 4680 obj.stop().fadeOut(); 4681 clearTimeout(objtime); 4682 }, 2000) 4683}); 4684// æå¾ç¨æ·å¼¹çªå¹¿å 4685$(function () { 4686 $("body").on("click", "#popup-st-user-popup .advert-public-wd .close-btn", function () { 4687 $(this).parent().parent().hide().parent().hide(); 4688 $.get('/?m=Popup&a=stClosePopup', { 'sign': 1 }); 4689 }); 4690 4691 $("body").on("click", "#popup-st-user-popup .advert-public-wd .got-it", function () { 4692 $(this).parent().hide().parent().hide(); 4693 $.get('/?m=Popup&a=stClosePopup', { 'sign': 2 }); 4694 }); 4695 4696 $('body').on('click', '#popup-st-user-popup img', function () { 4697 var url = $(this).attr('data-url'); 4698 $(this).parent().parent().hide().parent().hide(); 4699 $.get('/?m=Popup&a=stClosePopup', { 'sign': 2 }); 4700 window.open(url); 4701 }); 4702 4703 var param_hd = GetQueryString('hd'); 4704 var param_sem = GetQueryString('sem'); 4705 4706 if (param_sem > 0 || param_sem == 1 || param_sem == 2 || param_hd == 111 || param_hd == 127 || param_hd == 129) { 4707 if (CookieHandle.getCookie('user_sem_source') == null && param_sem > 0) { 4708 CookieHandle.setCookie('user_sem_source', param_sem, 3); 4709 } 4710 CookieHandle.setCookie("699pic_popup_lock", 1, 30); 4711 if (CookieHandle.getCookie('user_source') != 'sem') { 4712 // semæ¥æº 4713 CookieHandle.setCookie('user_source', 'sem', 365); 4714 } 4715 return true; 4716 } 4717 4718 4719 // è·åurlåæ° 4720 function GetQueryString(name) { 4721 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); 4722 var r = window.location.search.substr(1).match(reg); 4723 if (r != null) return unescape(r[2]); return null; 4724 } 4725}); 4726 4727 4728function originalSingle(id, type, comb) { 4729 var add = type == 'zip' ? 'Psd' : ''; 4730 picDown('/?m=Original&a=download' + add + '&id=' + id); 4731 return false; 4732 $.ajax({
4733 url: '/?m=Original&a=checkSingleDown', 4734 data: { id: id }, 4735 type: 'post', 4736 dataType: 'json', 4737 success: function (data) { 4738 if (data.status == 0) { 4739 picDown('/?m=Original&a=download' + add + '&id=' + id); 4740 } else if (data.status == -4) { 4741 $("#origin-vip-limit").closest('.down-limit').show(); 4742 $("#origin-vip-limit").show(); 4743 } else { 4744 $.ajax({ 4745 url: '?m=OriginalPay&a=wxQrcode', 4746 data: { id: id, 'pay-money': 1, 'pay-type': 'wx' }, 4747 type: "post", 4748 dataType: 'json', 4749 success: function (datas) { 4750 if (datas.status == 0) { 4751 $('.org-oneYuan-content .wx img').attr('src', datas.data.qrcode); 4752 $('.org-oneYuan-content .wx img').attr('data-order', datas.data.order_no); 4753 $('.org-oneYuan-content .wx img').attr('data-id', id); 4754 $('.org-oneYuan-content .wx img').attr('data-type', type); 4755 t1 = window.setInterval(update_native_state, 2000); 4756 } 4757 } 4758 }); 4759 4760 $('.org-oneYuan-content .alipay input').attr('data-url', '//588ku.com/?m=OriginalPay&a=alipay&id=' + id + '&pay-money=1&pay-type=ali'); 4761 $('.org-oneYuan-wd').parent('.down-limit').show(); 4762 $.ajax({
4763 url: '//ajax.588ku.com?m=ajax&a=originalSingle', 4764 data: {}, 4765 type: "get", 4766 dataType: 'json', 4767 success: function (datas) { 4768 } 4769 }); 4770 } 4771 } 4772 }); 4773} 4774 4775// VIP䏿èªå¨å±å¼ 4776function vipGatherSlide() { 4777 $("#vipGatherDrop").stop().slideDown(1000); 4778} 4779 4780$('.down-limit .org-oneYuan-wd .orgWd-close').click(function () { 4781 $('.org-oneYuan-content .wx img').attr('src', '//js-oss.588ku.com/comp/original/images/qr-scan.gif'); 4782 $('.org-oneYuan-content .wx img').attr('data-order', ''); 4783 $('.org-oneYuan-content .wx img').attr('data-id', ''); 4784 clearInterval(t1); 4785 $('.org-oneYuan-content .alipay input').attr('data-url', ''); 4786 $('.org-oneYuan-wd').parent('.down-limit').fadeOut(); 4787}); 4788 4789$('body').on("click", ".download-file", function (event) { 4790 event.stopPropagation(); 4791 event.preventDefault() 4792 if (!globaluid) { 4793 qqweixin(); 4794 return false; 4795 } 4796 var btn_obj = $(this); 4797 var model = $(this).data('model'); 4798 var type = $(this).data('type'); 4799 var picid = $(this).data('id'); 4800 var tem_tag = $(this).data('tem'); 4801 var ai = $(this).data('ai'); 4802 var case_id = $(this).data('case'); 4803 var is_sell = $(this).data('sell'); 4804 var is_new = $(this).data('new'); 4805 var datafrom = $(this).data('from') || ''; 4806 var video_senses = $(this).attr("data-senses") || 1; 4807 var is_free = $(this).data('free') || 0; 4808 var photo_gif_format = 0; 4809 var is_confrim = $(this).attr('data-confrim') 4810 // ä¸è½½æ¦æª---ï¼UI设计 广åè®¾è®¡ï¼ 4811 let interceptTypes = [3, 9]; 4812 if (interceptTypes.includes(model) && !is_confrim && type == 2) { 4813 let source_type = model; 4814 if (model == 9) { 4815 source_type = 22; 4816 }; 4817 let download_url = `//588ku.com/download/${picid}-${source_type}-${is_free}.html` 4818 window.open(download_url) 4819 return; 4820 } 4821 if (model == 11 || model == 10) { 4822 photo_gif_format = $('.on-set').attr('data-id') 4823 } 4824 var refererUrl = document.referrer; 4825 var typeName = ''; 4826 if (type == 1) { 4827 typeName = 'pic'; 4828 } else if (type == 2) { 4829 typeName = 'rar'; 4830 } else if (model == 7 && type == 3) { 4831 typeName = 'water-pic'; 4832 } else { 4833 return false; 4834 } 4835 4836 let qkm = btn_obj.attr('data-page'); 4837 let page_id; 4838 4839 if (model == 4) { 4840 if (is_office_vip && is_login && is_office_vip == 1 && is_login == 1 && typeof getVcodeOffice === 'function') { 4841 page_id = picid + 'a4'; 4842 if (typeof payOfficeSourceQkm === 'function') { 4843 payOfficeSourceQkm(page_id, picid) 4844 } 4845 getVcodeOffice() 4846 getAliCodeoffice() 4847 } 4848 } 4849 if (model == 5 || model == 8) { 4850 if (is_video_vip && is_login && is_video_vip == 1 && is_login == 1 && typeof getVcodeVideo === 'function') { 4851 if (model == 5) { 4852 page_id = picid + 'a6'; 4853 } else { 4854 page_id = picid + 'a8'; 4855 } 4856 if (typeof payVideoSourceQkm === 'function') { 4857 payVideoSourceQkm(page_id, picid) 4858 } 4859 getVcodeVideo(); 4860 getAliCodeVideo(); 4861 } 4862 } 4863 var url = '//dl.588ku.com/down/' + typeName; 4864 $.ajax({
4865 url: url, 4866 data: { 4867 type: model, 4868 picid: picid, 4869 refererUrl: refererUrl, 4870 ai: ai, 4871 case_id: case_id, 4872 is_new: is_new, 4873 is_sell: is_sell, 4874 video_senses: video_senses, 4875 photo_gif_format: photo_gif_format, 4876 is_free: is_free, 4877 }, 4878 dataType: 'jsonp', 4879 type: 'get', 4880 async: false, 4881 jsonp: 'callback', 4882 jsonpCallback: 'handleResponse', 4883 xhrFields: { withCredentials: true }, 4884 success: function (response, status, xhr) { 4885 if (response.code == 401) { 4886 qqweixin(); 4887 return false; 4888 } else if (response.code != 200) { 4889 alert(response.msg); 4890 return false; 4891 } 4892 var data = response.data; 4893 var vipType; 4894 var vipclass; 4895 if (model == 6) { 4896 vipType = '#wordart'; 4897 vipclass = '.wordart'; 4898 page_id = picid + 'a13'; 4899 } else if (model == 7) { 4900 vipType = '#illus'; 4901 vipclass = '.illus'; 4902 page_id = picid + 'a21'; 4903 } else if (model == 3) { 4904 vipType = '#template'; 4905 vipclass = '.model'; 4906 page_id = picid + 'a3'; 4907 } else if (model == 4) { 4908 vipType = '#ppt'; 4909 vipclass = '.ppt'; 4910 page_id = picid + 'a4'; 4911 } else if (model == 5) { 4912 vipType = '#video'; 4913 vipclass = '.video'; 4914 page_id = picid + 'a6'; 4915 } else if (model == 8) { 4916 vipType = '#video'; 4917 vipclass = '.video'; 4918 page_id = picid + 'a8'; 4919 } else if (model == 9) { 4920 vipType = '#web'; 4921 vipclass = '.web'; 4922 page_id = picid + 'a22'; 4923 } else if (model == 10) { 4924 vipType = '#photo'; 4925 vipclass = '.photo'; 4926 page_id = picid + 'a25'; 4927 } else if (model == 11) { 4928 vipType = '#gif'; 4929 vipclass = '.gif'; 4930 page_id = picid + 'a28'; 4931 } else if (model == 2) { 4932 vipType = '#online'; 4933 vipclass = '.bg'; 4934 page_id = picid + 'a2'; 4935 } else if (model == 1) { 4936 vipType = '#element' 4937 vipclass = '.element'; 4938 page_id = picid + 'a1'; 4939 } else { 4940 return false; 4941 } 4942 let format = 0; 4943 if (model == 10 || model == 11) { 4944 format = $('.on-set').attr('data-id') 4945 } 4946 if (qkm) { 4947 page_id = qkm; 4948 } 4949 let location = btn_obj.data('location'); 4950 let vipClassTag1, vipClassTag2; 4951 if (data.status == 0) { 4952 if (navigator.sendBeacon) { 4953 var _url = '//ajax.588ku.com/?m=search&a=totalData&_=beacon'; 4954 var _dat = new FormData(); 4955 _dat.append('uid', globaluid); 4956 _dat.append('index', model); 4957 _dat.append('id', picid); 4958 _dat.append('keyword', data.keyword); 4959 _dat.append('from', datafrom); 4960 _dat.append('format', format); 4961 navigator.sendBeacon(_url, _dat); 4962 } else { 4963 $.ajax({
4964 url: "//ajax.588ku.com/?m=search&a=totalData&_=xhr", 4965 dataType: 'jsonp', 4966 data: { 4967 uid: globaluid, 4968 index: model, 4969 id: picid, 4970 keyword: data.keyword, 4971 from: datafrom, 4972 format: format 4973 }, 4974 type: 'get', 4975 xhrFields: { withCredentials: true }, 4976 success: function (data) { 4977 } 4978 }); 4979 } 4980 let searchKeyword = $(".search_keyword_stat_sign").val(); 4981 $.ajax({ 4982 url: "//588ku.com/?m=SignRemain&a=totalDownNumber", 4983 dataType: 'jsonp', 4984 data: { searchKeyword: searchKeyword }, 4985 type: 'get', 4986 xhrFields: { withCredentials: true }, 4987 success: function (data) { 4988 } 4989 }); 4990 //广å弿µå¼¹çª 4991 adAlert(model, data) 4992 4993 window.location.href = data.url; 4994 4995 // ä¸è½½åç¹ 4996 window._qka && _qka.track('materialDownload', { 4997 www1_id: '588ku', 4998 www2_id: location, 4999 www3_id: picid, 5000 page_id: page_id, 5001 }) 5002 5003 if (data.photo_right_warn == 1) { 5004 $('.portraitbox').closest('.down-limit').show(); 5005 $('.portraitbox').show(); 5006 } 5007 if (model == 6) { 5008 $.ajax({
5009 url: "//ajax.588ku.com/?m=downStatist&a=yishuziDownStatist", 5010 dataType: 'jsonp', 5011 data: { 5012 uid: data.uid, 5013 isvip: data.isvip, 5014 create_time: data.create_time, 5015 id: data.id, 5016 keyword: data.keyword 5017 }, 5018 type: 'get', 5019 jsonp: 'callback', 5020 jsonpCallback: 'getName', 5021 xhrFields: { withCredentials: true }, 5022 success: function (data) { 5023 } 5024 }); 5025 } else if (model == 5) { 5026 $.ajax({ 5027 url: "//ajax.588ku.com/?m=downStatist&a=videoDownStatic", 5028 dataType: 'jsonp', 5029 data: { vid: picid }, 5030 type: 'get', 5031 jsonp: 'callback', 5032 jsonpCallback: 'getName', 5033 xhrFields: { withCredentials: true }, 5034 success: function (data) { 5035 } 5036 }); 5037 } else if (model == 9) { 5038 $.ajax({
5039 url: "//ajax.588ku.com/?m=downStatist&a=webDownStatic", 5040 dataType: 'jsonp', 5041 data: { 5042 uid: data.uid, 5043 isvip: data.isvip, 5044 create_time: data.create_time, 5045 id: data.id, 5046 keyword: data.keyword, 5047 tem: tem_tag 5048 }, 5049 type: 'get', 5050 jsonp: 'callback', 5051 jsonpCallback: 'getName', 5052 xhrFields: { withCredentials: true }, 5053 success: function (data) { 5054 } 5055 }); 5056 } else if (model == 8) { 5057 $.ajax({ 5058 url: "//ajax.588ku.com/?m=downStatist&a=audioDownStatic", 5059 dataType: 'jsonp', 5060 data: { id: picid, keyword: data.keyword }, 5061 type: 'get', 5062 jsonp: 'callback', 5063 jsonpCallback: 'getName', 5064 xhrFields: { withCredentials: true }, 5065 success: function (data) { 5066 } 5067 }); 5068 } else if (model == 3) { 5069 5070 $.ajax({
5071 url: "//ajax.588ku.com/?m=downStatist&a=templetDownStatic", 5072 dataType: 'jsonp', 5073 data: { id: picid }, 5074 type: 'get', 5075 jsonp: 'callback', 5076 jsonpCallback: 'getName', 5077 xhrFields: { withCredentials: true }, 5078 success: function (data) { 5079 } 5080 }); 5081 5082 } else if (model == 11) { 5083 5084 $.ajax({ 5085 url: "//ajax.588ku.com/?m=downStatist&a=gifDownStatic", 5086 dataType: 'jsonp', 5087 data: { id: picid }, 5088 type: 'get', 5089 jsonp: 'callback', 5090 jsonpCallback: 'getName', 5091 xhrFields: { withCredentials: true }, 5092 success: function (data) { 5093 } 5094 }); 5095 5096 } else if (model == 4) { 5097 5098 $.ajax({
5099 url: "//ajax.588ku.com/?m=downStatist&a=officeDownStatic", 5100 dataType: 'jsonp', 5101 data: { id: picid }, 5102 type: 'get', 5103 jsonp: 'callback', 5104 jsonpCallback: 'getName', 5105 xhrFields: { withCredentials: true }, 5106 success: function (data) { 5107 } 5108 }); 5109 5110 } else if (model == 7) { 5111 5112 $.ajax({ 5113 url: "//ajax.588ku.com/?m=downStatist&a=illusDownStatic", 5114 dataType: 'jsonp', 5115 data: { id: picid }, 5116 type: 'get', 5117 jsonp: 'callback', 5118 jsonpCallback: 'getName', 5119 xhrFields: { withCredentials: true }, 5120 success: function (data) { 5121 } 5122 }); 5123 5124 } else if (model == 10) { 5125 5126 $.ajax({
5127 url: "//ajax.588ku.com/?m=downStatist&a=photoDownStatic", 5128 dataType: 'jsonp', 5129 data: { id: picid }, 5130 type: 'get', 5131 jsonp: 'callback', 5132 jsonpCallback: 'getName', 5133 xhrFields: { withCredentials: true }, 5134 success: function (data) { 5135 } 5136 }); 5137 } else if (model == 2) { 5138 $.ajax({ 5139 url: "//ajax.588ku.com/?m=downStatist&a=backDownStatist", 5140 dataType: 'jsonp', 5141 data: { 5142 uid: data.uid, 5143 isvip: data.isvip, 5144 create_time: data.create_time, 5145 id: data.id, 5146 type: data.type, 5147 pictype: data.pictype, 5148 keyword: data.keyword 5149 }, 5150 type: 'get', 5151 jsonp: 'callback', 5152 jsonpCallback: 'getName', 5153 xhrFields: { withCredentials: true }, 5154 success: function (data) { 5155 } 5156 }); 5157 5158 if (data.hasOwnProperty("is_free_down")) { 5159 5160 if (data.is_free_down == 1) { 5161 5162 $('.bg-novip-limit').closest('.down-limit').show(); 5163 $('.bg-limit-box').show(); 5164 $.get('//588ku.com/index.php?m=back&a=freeNewDialog', {}, function () { 5165 }, "json"); 5166 } 5167 } 5168 5169 } else if (model == 1) { 5170 $.ajax({
5171 url: "//ajax.588ku.com/?m=downStatist&a=elementDownStatist", 5172 dataType: 'jsonp', 5173 data: { 5174 uid: data.uid, 5175 isvip: data.isvip, 5176 create_time: data.create_time, 5177 id: data.id, 5178 keyword: data.keyword 5179 }, 5180 type: 'get', 5181 jsonp: 'callback', 5182 jsonpCallback: 'getName', 5183 xhrFields: { withCredentials: true }, 5184 success: function (data) { 5185 } 5186 }); 5187 5188 if (data.hasOwnProperty("is_free_down")) { 5189 5190 if (data.is_free_down == 1) { 5191 5192 $('.element-novip-limit').closest('.down-limit').show(); 5193 $('.element-limit-box').show(); 5194 $.get('//588ku.com/index.php?m=element&a=freeNewDialog', {}, function () { 5195 }, "json"); 5196 } 5197 } 5198 } 5199 } else if (data.status == -1) { 5200 $("#login-limit-pane").closest('.down-limit').show(); 5201 } else if (data.status == -10) { 5202 vipClassTag1 = $(vipclass + '-same-limit'); 5203 if (model == 5) { 5204 picrecharge(picid, 4, 2, 2); 5205 } 5206 } else if (data.status == -11) { 5207 $(vipType + '-pro-vip-limit-pane').parent('.down-limit').find('.blue-num').text(data.dsdowncnt); 5208 $(vipType + '-pro-vip-limit-pane').closest('.down-limit').show(); 5209 } else if (data.status == -38 || data.status == -41) { 5210 if (data.status == -41) { 5211 vipClassTag1 = $(vipclass + '-source-limit'); 5212 } else { 5213 window.popupDownloadLimit && popupDownloadLimit.show(vipclass, location, page_id, picid); 5214 } 5215 5216 } else if (data.status == -40) { 5217 vipClassTag1 = $(vipclass + '-min-limit'); 5218 } else if (data.status == -14) { 5219 $(vipType + '-down-limit-pane').parent('.down-limit').find('.blue-num').text(data.dsdowncnt); 5220 $(vipType + "-down-limit-pane").closest('.down-limit').show(); 5221 } else if (data.status == -21) { 5222 vipClassTag1 = $('.script-abnormal-wd'); 5223 } else if (data.status == -15) { 5224 if (model != 4 && model != 5) { 5225 window.popupDownloadLimit && popupDownloadLimit.show(vipclass, location, page_id, picid); 5226 } else { 5227 vipClassTag1 = $(vipclass + '-ip-limit'); 5228 } 5229 } else if (data.status == -35) { 5230 if (model != 4 && model != 5) { 5231 window.popupDownloadLimit && popupDownloadLimit.show(vipclass, location, page_id, picid); 5232 } else { 5233 vipClassTag1 = $(vipclass + '-psd-free-limit'); 5234 } 5235 } else if (data.status == -37) { 5236 if (model != 4 && model != 5) { 5237 window.popupDownloadLimit && popupDownloadLimit.show(vipclass, location, page_id, picid); 5238 } else { 5239 vipClassTag1 = $(vipclass + '-pic-free-limit'); 5240 } 5241 } else if (data.status == -12) { 5242 if (model != 4 && model != 5) { 5243 if (typeof videoPayInit != 'undefined') { 5244 if (data.is_company == 1) { 5245 if (typeof setVideoQkmSource === 'function') { 5246 setVideoQkmSource(picid, page_id); 5247 } 5248 } 5249 5250 videoPayInit(picid, data.is_company) 5251 } else { 5252 window.popupDownloadLimit && popupDownloadLimit.show(vipclass, location, page_id, picid); 5253 } 5254 5255 } else { 5256 vipClassTag1 = $(vipclass + '-free-limit'); 5257 } 5258 if (model == 3) { 5259 // 模æ¿ä¸è½½é嶿鿬¡æ°è®°å½ 5260 $.get('//ajax.588ku.com/?m=SponsorFunnel&a=update&mod=1&type=1&uid=' + globaluid); 5261 modelPay(); 5262 } 5263 if (model == 5) { 5264 picrecharge(picid, 4, 2, 1); 5265 } 5266 } else if (data.status == -17 && data.type == 1) { 5267 // èæ¯æºæä»¶ä¸è½½éå¶ 5268 if (model != 4 && model != 5) { 5269 window.popupDownloadLimit && popupDownloadLimit.show(vipclass, location, page_id, picid); 5270 } else { 5271 vipClassTag1 = $(vipclass + '-source-limit'); 5272 } 5273 } else if ((data.status == -17 || data.status == -199) && (model == 5 || model == 8)) { 5274 // é³è§é¢-éVIP 5275 if (typeof videoPayInit != 'undefined') { 5276 if (data.is_company == 1) { 5277 if (typeof setVideoQkmSource === 'function') { 5278 setVideoQkmSource(picid, page_id); 5279 } 5280 } 5281 videoPayInit(picid, data.is_company); 5282 } else { 5283 if (model == 8) { 5284 $('#audio_popup').hide(); 5285 } 5286 if (data.is_company && data.is_company == 1) { 5287 // è§é¢å å¼å¼¹çª 5288 // $('.qyVideo-no-vip').closest('.down-limit').show(); 5289 // $('.qyVideo-no-vip').show(); 5290 window.videoSourceLimit && videoSourceLimit.show(2, picid); 5291 } else { 5292 // è§é¢éå¶å¼¹çª 5293 vipClassTag2 = $(vipclass + '-source-limit'); 5294 vipClassTag2.closest('.down-limit').show(); 5295 vipClassTag2.show().parent().show(); 5296 } 5297 } 5298 } else if (data.status == -68 && (model == 5 || model == 8)) { 5299 // $('.qyVideo-no-vip').closest('.down-limit').show(); 5300 // $('.qyVideo-no-vip').show(); 5301 window.videoSourceLimit && videoSourceLimit.show(2, picid); 5302 } else if (data.status == -33 && data.type == 1) { 5303 // åéæä»¶ä¸è½½éå¶ 5304 vipClassTag1 = $(vipclass + '-collect-limit'); 5305 } else if (data.status == -2) { 5306 $('#inspect').show(); 5307 } else if (data.status == -3) { 5308 $('#fixed').after(data.html); 5309 $('#fixed').attr('data-id', data.id); 5310 $('#fixed').attr('type', data.type); 5311 $('#fixed').attr('down_type', data.down_type); 5312 } else if (data.status == -4) { 5313 $("#collect_network").closest('.down-limit').show(); 5314 } else if (data.status == -24) { 5315 if (typeof videoPayInit != 'undefined') { 5316 if (data.is_company == 1) { 5317 if (typeof setVideoQkmSource === 'function') { 5318 setVideoQkmSource(picid, page_id); 5319 } 5320 } 5321 videoPayInit(picid, data.is_company) 5322 return; 5323 }; 5324 vipClassTag2 = $(".resoluDGcompyBox"); 5325 vipClassTag2.show(); 5326 } else if (data.status == -25) { 5327 $(".limitzsDGBox").show(); 5328 } else if (data.status == -26) { 5329 $(".resoluDGBox").show(); 5330 } else if (data.status == -101) { 5331 //æç»ä¸é¢vipä¸è½½æç¤º 5332 $('.chzt_vip_pay').click(); 5333 } else if (data.status == -200) { 5334 $.ajax({
5335 url: "/?m=Gt&a=start&t=" + (new Date()).getTime(), // å éæºæ°é²æ¢ç¼å 5336 type: "get", 5337 dataType: "json", 5338 success: function (data) { 5339 5340 initGeetest({ 5341 gt: data.gt, 5342 challenge: data.challenge, 5343 offline: !data.success, 5344 new_captcha: data.new_captcha, 5345 product: "bind", 5346 width: "300px", 5347 https: true 5348 }, function (captchaObj) { 5349 captchaObj.onReady(function () { 5350 captchaObj.verify(); 5351 }).onSuccess(function () { 5352 var result = captchaObj.getValidate(); 5353 if (!result) { 5354 return alert('è¯·å®æéªè¯'); 5355 } 5356 $.ajax({
5357 url: '/?m=Gt&a=verify', 5358 type: 'POST', 5359 dataType: 'json', 5360 data: { 5361 geetest_challenge: result.geetest_challenge, 5362 geetest_validate: result.geetest_validate, 5363 geetest_seccode: result.geetest_seccode 5364 }, 5365 success: function (data) { 5366 if (data.status === 'success') { 5367 5368 btn_obj.click(); 5369 5370 } else if (data.status === 'fail') { 5371 setTimeout(function () { 5372 alert('éªè¯å¤±è´¥ï¼è¯·å®æéªè¯'); 5373 captchaObj.reset(); 5374 }, 1500); 5375 } 5376 } 5377 }); 5378 }); 5379 }); 5380 } 5381 }); 5382 } else if (data.status == -201) { 5383 $('.black-ip-abnormal-wd').closest('.down-limit').show(); 5384 $('.black-ip-abnormal-wd').show(); 5385 } else if (data.status == -202) { 5386 $('.black-user-abnormal-wd').closest('.down-limit').show(); 5387 $('.black-user-abnormal-wd').show(); 5388 } else if (data.status == -203) { 5389 vipClassTag1 = $('.company-have-vip-nrz'); 5390 } else if (data.status == -204) { 5391 $('#company-down-limit-name').text(data.zhuti_name); 5392 $('.company-down-limit-gt-100').closest('.down-limit').show(); 5393 $('.company-down-limit-gt-100').show(); 5394 } else if (data.status == -205) { 5395 $('.portraitbox').closest('.down-limit').show(); 5396 $('.portraitbox').show(); 5397 } else if (data.status == -206) { 5398 vipClassTag1 = $('.portrait-no-vip'); 5399 } else if (data.status == -207) { 5400 vipClassTag1 = $('.figures-no-vip'); 5401 } else if (data.status == -208) { 5402 vipClassTag1 = $('.sand-no-vip'); 5403 } else if (data.status == -300) { 5404 // $('.qy-no-vip').closest('.down-limit').show(); 5405 // $('.qy-no-vip').show(); 5406 vipClassTag2 = $('.popup-noComVip'); 5407 vipClassTag2.show(); 5408 } else if (data.status == -19) { 5409 alert('æ¨å½æ¥ä¸è½½æ¬¡æ°å·²è¾¾ä¸éå¦ï¼ å级ä¸è½½éå¶å¯äº«åæ´å¤ä¸è½½~'); 5410 } else if (model == 10 && data.status == -400) { 5411 //æå½±å¾dtç´ æ 5412 window.open('//588ku.com/Authorize/25-' + picid + '/'); 5413 } else if (model == 10 && data.status == -104) { 5414 //dtç´ æé¢æ§ 5415 alert('ç¹å»ä¸è½½å¤ªé¢ç¹,è¯·ä¼æ¯å ç§ååè¯!'); 5416 } else if (data.status == -107) { 5417 vipClassTag1 = $('.agent-no-vip'); 5418 } else if (data.status == ENT_TIME_OVER) { 5419 changeUserDailog({ type: 4, information: 'å¼éä¼ä¸VIPï¼äº«3650w+ç´ ææµ·éä¸è½½æ éå¶ï¼åç¨æ é£é©ï¼ç°å¨ä¹°ä¸å¹´éä¸å¹´æ´åç®' }) 5420 if (typeof buildVideoQkmSource === 'function') { 5421 buildVideoQkmSource(picid, page_id); 5422 } 5423 } else if (data.status == ENT_MEMBER_OVER) { 5424 let memberCount = data.result.memberCount; 5425 let memberLimit = data.result.memberLimit; 5426 let ent_name = data.result.ent_name; 5427 $(".ent_overflow .ent_name em").text(ent_name); 5428 $(".ent_overflow .ent_count em").text(memberLimit); 5429 $(".ent_overflow .overflow_tip em").text(memberCount - memberLimit) 5430 $(".ent_overflow").show(); 5431 } else if (data.status == ENT_NOT_IDENTIFY) { 5432 $("#bisiness_form").data("id", data.main_id); 5433 $("#company_vip_business").show(); 5434 } else if (data.status == ENT_SELF_EMPLOYED) { 5435 $("#employed_limit_dailog").show(); 5436 if (data.employed_version === 'v1') { 5437 $('#employed_limit_dailog .info2').html('ä¸å å«ï¼æå½±å¾ãåå ¬ææ¡£ãè§é¢é³é¢ï¼'); 5438 } else if (data.employed_version === 'v2') { 5439 $('#employed_limit_dailog .info2').html('ä¸å å«ï¼å æ å ç´ ãåå ¬ææ¡£ãè§é¢é³é¢ï¼'); 5440 } 5441 5442 window.paySourceQkm && paySourceQkm.build($("#employed_limit_dailog"), location, page_id, picid); 5443 } else { 5444 alert('ä¸è½½å¤±è´¥'); 5445 } 5446 5447 if (vipClassTag1) { 5448 vipClassTag1.closest('.down-limit').show(); 5449 vipClassTag1.show(); 5450 5451 window.paySourceQkm && paySourceQkm.build(vipClassTag1, location, page_id, picid); 5452 } 5453 5454 if (vipClassTag2) { 5455 window.paySourceQkm && paySourceQkm.build(vipClassTag2, location, page_id, picid); 5456 } 5457 5458 if (data.status < 0) { 5459 if (($.inArray(data.status, [-12, -35, -37, -38, -41] !== false) || (data.status == -23 && data.vip != 5)) && typeof _kstat === 'function') { 5460 var module = ''; 5461 switch (model) { 5462 case 1: 5463 module = 'å ç´ '; 5464 break; 5465 case 2: 5466 module = 'èæ¯'; 5467 break; 5468 case 3: 5469 module = '模æ¿'; 5470 break; 5471 case 4: 5472 //module = 'åå ¬'; 5473 break; 5474 case 5: 5475 //module = 'è§å¬'; 5476 break; 5477 case 6: 5478 module = 'èºæ¯å'; 5479 break; 5480 case 7: 5481 module = 'æç»'; 5482 break; 5483 case 8: 5484 module = 'è§å¬'; 5485 break; 5486 case 9: 5487 module = 'UI'; 5488 break; 5489 case 10: 5490 module = 'æå½±å¾'; 5491 break; 5492 case 11: 5493 module = 'GIF'; 5494 break; 5495 } 5496 _kstat("å å¼:ä¸è½½éå¶å¼¹çª:" + module + ":popup"); 5497 if (typeof isFuse !== 'undefined') { 5498 _fuse(); 5499 } 5500 } 5501 } 5502 5503 }, 5504 });
5505 5506 return false; 5507}); 5508 5509// ä¼ä¸ä¸äº«ç´ æä¸è½½å¼¹çª 5510$('body').on("click", '.ent-download', function () { 5511 var picid = $(this).data('id'); 5512 var is_company_vip = $("input[name=is_company_vip]").val() || false; 5513 var is_vip = $("input[name=isVip]").val() || false; 5514 var type = parseInt($(this).data('type')); 5515 var model = parseInt($(this).attr('data-model')); 5516 var typeName = ''; 5517 if (type === 1) { 5518 typeName = 'pic'; 5519 } else if (type === 2) { 5520 typeName = 'rar'; 5521 } 5522 var _source = 0; 5523 if ($.inArray(model, [5, 8]) !== -1) { 5524 _source = 1; 5525 } 5526 if ($.inArray(model, [4, 10]) !== -1) { 5527 _source = 2; 5528 } 5529 5530 let qkm = $(this).attr('data-qkm'); 5531 if (typeof setVideoQkmSource === 'function') { 5532 setVideoQkmSource(picid, qkm); 5533 } 5534 5535 if (!is_company_vip && !is_vip) { 5536 // éVIPå¼¹çª 5537 event.stopPropagation(); 5538 // ä¸è½½åéåç¹ 5539 window._qka && _qka.track('ENT_DownloadLimited', { 5540 item_id: picid, 5541 click_str: typeName 5542 }); 5543 initDailog230411(0, _source); 5544 return false; 5545 } else if (!is_company_vip && is_vip) { 5546 // éä¼ä¸VIP,æ¯ä¸ªäººVIPå¼¹çª 5547 event.stopPropagation(); 5548 // ä¸è½½åéåç¹ 5549 window._qka && _qka.track('ENT_DownloadLimited', { 5550 item_id: picid, 5551 click_str: typeName 5552 }); 5553 initDailog230411(1, _source, model); 5554 return false; 5555 } 5556}); 5557 5558function adAlert(model, data) { 5559 var mname = $('input[name="toEditorTimes"]').val() || false; 5560 var is_all_vip = $('input[name="isAllVip"]').val() || 0; 5561 let is_module_life_vip = $('input[name="isModuleLifeVip"]').val() || false; 5562 var is_all_or_company_vip = $('input[name="isAllOrCompanyVip"]').val() || false 5563 if (model != 5 && !mname && (is_all_vip || is_module_life_vip) && model != 4 && parseInt(data.is_company) < 1) { 5564 var curentt = new Date(); 5565 var strcurentt = curentt.getFullYear().toString() + (curentt.getMonth() + 1).toString() + curentt.getDate().toString(); 5566 // var before7 = new Date(); 5567 // before7.setDate((before7.getDate()-7)); 5568 // before7 = before7.getFullYear().toString() + (before7.getMonth()+1).toString() + before7.getDate().toString(); 5569 if (!localStorage.getItem('push_qianku_edit') || localStorage.getItem('push_qianku_edit') != strcurentt) { 5570 let random = Math.floor(Math.random() * (10 - 1 + 1)) + 1 5571 if (random % 3 == 0) { 5572 let encodedUrl = encodeURIComponent('https://editor.588ku.com/search?sourceC=master&sourceP=qk_reg_mbmrsc'); 5573 window.open('//588ku.com/?m=BrandPublicity&a=adUrl&encoledUrl=' + encodedUrl, '_blank'); 5574 $.ajax({
5575 url: '//ajax.588ku.com/?m=ajax&a=totaltoEditor', 5576 type: 'get', 5577 data: { type: 5 }, 5578 xhrFields: { withCredentials: true }, 5579 success: function (response) { 5580 5581 } 5582 }) 5583 } else if (random % 3 == 2) { 5584 let encodedUrl = encodeURIComponent('https://chaopx.com/?hf=24'); 5585 window.open('//588ku.com/?m=BrandPublicity&a=adUrl&encoledUrl=' + encodedUrl, '_blank'); 5586 $.ajax({ 5587 url: '//ajax.588ku.com/?m=ajax&a=totalToChaopx', 5588 type: 'get', 5589 data: { type: 3 }, 5590 xhrFields: { withCredentials: true }, 5591 success: function (response) { 5592 5593 } 5594 }) 5595 } else { 5596 window.open('//588ku.com/qiye/?ad=1', '_blank'); 5597 $.ajax({ 5598 type: 'get', 5599 xhrFields: { withCredentials: true }, 5600 url: "//ajax.588ku.com/?m=Ent&a=dialogStat", 5601 dataType: 'json', 5602 data: { event: 'show', from: 'adAlert' }, 5603 success: function (response) { 5604 5605 } 5606 }) 5607 } 5608 localStorage.setItem('push_qianku_edit', strcurentt); 5609 } 5610 // else if(localStorage.getItem('push_qianku_edit')&&localStorage.getItem('push_qianku_edit')==before7){ 5611 // window.open('https://editor.588ku.com?&sourceP=qk_reg_mbmrsc','_blank'); 5612 // localStorage.setItem('push_qianku_edit', strcurentt); 5613 // //$.get("//ajax.588ku.com/?m=ajax&a=totaltoEditor",{type:5},function () {}); 5614 // $.ajax({
5615 // url:'//ajax.588ku.com/?m=ajax&a=totaltoEditor', 5616 // type:'get', 5617 // data:{type:5}, 5618 // xhrFields:{withCredentials:true}, 5619 // success:function(response){ 5620 // 5621 // } 5622 // }) 5623 // } 5624 } 5625 // ç»Date对象æ°å¢ getWeekæ¹æ³ 5626 Date.prototype.getWeek = function () { 5627 var date = new Date(this.getTime()); 5628 date.setHours(0, 0, 0, 0); 5629 // Thursday in current week decides the year. 5630 date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7); 5631 // January 4 is always in week 1. 5632 var week1 = new Date(date.getFullYear(), 0, 4); 5633 // Adjust to Thursday in week 1 and count number of weeks from date to week1. 5634 return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 5635 - 3 + (week1.getDay() + 6) % 7) / 7); 5636 } 5637 var date = new Date(); 5638 5639 // æ´»å¨å¼æµå¼¹çª 5640 let personasRandom = Math.floor(Math.random() * (2 - 1 + 1)) + 1; 5641 if ($("#person_limit_dailog").length > 0 && personasRandom == 1) { //2023.02.15ï¼æ°çç¨æ·ç»å 5642 $("#person_limit_dailog").show(); 5643 $.post("/?m=Api&a=personasClick", { type: 3 }, function () { 5644 5645 }) 5646 } else { 5647 if (is_all_or_company_vip == 0 && parseInt(data.is_company) < 1) { 5648 var weekKey = date.getFullYear() + '' + (date.getWeek()); 5649 var showTag = "download-success-nine-year-" + weekKey 5650 var toNineYearTag = localStorage.getItem(showTag); 5651 if (!toNineYearTag) { 5652 localStorage.setItem(showTag, 1); 5653 window.open("//588ku.com/?m=ActAllVip&a=index23618&entry_id=3", '_blank'); 5654 } 5655 } 5656 } 5657 5658 5659 // ç¼è¾å¨å¼æµå¼¹çª 5660 // if(model != 4 && model != 5 && model != 10 && (!data.is_company || parseInt(data.is_company) < 1)){ 5661 // var weekKey = date.getFullYear()+ '' + (date.getWeek()); 5662 // var downloadCountTag = "download-count-toEditor-" + weekKey; 5663 // var showTag = "download-success-toEditor-" + weekKey; 5664 // var downloadCount = window.localStorage.getItem(downloadCountTag) 5665 // if (!downloadCount) { 5666 // window.localStorage.setItem(downloadCountTag,1) 5667 // } else { 5668 // window.localStorage.setItem(downloadCountTag,parseInt(downloadCount) + 1) 5669 // } 5670 // downloadCount = window.localStorage.getItem(downloadCountTag); 5671 // var toEditorStorage = window.localStorage.getItem(showTag); 5672 // if (!toEditorStorage && parseInt(downloadCount) == 3) { 5673 // $('#download-success-211203').show(); 5674 // window.localStorage.setItem(showTag, 1) 5675 // } else { 5676 // showAdGc(); 5677 // } 5678 // } 5679} 5680//彿½®å¼¹çª 5681function showAdGc() { 5682 var date = new Date(); 5683 var key = date.getFullYear() + '' + (date.getMonth() + 1) + '' + date.getDate(); 5684 var showTag = 'download-success-20220616-gc-' + key 5685 var downloadSuccessGc = window.localStorage.getItem(showTag);// å½å¤©æ¯å¦æ¾ç¤º 5686 if (!downloadSuccessGc) { 5687 $('.popup-wrapper-center-20220616.download').show(); 5688 window.localStorage.setItem(showTag, 1); 5689 } 5690} 5691 5692function modelPay() { 5693 var h = location.href; 5694 if (h.split('moban/')[1]) { 5695 var hend = h.split('moban/')[1].split('.')[1]; 5696 } 5697 5698 // if(hend&&h.indexOf('588ku.com/moban/')>0&&hend=='html'){ 5699 // if($('.model-free-limit .timesBox')&&$('.model-free-limit .timesBox').length>0){ 5700 // 5701 // $('.model-free-limit .timesBox').html ('<span class="times-box"><span class="times">3</span>s</span>åè·³è½¬å°æ¨¡æ¿VIPå¼é页'); 5702 // 5703 // var timea = 3; 5704 // $('.model-free-limit .timesBox .times').text(timea); 5705 // //console.log($('.model-free-limit .timesBox .times').text()); 5706 // var hr = $('.model-free-limit .upload-vip').prop('href'); 5707 // var timemodel = setInterval(function(){ 5708 // timea = timea -1; 5709 // if(timea>=0){ 5710 // $('.model-free-limit .timesBox .times').text(timea); 5711 // } 5712 // if(timea<=0){ 5713 // $('.model-free-limit .upload-vip.model').click(); 5714 // location.href = hr; 5715 // clearInterval(timemodel); 5716 // } 5717 // },1000); 5718 // $('body').on('click','.model-free-limit .cancel',function(){ 5719 // clearInterval(timemodel); 5720 // }); 5721 // } 5722 // 5723 // }else{ 5724 $('.model-free-limit .timesBox ').html(''); 5725 5726 // } 5727 5728} 5729// ç¹å»å¹¿å
5730$(document).on('click', '.Adclick', function () { 5731 var location_url = $(this).attr('data-href'); 5732 var config_id = $(this).attr('data-config_id'); 5733 var company_id = $(this).attr('data-company_id'); 5734 var materiel_id = $(this).attr('data-materiel_id'); 5735 var that = this; 5736 5737 5738 // ååºå¹¿å ä¸å¼¹æ¡ 5739 var linkedWindow = null; 5740 var encodedUrl = encodeURIComponent(location_url); 5741 // linkedWindow = window.open() 5742 function openTab(url) { 5743 if (!url) { 5744 return false; 5745 } 5746 var a = document.createElement('a'); 5747 a.target = '_blank'; 5748 a.href = url; 5749 a.click(); 5750 a.remove(); 5751 } 5752 5753 function tolink() { 5754 if (location_url.indexOf('588ku.com') < 0) { // å¤ç½ 5755 // linkedWindow.location.href = '//588ku.com/?m=BrandPublicity&a=adUrl&encoledUrl=' + encodedUrl; 5756 openTab('//588ku.com/?m=BrandPublicity&a=adUrl&encoledUrl=' + encodedUrl) 5757 } else { // å ç½ 5758 // linkedWindow.location.href = location_url; 5759 openTab(location_url); 5760 } 5761 } 5762 $.ajax({
5763 url: '//ajax.588ku.com/?m=Ad&a=adClick', 5764 data: { config_id: config_id, materiel_id: materiel_id, company_id: company_id }, 5765 dataType: 'json', 5766 async: false, 5767 success: function (data) { 5768 tolink(); 5769 }, 5770 error: function (data) { 5771 tolink(); 5772 } 5773 }) 5774}); 5775 5776//ç¹å»ç¹æè¯´æ 5777$(document).on('click', '.libertyLink', function () { 5778 var location_url = $(this).attr('data-href'); 5779 var that = this; 5780 var linkedWindow = null; 5781 var encodedUrl = encodeURIComponent(location_url); 5782 linkedWindow = window.open() 5783 if (location_url.indexOf('588ku.com') < 0 || location_url.indexOf('editor') >= 0) { // å¤ç½ 5784 linkedWindow.location.href = '//588ku.com/?m=BrandPublicity&a=adUrl&encoledUrl=' + encodedUrl; 5785 } else { // å ç½ 5786 linkedWindow.location.href = location_url; 5787 } 5788}); 5789 5790// ç¹å»è¯¦æ 页æå¾è¿æ¥ 5791$(document).on('click', '.chaitu-link-out', function (event) { 5792 event.preventDefault(); 5793 var location_url = $(this).attr('href'); 5794 var encodedUrl = encodeURIComponent(location_url); 5795 window.open('//588ku.com/?m=BrandPublicity&a=adUrl&encoledUrl=' + encodedUrl); 5796 5797}); 5798 5799$('.ToNewSeoUrl').click(function () { 5800 var url = $(this).attr('data-url'); 5801 window.open(url); 5802}); 5803$('.ToNewSeoUrlNow').click(function () { 5804 var url = $(this).attr('data-url'); 5805 window.location.href = url; 5806}); 5807 5808 5809// å ¬å ±toast 5810function commonToast(msg) { 5811 setTimeout(function () { 5812 document.getElementsByClassName('common-toast')[0].getElementsByClassName('common-toast-msg')[0].innerHTML = msg; 5813 var toastTag = document.getElementsByClassName('common-toast')[0]; 5814 toastTag.className = toastTag.className.replace('commonToastAnimate', ''); 5815 setTimeout(function () { 5816 toastTag.className = toastTag.className + ' commonToastAnimate'; 5817 }, 100); 5818 }, 100); 5819} 5820function ComnToast(isIcon, tip) { 5821 var len = $('.ComnToast').length || 0; 5822 var iconht = ''; 5823 if (isIcon == '1') { 5824 iconht = '<em class="icon-box"><i class="iconfont icon-icon-test6" style="color:#1395EE;"></i></em>'; 5825 } else if (isIcon == '2') { 5826 iconht = '<em class="icon-box"><i class="iconfont icon-icon-test5" style="color:#51C717;"></i></em>'; 5827 } else if (isIcon == '3') { 5828 iconht = '<em class="icon-box"><i class="iconfont icon-icon-test4" style="color:#F13D2A;"></i></em>'; 5829 } else if (isIcon == '4') { 5830 iconht = '<em class="icon-box"><i class="iconfont icon-Warning" style="font-size:18px;;color:#fa9a05;"></i></em>'; 5831 } else if (!isIcon || isIcon == '0') { 5832 iconht = ''; 5833 } 5834 5835 $('body').append('<div class="Comn-Toast ComnToast ComnToast' + len + '">' + iconht + '<span class="tip-span">' + tip + '</span></div>'); 5836 var comnToastTime = setTimeout(function () { 5837 $('.ComnToast' + len).remove(); 5838 }, 3000); 5839} 5840 5841function headStatist(place, position) { 5842 $.get("//ajax.588ku.com/?m=ajax&a=headStatist", { place: place, position: position }, function () { 5843 5844 }) 5845} 5846 5847function t0dea95bdb8093eb2d78be190b8fccf0f(position, model) { 5848 $.ajax({
5849 url: "//ajax.588ku.com/?m=ajax&a=t0dea95bdb8093eb2d78be190b8fccf0f", 5850 dataType: 'json', 5851 data: { 'position': position, 'model': model }, 5852 xhrFields: { withCredentials: true }, 5853 }); 5854} 5855 5856$(function () { 5857 AdEditorHide(); 5858}) 5859$('#rightAdEditor .close').on('click', function (e) { 5860 AdEditorHandler(); 5861 e.stopPropagation(); 5862 e.preventDefault(); 5863}); 5864function AdEditorHide() { 5865 var AdEditor = CookieHandle.getCookie('AdEditor'); 5866 if (AdEditor) { 5867 $('#rightAdEditor').hide(); 5868 } else { 5869 $('#rightAdEditor').show(); 5870 } 5871} 5872function AdEditorHandler() { 5873 var AdEditor = CookieHandle.getCookie('AdEditor'); 5874 var expires = new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000) - new Date().getTime(); 5875 $('#rightAdEditor').hide(); 5876 if (AdEditor) { 5877 return false; 5878 } 5879 CookieHandle.setCookie('AdEditor', 1, 1); 5880} 5881 5882$(function () { 5883 $('.restructure-drop-list .btmSwiper .c-item').mouseenter(function (e) { 5884 var lefta = $(this).parents('.cBox').scrollLeft(); 5885 var X = $(this).position().top; 5886 var Y = $(this).position().left + 35 - lefta; 5887 5888 //console.log("---->"+left); 5889 var html = $(this).find('.h-box').text(); 5890 $(this).parents('.btmSwiper').children('.h-box').remove(); 5891 $(this).parents('.btmSwiper').append('<em class="h-box" style="left:' + Y + 'px;display:block;">' + html + '</em>'); 5892 }) 5893 $('.restructure-drop-list .btmSwiper .c-item').mouseleave(function (e) { 5894 var lefta = $(this).parents('.cBox').scrollLeft(); 5895 var X = $(this).position().top; 5896 var Y = $(this).position().left + 35 - lefta; 5897 //var html = $(this).find('.h-box').text(); 5898 var left = parseInt($(this).parents('.btmSwiper').children('.h-box').css('left')); 5899 if (left == Y) { 5900 $(this).parents('.btmSwiper').children('.h-box').remove(); 5901 } 5902 }); 5903 $('body').on('click', '.userDropListV3 .DefultDropList .selecrdropBox .list-item', function () { 5904 var inhtml = $(this).html(); 5905 $(this).parents('.DefultDropList').find('.Topval').html(inhtml); 5906 }); 5907}) 5908 5909function uDlswvip(n, obj) { 5910 if (n == '0') { 5911 var sl = $(obj).parents('.btmSwiper').find('.cBox').scrollLeft() + 140;//+ 28; 5912 $(obj).removeClass('noc'); 5913 if (sl >= 160) { 5914 $(obj).addClass('noc').siblings().removeClass('noc'); 5915 } else if (sl > 1) { 5916 $(obj).siblings().removeClass('noc'); 5917 } 5918 $(obj).parents('.btmSwiper').find('.cBox').animate({ 5919 scrollLeft: sl 5920 }, 300) 5921 } else if (n == '1') { 5922 5923 var sl = $(obj).parents('.btmSwiper').find('.cBox').scrollLeft() - 140;//- 28; 5924 $(obj).removeClass('noc'); 5925 if (sl <= 1) { 5926 $(obj).addClass('noc').siblings().removeClass('noc'); 5927 } else if (sl < 160) { 5928 $(obj).siblings().removeClass('noc'); 5929 } 5930 $(obj).parents('.btmSwiper').find('.cBox').animate({ 5931 scrollLeft: sl 5932 }, 300) 5933 } 5934} 5935 5936function toEditorTotalMs(type) { 5937 $.get("//ajax.588ku.com/?m=ajax&a=totaltoEditor", { type: type }, function () { }) 5938} 5939 5940 5941function bindLoadPoint() { 5942 $('[_l]').each(function () { 5943 pv_page_id = $(this).attr('_l'); 5944 recordPv(pv_page_id) 5945 }); 5946} 5947 5948function recordPv(page_id) { 5949 if (!page_id || page_id <= 0) return false; 5950 var url_address = window.location.href; 5951 var referer = document.referrer; 5952 $.ajax({
5953 url: "//ajax.588ku.com/?m=qiankuData&a=pageStat", 5954 type: "POST", 5955 data: { 5956 'page_id': page_id, 5957 'url': url_address, 5958 'referer': referer, 5959 }, 5960 dataType: 'json', 5961 xhrFields: { 5962 withCredentials: true 5963 }, 5964 crossDomain: true, 5965 success: function () { 5966 } 5967 }) 5968} 5969 5970$(function () { 5971 bindLoadPoint(); 5972}) 5973console.log(window.location, window.location.pathname, 'kkkkkkkk')
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.