//=== viewid:qqol_style_08_1683636143490 ===// $(function(){ if($('body').width() < 640){ // 是否苹果safari浏览器 var ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('applewebkit') > -1 && ua.indexOf('mobile') > -1 && ua.indexOf('safari') > -1 && ua.indexOf('linux') == -1 && ua.indexOf('android') == -1) { $('#qqol_style_08_1683636143490 .qq_view>a').each(function(){ let mobileHref = $(this).attr('mobilehref'); $(this).attr('href',mobileHref); }); }else if(ua.indexOf('baidu') > -1){ // PS:百度浏览器无法跳转qq的,因为百度内部屏蔽了跳转协议,为的是不让百度自己的流量窜到敌站。除非百度自己开放接口,否则无法解决。 $('#qqol_style_08_1683636143490 .qq_view>a').each(function(){ $(this).attr('href','javascript:;'); }); } // 选择颜色 $('#qqol_style_08_1683636143490 .info_view').each(function(){ $(this).click(function(){ $(this).find('.menu_con').toggle(); $(this).siblings().find('.menu_con').hide(); if($(this).find('.menu_ico').hasClass('mobile_ico_cur')){ $(this).find('.menu_ico').addClass('mobile_ico_notcur').removeClass('mobile_ico_cur'); }else{ $(this).find('.menu_ico').addClass('mobile_ico_cur').removeClass('mobile_ico_notcur'); } $(this).siblings().find('.menu_ico').addClass('mobile_ico_notcur').removeClass('mobile_ico_cur'); }); }); // 选择颜色 $('#qqol_style_08_1683636143490 .link_view').each(function(){ $(this).on('touchstart',function(){ $(this).siblings().find('.menu_con').hide(); $(this).find('.menu_ico').addClass('mobile_ico_cur').removeClass('mobile_ico_notcur'); $(this).siblings().find('.menu_ico').addClass('mobile_ico_notcur').removeClass('mobile_ico_cur'); }); $(this).on('touchend',function(){ $(this).find('.menu_ico').addClass('mobile_ico_notcur').removeClass('mobile_ico_cur'); }); }); }else{ $('#qqol_style_08_1683636143490 .main_li').hover(function(){ $(this).find('.menu_con').show(); $(this).siblings().find('.menu_con').hide(); },function(){}); $('#qqol_style_08_1683636143490 .main_li .menu_con').hover(function(){ $(this).show(); },function(){ $(this).hide(); }); } }) //=== viewid:qqol_style_08_1683636143490 ===// //购物车 if(typeof showcart !== 'function'){ function showcart(){ var langid = 0; if (langid==0 && BodyIsFt) langid = 1; if(window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767)){ location.href = "//s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&ismobile=1"; }else{ document.getElementById("boxName").innerHTML="查看购物车"; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src="//s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&v=9"; box.Show({width:'1000px', height:'600px'}); } } } //判断是否是手机,用于处理QQ电脑端及手机端链接不一致问题 var mobile_flag = isMobile(); if(mobile_flag){ $('#qqol_style_08_1683636143490 .qq_pc').hide(); $('#qqol_style_08_1683636143490 .qq_mobile').show(); } function isMobile() { var userAgentInfo = navigator.userAgent; var mobileAgents = [ "Android", "iPhone", "SymbianOS", "Windows Phone", "iPad","iPod"]; var mobile_flag = false; //根据userAgent判断是否是手机 for (var v = 0; v < mobileAgents.length; v++) { if (userAgentInfo.indexOf(mobileAgents[v]) > 0) { mobile_flag = true; break; } } var screen_width = window.screen.width; var screen_height = window.screen.height; //根据屏幕分辨率判断是否是手机 if(screen_width < 500 && screen_height < 800){ mobile_flag = true; } return mobile_flag; } //=== viewid:qqol_style_08_1683636143490 ===// // 对输入内容中的尖括号、引号等进行转义 function html_encode(str) { var s = ""; if (str.length == 0) return ""; s = str.replace(/&/g, "&"); s = s.replace(//g, ">"); s = s.replace(/ /g, " "); s = s.replace(/\'/g, "'"); s = s.replace(/\"/g, """); s = s.replace(/\n/g, "
"); return s; } function html_decode(str) { var s = ""; if (str.length == 0) return ""; s = str.replace(/&/g, "&"); s = s.replace(//g, ">"); s = s.replace(/ /g, " "); s = s.replace(/'/g, "\'"); s = s.replace(/"/g, "\""); s = s.replace(/
/g, "\n"); return s; } //=== viewid:dh_style_39_1700202391517 ===// /*pc,手机显示隐藏*/ function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } var is_mobile_boolean = is_mobile(); $(function(){ /*pc,手机显示隐藏*/ }) //=== viewid:dh_style_39_1700202391517 ===// 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_39_1700202391517(){ $("#dh_style_39_1700202391517 .menuUl>li").each(function(){ $(this).find(".menuUl03").css("left",'100%'); }) } $(window).resize(function() { subLeft_dh_style_39_1700202391517(); }) $(function(){ $("#dh_style_39_1700202391517 .fa-navicon").click(function(){ $("#dh_style_39_1700202391517").addClass('clearTransform'); $("#dh_style_39_1700202391517 .menuUlCopy").each(function(){ $(this).siblings(".fa").show(); }) }) subLeft_dh_style_39_1700202391517(); $("#dh_style_39_1700202391517 .subBox").css("top",$("#dh_style_39_1700202391517 .menuUl_box").height()); if($("#dh_style_39_1700202391517 .menuUl").hasClass("noHover")){ var tabNum = 0; $("#dh_style_39_1700202391517 .menuUl>li").find(".Onsub").each(function(){ tabNum += 1; $(this).parent().attr("tabNum",tabNum) }) $("#dh_style_39_1700202391517 .menuUl>li .Onsub").mouseover(function(){ $("#dh_style_39_1700202391517 .subBox").show(); var index = $(this).parent().attr("tabNum"); $("#dh_style_39_1700202391517 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide(); $("#dh_style_39_1700202391517 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide(); }) $("#dh_style_39_1700202391517 .subBox").mouseleave(function(){ $(this).hide(); }); $("#dh_style_39_1700202391517 .menuUl>li .Nosub").mouseover(function(){ $("#dh_style_39_1700202391517 .subBox").hide(); }) //风格41 42 } }) //=== viewid:lang_style_1_1709694073480,lang_style_14_1709694344920,video_style_02_1699926344214 ===// $(document).ready(function(){ }); //=== viewid:newsDetail_style_01_1506318095542 ===// // 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解决传输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 ===// //-- $(function(){ var viewid="newsDetail_style_01_1506318095542"; var sys_url="viewid=newsDetail_style_01_1506318095542&name=newsDetail&style=style_01&langid=0&pageid=578957&viewCtrl=newsDetail&isfb=1"; var moreParams=''; if(typeof(history.pushState) != 'undefined'){ var hstate=JSON.stringify(history.state); if(hstate!='null'&& hstate!=null){ eval('var hjson = ' + hstate); moreParams=hjson.moreParamsnewsDetail_style_01_1506318095542; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:newsDetail_style_01_1506318095542 ===// $(function(){ $('title').html('新闻标题 - 太阳集团72138网址'); $('meta[name=keywords]').attr('content','新闻关键字'); $('meta[name=description]').attr('content','新闻简介'); }); //=== viewid:newsDetail_style_01_1506318095542 ===// detailHeightAuto("newsDetail_style_01_1506318095542", "详情加载中"); //=== viewid:copyright_style_01_1660990229104,text_style_15_1700450000693,text_style_15_1700450000711,text_style_15_1700450000724,text_style_15_1700450000735 ===// //=== viewid:footerCustom_textlist_01_1702434921951,footerCustom_textlist_01_1702434980976,footerCustom_textlist_01_1700038503014,footerCustom_textlist_01_1700101421014 ===// if(typeof showcart !== 'function'){ function showcart(){ var langid = 0; if (langid==0 && BodyIsFt) langid = 1; if(window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767)){ location.href = "https://s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&ismobile=1"; }else{ document.getElementById("boxName").innerHTML=""; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; document.getElementById("showiframe").src="https://s143js.nicebox.cn/exusers/u_cart.php?idweb=43749&act=show&lang="+langid+"&v=9"; box.Show({width:'1000px', height:'600px'}); } } }