$(function() { // alert(screen.width); var body = $("body"); if(isFrontEnv()) { $("a,img").removeAttr("title alt"); body.addClass("wd"); header(body); index(body); } else { body.addClass("make"); } }); function header(body) { $(".wd-header").appendTo(body); var a = $(".wd-header"); function b() { var top = $(window).scrollTop(); if(top > 50) { a.addClass("wd-dark"); } else { a.removeClass("wd-dark"); } } b(); $(window).scroll(function() { b(); }); var full = $(".wd-full-nav").appendTo(body); //full.addClass("wd-show"); /* full.find("li").each(function(r) { $(this).append('
'+["HOME", "ABOUT", "PRODUCT", "NEWS", "CONTACT"][r]+'
'); }).click(function() { location.href = $(this).find("a").attr("href"); }); */ var t = a.find(".wd-trigger"); t.click(function() { $(this).toggleClass("wd-show"); full.toggleClass("wd-show"); }); } function index(body) { if($("#c_portalResPublic_codeContainer-1591405206633").length) { body.addClass("index"); body.append(''); $("#c_portalResPublic_codeContainer-1591405206633, #content_box-1591405206363-1, #c_portalResComplaintPage_detail-15914293540612574, #w_grid-1591405206423, #w_grid-1591405206443").addClass("section").appendTo($(".wd-fullpage")); var currentIndex = 0; var footer = $("#content_box-1591405206363-footer"); body.append(footer); $("#w_sfbox-1591405206363").remove(); var mouse_touch_y = 0; var mouse_touch_y_end = 0; $(".wd-fullpage").fullpage({ autoScrolling:true, scrollHorizontally: true, paddingTop:0, fixedElements:"#content_box-1591405206363-footer", afterRender:function(b) { $("#superContainer").css("top", '0px'); var a = $(".wd-fullpage"); if(screen.width < 1366) { body.get(0).addEventListener('touchstart', function(e) { mouse_touch_y = e.targetTouches[0].pageY; }, false); body.get(0).addEventListener('touchmove', function(e) { console.log(e); mouse_touch_y_end = e.targetTouches[0].pageY; }, false); body.get(0).addEventListener('touchend', function(e) { if(mouse_touch_y_end - mouse_touch_y < 0 && currentIndex == 5) { a.addClass("wd-show-footer"); footer.addClass("wd-show"); } else { a.removeClass("wd-show-footer"); footer.removeClass("wd-show"); } }, false); } body.mousewheel(function(e) { if(e.deltaY < 0 && currentIndex == 5) { a.addClass("wd-show-footer"); footer.addClass("wd-show"); } else { a.removeClass("wd-show-footer"); footer.removeClass("wd-show"); } }); }, afterLoad:function(index,nextIndex,direction) { currentIndex = nextIndex; } }); $("#w_fbtn-1591405206433, #w_fbtn-1591405206393").addClass("wd-button").find(".p_CommonBtn").append(''); var old_index = -1; setInterval(function() { var a = $(".w_sfbox-002 > div > .p_SwipPanelBox .p_SwipPanel"); var b = a.filter(".active"); var index = a.index(b); if(old_index != index) { var c = $(".wd .w_sfbox-002 > .w_sfbox > .p_fbox > .p_wrapbox"); c.removeClass("current").eq(index).addClass("current"); old_index = index; } }, 300); $(window).load(function() { setInterval(function() { if(old_index <= 0) { $(".wd-header").removeClass("wd-dark"); } else { $(".wd-header").addClass("wd-dark"); } }, 300); }); $("#w_fbtn-1590742377539, #w_fbtn-1590741739140").addClass("wd-index-more"); $(".wd-index-more").find(".w_fbtn").append(''); $("#w_common_text-1590742700049").append(''); $(window).load(function() { $(".w_sfbox-002 > div > .p_SwipPanelBox").addClass("wd-show"); }); } else { sub(body); } } function sub(body) { body.addClass("sub"); if(screen.width < 768) { $("#w_grid-1592946398088 .p_gridCell").children().unwrap(); } $("#w_common_text-1592946407984,#w_common_text-1592946570366,#w_common_text-1592946639258").each(function() { $(this).find("p").first().append('').addClass("wd-20200624051519"); }); $("#w_common_text-1592946533794,#w_common_text-1592946580675,#w_common_text-1592946644901").each(function() { $(this).find("p").first().prepend('').addClass("wd-20200624051519 wd-20200624051616"); }); $("#w_common_text-1590801256177, #w_common_text-1590800694237, #w_common_text-1590800319153, #w_common_text-1590802002237,#w_common_text-1591929418009, #w_common_text-1591953242303,#w_common_text-1592222016957,#w_common_text-1592222178581,#w_common_text-1592222385929,#w_common_text-1592222468486,#w_common_text-1592222468486,#w_common_text-1590797061411,#w_common_text-1590797118396,#w_common_text-1590799980170,#w_common_text-1590800167689,#w_common_text-1591063153214").addClass("wd-sub-main-title").each(function() { $(this).find("span").each(function() { if($.trim($(this).text()) == "") { $(this).remove(); } }); }); $(".wd-sub-cate a:contains('鍖诲吇涓?)").attr("href", "/news/29.html"); $(".wd-sub-cate a:contains('鍐滅墽涓?)").attr("href", "/news/30.html"); $(".wd-sub-cate a:contains('楂樼瑁呭鍒堕€?)").attr("href", "/news/31.html"); $("#w_grid-1590800694217, #w_grid-1590800319053, #w_grid-1590802002127, #w_grid-1590797416614, #w_grid-1591929417789, #w_grid-1591537116164, #w_grid-1590796431337, #w_grid-1590797118376, #w_grid-1590799980150, #w_grid-1590795664706, #w_grid-1590801256137, #w_grid-1590800167669, #w_grid-1592222385899, #w_grid-1591953242273, #w_grid-1592222178551, #w_grid-1592222468456, #w_grid-1592222016927").addClass("sub-bg"); $("#w_common_text-1591175565639").find("p").slice(2).prepend(''); // contact us $("#w_common_text-1592278506871").addClass("wd-20200530074924").prepend(''); $("#w_common_text-1592231011936").addClass("wd-20200530074924").prepend(''); $("#w_common_text-1590795926406, #w_common_text-1590795936328, #w_common_text-1590795937095, #w_common_text-1590795937683").addClass("wd-20200530074924").each(function(i) { $(this).prepend(['', '', '', ''][i]); }); $(".wd-sub-more").append(''); $(".wd-sub-cate").each(function() { $(this).prepend('