= 0) {
$(this).attr("href", $(this).attr("data-url"));
} else {
$(this).attr("href", "http://www.sanya.gov.cn" + $(this).attr("data-url"));
}
})
}
function loadGWYData (channelCode, num) {
var protocol = window.location.protocol;
$.ajax({
url: protocol + '//www.gov.cn/pushinfo/v150203/pushinfo.jsonp',
data: {
time: timestamp
},
dataType: "jsonp",
scriptCharset: 'UTF-8',
jsonp: "pushInfoJsonpCallBack",
jsonpCallback: "pushInfoJsonpCallBack",
success: function (data) {
// 鏇挎崲棣栭〉鈥滃浗鍔¢櫌淇℃伅鈥濅腑鐨勬暟鎹
// $("#gjxx").append("鈥↑/span>涔犺繎骞冲悜2022骞翠腑鍥藉浗闄呮湇鍔¤锤鏄撲氦鏄撲細鑷磋春淇狘/a> ");
// $("#gjxx").append("鈥↑/span>鏉庡厠寮轰富鎸佸彫寮€鍥藉姟闄㈠父鍔′細璁 鍚彇绋充綇缁忔祹澶х洏鐫e鍜屾湇鍔?.. ");
$.each(data, function (i, json) {
if (i >= num) {
return false;
}
if (channelCode == '') {
$("#gjxx").append("鈥↑/span>" + (json.title.length >
28 ? json.title.substr(0, 27) + '...' : json.title) + "")
} else if (channelCode == 'new' || channelCode == 'xwzx') {
$("#gwyyw").append("" + (json.title
.length > 15 ? json.title.substr(0, 15) + '...' : json.title) + "")
}
});
},
error: function () { }
});
}
function loadZhengWu () {
var xkgsURL = $('.xkgsURL').attr('href');
var cfgsURL = $('.cfgsURL').attr('href');
if (xkgsURL && cfgsURL) $('.sgsCutOff').show();
$('.sgs').mouseover(function () {
$('.sgs').removeClass('def');
$(this).addClass('def');
if ($(this).hasClass('xkgs')) {
$('.xkjg').text('璁稿彲鍐冲畾涔︽枃鍙凤細').removeClass('cfwsh');
$('#xzxkList').show();
$('#xzcfList').hide();
} else if ($(this).hasClass('cfgs')) {
$('.xkjg').text('澶勭綒鍐冲畾涔︽枃鍙凤細').addClass('cfwsh');
$('#xzxkList').hide();
$('#xzcfList').show();
}
});
}
function getDHJSONP (url, jsonpCallbackMethodName, successFunc) {
$.ajax({
type: 'GET',
url: url,
dataType: "jsonp",
jsonp: "JsonpCallBack",
jsonpCallback: jsonpCallbackMethodName,
success: function (data) {
successFunc(data);
}
});
}
/*鏈€鏂颁俊鎭叕寮€*/
function showZXGK () {
getDHJSONP(UrlObj["zxgk"], "ztzpCallBack", function (data) {
zxgkList = data.list;
var $zxgkList = $("#zxgkList");
$zxgkList.html(template(TplObj["zxgk"], zxgkList));
$zxgkList.find("a").each(function (index, item) {
$(this).attr("href", $(this).attr("data-url"));
});
});
}
/*function loadFuWu(num){
$.getJSON('/b/api/zwzx/zwfw2/'+SiteConfig.zwzx_deptcode+'.json',{time:timestamp}, function(data){
zwfwList = data.data.datas.slice(0,num);
$("#zwfwList").html(template(TplObj.zwfw, zwfwList));
$('.isonline').each(function(i, n){
$(this).attr('href',$(this).attr('data-url'));
});
$("#zwfwList li").each(function(i, n){
var url = 'http://zwzx.sanya.gov.cn/zwzxsite/bmfl/n_work_detail.shtml?code='+ zwfwList[i].code;
$(this).find('.fwsxTit').attr("href",url);
});
});
}*/
// function loadFuWu (end, start) {
// $.getJSON('/api/zwzx/sx2020/' + SiteConfig.zwzx_bszn + '.json', {
// time: timestamp
// }, function (data) {
// start = start ? start : 0;
// end = end ? end : data.data.datas.length;
// zwfwList = data.data.datas.slice(start, end);
// if (!isPaginationInited && channelCode == '') {
// $("#Pagination").pagination(data.data.datas.length, {
// num_edge_entries: 0,
// num_display_entries: 4,
// link_to: "javascript:;",
// callback: function pageselectCallback (page_index, jq) {
// if (isPaginationInited) {
// loadFuWu((page_index + 1) * 5, page_index * 5);
// }
// },
// items_per_page: 5,
// prev_text: "涓婁竴椤?,
// next_text: "涓嬩竴椤?
// });
// isPaginationInited = true;
// }
// $("#zwfwList").empty().html(template(TplObj.zwfw, zwfwList));
// $('.isonline').each(function (i, n) {
// $(this).attr('href', $(this).attr('data-url'));
// });
// $("#zwfwList li .fwsxTit").each(function (i, n) {
// $(this).attr("href", zwfwList[i].onlineUrl);
// });
// $("#Pagination").show();
// });
// }
function loadBSTJ () {
if (siteCode != 'sjjsite') {
var allSite = {
"sthjsite": '涓変簹甯傜敓鎬佺幆澧冨眬',
"fgwsite": '涓変簹甯傚彂灞曞拰鏀归潻濮斿憳浼?,
"nyjsite": '涓変簹甯傚啘涓氬啘鏉戝眬',
"czjsite": '涓変簹甯傝储鏀垮眬',
"rsjsite": '涓変簹甯備汉鍔涜祫婧愬拰绀句細淇濋殰灞€',
"wjwsite": '涓変簹甯傚崼鐢熷仴搴峰鍛樹細',
"gajsite": '涓変簹甯傚叕瀹夊眬',
"zjjsite": '涓変簹甯備綇鎴垮拰鍩庝埂寤鸿灞€',
"jtjsite": '涓変簹甯備氦閫氳繍杈撳眬',
"zhxzjsite": '涓変簹甯傜患鍚堣鏀挎墽娉曞眬',
"lyjsite": '涓変簹甯傛灄涓氬眬',
"tjjsite": '涓変簹甯傜粺璁″眬',
"swjsite": '涓変簹甯傚晢鍔″眬',
"xfjsite": '涓変簹甯傚叕瀹夋秷闃叉敮闃?,
"zgjsite": '涓変簹甯傝嚜鐒惰祫婧愬拰瑙勫垝灞€',
"wljsite": '涓変簹甯傛梾娓稿拰鏂囧寲骞跨數浣撹偛灞€',
"jyjsite": '涓変簹甯傛暀鑲插眬'
};
var nowdays = new Date();
var year = nowdays.getFullYear();
var month = nowdays.getMonth();
if (month == 0) {
month = 12;
year = year - 1;
}
if (month < 10) {
month = "0" + month;
}
var firstDayOfPreMonth = year + "-" + month + "-" + "01"; //涓婁釜鏈堢殑绗竴澶
siteCode == "jyjsite" ? firstDayOfPreMonth = '2019-10-01' : firstDayOfPreMonth = firstDayOfPreMonth;
var lastDay = new Date(year, month, 0);
var lastDayOfPreMonth = year + "-" + month + "-" + lastDay.getDate(); //涓婁釜鏈堢殑鏈€鍚庝竴澶
siteCode == "jyjsite" ? lastDayOfPreMonth = '2019-10-30' : lastDayOfPreMonth = lastDayOfPreMonth;
var bstjChart = echarts.init(document.getElementById('bstjChart'));
$.ajax({
type: 'GET',
url: '/api/g/zwzx/countAgent',
data: {
start: firstDayOfPreMonth,
end: lastDayOfPreMonth,
agent: allSite[siteCode],
type: 'day'
},
success: function (data) {
if (data.data.length > 0) {
var bstjData = data.data,
xAxisData = [],
seriesAcceptData = [],
seriesFinishData = [];
for (var key in bstjData) {
xAxisData.push(bstjData[key].date);
seriesAcceptData.push(bstjData[key].accept);
seriesFinishData.push(bstjData[key].finish);
}
var option = {
title: {
text: (allSite[siteCode] == '涓変簹甯傚叕瀹夋秷闃叉敮闃? ? '涓変簹甯傛秷闃叉敮闃? : allSite[siteCode]) + '鍔炰簨缁熻鏁版嵁',
x: 'center',
top: 20
},
legend: {
orient: 'horizontal',
bottom: 'bottom',
data: [{
name: '鍙楃悊'
},
{
name: '鍔炵粨'
}
]
},
toolbox: {
// y: 'bottom',
top: 20,
right: 100,
feature: {
magicType: {
type: ['stack', 'tiled']
},
dataView: {},
saveAsImage: {
pixelRatio: 2
}
}
},
tooltip: {},
xAxis: {
type: 'category',
data: xAxisData
},
yAxis: {},
// Declare several bar series, each will be mapped
// to a column of dataset.source by default.
series: [{
type: 'bar',
name: '鍙楃悊',
data: seriesAcceptData
}, {
type: 'bar',
name: '鍔炵粨',
data: seriesFinishData
}]
};
bstjChart.setOption(option);
} else if (data.data.length == 0) {
$('#bstj').html(
'鍥犳湰鍗曚綅鏀垮姟鏈嶅姟浜嬮」杈冨皯锛岃繎涓€骞存潵鏈敹鍒扮浉鍏充簨椤瑰姙鐞嗚瘔姹傦紝鏁呮棤鍔炰簨缁熻鏁版嵁灞曠ず銆侟/div>'
);
}
},
error: function () { }
});
}
}
/*鎰忚寰侀泦*/
function loadYJZJData (PageSize, pageIndex) {
$.ajax({
type: 'POST',
url: UrlObj['yjzj'],
data: {
page: pageIndex,
pageSize: PageSize
},
dataType: "json",
success: function (data) {
yjzjList = data.list;
if (!isPaginationInited && channelCode == 'yjzj') {
$("#Pagination").pagination(data.totalRow, {
num_edge_entries: 0,
num_display_entries: 6,
callback: function pageselectCallback (page_index, jq) {
if (isPaginationInited) {
loadYJZJData(15, page_index + 1);
}
},
items_per_page: 15,
prev_text: "涓婁竴椤?,
next_text: "涓嬩竴椤?
});
isPaginationInited = true;
}
$("#yjzjList").html(template(TplObj.yjzj, yjzjList));
$("#yjzjList").find("a").each(function (i, n) {
var zjlb = yjzjList[i].type == 1 ? 'yjzj' : 'wsdc';
$(this).attr("href", '/u/solicitation/showPage/' + $(this).attr("data-id") + '?id=' + $(this).attr("data-id") + '&zjlb=' + zjlb);
});
$("#Pagination").show();
}
});
}
/*鑾峰彇鍙屽叕绀鸿矾寰勫弬鏁?/
function getRequestParams () {
var url = window.location.search;
var theRequest = {};
var str = url.substr(1),
strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = strs[i].split("=")[1];
}
return theRequest;
}
for (var i = 0; i < document.links.length; i++) {
var url = document.links[i].href.toLowerCase();
if (url.indexOf("gov.cn") == -1 && url != "#" && url.indexOf('javascript') == -1 && url.indexOf('#top') == -1 && !
document.links[i].onclick) {
document.links[i].onclick = function () {
return confirm("鎮ㄨ闂殑閾炬帴鍗冲皢绂诲紑闂ㄦ埛缃戠珯锛屾槸鍚︾户缁紵")
};
}
}
function loadSZRX (num) {
$.getJSON(SiteConfig.szrx, function (data) {
fwrxList = data.data.wpInfos.slice(0, num);
var $fwrxListElem = $("#fwrxList");
$fwrxListElem.html(template(TplObj.fwrx, fwrxList));
$fwrxListElem.find("a").each(function (i, n) {
if (siteCode != 'sjjsite') {
var url = '/' + siteCode + '/tszx/wpdetailed.shtml?no=' + fwrxList[i].wpid;
$(this).attr("href", url);
} else {
var url = 'http://12345.sanya.gov.cn/12345/tszx/wpdetailed.shtml?no=' + fwrxList[i].wpid;
$(this).attr("href", url);
}
});
// $fwrxListElem.html(sortAndProp($('#fwrxList li'),6));
});
$.getJSON('/api/szrx/stat/' + SiteConfig.szrx_deptid + '.json', function (data) {
var tjData = data.obj;
$('.dayFinish').text(tjData.dayFinish);
$('.dayPhone').text(tjData.dayPhone);
$('.monthFinish').text(tjData.monthFinish);
$('.monthPhone').text(tjData.monthPhone);
$('.yearFinish').text(tjData.yearFinish);
});
}
// function loadVideo1(width, height) {
// $.getJSON('/api/newsvideo.json?time=' + timestamp, function(data) {
// var website = "http://www.zaity.tv";
// var video = website + data.video;
// var img = website + data.img;
// // img = encodeURIComponent('http://www.sanya.gov.cn/b/sys/getImage?width=400&height=270&url='+img);
// // $("#myNews").text("20"+data.title.trim());
// var s1 = new SWFObject("/default/xhtml/new/flvplayer.swf", "single", width, height, "7");
// s1.addParam("allowfullscreen", "true");
// s1.addVariable("file", video);
// s1.addVariable("image", img);
// s1.addVariable("width", width);
// s1.addVariable("height", height);
// s1.write("player1");
// });
// }
// 缁煎悎琛屾斂鎵ф硶灞€鐨勬満鏋勪粙缁嶉〉闈腑淇敼鑱旂郴鏂瑰紡妯″潡
if (siteCode == "zhxzjsite" && channelCode == "jgzz") {
$(".box1 .adressList.list li").eq(1).after("
鎶曡瘔鐢佃瘽锛 0898-88595007淇¤鐢佃瘽锛 0898-88595130灞€闀垮姙鍏數璇濓細 0898-88036889");
$(".jgznBox").css("cssText", "height:891px;");
$(".znContent").css("cssText", "height:775px;");
$(".box1").eq(1).css("cssText", "height:530px;");
$(".box1 .adressList.list").append("鍔冲姩淇濋殰鐩戝療鎶曡瘔鐢佃瘽锛?898-88275975锛堝湴鍧€锛氫笁浜氬競鍚夐槼杩庡璺?83鍙?3锛堻/li>");
}
// 鏇存敼椤甸潰涓潰鍖呭睉棣栭〉鐨勯摼鎺
$(".crumbs a:eq(0)").attr("href", window.location.protocol + "//" + window.location.host);
$(".wz a:eq(0)").attr("href", window.location.protocol + "//" + window.location.host);
// 浜哄ぇ寤鸿鍜屾斂鍗忔彁妗
function loadRDZX(){
var rdzxSites = [
"zjjsite",
"fgwsite",
"jyjsite"
];
if (rdzxSites.indexOf(siteCode) != -1) {
$(".hdrdjy").attr("href","/" + siteCode + "/rdjy/list2.shtml");
$(".hdzxta").attr("href","/" + siteCode + "/zxta/list2.shtml");
}
}
// title鏍囩鍙栫函鏂囨湰
var titleTag = $("head title").text();
var regex = /<\/?.+?\/?>/gm;
var subst = '';
var result = titleTag.replace(regex, subst);
$("head title").text(result);
});
// function loadVideo() {
// $.getJSON('/api/newsvideo.json?time=' + timestamp, function(data) {
// var website = "http://www.zaity.tv";
// var video = website + data.video;
// var img = website + data.img;
// var videoObject = {
// container: '#video',//鈥?鈥濅唬琛ㄥ鍣ㄧ殑ID锛屸€?鈥濇垨鈥溾€濅唬琛ㄥ鍣ㄧ殑class
// variable: 'player',//璇ュ睘鎬у繀闇€璁剧疆锛屽€肩瓑浜庝笅闈㈢殑new chplayer()鐨勫璞
// poster:img,//灏侀潰鍥剧墖
// video:video//瑙嗛鍦板潃
// };
// var player=new ckplayer(videoObject);
// });
// }
function lunbo (className) {
var mySwiper = new Swiper('.' + className, {
pagination: '.swiper-pagination',
autoplay: 4000,
loop: true,
grabCursor: true,
autoplayDisableOnInteraction: false,
paginationClickable: true,
onInit: function (swiper) {
$("." + className + " ul,." + className + " ul li,." + className).css("height", $("." + className +
" ul li img:eq(0)").height())
}
})
$('.prev').on('click', function (e) {
e.preventDefault()
mySwiper.swipePrev()
})
$('.next').on('click', function (e) {
e.preventDefault()
mySwiper.swipeNext()
})
}
$("div.box3.hide").each(function () {
if ($(this).children("ul:has(li)").length > 0) {
$(this).show();
}
});