$(function() { //蓝色餐桌切换背景 $("#c_static_001-1658713112569 .e_loop-59 .p_loopitem:nth-child(1)").mouseover(function() { $("#c_static_001-1658713112569 .e_container-40").css('background-image', 'url(https://ngc202207190001.fastindexs.com/repository/portal-local/ngc202207190001/cms/image/101c4087-2231-437c-a1b5-a77b986153ff.jpg)' ) }) $("#c_static_001-1658713112569 .e_loop-59 .p_loopitem:nth-child(2)").mouseover(function() { $("#c_static_001-1658713112569 .e_container-40").css('background-image', 'url(https://ngc202207190001.fastindexs.com/repository/portal-local/ngc202207190001/cms/image/9ab33226-8a61-4fce-8365-1ea0388a0971.jpg)' ) }) $("#c_static_001-1658713112569 .e_loop-59 .p_loopitem:nth-child(3)").mouseover(function() { $("#c_static_001-1658713112569 .e_container-40").css('background-image', 'url(https://ngc202207190001.fastindexs.com/repository/portal-local/ngc202207190001/cms/image/409e20f1-d604-414b-b2a3-afa5b0cbb489.jpg)' ) }); //增加ID //$("#c_static_001-1658713112569 .e_container-25").attr('id','zsfx'); //$("#c_static_001-1658713112569 .e_container-23").attr('id','ppscx'); //$("#c_static_001-1658713112569 .e_container-19").attr('id','ppjs'); //$("#c_static_001-1658713112569 .e_container-64").attr('id','mscp'); $("#c_static_001-1658713112569 .e_container-186").attr('id','syx'); $("#c_static_001-1658713112569 .e_container-206").attr('id','kcxfz'); $("#c_static_001-1658713112569 .e_container-211").attr('id','gjqw'); //导航 $("#c_static_001-16420726227420 .e_image-12").click(function(){ $("#c_static_001-16420726227420 .e_container-21").addClass('active_dh'); $("#c_grid-116273709439191").addClass('active_bj'); }); $("#c_grid-116273709439191 .e_image-74").click(function(){ $("#c_static_001-16420726227420 .e_container-21").removeClass('active_dh'); $("#c_grid-116273709439191").removeClass('active_bj'); }); //页码 $(".page_prev").append("<"); $(".page_next").append(">"); //首页地图切换 $("#c_static_001-1660016614280 .e_container-10").addClass('show'); $("#c_static_001-1660016614280 .e_container-7 > .p_item:nth-child(1)").addClass('active_1'); $("#c_static_001-1660016614280 .e_container-7 > .p_item").click(function () { $(this).addClass('active_1').siblings().removeClass('active_1'); $('#c_static_001-1660016614280 .e_container-6 > .p_item').find('.s_layout').eq($(this).index()).addClass('show').siblings().removeClass('show'); }); //首页底部消失 var li_h = window.location.pathname; if(li_h == '/Home.html'){ $("#c_grid-116273709439190").hide(); $("#c_static_001-16613072165230 .e_image-63").addClass('xiaoshi') }; //首页第三屏 setInterval(() => { $("#c_static_001-1660015048948 .swiper-pagination .swiper-pagination-bullet:nth-child(3)").click(function(){ $("#c_static_001-1660015048948 .swiper-pagination").addClass('one_page'); $("#c_static_001-1660015048948 .swiper-pagination").removeClass('two_page'); }); $("#c_static_001-1660015048948 .swiper-pagination .swiper-pagination-bullet:nth-child(2)").click(function(){ $("#c_static_001-1660015048948 .swiper-pagination").removeClass('one_page'); $("#c_static_001-1660015048948 .swiper-pagination").addClass('two_page'); }); $("#c_static_001-1660015048948 .swiper-pagination .swiper-pagination-bullet:nth-child(1)").click(function(){ $("#c_static_001-1660015048948 .swiper-pagination").removeClass('one_page'); $("#c_static_001-1660015048948 .swiper-pagination").removeClass('two_page'); }); }, 500); //职位招聘点击事件 $("#c_static_001-1658713112569 .e_loop-66 .p_loopitem").click(function(){ if($(this).find(".e_container-76").css("display")=="none"){ $(this).find(".e_container-76").show() }else{ $(this).find(".e_container-76").hide() } }); //点击回顶部 $("#c_static_001-16600405341260 .e_image-63").click(function () { $("body,html").animate({ "scrollTop": 0 }, 300); }); $("#c_static_001-16613072165230 .e_image-63").click(function () { $("body,html").animate({ "scrollTop": 0 }, 300); }); //底部二维码 $("#c_static_001-16611512192590 .e_container-57 > .cbox-57-1").click(function(){ if($("#c_static_001-16611512192590 .e_image-60").css("opacity")=="0"){ $("#c_static_001-16611512192590 .e_image-60").addClass('show_click'); }else{ $("#c_static_001-16611512192590 .e_image-60").removeClass('show_click'); }; if($("#c_static_001-16611512192590 .e_image-59").css("display")=="none"){ $("#c_static_001-16611512192590 .e_image-59").show(); }else{ $("#c_static_001-16611512192590 .e_image-59").hide(); }; if($("#c_static_001-16611512192590 .e_image-65").css("display")=="none"){ $("#c_static_001-16611512192590 .e_image-65").show(); }else{ $("#c_static_001-16611512192590 .e_image-65").hide(); }; }); /*$("#c_static_001-16600405341260 .e_container-57 > .cbox-57-1").click(function(){ if($("#c_static_001-16600405341260 .e_image-60").css("opacity")=="0"){ $("#c_static_001-16600405341260 .e_image-60").addClass('show_click'); }else{ $("#c_static_001-16600405341260 .e_image-60").removeClass('show_click'); }; if($("#c_static_001-16600405341260 .e_image-59").css("display")=="none"){ $("#c_static_001-16600405341260 .e_image-59").show(); }else{ $("#c_static_001-16600405341260 .e_image-59").hide(); }; if($("#c_static_001-16600405341260 .e_image-65").css("display")=="none"){ $("#c_static_001-16600405341260 .e_image-65").show(); }else{ $("#c_static_001-16600405341260 .e_image-65").hide(); }; });*/ /*手机端底部点击事件*/ $("#c_static_001-16600405341260 .e_container-34 > .p_item").click(function(){ if($(this).css("opacity")=="0.9"){ $(this).addClass('down_active'); }else{ $(this).removeClass('down_active'); } }); $("#c_static_001-16613072165230 .e_container-34 > .p_item").click(function(){ if($(this).css("opacity")=="0.9"){ $(this).addClass('down_active'); }else{ $(this).removeClass('down_active'); } }); //首页公司荣誉约字 //$("#c_static_001-16599253204690 .e_loop-31 .p_loopitem:nth-child(4)").append("

"); //$("#c_static_001-16599253204690 .e_loop-31 .p_loopitem:nth-child(4) p:last-child").addClass('yue'); //联系我们链接 $("#c_static_001-1658713112569 .e_loop-99 .p_loopitem:nth-child(3) a").attr('href','mailto:JOYVIOFOOD@JOYVIOFOOD.COM') $("#c_static_001-1658713112569 .e_loop-99 .p_loopitem:nth-child(2) a").attr('href','tel:010-57058360'); //首页文字后台链接 var a_img = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(1) .s_img img").attr('src'); var a_text1 = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(1) .e_text-5").text(); var a_text2 = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(1) .e_text-6").text(); $("#html_zx1 .swiper-slide:nth-child(1) .home1_img img").attr('src',a_img); $("#html_zx1 .swiper-slide:nth-child(1) .homet_text1").append(a_text1); $("#html_zx1 .swiper-slide:nth-child(1) .homet_text2").append(a_text2); var a_img = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(2) .s_img img").attr('src'); var a_text1 = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(2) .e_text-5").text(); var a_text2 = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(2) .e_text-6").text(); $("#html_zx1 .swiper-slide:nth-child(2) .home1_img img").attr('src',a_img); $("#html_zx1 .swiper-slide:nth-child(2) .homet_text1").append(a_text1); $("#html_zx1 .swiper-slide:nth-child(2) .homet_text2").append(a_text2); var a_img = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(3) .s_img img").attr('src'); var a_text1 = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(3) .e_text-5").text(); var a_text2 = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(3) .e_text-6").text(); $("#html_zx1 .swiper-slide:nth-child(3) .home1_img img").attr('src',a_img); $("#html_zx1 .swiper-slide:nth-child(3) .homet_text1").append(a_text1); $("#html_zx1 .swiper-slide:nth-child(3) .homet_text2").append(a_text2); var a_img = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(4) .s_img img").attr('src'); var a_text1 = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(4) .e_text-5").text(); var a_text2 = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(4) .e_text-6").text(); var a_text3 = $("#c_static_001-1660611637354 .e_loop-2 .p_loopitem:nth-child(4) .e_text-9").text(); $("#html_zx1 .swiper-slide:nth-child(4) .home1_img img").attr('src',a_img); $("#html_zx1 .swiper-slide:nth-child(4) .homet_text1").append(a_text1); $("#html_zx1 .swiper-slide:nth-child(4) .homet_text2").append(a_text2); $("#html_zx1 .swiper-slide:nth-child(4) .homet_text3").append(a_text3); //首页资讯与下载链接 $("#c_magiccube_009-1660029593557 .p_tablist>span").click(function () { $("#c_magiccube_009-1660029593557 .p_tablist>span").unbind(); }); $("#c_magiccube_009-1660029593557 .p_tablist>span:nth-child(2)").append(``); $("#c_magiccube_009-1660029593557 .p_tablist>span:nth-child(3)").append(``); //$("#c_magiccube_009-1660029593557 .p_tablist>span").mouseover(function () { // $(this).addClass('p_active').siblings().removeClass('p_active'); // $('#c_magiccube_009-1660029593557 .top-content').find('.p_content').eq($(this).index()).addClass('active').siblings().removeClass('active'); //}); //蓝色餐桌 $("#c_static_001-1658713112569 .e_image-75").mouseover(function () { if($(this).parent('.cbox-74').find(".e_container-77").css("opacity")=="0"){ console.log($(this).parent('.cbox-74').find(".e_container-77")) }; }); //搜索结果关键字变色 function getvalue(name){ var reg = new RegExp("(^|&)" + name + "+([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r != null) return r[2];return ""; } var fdate = getvalue('_detailId='); var bdate = decodeURIComponent(fdate) console.log(bdate); $('#c_static_001-1658713112569 .e_richText-181').each((i, ele) => { var str = $(ele).text(); str = str.replace(bdate, ''+bdate+''); $(ele).html(str); }); });