"use strict"; var Config = { title: "陕西广电融媒体集团", logoUrl: "http://zyx-data-base.oss-cn-beijing.aliyuncs.com/img/logonew2.png", baseUrl: "http://zyx-data-base.oss-cn-beijing.aliyuncs.com" }; document.title = Config.title; $(".proName").append($("" + Config.title + "")); var pageName = getPageName(); if (/skeleton/.test(pageName) && !localStorage.login) { location.href = "./index.html"; } function getPageName() { var pathList = location.href.split('/'); return pathList[pathList.length - 1]; } function showAlert(text, s) { var ele = $("
" + text + "
"); $(document.body).prepend(ele); var timeout; timeout = window.setTimeout(function () { window.clearTimeout(timeout); $("#local-alert").addClass("fadeOutRightBig animated infinite"); timeout = window.setTimeout(function () { window.clearTimeout(timeout); $("#local-alert").remove(); }, 500); }, s || 2000); } function createTable(ele, theadList, list) { $(ele + " .localtable").remove(); var pele = $(ele); var table = $("
"); var thead = $(""); var tbody = $(""); var trHead = $(""); var theadListL = theadList || []; var listL = list || []; theadListL.map(function (v, i) { var td = $("" + v.title + ""); trHead.append(td); }); listL.map(function (v, o) { var className = o % 2 === 1 ? "oddRow" : ""; var trBody = $(""); theadListL.map(function (titleI) { var val = titleI.value === "#index" ? o + 1 : v[titleI.value]; titleI.formatValue && (val = titleI.formatValue(val)); var td = $("" + val + ""); trBody.append(td); }); tbody.append(trBody); }); thead.append(trHead); table.append(thead); table.append(tbody); pele.append(table); } function createPager(totalPage, pageIndex, pele, section) { $("nav.localnavigation").remove(); var sectionReal = section || 2; var nav = $(""); var ul = $(""); var next = $('
  • '); var minPage = pageIndex - sectionReal > 1 ? pageIndex - sectionReal : 1; var maxPage = pageIndex + sectionReal < totalPage ? pageIndex + sectionReal : totalPage; if (minPage !== 1) { ul.append($("
  • 1
  • ")); ul.append($("
  • ...
  • ")); } for (var i = minPage; i <= maxPage; i++) { var li = $("
  • " + i + "
  • "); ul.append(li); } if (maxPage !== totalPage) { ul.append($("
  • ...
  • ")); ul.append($("
  • " + totalPage + "
  • ")); } ul.append(next); nav.append(ul); $(pele).append(nav); }