//=== viewid:dh_style_36_1634797963483 ===// /*pc,鎵嬫満鏄剧ず闅愯棌*/ function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } $(function(){ $("#dh_style_36_1634797963483 li").each(function(){ }); }) //=== viewid:dh_style_36_1634797963483 ===// function navSwtich(obj) { $(obj).siblings(".menuUlCopy").slideToggle(200); $(obj).toggleClass('ontoggle'); $(obj).parent().siblings().find(".menuUlCopy").slideUp(200); $(obj).parent().siblings().find(".fa-angle-down").removeClass('ontoggle'); } function subLeft_dh_style_36_1634797963483(){ $("#dh_style_36_1634797963483 .menuUl>li").each(function(){ $(this).find(".menuUl03").css("left",'100%'); }) } $(window).resize(function() { subLeft_dh_style_36_1634797963483(); }) $(function(){ $("#dh_style_36_1634797963483 .fa-navicon").click(function(){ $("#dh_style_36_1634797963483 .menuUlCopy").each(function(){ $(this).siblings(".fa").show(); }) }) subLeft_dh_style_36_1634797963483(); $("#dh_style_36_1634797963483 .subBox").css("top",$("#dh_style_36_1634797963483 .menuUl_box").height()); if($("#dh_style_36_1634797963483 .menuUl").hasClass("noHover")){ var tabNum = 0; $("#dh_style_36_1634797963483 .menuUl>li").find(".Onsub").each(function(){ tabNum += 1; $(this).parent().attr("tabNum",tabNum) }) $("#dh_style_36_1634797963483 .menuUl>li .Onsub").mouseover(function(){ $("#dh_style_36_1634797963483 .subBox").show(); var index = $(this).parent().attr("tabNum"); $("#dh_style_36_1634797963483 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide(); $("#dh_style_36_1634797963483 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide(); }) $("#dh_style_36_1634797963483 .subBox").mouseleave(function(){ $(this).hide(); }); $("#dh_style_36_1634797963483 .menuUl>li .Nosub").mouseover(function(){ $("#dh_style_36_1634797963483 .subBox").hide(); }) //椋庢牸41 42 } }) //=== viewid:newsDetail_style_01_1506318095542 ===// /* * @Author:L.Tap * @Description: 绀句細鍖栧垎浜 */ (function($, window, document, undefined) { //鎻掍欢鍒濆鍖 function init(target, options) { var settings = $.extend({}, $.fn.socialShare.defaults, options); console.log(target); //$(target).find('.wechat_qrcode').find('img').attr('src','http://zixuephp.net/inc/qrcode_img.php?url='+options.url); $(target).find('.wechat_qrcode').find('img').attr('src','http://bshare.optimix.cn/barCode?site=weixin&type=0&publisherUuid=&url='+options.url); //娣诲姞鑵捐寰崥鍒嗕韩浜嬩欢 $(document).on("click",".msb_network_button.tQQ",function(){ tQQ(this,settings); }); //娣诲姞QQ绌洪棿鍒嗕韩浜嬩欢 $(document).on("click",".msb_network_button.qZone",function(){ qZone(this,settings); }); //娣诲姞鏂版氮寰崥鍒嗕韩浜嬩欢 $(document).on("click",".msb_network_button.sina",function(){ sinaWeibo(this,settings); }); //娣诲姞璞嗙摚鍒嗕韩浜嬩欢 $(document).on("click",".msb_network_button.douban",function(){ doubanShare(this,settings); }); //娣诲姞寰俊鍒嗕韩浜嬩欢 $(document).on("click",".weixin",function(){ // weixinShare(this,settings); //$(this).find('.wechat_qrcode').toggle(); }); } function replaceAPI (api,options) { api = api.replace('{url}', options.url); api = api.replace('{title}', options.title); api = api.replace('{content}', options.content); api = api.replace('{pic}', options.pic); return api; } function tQQ(target,options){ var options = $.extend({}, $.fn.socialShare.defaults, options); window.open(replaceAPI(tqq,options)); } function qZone(target,options){ var options = $.extend({}, $.fn.socialShare.defaults, options); window.open(replaceAPI(qzone,options)); } function sinaWeibo(target,options){ var options = $.extend({}, $.fn.socialShare.defaults, options); window.open(replaceAPI(sina,options)); } function doubanShare(target,options){ window.open(replaceAPI(douban,$.extend({},$.fn.socialShare.defaults,options))); } function weixinShare(target,options){ window.open(replaceAPI(weixin,$.extend({},$.fn.socialShare.defaults,options))); } $.fn.socialShare = function(options, param) { if(typeof options == 'string'){ var method = $.fn.socialShare.methods[options]; if(method) return method(this,param); }else init(this,options); } //鎻掍欢榛樿鍙傛暟 $.fn.socialShare.defaults = { url: window.location.href, title: document.title, content: '', pic: '' } //鎻掍欢鏂规硶 $.fn.socialShare.methods = { //鍒濆鍖栨柟娉 init:function(jq,options){ return jq.each(function(){ init(this,options); }); }, tQQ:function(jq,options){ return jq.each(function(){ tQQ(this,options); }) }, qZone:function(jq,options){ return jq.each(function(){ qZone(this,options); }) }, sinaWeibo:function(jq,options) { return jq.each(function(){ sinaWeibo(this,options); }); }, doubanShare:function(jq,options) { return jq.each(function(){ doubanShare(this,options); }); }, weixinShare:function(jq,options){ return jq.each(function(){ weixinShare(this,options); }); } } //鍒嗕韩鍦板潃 var qzone = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={url}&title={title}&pics={pic}&summary={content}'; var sina = 'http://service.weibo.com/share/share.php?url={url}&title={title}&pic={pic}&searchPic=false'; // var tqq = 'http://share.v.t.qq.com/index.php?c=share&a=index&url={url}&title={title}&appkey=801cf76d3cfc44ada52ec13114e84a96'; var tqq = 'https://connect.qq.com/widget/shareqq/index.html?url={url}&title={title}&pics={pic}&desc='; var douban = 'http://www.douban.com/share/service?href={url}&name={title}&text={content}&image={pic}'; //var weixin = 'http://zixuephp.net/inc/qrcode_img.php?url={url}'; var weixin = 'http://bshare.optimix.cn/barCode?site=weixin&type=0&publisherUuid=&url={url}'; })(jQuery, window, document); // var content_div = ''; // var show_div = ''; // var flag=""; // var lang=""; // var show_style=""; // var page_length = ""; var content_length = 0; var page_num = 1; var start_flag = 0; var end_flag = 0; var content_arr = ''; // var total_lenth = 0; // var page_count = 0; function getPage(hideNewsContent) { if(flag == 2){ var content = $(hideNewsContent).html(); content_arr = content.split(/]*>/); page_count = content_arr.length; } else{ total_lenth = $(hideNewsContent).text().trim().length; page_count = Math.ceil(total_lenth / page_length); content_arr = $(hideNewsContent).html(); } $(hideNewsContent).empty(); } function goto(page,newsText,view_id,obj='', showAllText = '') { if(obj && !newsText && !view_id){ view_id = $(obj).parents('.newsDetail').attr("id"); newsText = '#'+view_id+' .newsText.contSet'; } if(page != -1 && !is_login && need_check_login == 1){ checkLogin(); } if(page == -1 || is_login || need_check_login == 0){ content_length = 0; start_flag = 0; end_flag = 0; if(page < 1) page_num = 1; else if(page > page_count) page_num = page_count; else page_num = page; if(flag == 1){ $(newsText).html(content_arr); getChildren(newsText); } else{ $(newsText).html(content_arr[page_num - 1]); } pagebutton(newsText, view_id, showAllText); if(page != -1){ location.href = newsText; } setDivHeight(newsText) } } function getChildren(el) { var child = $(el).children(); if(child.length > 0){ child.each(function () { if(end_flag == 1) return false; content += $(this).contents().filter(function() { return this.nodeType === 3; }).text(); content_length += $(this).contents().filter(function() { return this.nodeType === 3; }).text().length; //鑾峰彇涓婁竴椤电粨灏 if(start_flag == 0 && content_length >= (page_num - 1) * page_length){ var parents = $(this).parentsUntil(el); start_flag = 1; var need_length = content_length - ((page_num - 1) * page_length); //灏嗗綋鍓嶉〉寮€澶村埌涓婁竴椤电粨灏句负姝㈠鍑烘潵鐨勫唴瀹瑰幓鎺 if(need_length > 0){ var now_html = $(this).html(); var now_text_length = $(this).contents().filter(function() { return this.nodeType === 3; }).text().length; now_html = now_html.substring(now_text_length - need_length, now_html.length); $(this).html(now_html); } parents.each(function () { $(this).prevAll().remove(); }); } //鑾峰彇褰撳墠椤电粨灏 if(content_length >= page_num * page_length){ var parents = $(this).parentsUntil(el); var need_length = content_length - (page_num * page_length); if(need_length == 0){ parents.each(function () { $(this).nextAll().remove(); }); } else{ var now_text = $(this).contents().filter(function() { return this.nodeType === 3; }).text(); var need_text = now_text.substring(0, now_text.length - need_length); $(this).text(need_text); parents.each(function () { $(this).nextAll().remove(); }); } end_flag = 1; return false; } else { var flag = getChildren(this); } }); } } function showAll() { if(need_check_login == 1){ checkLogin(); } if(is_login == true || need_check_login == 0){ $('.news_pagination').remove(); if(flag == 2){ $(show_div).html(content_arr.join('')); } else{ $(show_div).html(content_arr); } location.href = show_div; setDivHeight(show_div) } } function pagebutton(newsText,view_id, showAllText = '') { $('#'+view_id+' .news_pagination').remove(); if (!showAllText) { showAllText = '鏄剧ず鍏ㄩ儴'; } var button_html = '
'; if(show_style == 1){ for(var i = 1; i <= page_count; i++){ if(i > page_count) break; if(i != page_num){ button_html += '` + i + ''; } else{ button_html += '' + i + ''; } } } else if(show_style == 2){ button_html += `'; } else { var show_button = page_count > 8 ? 8 : page_count; var button_text = 1; if(page_num > 5){ button_html += '<`; button_text = page_num - 4; } for(var i = 1; i <= show_button; i++){ if(button_text > page_count) break; if(button_text != page_num){ button_html += '` + button_text + ''; } else{ button_html += '' + button_text + ''; } button_text++; } if(page_num < page_count){ button_html += '>`; } } button_html += '' + showAllText + ''; button_html += '
'; $(newsText).after(button_html); } function checkLogin(errorText = '', loginText = '') { var serverUrl = '//' + diy_js_server + '/sysTools.php?mod=viewsConn&act=checkUserLogin&idweb=' + id_web; if (!errorText) { errorText = '浜诧紝鎮ㄥ繀椤荤櫥褰曚簡鎵嶅彲缁х画鏌ョ湅璇ユ枃绔?; } if (!loginText) { loginText = '椹笂鐧诲綍'; } //鑾峰彇鏁版嵁 xhrFields瑙e喅浼犺緭cookie闂 $.ajax({ type: 'get', cache: false, dataType: 'json', async: false, url: serverUrl, xhrFields: { withCredentials: true }, crossDomain: true, success: function(result){ if(result.is_login == false){ var fun_str = is_mobile() ? 'OnLogin(' + lang +', 0, \'' + location.href + '\')' : 'OnLogin(' + lang +', 0)'; var html = '
' + '
' + '
' + errorText + '锛? + '' + '
' + '
'; $('body').css({overflowY:'hidden',height:'100%'}); $('body').append(html); } else { is_login = true } } }); } function hideLogin() { $('.mustlogin').remove(); } //=== viewid:newsDetail_style_01_1506318095542 ===// detailHeightAuto("newsDetail_style_01_1506318095542", "璇︽儏鍔犺浇涓?); //=== viewid:footerCustom_footerDh_01_1634553807468 ===// $(function(){ if($("#footerCustom_footerDh_01_1634553807468 .menuUl").hasClass("noHover")){ var tabNum = 0; $("#footerCustom_footerDh_01_1634553807468 .menuUl>li").find(".Onsub").each(function(){ tabNum += 1; $(this).parent().attr("tabNum",tabNum) }) } }) //=== viewid:footerCustom_footerDh_01_1634553807468 ===// /*pc,鎵嬫満鏄剧ず闅愯棌*/ function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } function _checkWindwo(){ if(is_mobile()){ $("#footerCustom_footerDh_01_1634553807468 .showmobile").show(); $("#footerCustom_footerDh_01_1634553807468 .showpc").hide(); }else{ $("#footerCustom_footerDh_01_1634553807468 .showmobile").hide(); $("#footerCustom_footerDh_01_1634553807468 .showpc").show(); } } _checkWindwo(); $(window).resize(function() { _checkWindwo(); }) //=== viewid:copyright_style_01_1634268381705 ===//