var zanpiancms = { tool: function () { var _0x38db3e = $(window); $scrollTopLink = $(".back-top"); $scrollsTopLink = $(".back-tops"); $scrollTopHead = $(".header"); $scrollTopNav = $("#top-nav"); if ($scrollTopHead["offset"]()["top"] > 500) { $scrollTopHead["addClass"]("header-top-down"); } _0x38db3e["scroll"](function () { 500 < $(this)["scrollTop"]() ? $scrollTopLink["css"]("display", "block") : $scrollTopLink["css"]("display", "none"); 400 > $(this)["scrollTop"]() ? $scrollTopHead["removeClass"]("header-top-down") : $scrollTopHead["addClass"]("header-top-down"); if ($(".header.home")["length"] > 0) { 0 < $(this)["scrollTop"]() ? $scrollTopHead["removeClass"]("bg") : $scrollTopHead["addClass"]("bg"); } }); $scrollsTopLink["on"]("click", function () { $("html, body")["animate"]({ scrollTop: 0 }, 400); return !1; }); $scrollTopLink["on"]("click", function () { $("html, body")["animate"]({ scrollTop: 0 }, 400); return !1; }); }, Cookie: { Set: function (_0x44bf96, _0x41adb1, _0x120918) { var _0xf68378 = new Date(); _0xf68378["setTime"]( _0xf68378["getTime"]() + _0x120918 * 24 * 60 * 60 * 1000 ); var _0x31828c = document["cookie"]["match"]( new RegExp("(^| )" + _0x44bf96 + "=([^;]*)(;|$)") ); document["cookie"] = _0x44bf96 + "=" + escape(_0x41adb1) + ";path=/;expires=" + _0xf68378["toUTCString"](); }, Get: function (_0x40a381) { var _0x445902 = document["cookie"]["match"]( new RegExp("(^| )" + _0x40a381 + "=([^;]*)(;|$)") ); if (_0x445902 != null) { return unescape(_0x445902[2]); } }, Del: function (_0x5b1efd) { var _0x4b8d09 = new Date(); _0x4b8d09["setTime"](_0x4b8d09["getTime"]() - 1); var _0x26cdad = this["Get"](_0x5b1efd); if (_0x26cdad != null) { document["cookie"] = _0x5b1efd + "=" + escape(_0x26cdad) + ";path=/;expires=" + _0x4b8d09["toUTCString"](); } }, }, search: { get: function () { var _0x239d72 = []; var _0x39f159 = ""; if (this["Json"]) { _0x239d72 = this["Json"]; } else { var _0x46de63 = zanpiancms["Cookie"]["Get"]("zanpiancms_search_wd"); if (_0x46de63 != undefined) { _0x239d72 = eval(_0x46de63); } } if (_0x239d72["length"] > 0) { _0x39f159 += '

历史记录清空

'; _0x39f159 += '
'; for ($i = 0; $i < _0x239d72["length"]; $i++) { _0x39f159 += '
  • ' + _0x239d72[$i]["name"] + "
  • "; } _0x39f159 += "
    "; } $("#hot-search")["html"](_0x39f159); if ($("#hot-searchs")["length"] > 0) { $("#hot-searchs")["html"](_0x39f159); } $("body")["on"]("click", "#hot-search-clear", function (_0x57f9eb) { zanpiancms["Cookie"]["Del"]("zanpiancms_search_wd"); $("#hot-search")["html"](""); }); }, add: function (_0x82b744, _0x133453) { var _0x5c8e73 = zanpiancms["Cookie"]["Get"]("zanpiancms_search_wd"); if (_0x5c8e73 != undefined) { this["Json"] = eval(_0x5c8e73); for ($i = 0; $i < this["Json"]["length"]; $i++) { if (this["Json"][$i]["url"] == _0x133453) { return ![]; } } jsonstr = '{video:[{"name":"' + _0x82b744 + '","url":"' + _0x133453 + '"},'; for ($i = 0; $i <= 2; $i++) { if (this["Json"][$i]) { jsonstr += '{"name":"' + this["Json"][$i]["name"] + '","url":"' + this["Json"][$i]["url"] + '"},'; } else { break; } } jsonstr = jsonstr["substring"](0, jsonstr["lastIndexOf"](",")); jsonstr += "]}"; } else { jsonstr = '{video:[{"name":"' + _0x82b744 + '","url":"' + _0x133453 + '"}]}'; } zanpiancms["Cookie"]["Set"]("zanpiancms_search_wd", jsonstr, 30); }, }, ajax: function ( _0x29613b, _0x4b345d, _0x30d78d, _0x44a3ed, _0x30153b, _0x11056d, _0x1a242b ) { _0x4b345d = _0x4b345d || "get"; dataType = _0x30d78d || "json"; _0x44a3ed = _0x44a3ed || ""; zanpiancms["tip"]["open"]( { css: "loadings", msg: "数据提交中..." }, function (_0x22a961) { $["ajax"]({ type: _0x4b345d, data: _0x44a3ed, dataType: _0x30d78d, cache: ![], url: _0x29613b, timeout: 3000, beforeSend: function (_0x4cb96f) {}, error: function (_0x4626cf, _0x1718d9, _0x6e1a55) { if (_0x11056d) _0x11056d(_0x4626cf, _0x1718d9, _0x6e1a55); }, success: function (_0x44a3ed) { _0x30153b(_0x44a3ed); }, complete: function (_0x3d5d35, _0x1f328f) { if (_0x1a242b) _0x1a242b(_0x3d5d35, _0x1f328f); }, }); } ); }, tip: { auto: function (_0x25ddd9, _0x19574e) { var _0x80a7f2 = $("#zanpian-tips-box"); var _0x3fbff4 = $(window)["width"](); var _0x418892 = $(window)["height"](); var _0x20bf4f = (_0x418892 - _0x80a7f2["height"]()) / 2; var _0x4cfc61 = (_0x3fbff4 - _0x80a7f2["width"]()) / 2; _0x80a7f2["css"]("top", _0x20bf4f); _0x80a7f2["css"]("left", _0x4cfc61); }, close: function (_0x129543) { $("#zanpian-tips-bg")["remove"](); $("#zanpian-tips-box")["remove"](); $("#zanpian-tips-content")["remove"](); }, hide: function (_0x2a4664) { var _0x3e0ff0 = { intvaltime: 1000 }; _0x2a4664 = _0x2a4664 || {}; if (_0x2a4664["msg"] != null && _0x2a4664["msg"] != undefined) { $("#zanpian-tips-tip")["html"](_0x2a4664["msg"]); } if ( parseInt(_0x2a4664["rcode"]) == 1 || parseInt(_0x2a4664["code"]) == 1 || parseInt(_0x2a4664["code"]) > 0 ) { $("#zanpian-tips-tip") ["removeClass"]("loadings error alert") ["addClass"]("succ"); } else if ( parseInt(_0x2a4664["rcode"]) < 1 || parseInt(_0x2a4664["code"]) < 1 ) { $("#zanpian-tips-tip") ["removeClass"]("loadings alert succ") ["addClass"]("error"); } setTimeout(function () { zanpiancms["tip"]["close"](); }, _0x3e0ff0["intvaltime"]); }, open: function (_0x4897ca, _0x4ac2d2) { $(window)["resize"](function () { zanpiancms["tip"]["auto"](); }); var _0x3f2d83 = typeof _0x4ac2d2 === "function"; var _0xb06d30 = { msg: "数据加载中,请稍后...", wantclose: 1, autoclose: 1, css: "loadings", html: "", title: "", intvaltime: 1000, }; _0x4897ca = _0x4897ca || {}; $["extend"](_0xb06d30, _0x4897ca); $("#zanpian-tips-bg")["remove"](); $("#zanpian-tips-box")["remove"](); if (_0xb06d30["wantclose"] == 1) { var _0x30bb4c = $( '
    ' + _0xb06d30["msg"] + '
    关闭
    ' ); $("body")["append"](_0x30bb4c); zanpiancms["tip"]["auto"](); $("#zanpian-tips-bg")["fadeIn"](500); $("#zanpian-tips-box")["fadeIn"](500); $("#zanpian-tips-tip") ["removeClass"]("succ error alert loadings") ["addClass"](_0xb06d30["css"]); $(".zanpian-tips-close")["click"](function () { zanpiancms["tip"]["close"](); }); if (_0x3f2d83) { return _0x4ac2d2(); } } else if (_0xb06d30["wantclose"] == 2) { var _0x30bb4c = $( '
    ' ); $("body")["append"](_0x30bb4c); zanpiancms["tip"]["auto"](); $("#zanpian-tips-bg")["fadeIn"](500); $("#zanpian-tips-box")["fadeIn"](500); $(".zanpian-tips-close")["click"](function () { zanpiancms["tip"]["close"](); }); $("#cancel")["click"](function () { zanpiancms["tip"]["close"](); }); $("#confirm")["click"](function (_0x503975) { if (_0x3f2d83) { return _0x4ac2d2(); } }); } else if (_0xb06d30["wantclose"] == 3) { var _0x30bb4c = $( '
    ' + _0xb06d30["html"] + '
    close
    ' ); $("body")["append"](_0x30bb4c); zanpiancms["tip"]["auto"](); $("#zanpian-tips-bg")["fadeIn"](500); $("#zanpian-tips-box")["fadeIn"](500); $("#zanpian-tips-close")["click"](function () { zanpiancms["tip"]["close"](); }); $("#cancel")["click"](function () { zanpiancms["tip"]["close"](); }); $("#confirm")["click"](function (_0x597ca5) { if (_0x3f2d83) { return _0x4ac2d2(); } }); } else { var _0x30bb4c = $( '
    ' + _0xb06d30["msg"] + '
    关闭
    ' ); $("body")["append"](_0x30bb4c); zanpiancms["tip"]["auto"](); $("#zanpian-tips-bg")["fadeIn"](500); $("#zanpian-tips-box")["fadeIn"](500); $("#zanpian-tips-cnt")["fadeIn"](500); $("#zanpian-tips-tip") ["removeClass"]("succ error alert loadings") ["addClass"](_0xb06d30["css"]); $(".zanpian-tips-close")["click"](function () { zanpiancms["tip"]["close"](); }); setTimeout(function () { zanpiancms["tip"]["close"](); }, _0xb06d30["intvaltime"]); } $("#zanpian-tips-bg")["bind"]("click", function (_0x2993e4) { pp = setTimeout("zanpiancms.tip.close()", _0xb06d30["intvaltime"]); zanpiancms["tip"]["close"](_0x2993e4); if (pp != null) { clearTimeout(pp); } }); }, }, pop: { auto: function (_0x53180e, _0x50226f) { var _0x10fc05 = $("#zanpian-pop-box"); var _0x344c57 = $(window)["width"](); var _0x51cb3a = $(window)["height"](); var _0x513e18 = (_0x51cb3a - _0x10fc05["height"]()) / 2; var _0x2431b8 = (_0x344c57 - _0x10fc05["width"]()) / 2; _0x10fc05["css"]("top", _0x513e18); _0x10fc05["css"]("left", _0x2431b8); }, close: function (_0x2cb47a) { $("#zanpian-pop-bg")["remove"](); $("#zanpian-pop-box")["remove"](); $("#zanpian-pop-content")["remove"](); }, url: function (_0x4af9f4, _0x4dd873) { $(window)["resize"](function () { zanpiancms["pop"]["auto"](); }); var _0x576d66 = typeof _0x4dd873 === "function"; var _0x475a58 = { url: "", data: "", type: "get", dataType: "json", timeout: 5000, }; _0x4af9f4 = _0x4af9f4 || {}; $["extend"](_0x475a58, _0x4af9f4); $("#zanpian-pop-bg")["remove"](); $("#zanpian-pop-box")["remove"](); $("#zanpian-pop-content")["remove"](); var _0x5e5b15 = $( '
    close
    ' ); $("body")["append"](_0x5e5b15); $("#zanpian-pop-close")["click"](function () { zanpiancms["pop"]["close"](); }); $["ajax"]({ url: _0x475a58["url"], type: _0x475a58["type"], dataType: _0x475a58["dataType"], data: _0x475a58["data"], timeout: _0x475a58["timeout"], beforeSend: function (_0x1d8701) {}, error: function (_0xc3791a, _0x23b1a5, _0x22ccfb) {}, success: function (_0x10cc58) { $("#zanpian-pop-con")["html"](_0x10cc58); zanpiancms["pop"]["auto"](); $(".zanpian-modal")["show"](); $("#zanpian-pop-bg")["fadeIn"](500); $("#zanpian-pop-box")["fadeIn"](500); $("#zanpian-pop-content")["fadeIn"](500); }, complete: function (_0x381e2f, _0x2a97c7) { if (_0x2a97c7 == "timeout") { ajaxTimeOut["abort"](); } }, }); $("#zanpian-pop-bg")["bind"]("click", function (_0x3ed9eb) { pp = setTimeout("zanpiancms.tip.close()", _0x475a58["intvaltime"]); zanpiancms["pop"]["close"](_0x3ed9eb); if (pp != null) { clearTimeout(pp); } }); }, }, fixbar: function (_0x3de3a1, _0x2c8c24) { var _0x2194ca = $(_0x3de3a1), _0x2c250c = $(_0x2c8c24), _0x315c05 = _0x2194ca["offset"]()["top"], _0x2c0b8d = _0x2c250c["offset"]()["top"], _0x2b39b8 = _0x2c250c["width"](); $(window)["resize"](_0x3c04e6)["scroll"](_0x3c04e6)["trigger"]("resize"); function _0x3c04e6() { var _0x3c04e6 = $(window)["scrollLeft"](), _0x318bc1 = $(window)["scrollTop"](), _0x281d7f = $(document)["height"](), _0x13899b = $(window)["height"](), _0x148fd6 = _0x2194ca["height"](), _0x124d66 = _0x2c250c["height"](), _0x415dce = _0x148fd6 > _0x124d66 ? _0x2c0b8d : _0x315c05, _0x827d79 = _0x148fd6 > _0x124d66 ? _0x2c250c : _0x2194ca, _0x2b0d35 = _0x148fd6 > _0x124d66 ? _0x2194ca["offset"]()["left"] + _0x2194ca["outerWidth"](!0) - _0x3c04e6 : _0x2c250c["offset"]()["left"] - _0x2194ca["outerWidth"](!0) - _0x3c04e6, _0x4fd7d9 = _0x148fd6 > _0x124d66 ? _0x124d66 : _0x148fd6, _0x4d88ef = _0x148fd6 > _0x124d66 ? _0x148fd6 : _0x124d66, _0x2c760f = parseInt(_0x4d88ef - _0x13899b) - parseInt(_0x4fd7d9 - _0x13899b); $(_0x3de3a1 + "," + _0x2c8c24)["removeAttr"]("style"), _0x13899b > _0x281d7f || _0x4fd7d9 > _0x4d88ef || _0x415dce > _0x318bc1 || _0x4fd7d9 - _0x13899b + _0x415dce >= _0x318bc1 ? _0x827d79["removeAttr"]("style") : (_0x13899b > _0x4fd7d9 && _0x318bc1 - _0x415dce >= _0x2c760f) || (_0x4fd7d9 > _0x13899b && _0x318bc1 - _0x415dce >= _0x4d88ef - _0x13899b) ? _0x827d79["attr"]("style", "margin-top:" + _0x2c760f + "px;") : _0x827d79["attr"]( "style", "_margin-top:" + (_0x318bc1 - _0x415dce) + "px;position:fixed;width:" + _0x2b39b8 + "px;left:" + _0x2b0d35 + "px;" + (_0x13899b > _0x4fd7d9 ? "top" : "bottom") + ":0;" ); } }, list: { init: function () { zanpiancms["list"]["ajax"](); zanpiancms["list"]["more"](); }, ajax: function () { try { if (type_ajax_url != undefined && type_ajax_url != null) { $("body")["on"]( "click", ".type-fenlei ul li a", function (_0x3c7f07) { msg_list_loading = ![]; if (type_parms != undefined && type_parms != null) { var _0x2cda77 = $(this)["attr"]("data")["split"]("-"); if (_0x2cda77[0] == "id" || _0x2cda77[0] == "sid") { type_parms = { id: _0x2cda77[1], mcid: "0", area: "0", year: "0", letter: "0", sid: "0", wd: "0", sex: "0", zy: "0", order: "0", picm: 1, p: 1, }; zanpiancms["list"]["deltype"](); } type_parms[_0x2cda77[0]] = _0x2cda77[1]; type_parms["p"] = 1; url = zanpiancms["list"]["parseurl"](type_parms); $(this)["parent"]()["addClass"]("active"); $(this)["parent"]()["siblings"]()["removeClass"]("active"); $(this)["addClass"]("active"); $(this)["siblings"]()["removeClass"]("active"); zanpiancms["list"]["url"](url); zanpiancms["list"]["deltitle"](); } return ![]; } ); $("body")["on"]( "click", ".type-selected ul li a", function (_0x14602a) { msg_list_loading = ![]; if (type_parms != undefined && type_parms != null) { curdata = $(this)["attr"]("data")["split"]("-"); if (curdata[0] == "id" || curdata[0] == "sid") { type_parms = { id: curdata[1], mcid: "0", area: "0", year: "0", letter: "0", sid: "0", wd: "0", sex: "0", zy: "0", order: "0", picm: 1, p: 1, }; zanpiancms["list"]["deltype"](); } type_parms[curdata[0]] = curdata[1]; type_parms["p"] = 1; url = zanpiancms["list"]["parseurl"](type_parms); $(this)["parent"]()["addClass"]("active"); $(this)["parent"]()["siblings"]()["removeClass"]("active"); $(this)["addClass"]("active"); $(this)["siblings"]()["removeClass"]("active"); zanpiancms["list"]["deloption"](curdata[0]); zanpiancms["list"]["url"](url); $(this)["remove"](); return ![]; } } ); $("body")["on"]( "click", ".ajax-page ul li a,.week-list a", function (_0x33bd0d) { _0x33bd0d["preventDefault"](); $(this)["parent"]()["addClass"]("active"); $(this)["parent"]()["siblings"]()["removeClass"]("active"); $(this)["addClass"]("active"); $(this)["siblings"]()["removeClass"]("active"); var _0x42123b = $(this)["attr"]("data")["split"]("-"); type_parms[_0x42123b[0]] = _0x42123b[1]; var _0x3dc0ac = zanpiancms["list"]["parseurl"](type_parms); zanpiancms["list"]["url"](_0x3dc0ac); } ); $("body")["on"]("click", ".ajax-nav-tabs a", function (_0x503473) { _0x503473["preventDefault"](); var _0x339ad7 = $(this)["attr"]("data")["split"]("-"); type_parms[_0x339ad7[0]] = _0x339ad7[1]; if ($(this)["data"]("id") != 1) { type_parms["p"] = 1; } var _0x41e8f2 = zanpiancms["list"]["parseurl"](type_parms); $(this)["parent"]()["siblings"]()["removeClass"]("active"); $(this)["parent"]()["addClass"]("active"); $(this)["siblings"]()["removeClass"]("active"); $(this)["addClass"]("active"); zanpiancms["list"]["url"](_0x41e8f2); }); $("body")["on"]( "click", ".seach-nav-tabs li a", function (_0x5a2d40) { _0x5a2d40["preventDefault"](); var _0x3b0b31 = $(this)["attr"]("data")["split"]("-"); type_parms[_0x3b0b31[0]] = _0x3b0b31[1]; type_parms["p"] = 1; var _0x3a0cca = zanpiancms["list"]["parseurl"](type_parms); $(".seach-nav-tabs li a")["each"](function (_0x5a2d40) { $(this)["removeClass"]("active"); }); $(this)["addClass"]("active"); zanpiancms["list"]["url"](_0x3a0cca); } ); $("body")["on"]("click", "#conreset a", function (_0x190318) { msg_list_loading = ![]; var _0x194414 = $(this)["attr"]("data")["split"]("-"); type_parms = { id: _0x194414[1], mcid: "0", area: "0", year: "0", letter: "0", sid: "0", wd: "0", sex: "0", zy: "0", order: "0", picm: 1, p: 1, }; url = zanpiancms["list"]["parseurl"](type_parms); zanpiancms["list"]["url"](url); zanpiancms["list"]["deltype"](); zanpiancms["list"]["deltitle"](); return ![]; }); } } catch (_0x5ca660) {} }, deltitle: function () { var _0x13c210 = ""; $(".type-fenlei ul li a")["each"](function (_0x34a87a) { if ($(this)["parent"]()["hasClass"]("active")) { var _0x58bd09 = $(this)["attr"]("data")["split"]("-"); if ($(this)["html"]() == "全部") _0x13c210 += " "; else _0x13c210 += '
  • ' + $(this)["html"]() + "
  • "; } }); var _0x547697 = '
  • 已选
  • '; if (_0x13c210 != "") $(".conbread")["html"](_0x547697 + _0x13c210); }, deltype: function () { $(".type-fenlei ul li a")["each"](function (_0x3942da) { $(this)["parent"]()["removeClass"]("active"); if ($(this)["html"]() == "全部") { $(this)["parent"]()["addClass"]("active"); } }); return ![]; }, deloption: function (_0x463aa0) { $("#" + _0x463aa0) ["children"]() ["removeClass"]("active"); $("#" + _0x463aa0 + " a")["each"](function (_0xb4d772) { if ($(this)["html"]() == "全部") { $(this)["parent"]()["addClass"]("active"); } }); }, parseurl: function (_0x3e3b56) { var _0x338794 = cms["root"] + type_ajax_url; for (var _0x4b2508 in _0x3e3b56) { if (_0x3e3b56[_0x4b2508] != "0") { _0x338794 = _0x338794 + "-" + _0x4b2508 + "-" + _0x3e3b56[_0x4b2508]; } } return _0x338794; }, url: function (_0x3004fd) { $("#content")["html"]('
    '); msg_list_loading = ![]; $["ajax"]({ url: _0x3004fd, timeout: 5000, error: function (_0x4f0a7a, _0x581bc5, _0xf1e887) {}, success: function (_0x59ef7a) { var _0xed0aee = jQuery("#content", _0x59ef7a)["html"](); if (_0xed0aee == null || _0xed0aee == "") { _0xed0aee = '
    抱歉,没有找到相关内容!
    '; } $("#content")["html"](_0xed0aee); $("#short-page")["html"](jQuery("#short-page", _0x59ef7a)["html"]()); $("#page")["html"](jQuery("#page", _0x59ef7a)["html"]()); $("#total-page")["html"](jQuery("#total-page", _0x59ef7a)["html"]()); $("#current-page")["html"]( jQuery("#current-page", _0x59ef7a)["html"]() ); $("#count")["html"](jQuery("#count", _0x59ef7a)["html"]()); zanpian["lazyload"]["tab"]("#content"); if ($(".main-left")["height"]() > $(".main-right")["height"]()) { zanpiancms["fixbar"](".main-left", ".main-right"); } }, complete: function (_0x259249, _0x63ebc6) { _0x259249 = null; }, }); }, more: function () { if ($("#content-more")["length"] > 0) { var _0x762644 = ![]; var _0xca3072 = 2; $(window)["scroll"](function () { if (!_0x762644) { _0x517418(type_ajax_url); } }); function _0x517418(_0x7325e4) { var _0x1df993 = $(window)["height"](); var _0x58154a = $(document["body"])["height"](); var _0x1b6c70 = $(window)["scrollTop"](); var _0x42e588 = (_0x58154a - _0x1df993 - _0x1b6c70) / _0x1df993; if (_0x42e588 < 0.02) { _0x762644 = true; type_parms["p"] = _0xca3072; var _0x7325e4 = zanpiancms["list"]["parseurl"](type_parms); $("#content-more")["append"]('
    '); $["ajax"]({ url: _0x7325e4, timeout: 5000, error: function (_0x1857b9, _0xb20a2, _0x48b37d) {}, success: function (_0x47563a) { var _0x42da13 = jQuery("#content", _0x47563a)["html"](); var _0x1abb7d = jQuery(".kong", _0x47563a)["html"](); $("#content-more")["find"](".loading")["remove"](); if (_0x1abb7d) { $(".kong")["remove"](); _0x42da13 = '
    我是有底线的!
    '; _0x762644 = true; $("#content-more")["append"](_0x42da13); $("body")["on"]( "click", ".type-select ul li a,#conreset a", function (_0x23220f) { _0x762644 = ![]; } ); return ![]; } $("#content-more") ["removeClass"]("content-more") ["append"](_0x42da13); $("#page-count")["html"]( jQuery("#page-count", _0x47563a)["html"]() ); $("#page")["html"](jQuery("#page", _0x47563a)["html"]()); _0x762644 = ![]; zanpian["lazyload"]["tab"]("#content-more"); _0xca3072++; $("body")["on"]( "click", ".type-select ul li a,#conreset a", function (_0xde5fa3) { _0xca3072 = 2; _0x762644 = ![]; } ); }, complete: function (_0x49115a, _0x3cff7c) { _0x49115a = null; }, }); } } } if ($("#content-more-loading")["length"] > 0) { var _0x762644 = ![]; var _0xca3072 = 2; $("body")["on"]("click", "#content-more-loading", function () { if (!_0x762644) { _0x2460ea(type_ajax_url); } }); function _0x2460ea(_0x3ac9aa) { _0x762644 = true; type_parms["p"] = _0xca3072; var _0x3ac9aa = zanpiancms["list"]["parseurl"](type_parms); $("#content-more-loading")["append"]('
    '); $["ajax"]({ url: _0x3ac9aa, timeout: 5000, error: function (_0xba8db7, _0x257d26, _0x460cda) {}, success: function (_0x2dcc64) { var _0x51daf8 = jQuery("#content", _0x2dcc64)["html"](); var _0x202214 = jQuery(".kong", _0x2dcc64)["html"](); $("#content-more-loading")["find"](".loading")["remove"](); $("#content-more-loading")["find"](".more-loading")["remove"](); if (_0x202214) { $(".kong")["remove"](); _0x51daf8 = '
    我是有底线的!
    '; _0x762644 = true; $("#content-more-loading")["append"](_0x51daf8); $("body")["on"]( "click", ".type-select ul li a,#conreset a", function (_0x342673) { _0x762644 = ![]; } ); return ![]; } $("#content-more-loading") ["removeClass"](".more-loading") ["append"](_0x51daf8); $("#page-count")["html"]( jQuery("#page-count", _0x2dcc64)["html"]() ); $("#page")["html"](jQuery("#page", _0x2dcc64)["html"]()); _0x762644 = ![]; zanpian["lazyload"]["tab"]("#content-more-loading"); _0xca3072++; $("body")["on"]( "click", ".type-select ul li a,#conreset a", function (_0x31825a) { _0xca3072 = 2; _0x762644 = ![]; } ); }, complete: function (_0xcb9ede, _0xac9f97) { _0xcb9ede = null; }, }); } } }, }, photoswipe: function () { if ($(".show-pic")["length"] > 0) { title = $("h1")["text"](); let _0x46009d = ""; let _0x168ea3 = []; let _0x5f3dc9 = '
    ' + '
    ' + '
    ' + '
    返回
    ' + title + ' ×查看原图
    ' + '
    ' + '
    ' + '
    ' + '
    ' + "
    " + "
    " + "
    "; var _0xe8096 = $(".show-pic")["length"] - 6; if (_0xe8096 > 9) { _0xe8096 = $(".show-pic")["length"] - 10; } $["each"]($(".swiper-slide"), function (_0x1a376c, _0x2aea35) { if (_0x1a376c < _0xe8096) { $(this)["addClass"]("real-show-pic"); } }); console["log"](i); $(".show-pic")["click"](function () { _0x46009d = ""; _0x168ea3 = []; titleArr = []; let _0x515385 = 0; let _0x4a74f2 = $(this)["data"]("srcs"); $("body")["append"](_0x5f3dc9); let _0x535e13 = $(".swiper-slide")["find"]("img"); for (var _0x5a3ee5 = 0; _0x5a3ee5 < _0x535e13["length"]; _0x5a3ee5++) { _0x168ea3["push"](_0x535e13["eq"](_0x5a3ee5)["data"]("srcs")); } _0x168ea3["forEach"]((_0x5580a2, _0x2b35fe) => { if (_0x4a74f2 === _0x5580a2) { _0x515385 = _0x2b35fe; } }); for (var _0x5a3ee5 = 0; _0x5a3ee5 < _0x535e13["length"]; _0x5a3ee5++) { _0x46009d += "
    "; } $(".picture-slide .swiper-wrapper")["append"](_0x46009d); $(".picture-slide")["fadeIn"](500); var _0x23d3e7 = new Swiper(".picture-slide .swiper-container", { loop: true, lazy: { loadPrevNext: true }, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, pagination: { el: ".swiper-pagination", type: "fraction" }, observer: true, observeParents: true, initialSlide: _0x515385, }); $(".swiper-container") ["children"](".swiper-notification") ["eq"](0) ["siblings"](".swiper-notification") ["remove"](); }); $("body")["on"]( "click", ".picture-slide .closed,.picture-slide-left", function () { $(".picture-slide")["remove"](); } ); $("body")["on"]("click", ".yuantu", function () { var _0x46edd3 = $(".picture-slide .swiper-slide-active img")["attr"]( "src" ); console["log"](_0x46edd3); window["location"]["href"] = _0x46edd3; }); } }, slider: { index: function () { if ( $(".index-slide")["length"] > 0 && $(".index-slide-txt")["length"] > 0 ) { var _0x244390 = new Swiper(".index-slide-txt", { slidesPerView: 1, allowSlideNext: ![], allowSlidePrev: ![], watchSlidesVisibility: true, }); var _0x13dddf = new Swiper(".index-slide", { lazy: { loadPrevNext: true }, loop: true, autoplay: true, effect: "fade", pagination: { el: ".index-slide .swiper-pagination", clickable: true, }, thumbs: { swiper: _0x244390 }, }); var _0x2d903f = $(".index-slide-txt .swiper-slide"); for (i = 0; i < _0x2d903f["length"]; i++) { _0x2d903f[i]["index"] = i + 1; _0x2d903f[i]["onmouseover"] = function () { _0x13dddf["slideTo"](this["index"]); }; } for (i = 0; i < _0x13dddf["pagination"]["bullets"]["length"]; i++) { _0x13dddf["pagination"]["bullets"][i]["onmouseover"] = function () { this["click"](); }; } } var _0x10a548 = new Swiper("#article-slide", { lazy: { loadPrevNext: true }, loop: true, autoHeight: true, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, pagination: { el: " .swiper-pagination", clickable: true }, fadeEffect: { crossFade: true }, }); }, nav: function (_0x116e75, _0x4185d8 = "li.active") { if ($(_0x116e75)["length"] > 0) { try { var _0x1ec5e1 = new Swiper(_0x116e75, { freeMode: true, slidesPerView: "auto", observer: true, observeParents: true, }); var _0x3393ed = $(_0x116e75 + " .swiper-wrapper")["find"](_0x4185d8), _0x5fce7 = _0x3393ed["outerWidth"](), _0x1d02dc = _0x3393ed["offset"]()["left"], _0x4cb96a = _0x1ec5e1["maxTranslate"](), _0x362e97 = $(window)["outerWidth"](); if (_0x1d02dc < _0x362e97 / 2) { _0x1ec5e1["setTransition"](0); } else { if (_0x1d02dc > -_0x4cb96a + _0x362e97 / 2 - _0x5fce7) { _0x1ec5e1["setTransition"](1000); _0x1ec5e1["setTranslate"](_0x4cb96a); } else { _0x1ec5e1["setTransition"](1000); _0x1ec5e1["setTranslate"]( _0x362e97 / 2 - _0x1d02dc - _0x5fce7 / 2 ); } } } catch (_0x4c8b3a) {} } }, one: function (_0x4d7042) { $("body") ["find"](_0x4d7042) ["each"](function () { var _0x2223f2 = "#" + $(this)["attr"]("id"); var _0x2afcef = new Swiper(_0x2223f2, { lazy: { loadPrevNext: true }, loop: true, autoplay: true, effect: "fade", navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, pagination: { el: _0x2223f2 + " .swiper-pagination", clickable: true, }, fadeEffect: { crossFade: true }, }); }); }, auto: function (_0x540786) { var _0x2bc111 = new Swiper(_0x540786, { lazy: { loadPrevNext: true, loadPrevNextAmount: 6 }, loop: true, freeMode: true, slidesPerView: "auto", navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, }); }, autos: function (_0x27459d) { var _0x3a5ac9 = new Swiper(_0x27459d, { lazy: { loadPrevNext: true, loadPrevNextAmount: 6 }, freeMode: true, slidesPerView: "auto", pagination: { el: ".swiper-pagination", type: "fraction" }, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, }); }, five: function (_0x11b9de) { if ($(".news-slide-box")["length"] > 0) { certifySwiper = new Swiper(".news-slide-box .swiper-container", { watchSlidesProgress: true, slidesPerView: "auto", centeredSlides: true, loop: true, loopedSlides: 5, lazy: { loadPrevNext: true, loadPrevNextAmount: 3 }, autoplay: true, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, on: { progress: function (_0x4e74b2) { for (i = 0; i < this["slides"]["length"]; i++) { var _0xb1cc11 = this["slides"]["eq"](i); var _0x4f686f = this["slides"][i]["progress"]; modify = 1; if (Math["abs"](_0x4f686f) > 1) { modify = (Math["abs"](_0x4f686f) - 1) * 0.3 + 1; } translate = _0x4f686f * modify * 260 + "px"; scale = 1 - Math["abs"](_0x4f686f) / 5; zIndex = 999 - Math["abs"](Math["round"](10 * _0x4f686f)); _0xb1cc11["transform"]( "translateX(" + translate + ") scale(" + scale + ")" ); _0xb1cc11["css"]("zIndex", zIndex); _0xb1cc11["css"]("opacity", 1); if (Math["abs"](_0x4f686f) > 3) { _0xb1cc11["css"]("opacity", 0); } } }, setTransition: function (_0x152410) { for ( var _0xf860df = 0; _0xf860df < this["slides"]["length"]; _0xf860df++ ) { var _0x24e0fb = this["slides"]["eq"](_0xf860df); _0x24e0fb["transition"](_0x152410); } }, }, }); } }, three: function (_0x26569b) { if ($(".three-slide-box")["length"] > 0) { var _0x33306b = new Swiper(".three-slide-box .current-swiper", { loop: true, }); _0x33306b["$el"] ["parent"]() ["find"](".swiper-button-next") ["on"]("click", function () { _0x33306b["slideNext"](); }); _0x33306b["$el"] ["parent"]() ["find"](".swiper-button-prev") ["on"]("click", function () { _0x33306b["slidePrev"](); }); var _0x322a21 = new Swiper(".left-swiper", { loop: true, simulateTouch: ![], }); var _0x1bb926 = new Swiper(".right-swiper", { loop: true, simulateTouch: ![], }); _0x33306b["controller"]["control"] = [_0x322a21, _0x1bb926]; } }, }, }; var zanpian = { url: document.URL, domain: document.domain, title: document.title, languages: (function () { try { var ua = (navigator.browserLanguage || navigator.language).toLowerCase(); return ua; } catch (e) {} })(), canvas: (function () { return !!document.createElement("canvas").getContext; })(), useragent: (function () { var ua = navigator.userAgent; return { mobile: !!ua.match(/AppleWebKit.*Mobile.*/), ios: !!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), android: ua.indexOf("Android") > -1 || ua.indexOf("Linux") > -1, iPhone: ua.indexOf("iPhone") > -1 || ua.indexOf("Mac") > -1, iPad: ua.indexOf("iPad") > -1, trident: ua.indexOf("Trident") > -1, presto: ua.indexOf("Presto") > -1, webKit: ua.indexOf("AppleWebKit") > -1, gecko: ua.indexOf("Gecko") > -1 && ua.indexOf("KHTML") == -1, weixin: ua.indexOf("MicroMessenger") > -1, }; })(), js: function (file) { $("" + "") .attr({ src: file, type: "text/javascript" }) .appendTo("head"); }, css: function (file) { $("") .attr({ rel: "stylesheet", type: "text/css", href: file }) .appendTo("head"); }, jump: function () { if (cms.wap_status == 1) { if (zanpian.useragent.mobile && zanpian.url.indexOf(cms.wap_url) < 0) { urls = zanpian.url.replace(cms.pc_url, cms.wap_url); location.replace(urls); } else if ( cms.wap_status == 1 && !zanpian.useragent.mobile && zanpian.url.indexOf(cms.pc_url) < 0 ) { urls = zanpian.url.replace(cms.wap_url, cms.pc_url); location.replace(urls); } } }, verify: { init: function () { zanpian.verify.focus(); zanpian.verify.click(); }, focus: function () { $("body").on("focus", ".zanpian-validate", function () { $(this).removeClass("zanpian-validate").after(zanpian.verify.show()); $(this).unbind(); }); }, click: function () { $("body").on("click", "img.validate-img", function () { $(this).attr( "src", cms.root + "index.php?s=/home/verify/index/" + Math.random() ); }); }, refresh: function (a) { if (a) { $(a + " .validate-img").attr( "src", cms.root + "index.php?s=/home/verify/index/" + Math.random() ); } else { $(".validate-img").attr( "src", cms.root + "index.php?s=/home/verify/index/" + Math.random() ); } }, show: function () { return ( '' ); }, }, lazyload: { show: function () { try { $(".lazy,.lazyload").lazyload({ effect: "fadeIn", failurelimit: 10 }); } catch (e) {} }, tab: function ($id) { $($id) .find(".lazyload") .each(function () { if (typeof $(this).hasClass("lazyload")) { $(this).attr("src", $(this).attr("src")); $(this).removeAttr("src"); if ($(this).attr("src").length > 0) { $(this).removeAttr("fade-in"); } else { $(this).addClass("fade-in"); } } }); }, box: function ($id) { $(".lazyload").lazyload({ container: $($id) }); }, }, hits: function () { if ($(".detail-hits").length == 0) { return false; } $(".detail-hits").each(function (i) { var $this = $(".detail-hits").eq(i); // $.ajax({ // type: 'get', url: cms.root + 'index.php?s=/home/hits/show/id/' + $this.attr("data-id") + // '/sid/' + $this.attr("data-sid") + '/type/' + $this.attr("data-type"), timeout: 5000, dataType: 'json', success: function (data) { // $type = $this.attr('data-type'); if ($type != 'insert') { $this.html(eval('(data.' + $type + ')')); } // if ($('#detail-hits').length > 0) { $("#detail-hits").html(eval('(data.' + $("#detail-hits").attr('data-type') + ')')); } // } // }); }); }, digg: function () { $("body").on("click", ".digg_link,#flower", function () { var data = { id: $(this).data("id"), sid: $(this).data("sid"), type: $(this).data("type"), name: $(this).data("name"), }; var obj = $(this); zanpiancms.ajax( cms.root + "index.php?s=/home/digg/index", "post", "json", data, function (r) { zanpiancms.tip.hide(r); if (parseInt(r.code) > 0) { count = obj.find("#count").text() * 1 + 1; obj.find("#count").text(count); obj.find("#count").attr("data-count", count); } } ); return false; }); $("#flower").hover( function () { $(this).find("#count").text("送花"); }, function () { var count = $(this).find("#count").attr("data-count"); $(this).find("#count").text(count); } ); }, love: function () { $(".user-bt").each(function () { var a = $(this).find(".sect-btn"), b = $(this).find(".cancel"), c = $(this).find(".sect-show"); a.click(function () { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } var d = $(this); zanpiancms.ajax( cms.root + "index.php?s=/home/ajax/mark/type/" + a.attr("data-type") + "/id/" + a.attr("data-id") + "/cid/" + a.attr("data-cid"), "get", "json", "", function (a) { zanpiancms.tip.hide(a), parseInt(a.code) > 0 ? (d.hide(), c.show(), b.show()) : parseInt(a["yjdy"]) > 0 && 1 == parseInt(a["yjdy"]) && (d.hide(a), c.show(), b.show()); } ); }), b.click(function () { zanpiancms.ajax( cms.root + "index.php?s=/home/ajax/mark/type/" + a.attr("data-type") + "/id/" + a.attr("data-id") + "/cid/" + a.attr("data-cid"), "get", "json", "", function (b) { zanpiancms.tip.hide(b), parseInt(b.code) > 0 && (a.show(), c.hide()); } ); }); }); }, score: { init: function () { if ($("#zanpian-score").length > 0 && $("#zanpian-cm").length == 0) { zanpian.score.ajax( cms.root + "index.php?s=/home/ajax/gold/id/" + $("#zanpian-score").data("id") + "/sid/" + $("#zanpian-score").data("sid") ); } }, loading: function () { if ($("#zanpian-score").length > 0) { zanpian.score.ajax( cms.root + "index.php?s=/home/ajax/gold/id/" + $("#zanpian-score").data("id") + "/sid/" + $("#zanpian-score").data("sid") ); } }, ajax: function (url) { $.ajax({ url: url, cache: false, timeout: 3000, success: function (data) { if (data.gold != undefined && data.gold != null) { zanpian.score.stars(data.gold); } }, }); return false; }, stars: function (r) { var id = $("#zanpian-score").data("id"); var sid = $("#zanpian-score").data("sid"); var score = $("#zanpian-score").data("score"); if ($("#rating")) { $("ul.rating li").each(function () { var b = $(this).attr("title"), c = $("ul.rating li"), d = $(this).index(), e = d + 1; $(this) .click(function () { hadpingfen > 0 ? (zanpiancms.tip.open({ msg: "已经评分,请务重复评分", css: "alert", }), zanpiancms.tip.hide({})) : (zanpiancms.tip.open({ msg: "数据提交中...", css: "loadings", }), c.removeClass("active"), $("ul.rating li:lt(" + e + ")").addClass("active"), $("#ratewords").html(b), $.get( maccms.path + "/index.php/ajax/score", { val: $(this).attr("val"), id: id, mid: sid, score: score, }, function (a) { if (parseInt(a.code) == 1) { $.ajax({ type: "get", cache: false, timeout: 3000, url: maccms.path + "/index.php/ajax/score?" + "mid=" + sid + "&id=" + id + "&score=" + score, success: function (data) { zanpian.score.stars(data.score); }, }); } parseInt(a.code) > 0 ? (zanpiancms.tip.hide(a), (hadpingfen = 1)) : -2 == parseInt(a.code) ? ((hadpingfen = 1), zanpiancms.tip.open({ msg: "已经评分,请务重复评分", css: "alert", }), zanpiancms.tip.hide({})) : (zanpiancms.tip.close(), $("#innermsg").trigger("click")); }, "json" )); }) .hover( function () { (this.myTitle = this.title), (this.title = ""), $(this).nextAll().removeClass("active"), $(this).prevAll().addClass("active"), $(this).addClass("active"), $("#ratewords").html(b); }, function () { (this.title = this.myTitle), $("ul.rating li:lt(" + e + ")").removeClass("hover"); } ); }), $(".rating-panle").hover( function () { $(this).find(".rating-show").show(); }, function () { $(this).find(".rating-show").hide(); } ); } var hadpingfen = 0; var curstars = parseInt(r); $("#pa").html(0 + "人"); $("#pb").html(0 + "人"); $("#pc").html(0 + "人"); $("#pd").html(0 + "人"); $("#pe").html(0 + "人"); // $("#vod_gold").html(r['curpingfen'].pinfen); hadpingfen = 1; var PFbai = parseInt(r) * 10; if (PFbai > 0) { $("#rating-main").show(); $("#rating-kong").hide(); $("#fenshu").animate({ width: parseInt(PFbai) + "%" }); $("#total").animate({ width: parseInt(PFbai) + "%" }); $("#pingfen").html(r); $("#pingfen2").html(r); } else { $("#rating-main").hide(); $("#rating-kong").show(); $(".loadingg") .addClass("nopingfen") .html("暂时没有人评分,赶快从左边打分吧!"); } if (r["loveid"] != null) { $("#love").hide(); $("#yeslove").show(); } else { $("#love").show(); $("#yeslove").hide(); } if (r["remindid"] != null) { $("#remind").hide(); $("#yesremind").show(); } else { $("#remind").show(); $("#yesremind").hide(); } if (curstars > 0) { var curnum = curstars - 1; $("ul.rating li:lt(" + curnum + ")").addClass("current"); $("ul.rating li:eq(" + curnum + ")").addClass("current"); $("ul.rating li:gt(" + curnum + ")").removeClass("current"); var arr = new Array("很差", "较差", "还行", "推荐", "力荐"); $("#ratewords").html(arr[curnum]); } }, }, playlog: { init: function () { zanpian.playlog.set(); zanpian.playlog.get(); }, get: function () { if ($("#nav-signed").eq(0).length == 0) { zanpian.user.userinfo(); } $("#playlog-todo").show(); if ( $("#user-playlog").eq(0).length > 0 || $(".playlog-mini .playlog-box").eq(0).length > 0 ) { $("#user-playlog").hover( function () { $(this).children(".playlog-box").stop(true, true).show(); }, function () { $(this).children(".playlog-box").stop(true, true).hide(); } ); $("body").on("click", ".search-r", function () { $(".playlog-mini").show(); }); $("body").on("click", "#playlog-clear", function () { }); $("body").on("click", "#playlog-del", function (event) { event.preventDefault(); $.post( cms.root + "index.php?s=/home/playlog/del", { log_id: $(this).attr("data-id"), log_vid: $(this).attr("data-vid"), }, function (data) { if (parseInt(data["code"]) > 0) { } }, "json" ); $(this).parent().remove(); }); $("body").on("click", "#playlog-close", function () { $(".playlog-box").stop(true, true).hide(); }); } }, set: function () { if ($(".playlog-set").eq(0).attr("data-pid")) { $.post(cms.root + "index.php?s=/home/playlog/set", { log_vid: $(".playlog-set").attr("data-id"), log_sid: $(".playlog-set").attr("data-sid"), log_pid: $(".playlog-set").attr("data-pid"), log_urlname: $(".playlog-set").attr("data-name"), log_maxnum: $(".playlog-set").attr("data-count"), }); } }, }, cm: { init: function () { $(".cm-ajax-page ul a").click(function (e) { var pagegourl = $(this).attr("href"); zanpian.cm.ajax(pagegourl); return false; }); if ($("#zanpian-cm[data-type=uyan]").length) { this.uyan(); } else if ($("#zanpian-cm[data-type=changyan]").length) { this.changyan(); } else { this.forum(); } }, forum: function () { var id = $("#zanpian-cm").data("id"); var sid = $("#zanpian-cm").data("sid"); var score = $("#zanpian-cm").data("score"); if ($("#zanpian-cm").length > 0) { if ($("#zanpian-score").length > 0) { zanpian.score.stars(score); } else { zanpian.cm.ajax( cms.root + "index.php?s=/home/ajax/cm/id/" + id + "/sid/" + sid ); } // zanpian.cm.emo(); } $("#subcomm").click(function (e) { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } if ($("#comm_txt").val() == "") zanpiancms.tip.open({ css: "alert", msg: "请输入评论内容" }), $("#comm_txt").focus(), zanpiancms.tip.hide({}); else { zanpiancms.ajax( cms.root + "index.php?s=home/ajax/addcm/sid/" + sid + "/id/" + id, "post", "json", $("#commform").serializeArray(), function (r) { zanpiancms.tip.hide(r); if (parseInt(r["code"]) > 0) { if (parseInt(r["code"]) == 1) { zanpian.cm.ajax( cms.root + "index.php?s=home/ajax/cm/id/" + id + "/sid/" + sid ); } } else { zanpian.verify.refresh("#commform"); } if (parseInt(r["code"]) < -1) { zanpian.user.loginform(); return false; } } ); } return false; }); $("#cmt-input-tip .form-control").focus(function () { $("#cmt-input-tip").hide(), $("#cmt-input-bd").show(), $("#cmt-input-bd .ui-textarea").focus(); if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } }); }, uyan: function () { $("#zanpian-cm").html('
    '); $.getScript( "http://v2.uyan.cc/code/uyan.js?uid=" + $("#zanpian-cm[data-type=uyan]").attr("data-uyan-uid") ); }, changyan: function () { $appid = $("#zanpian-cm[data-type=changyan]").attr("data-changyan-id"); $conf = $("#zanpian-cm[data-type=changyan]").attr("data-changyan-conf"); $sourceid = cms.sid + "-" + cms.id; var width = window.innerWidth || document.documentElement.clientWidth; if (width < 768) { $("#zanpian-cm").html( '
    ' ); } else { $("#zanpian-cm").html( '
    ' ); $.getScript( "https://changyan.sohu.com/upload/changyan.js", function () { window.changyan.api.config({ appid: $appid, conf: "prod_" + $conf, }); } ); } }, emo: function () { if ($(".emotion").length > 0 && $("#emots").length > 0) { $.get(cms.public + "tpl/cms/emots.html", function (data) { $("#emots").html(data); $("body").on("click", ".emotion", function () { var left = $(this).offset().left; var top = $(this).offset().top; var id = $(this).attr("data-id"); $("#smileBoxOuter") .css({ left: left, top: top + 25 }) .show() .attr("data-id", id); }); $("#smileBoxOuter,.emotion").hover( function () { $("#smileBoxOuter").attr("is-hover", 1); }, function () { $("#smileBoxOuter").attr("is-hover", 0); } ); $(".emotion,#smileBoxOuter").blur(function () { var is_hover = $("#smileBoxOuter").attr("is-hover"); if (is_hover != 1) { $("#smileBoxOuter").hide(); } }); $(".smileBox") .find("a") .click(function () { var textarea_id = $("#smileBoxOuter").attr("data-id"); var textarea_obj = $("#reply_" + textarea_id).find("textarea"); var textarea_val = textarea_obj.val(); if (textarea_val == "发布评论") { textarea_obj.val(""); } var title = "[" + $(this).attr("title") + "]"; textarea_obj.val(textarea_obj.val() + title).focus(); $("#smileBoxOuter").hide(); }); $("#smileBoxOuter") .find(".smilePage") .children("a") .click(function () { $(this).addClass("current").siblings("a").removeClass("current"); var index = $(this).index(); $("#smileBoxOuter") .find(".smileBox") .eq(index) .show() .siblings(".smileBox") .hide(); }); $(".comment_blockquote").hover( function () { $(".comment_action_sub").css({ visibility: "hidden" }); $(this) .find(".comment_action_sub") .css({ visibility: "visible" }); }, function () { $(".comment_action_sub").css({ visibility: "hidden" }); } ); }); } }, ajax: function (url) { $.ajax({ url: url, cache: false, timeout: 3000, success: function (data) { if (data != "") { if ($("#datalist li").length > 3) $("html,body").animate( { scrollTop: $("#datalist").offset().top - 130 }, 1000 ); $("#comment").empty().html(data.comment); $("#commnum").html(jQuery("#comment-count", data.comment).html()); $("#data").empty().html(data); $("#commnum").html(data.count); $(".digg a").click(function (e) { var data = { id: $(this).data("id"), type: $(this).data("type") }; var obj = $(this); zanpiancms.ajax( $(this).data("url"), "post", "json", data, function (r) { zanpiancms.tip.hide(r); if (parseInt(r.code) > 0) { obj .children("strong") .html(parseInt(obj.children("strong").html()) + 1); } } ); return false; }); $(".reply").click(function (e) { var curid = $(this).attr("data-id"); var curpid = $(this).attr("data-pid"); var curtid = $(this).attr("data-tid"); var curtuid = $(this).attr("data-tuid"); var curvid = $(this).attr("data-vid"); var cursid = $(this).attr("data-sid"); if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } else { if ($("#rep" + curid).html() != "") { $("#rep" + curid).html(""); } else { $(".comms").html(""); $("#rep" + curid).html($("#commsub").html()); $(".emotion,#smileBoxOuter").blur(function () { var is_hover = $("#smileBoxOuter").attr("is-hover"); if (is_hover != 1) { $("#smileBoxOuter").hide(); } }); $("#rep" + curid + " #comm_pid").val(curpid); $("#rep" + curid + " #comm_id").val(curid); $("#rep" + curid + " #comm_tid").val(curtid); $("#rep" + curid + " #comm_tuid").val(curtuid); $("#rep" + curid + " #comm_sid").val(cursid); $("#rep" + curid + " #comm_vid").val(curvid); $("#rep" + curid + " #row_id").attr("data-id", curid); $("#rep" + curid + " .recm_id").attr("id", "reply_" + curid); $("#rep" + curid + " .sub").unbind(); $("#rep" + curid + " .sub").click(function (e) { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } if ($("#rep" + curid + " #commtxt").val() == "") zanpiancms.tip.open({ css: "alert", msg: "请输入评论内容", }), $("#rep" + curid + " #commtxt").focus(), zanpiancms.tip.hide({}); else { zanpiancms.ajax( cms.root + "index.php?s=/home/ajax/addrecm", "post", "json", $("#rep" + curid + " #comm-sub-form").serializeArray(), function (r) { zanpiancms.tip.hide(r); if (parseInt(r["code"]) > 0) { if (parseInt(r["code"]) == 1) { zanpian.cm.ajax(url); } } else { zanpian.verify.refresh( "#rep" + curid + " #comm-sub-form" ); } if (parseInt(r["code"]) < -1) { zanpian.user.loginform(); return false; } } ); } }); } } }); } else { $("#datalist").html( '
  • 当前没有评论,赶紧抢个沙发!
  • ' ); } if (data.gold != undefined && data.gold != null) { zanpian.score.stars(data.gold); } $("#pages").html(data.pages); $("#pagetop").html(data.pagetop); $(".ajax-page ul a").click(function (e) { var pagegourl = $(this).attr("href"); zanpian.cm.ajax(pagegourl); return false; }); }, dataType: "json", }); return false; }, }, barrage: { init: function () { $.ajaxSetup({ cache: true }); if ($("#barrage").length) { $("") .attr({ rel: "stylesheet", type: "text/css", href: cms.public + "tpl/cms/barrager/barrager.css", }) .appendTo("head"); $.getScript(cms.public + "tpl/" + cms.theme + "/js/jquery.barrager.js"); } if ($(".barrage_switch").is(".on")) { zanpian.barrage.get(0); } $("body").on("click", "#slider", function () { if ($(".barrage_switch").is(".on")) { $(".barrage_switch").removeClass("on"); $.fn.barrager.removeAll(); clearInterval(looper); return false; } else { $(".barrage_switch").addClass("on"); zanpian.barrage.get(0); } }); $("#barrage-submit").click(function (e) { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } zanpiancms.ajax( cms.root + "index.php?s=/home/barrage/add", "post", "json", $("#barrage-form").serializeArray(), function (r) { zanpiancms.tip.hide(r); if (parseInt(r["code"]) > 0) { zanpian.barrage.get(1); } else { zanpian.verify.refresh("#barrage-form"); } } ); return false; }); }, get: function (t) { if ( $("#barrage").data("id") != undefined && $("#barrage").data("id") != null && $("#barrage").data("id") != "" ) { var url = cms.root + "index.php?s=/home/barrage/index/t/" + t + "/id/" + $("#barrage").data("id"); } else { return false; } $.getJSON(url, function (data) { if (typeof data != "object") { return false; } var looper_time = data.looper_time; var items = data.items; var total = items.length; var run_once = true; var index = 0; barrager(); function barrager() { if (t == 0) { if (run_once) { looper = setInterval(barrager, looper_time); run_once = false; } } $("#zanpiancms_player").barrager(items[index]); if (t == 0) { index++; if (index == total) { clearInterval(looper); return false; } } } }); }, }, player: { playerlist: function () { var height = $(".play-bo").height(); var tips = $(".play-tips").height(); if ($(window).width() > 767) { var height = height - tips - 110; } $(".min-play-list").height(height); }, vip_callback: function ( $vod_id, $vod_sid, $vod_pid, $status, $trysee, $tips ) { if ($status != 200) { if ($trysee > 0) { window.setTimeout(function () { $.get( cms.root + "index.php?s=/home/vod/vip/type/trysee/id/" + $vod_id + "/sid/" + $vod_sid + "/pid/" + $vod_pid, function (html) { var index = '
    ' + html + "
    "; $("#zanpiancms_player").html(index); }, "html" ); }, 1000 * 60 * $trysee); } else { $("#zanpiancms-player-vip .zanpiancms-player-box") .html($tips) .addClass("jumbotron"); $("#zanpiancms-player-vip .zanpiancms-player-iframe").hide(); } $("body").on("click", "#user-weixinpwd", function () { $(this).text("Loading..."); $pwd = $(".password").val(); $.get( cms.root + "index.php?s=/home/vod/vip/type/pwd/id/" + $vod_id + "/sid/" + $vod_sid + "/pid/" + $vod_pid + "/pwd/" + $pwd, function (json) { if (json.status == 200) { zanpian.user.iframe(); } else { $("#user-weixinpwd").text("播放"); alert("密码错误或失效,请重新回复"); } }, "json" ); }); $("body").on("click", "#user-price", function () { $(this).text("Loading..."); var obj = $(this); $.get( cms.root + "index.php?s=/home/vod/vip/type/ispay/id/" + $vod_id + "/sid/" + $vod_sid + "/pid/" + $vod_pid, function (json) { if (json.status == 200) { zanpiancms.tip.open({ txt: "支付成功", cssname: "succ" }); zanpiancms.tip.hide({}); zanpian.user.iframe(); } else if (json.status == 602) { obj.text("确定"); zanpiancms.tip.open({ css: "alert", msg: json.info }); zanpiancms.tip.hide({}); setTimeout(function () { zanpian.user.payment(); }, 1000); } else if (json.status == 500 || json.status == 501) { } else { $("#zanpiancms-player-vip .zanpiancms-player-box") .html(json.info) .addClass("jumbotron"); } }, "json" ); }); } else { } }, }, user: { index: function () { zanpian.user.login(); zanpian.user.reg(); zanpian.user.home(); zanpian.user.center(); var countdown = 60; function settime(val) { if (countdown == 0) { val.addClass("btn-success").prop("disabled", false); val.val("获取验证码"); countdown = 60; return true; } else { val.removeClass("btn-success").prop("disabled", true); val.val("重新发送(" + countdown + ")"); countdown--; } setTimeout(function () { settime(val); }, 1000); } $("body").on("click", "#send", function () { var ac = $('input[name="ac"]').val(); var to = $('input[name="to"]').val(); if (ac == "mobile") { if ("" == to) { zanpiancms.tip.open({ css: "alert", msg: "请输入手机号码" }), $("#to").focus(), zanpiancms.tip.hide({}); return false; } var pattern = /^[1][0-9]{10}$/; var ex = pattern.test(to); if (!ex) { zanpiancms.tip.open({ css: "alert", msg: "手机号格式不正确" }), $("#to").focus(), zanpiancms.tip.hide({}); return false; } } else if (ac == "email") { if ("" == to) { zanpiancms.tip.open({ css: "alert", msg: "请输入邮箱" }), $("#to").focus(), zanpiancms.tip.hide({}); return false; } var pattern = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; var exs = pattern.test(to); if (!exs) { zanpiancms.tip.open({ css: "alert", msg: "邮箱格式不正确" }), $("#to").focus(), zanpiancms.tip.hide({}); return false; } } var obj = $(this); zanpiancms.ajax( cms.root + "index.php?s=/user/reg/send/", "post", "json", $(this).closest("form").serializeArray(), function (a) { if ((zanpiancms.tip.hide(a), parseInt(a["code"]) > 0)) { settime(obj); } else { zanpian.verify.refresh($(this).closest("form")); } } ); }); $("body").on("click", "#user-vip", function () { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } zanpiancms.pop.url({ url: cms.root + "index.php?s=/user/center/buy" }); }); $("body").on("click", "#user-payment", function () { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } zanpian.user.payment(); }); $("body").on("click", "#user-pay-vip", function () { zanpiancms.ajax( cms.root + "index.php?s=/user/center/buy", "post", "json", $(".form-pay-vip").serializeArray(), function (a) { if ((zanpiancms.tip.hide(a), parseInt(a["code"]) > 0)) { setTimeout(function () { zanpiancms.pop.close(); }, 500); $("#grouptitle").html(a["data"]["user_grouptitle"]); $("#viptime").html(a["data"]["user_viptime"]); $("#usescore").html(a["data"]["user_score"]); zanpian.user.iframe(); } if ((zanpiancms.tip.hide(a), parseInt(a["code"]) == -2)) { setTimeout(function () { zanpian.user.payment(); }, 500); } else -3 == parseInt(a["code"]); } ); }); $("body").on("click", "#user-pay-card", function () { zanpiancms.ajax( cms.root + "index.php?s=/user/payment/card", "post", "json", $(".form-pay-card").serializeArray(), function (a) { if ( (zanpiancms.tip.hide(a), parseInt(a["code"]) > 0 || parseInt(a["code"]) > 0) ) { setTimeout(function () { zanpiancms.pop.close(); }, 500); $("#usescore").html( parseInt($("#usescore").text()) + parseInt(a["data"]) ); zanpian.user.iframe(); } if ( (zanpiancms.tip.hide(a), parseInt(a["code"]) == -2 || parseInt(a["code"]) == -2) ) { zanpian.user.payment(); } else -3 == parseInt(a["code"]); } ); }); $("body").on("click", "#user-pay", function (e) { var type = $("select[name='payment'] option:selected").val(); var score = $("#score").val(); if (type == "weixinpay") { e.preventDefault(); zanpiancms.pop.url({ url: cms.root + "index.php?s=/user/payment/index/payment/" + type + "/score/" + score, }); } payckeck = setInterval(function () { check(); }, 5000); function check() { if ($(".modal").css("display") == "none") { clearInterval(payckeck); } $.get( cms.root + "index.php?s=/user/payment/check/type/" + type + "/id/" + $("#order_id").text(), function (a) { if ( (zanpiancms.tip.hide(a), parseInt(a["code"]) > 0 || parseInt(a["code"]) > 0) ) { clearInterval(payckeck); $("#success").html( "付款成功增加" + parseInt(a["data"]) + "积分" ); $("#usescore").html( parseInt($("#usescore").text()) + parseInt(a["data"]) ); zanpiancms.tip.open({ msg: "付款成功增加" + parseInt(a["data"]) + "积分", css: "succ", }); $(".modal-dialog .close").trigger("click"); zanpian.user.iframe(); } } ); } }); }, payment: function () { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } zanpiancms.pop.url({ url: cms.root + "index.php?s=/user/payment/index" }); }, iframe: function () { if ($("#zanpiancms-player-vip").length > 0) { if ( $(".zanpiancms-player-iframe").length > 0 && $(".zanpiancms-player-iframe") .attr("src") .indexOf("home-vod-vip-type-play") >= 0 ) { $(".zanpiancms-player-iframe") .attr("src", $(".zanpiancms-player-iframe").attr("src")) .show(); } else { self.location.reload(); } } }, islogin: function () { islogin = 0; if (document.cookie.indexOf("auth_sign=") >= 0) { islogin = 1; return true; } return false; }, loginform: function () { if (!zanpian.user.islogin()) { zanpiancms.pop.url({ url: cms.root + "index.php?s=/home/ajax/login" }); } else { return false; } }, login: function () { $("body").on("click", "#login-submit", function () { if ("" == $("#login-form #user_name").val()) { zanpiancms.tip.open({ css: "alert", msg: "请输入用户名" }), $("#login-form #user_name").focus(), zanpiancms.tip.hide({}); return false; } if ("" != $("#login-form #user_password").val()) return zanpiancms.ajax( cms.root + "index.php?s=/user/login/index", "post", "json", $("#login-form").serializeArray(), function (a) { if ((zanpiancms.tip.hide(a), parseInt(a["code"]) > 0)) { zanpian.user.iframe(); try { zanpian.playlog.get(); zanpian.score.loading(); } catch (e) {} setTimeout(function () { zanpiancms.pop.close(); }, 500); } else -3 == parseInt(a["code"]); zanpian.verify.refresh("#login-form"); return false; } ); zanpiancms.tip.open({ css: "alert", msg: "请输入密码" }), $("#login-form #user_password").focus(), zanpiancms.tip.hide({}); }); }, reg: function () { $("body").on("click", "#reg-submit", function () { var ac = $('input[name="ac"]').val(); var to = $('input[name="to"]').val(); if ("" == $("#reg-form #user_name").val()) { zanpiancms.tip.open({ css: "alert", msg: "请输入用户名" }), $("#reg-form #user_name").focus(), zanpiancms.tip.hide({}); return false; } if (ac == "mobile") { if ("" == to) { zanpiancms.tip.open({ css: "alert", msg: "请输入手机号码" }), $('input[name="to"]').focus(), zanpiancms.tip.hide({}); return false; } var pattern = /^[1][0-9]{10}$/; var ex = pattern.test(to); if (!ex) { zanpiancms.tip.open({ css: "alert", msg: "手机号格式不正确" }), $('input[name="to"]').focus(), zanpiancms.tip.hide({}); return false; } } else if (ac == "email") { if ("" == to) { zanpiancms.tip.open({ css: "alert", msg: "请输入邮箱" }), $('input[name="to"]').focus(), zanpiancms.tip.hide({}); return false; } var pattern = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; var ex = pattern.test(to); if (!ex) { zanpiancms.tip.open({ css: "alert", msg: "邮箱格式不正确" }), $('input[name="to"]').focus(), zanpiancms.tip.hide({}); return false; } } if ("" != $("#reg-form #user_password").val()) return zanpiancms.ajax( cms.root + "index.php?s=/user/reg/index", "post", "json", $("#reg-form").serializeArray(), function (a) { if ((zanpiancms.tip.hide(a), parseInt(a["code"]) > 0)) { try { zanpian.playlog.get(); } catch (e) {} setTimeout(function () { zanpiancms.pop.close(); }, 500); } else -3 == parseInt(a["code"]); zanpian.verify.refresh("#reg-form"); return false; } ); zanpiancms.tip.open({ css: "alert", msg: "请输入密码" }), $("#reg-form #user_password").focus(), zanpiancms.tip.hide({}); }); }, userinfo: function () { if (!zanpian.user.islogin()) { return false; } $.ajax({ type: "get", cache: false, url: cms.root + "index.php?s=/user/center/flushinfo", timeout: 10000, success: function (a) { return -7 == parseInt(a.code) ? (zanpiancms.tip.open({ msg: a.msg, classname: "error" }), zanpiancms.tip.hide({ code: -1, msg: a.msg }), !1) : a.uid > 0 && (parseInt(a.history) > 10 ? ($("#playlog-todo").html( '进入会员中心查看' + a.history + "条播放记录>>" ), $("#playlog-todo").show()) : ($("#playlog-todo").html(""), $("#playlog-todo").hide()), (loginhtml = $("#user-login").html()), $("#user-login").html(a.html), $("#nav-signed").hide(), $(".logoutbt").unbind(), $("#user-login .nav-link").removeAttr("href"), $("#nav-signed").removeAttr("style"), $(".logoutbt").click(function (event) { event.stopPropagation(); zanpiancms.tip.open({ msg: "数据提交中...", css: "loadings", }); $.get( cms.root + "index.php?s=/home/ajax/logout", function (r) { if ((zanpiancms.tip.hide(r), parseInt(r["code"]) > 0)) { $("#user-login").html(loginhtml); zanpian.playlog.get(); zanpian.user.iframe(); $("#love,#remind").show(); $("#yeslove,#yesremind").hide(); } }, "json" ); })); }, }); }, home: function () { $("body").on("click", ".user-home-nav ul a", function () { var url = $(this).attr("data-url"); if (url) { var txt = $(this).text(); $(this).parents().find("li").removeClass("active"); $(this).parent("li").addClass("active"); $("#tab_title").text(txt); if ($(this).attr("data-id") == "cm") { zanpian.cm.ajax(url); zanpian.cm.emo(); } else { zanpian.user.get(url); } } }); }, center: function () { var countdown = 60; function settime(val) { if (countdown == 0) { val.addClass("btn-success").prop("disabled", false); val.val("重新发送认证邮件"); countdown = 60; return true; } else { val.removeClass("btn-success").prop("disabled", true); val.val("重新发送(" + countdown + ")"); countdown--; } setTimeout(function () { settime(val); }, 1000); } if ($("#cxselect").length > 0) { $.cxSelect.defaults.url = cms.public + "/zanpianadmin/libs/jquery-cxselect/js/cityData.json"; $.cxSelect.defaults.emptyStyle = "none"; $("#cxselect").cxSelect({ selects: ["province", "city", "area"] }); } $("body").on("click", "#submit-bind", function () { var ac = $('input[name="ac"]').val(); var to = $('input[name="to"]').val(); if ("" == $('input[name="code"]').val()) { zanpiancms.tip.open({ msg: "请输入验证码" }), $('input[name="code"]').focus(), zanpiancms.tip.hide({}); return false; } zanpiancms.ajax( cms.root + "index.php?s=/user/center/bind", "post", "json", $("form").serializeArray(), function (a) { if ((zanpiancms.tip.hide(a), parseInt(a["code"]) > 0)) { setTimeout(function () { zanpiancms.pop.close(); }, 500); if (ac == "email") { $("#user_email").val(a["data"]); $(".user_email").val(a["data"]); $("#email").html(a["data"]); $(".user-email-nubind").show(); $(".user-email-bind").hide(); } if (ac == "mobile") { $("#user_mobile").val(a["data"]); $(".user_mobile").val(a["data"]); $("#mobile").html(a["data"]); $(".user-mobile-nubind").show(); $(".user-mobile-bind").hide(); } } } ); }); $("body").on("click", "#unbind", function () { var url = $(this).data("url"); var ac = $(this).data("type"); zanpiancms.tip.open({ msg: "数据提交中...", css: "loading" }); $.get( url, function (r) { if ((zanpiancms.tip.hide(r), parseInt(r["code"]) > 0)) { if (ac == "email") { $("#user_email").val(""); $(".user_email").val(""); $(".user-email-nubind").hide(); $(".user-email-bind").show(); } if (ac == "mobile") { $("#user_mobile").val(""); $(".user_mobile").val(""); $(".user-mobile-nubind").show(); $(".user-mobile-bind").hide(); } } }, "json" ); }); $("body").on("click", "#send_newemail", function () { var obj = $(this); zanpiancms.tip.open({ msg: "邮件发送中...", css: "loading" }); $.post( cms.root + "index.php?s=/user/reg/sendemail", { val: 1 }, function (a) { settime(obj); zanpiancms.tip.hide(a); }, "json" ); }); $(".user-notice-close").click(function () { $(this) .parent(".user-notice") .fadeOut(400, 0, function () { $(this).parent(".user-notice").slideUp(400); }); return false; }); $("body").on("click", ".mdel,.del", function () { var parents = $(this).parents("li"); zanpiancms.tip.open({ wantclose: 2, succdo: function (r) { parents.remove(); count = $("#total").text() * 1 - 1; $("#total").text(count); }, msg: "确认删除?", }); }); $("body").on("click", ".clearall", function () { var url = $(this).attr("data"); zanpiancms.tip.open({ wantclose: 2, ispost: 1, formid: "clearcomm", url: url, succdo: function (r) { if (r.data > 0) { count = $("#total").text() * 1 - r.data; $("#total").text(count); } zanpian.user.get(geturl); if (typeof hoturl != "undefined") { zanpian.user.hot(hoturl); } }, msg: "确认删除?", }); }); zanpian.user.setuplabel(); $("body").on("click", ".label-checkbox", function () { zanpian.user.setuplabel(); }); $("body").on("click", ".delcheckall", function () { checkAll(""); }); $("body").on("mouseenter", "#list li", function () { $(this).find(".ui-del,.mdel").show(); $(this).addClass("hover"); }); $("body").on("mouseleave", "#list li", function () { $(this).find(".ui-del,.mdel").hide(); $(this).removeClass("hover"); }); $("body").on("click", ".user_nav_get li", function () { var url = $(this).attr("data-url"); $(this).siblings().removeClass("active"); $(this).addClass("active"); zanpian.user.get(url); }); $("body").on("click", "#user-edit", function () { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } var url = $(this).data("url"); zanpiancms.pop.url({ url: url }); }); $("body").on("click", "#user-email", function () { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } zanpiancms.pop.url({ url: cms.root + "index.php?s=/user/center/iemail", }); }); $("body").on("click", "#send-msg", function () { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } var uid = $(this).attr("data-id"); zanpiancms.pop.url({ url: cms.root + "index.php?s=/user/home/msg/id/" + uid, }); }); $("body").on("click", "#add-modal-submit", function () { var url = $("#modal-form").attr("action"); zanpiancms.ajax( url, "post", "json", $("#modal-form").serializeArray(), function (a) { if ((zanpiancms.tip.hide(a), parseInt(a["code"]) > 0)) { if (typeof geturl != "undefined") { zanpian.user.get(geturl); } setTimeout(function () { zanpiancms.pop.close(); }, 500); } else { zanpian.verify.refresh("#modal-form"); } } ); }); $("body").on("click", ".fav-cancel", function (event) { zanpiancms.tip.open({ wantclose: 2, succdo: function (r) { if (parseInt(r.code) == 1) { zanpian.user.get(geturl); zanpian.user.hot(hoturl); } }, msg: "确认删除?", }); }); $("body").on("click", ".fav-add", function (e) { zanpiancms.tip.open({ css: "loading" }); var turl = $(this).attr("href"); $.get( turl, "", function (data) { zanpiancms.tip.hide(data); if (parseInt(data.code) > 0) { zanpian.user.hot(hoturl); zanpian.user.get(geturl); } }, "json" ); return false; }); $("body").on("mouseenter", ".i-rss-list", function () { var vid = $(this).find(".play-pic").attr("data"); if ($("#play" + vid).attr("data") == "") { $.ajax({ url: cms.root + "index.php?s=/user/center/getplayurl/id/" + vid, success: function (r) { $("#play" + vid).html(r); $("#play" + vid).attr("data", "1"); }, dataType: "json", }); } $(this).find(".i-rss-box").show(); }); $("body").on("mouseleave", ".i-rss-list", function () { $(this).find(".i-rss-box").hide(); }); $("form").on("submit", function (e) { var url = $(this).attr("action"); if (!url) { url = window.location.href; } zanpiancms.ajax( url, "post", "json", $("#modal-form").serializeArray(), function (a) { if ((zanpiancms.tip.hide(a), parseInt(a["code"]) < 0)) { zanpian.verify.refresh($(this)); } } ); }); $("body").on("click", "#delsns", function () { var type = $(this).attr("data-id"); zanpiancms.tip.open({ msg: "数据提交中...", css: "loading" }); $.ajax({ type: "get", dataType: "json", cache: false, url: cms.root + "index.php?s=/user/center/sns/type/" + type, timeout: 3000, success: function (r, a) { zanpiancms.tip.hide(r); if (parseInt(r.code) > 0) { $(".btn-success").hide(); $(".btn-default").show(); } }, }); }); $("body").on("click", "#addsns", function () { var type = $(this).attr("data-id"); var snsckeck = setInterval(snslogin, 1000); window.open( cms.root + "index.php?s=/user/snslogin/" + type + "/t/1", "_blank", "width=750, height=525" ); function snslogin() { if (zanpian.user.islogin()) { zanpian.user.iframe(); zanpian.playlog.get(); zanpiancms.pop.close(); clearInterval(snsckeck); } else { return false; } } }); $("body").on("click", ".loginout", function () { zanpiancms.tip.open({ msg: "正在退出...", css: "loading", isajax: 1, succdo: function (r) {}, }); return false; }); }, get: function (url) { $.ajax({ url: url, cache: false, timeout: 3000, success: function (data) { if (data != "") { if ($("#list li").length > 3) $("html,body").animate( { scrollTop: $("#list li").offset().top - 130 }, 1000 ); $("#data").empty().html(data); } else { $("#data").html('
    当前没有任何数据!
    '); } $(".ajax-page ul a").click(function (e) { var pagegourl = $(this).attr("href"); zanpian.user.get(pagegourl); return false; }); }, dataType: "json", }); return false; }, hot: function (url) { $.ajax({ url: url, cache: false, timeout: 3000, success: function (data) { if (data.ajaxtxt != "") { $("#hotremind").empty().html(data); } else { $("#hotremind").html('
  • 当前没有任何数据!
  • '); } $("#pages").html(data.pages); }, dataType: "json", }); return false; }, setuplabel: function () { if ($(".label-checkbox input").length) { $(".label-checkbox").each(function () { $(this).removeClass("label-checkbox-on"); }); $(".label-checkbox input:checked").each(function () { $(this).parent("label").addClass("label-checkbox-on"); }); } if ($(".label-radio input").length) { $(".label-radio").each(function () { $(this).removeClass("label-radio-on"); }); $(".label-radio input:checked").each(function () { $(this).parent("label").addClass("label-radio-on"); }); } }, editor: function () {}, }, gbook: function () { $("body").on("click", "#gb_types li", function (e) { $("#gb_types li").each(function () { $(this).removeClass("active"); }); $(this).addClass("active"); $("#gb_type").val($(this).attr("val")); }); $("body").on("click", "#gb-submit", function () { if ($("#gb_nickname").val() == "") zanpiancms.tip.open({ css: "alert", msg: "请输入您的昵称" }), $("#gb_nickname").focus(), zanpiancms.tip.hide({}); else { if ("" != $("#gb_content").val()) return zanpiancms.ajax( cms.root + "index.php?s=/home/gb/add", "post", "json", $("#gbook-form").serializeArray(), function (r) { if ((zanpiancms.tip.hide(r), parseInt(r["code"]) > 0)) { if (parseInt(r["code"]) == 1) { zanpiancms.list.url(cms.root + "index.php?s=/home/gb/show"); } } else { zanpian.verify.refresh("#gbook-form"); } return false; } ); zanpiancms.tip.open({ css: "alert", msg: "输入留言内容" }), $("#gb_content").focus(), zanpiancms.tip.hide({}); } }); }, autocomplete: function () { if ($(".zanpian-search").length == 0) { return false; } var $limit = $(".zanpian-search").eq(0).data("limit"); $.ajaxSetup({ cache: true }); $.getScript( cms.tpl_path + "statics/asset/js/jquery.autocomplete.min.js", function (response, status) { $ajax_url = cms.root + "index.php?s=/home/search/vod"; $(".zanpian-wd").autocomplete({ serviceUrl: $ajax_url, params: { limit: $limit }, paramName: "q", maxHeight: 420, transformResult: function (response) { $(".header-search .dropdown").hide(); var obj = $.parseJSON(response); return { suggestions: $.map(obj.data, function (dataItem) { return { value: dataItem.vod_name, data: dataItem.vod_url }; }), }; }, onSelect: function (suggestion) { $(".header-search .dropdown").hide(); zanpiancms.search.add(suggestion.value, suggestion.data); location.href="tvhhftujpo.ebub;" }, }); } ); }, language: { s2t: function () { if (zanpian.languages == "zh-hk" || zanpian.languages == "zh-tw") { $.getScript( cms.tpl_path + "statics/asset/js/s2t.min.js", function (data, status, jqxhr) { $(document.body).s2t(); } ); } }, t2s: function () { if (zanpian.languages == "zh-cn") { $.getScript( cms.tpl_path + "statics/asset/js/s2t.min.js", function (data, status, jqxhr) { $(document.body).t2s(); } ); } }, }, qrcode: function () { if ($(".qrcode-box").length > 0) { wapurl = cms.wapurl; if (wapurl == "" || wapurl == "undefined" || wapurl == undefined) { wapurl = zanpian.url; } $(".qrcode-box img").attr( "src", "/qrcode/?url=" + encodeURIComponent(wapurl) ); $(".qrcode-box").append( '' ); } }, mytab: { init: function () { $("body").on("click", "#myTab li", function (e) { var id = $(this).attr("id"); $(this).addClass("active").siblings().removeClass("active"); $(id).siblings().addClass("hide"); $(id) .removeClass("hide") .addClass("show") .siblings() .removeClass("show"); zanpian.lazyload.tab(id); }); $("#hoverTab li").hover(function () { var id = $(this).attr("id"); $(this).addClass("active").siblings().removeClass("active"); $(id).siblings().addClass("hide"); $(id) .removeClass("hide") .addClass("show") .siblings() .removeClass("show"); zanpian.lazyload.tab(id); }); if ($(".hot-show").length > 0) { $(".hot-show") .children() .hover(function (t) { $(this).siblings().removeClass("active"); $(this).addClass("active"); zanpian.lazyload.tab($(this)); }); } $("body").on("click", "#Tab li", function (e) { if (!$(this).children("a").hasClass("moreTab")) { var id = $(this).children("a").attr("id"); $(this).addClass("active").siblings().removeClass("active"); $(id).siblings().addClass("hide"); $(id) .removeClass("hide") .addClass("show") .siblings() .removeClass("show"); } }); }, click: function (nid, cid, sel, show) { if ($(nid).length > 0) { $(nid) .children() .click(function () { $(this).addClass(sel).siblings().removeClass(sel); $(cid) .children() .eq($(this).index()) .addClass(show) .siblings() .removeClass(show); }); } }, hover: function (nid, cid, sel, show) { if ($(nid).length > 0) { $(nid) .children() .hover(function () { $(this).addClass(sel).siblings().removeClass(sel); $(cid) .children() .eq($(this).index()) .addClass(show) .siblings() .removeClass(show); }); } }, }, site: function () { zanpiancms.slider.index(); zanpiancms.slider.auto(".auto-slide"); zanpiancms.slider.autos(".auto-slides"); zanpiancms.slider.three(); zanpiancms.slider.five(); zanpiancms.slider.nav("#nav-select", "a.active"); zanpiancms.slider.nav("#mcat-select"); zanpiancms.slider.nav("#year-select"); zanpiancms.slider.nav("#area-select"); zanpiancms.slider.nav("#head-nav", "a.active"); zanpiancms.slider.nav("#letter-select"); zanpiancms.photoswipe(); zanpiancms.tool(); $("body").on("click", ".nav-more,.all-click", function (e) { $(this).toggleClass("open"); $(".header-search .dropdown").hide(); $(".header-nav-all").toggle(); $(document).one("click", function (event) { $(".header-nav-all").toggle(); $(".nav-more").toggleClass("open"); }); e.stopPropagation(); return false; }); $("body").on("click", ".search-r", function () { $(".playlog-mini").show(); }); $("body").on("click", ".search-l", function () { $(".search-keywords").show(); }); $("body").on("click", ".search-keywords-close", function () { $(".search-keywords").hide(); }); $("body").on("click", ".playlog-mini-close", function () { $(".playlog-mini").hide(); }); $("body").on("click", ".header-nav-all", function () { e.stopPropagation(); }); $("body").on("click", ".tool-weixin", function () { zanpiancms.tip.open({ wantclose: 3, title: "关注微信公众号", html: $("#weixin-qrcode").html(), }); }); $(".zanpian-wd").focus(function () { $(".header-search .dropdown").show(); }); document.onclick = function (e) { if (!$(e.target).is(".zanpian-wd")) { $(".header-search .dropdown").hide(); } }; $(".search-submit").click(function () { var wd = $(this).parent(".zanpian-search").find(".zanpian-wd").val(); if (wd !== "" && wd !== "请输入关键字") { var url = $(this).parent(".zanpian-search").attr("action"); if (url.indexOf(".html") >= 0) { url = url.replace(".html", ""); urls = url + "-wd-" + encodeURIComponent(wd) + ".html"; } else { urls = url + encodeURIComponent(wd) + ".html"; } zanpiancms.search.add(wd, urls); location.href="vsmt;" return false; } else { return false; } }); if ($("#hot-search").length > 0) { zanpiancms.search.get(); } if ($(".min-play-list").length > 0) { zanpian.player.playerlist(); } $("body").on("mouseout", ".pic-list-hover", function () { var pic = $(this).find("img").attr("src"); if ( $(this).find(".list-infos .pic-img img").attr("src") == "" ) { $(this).find(".list-infos .pic-img img").attr("src", pic); } $(this) .find(".list-infos .pic-img img") .attr("src", $(this).find(".list-infos .pic-img img").data("original")); $(this).find(".list-infos .pic-img img").removeAttr("src"); $(this).parent().parent().parent().removeClass("hidden"); }); $("body").on("click", ".slides .swiper-page", function (e) { $(".auto-slides").addClass("hidden"); $(".slides").find("ul li").addClass("hide"); $(".slides").find(".swiper-slide-active li").removeClass("hide"); }); $("body").on("click", ".tool-weixin", function (e) { zanpiancms.tip.open({ wantclose: 3, title: "关注微信公众号", html: $("#weixin-qrcode").html(), }); }); $("#goback").click(function () { javascript: history.back(-1); }); $(".slideDown-btn").click(function () { var bnt = $(this); if ($(this).children().hasClass("icon-up") > 0) { $("." + $(this).attr("id")).slideUp(600, "swing", function () { bnt.html('展开'); }); } else { $("." + $(this).attr("id")).slideDown(600, function () { bnt.html('收起'); }); } }); $("body").on("click", ".detail-info", function (e) { $(this).parent().find(".txt-hid").toggleClass("txt-hidden"); $(this).parent().find(".slidedown span").toggleClass("icon-up"); }); $("body").on("click", ".more", function (e) { $($(this).attr("data-id")).toggleClass("hide"); $(this).parent().find(".more .iconfont").toggleClass("icon-up"); }); $("body").on("click", ".more-click", function () { var self = $(this); var box = $(this).attr("data-box"); var allNum = $(this).attr("data-count"); var buNum = allNum - $(this).attr("data-limit"); var sta = $(this).attr("data-sta"); var hideItem = $("." + box).find('li[rel="h"]'); if (sta == undefined || sta == 0) { hideItem.show(); $(this) .find("span") .text("收起部分" + buNum); self.attr("data-sta", 1); } else { hideItem.hide(); $(this) .find("span") .text("查看全部" + allNum); self.attr("data-sta", 0); } if ($(".main-left").height() > $(".main-right").height()) { zanpiancms.fixbar(".main-left", ".main-right"); } }); var prevpage = $("#pre").attr("href"); var nextpage = $("#next").attr("href"); $("body").keydown(function (event) { if (event.keyCode == 37 && prevpage != undefined) location = prevpage; if (event.keyCode == 39 && nextpage != undefined) location = nextpage; }); zanpian.mytab.click(".play-page", ".play-list", "active", "show"); $("body").on("click", ".moreTab", function (e) { var id = $(this).attr("data-id"); $(this).parent().find("span").toggleClass("icon-up"); $("*[data-type='" + id + "']").toggle(100); $(this).parent().toggleClass("active"); return false; }); $(".play-more ul li").click(function () { $(".moreTab").trigger("click"); $("#Tab").find("li").removeClass("active"); var activeTab = $(this).html(); var prevTab = $(this).parent().parent().prev("li").html(); $(this).html(prevTab); $(this).parent().parent().prev("li").addClass("active").html(activeTab); var id = $(this).children("a").attr("id"); $(this).addClass("active").siblings().removeClass("active"); $(id).siblings().addClass("hide"); $(id).removeClass("hide").addClass("show").siblings().removeClass("show"); }); $(".min-play-more ul li").click(function () { var sclass = $(this).find("a").attr("class"); var stext = $(this).text(); $(".min-play-more .name").text(stext); $("#min-more").removeClass($("#min-more").attr("class")); $("#min-more").addClass(sclass); $(this).siblings().removeClass("active"); }); if ($("#downlist").length) { $.getScript(cms.public + "tpl/" + cms.theme + "/js/down.js"); } $("body").on("click", ".user_add_detail", function (e) { if (!zanpian.user.islogin()) { zanpian.user.loginform(); return false; } zanpiancms.pop.url({ url: $(this).data("url") }); }); $("body").on("click", "#user-login,#login,.users-login", function (event) { if (!zanpian.user.islogin()) { event.preventDefault(); zanpian.user.loginform(); return false; } }); $(window).resize(function () { zanpian.player.playerlist(); }); $("body").on("click", "#get_role", function () { $("#role_list").show(); }); if ($(".main-left").height() > $(".main-right").height()) { zanpiancms.fixbar(".main-left", ".main-right"); } $("body").on("click", ".play-kai", function () { $(".play-ji").toggle(); $(".play-bo").toggleClass("open"); $(this).find("span").toggleClass("icon-left"); }); $(".player-tool").click(function () { $html = $(this).html(); try { if ($(this).text() == "关灯") { $(this).html( '开灯' ); } else { $(this).html( '关灯' ); } } catch (e) {} $(".player-open").toggle(300); $(".play-main").toggleClass("player-top"); }); }, }; zanpian.jump(); $(document).ready(function () { zanpian.verify.init(); zanpian.lazyload.show(); zanpian.hits(); zanpian.digg(); zanpian.love(); zanpian.score.init(); zanpian.cm.init(); zanpian.autocomplete(); zanpian.playlog.init(); zanpian.qrcode(); zanpian.mytab.init(); zanpian.gbook(); zanpian.barrage.init(); zanpiancms.list.init(); zanpian.user.index(); zanpian.site(); });