history.scrollRestoration = 'manual'; // alert($(window).width()); var wd = {}; $(function() { wd.body = $("body"); if (isFrontEnv()) { setInterval(function() { $("a").not(".wd-wd").addClass("wd-wd").each(function() { var title = $(this).attr("title"); if(location.href.indexOf("make") != -1) { if(title == undefined) { console.log(this); } console.log($(this).attr("title")); } $(this).removeAttr("title") }); $("img").not(".wd-wd").addClass("wd-wd").removeAttr("title").each(function() { if(location.href.indexOf("make") != -1) { console.log($(this).attr("alt")); } }); }, 1000 / 60); wd.body.addClass("wd"); wd.rightFloat(); wd.index(); setTimeout(function() { wd.body.addClass("wd-show"); }, 500); } else { wd.body.addClass("make"); setInterval(function() { $(".w_fimg-000 img").attr("title", "188金宝慱亚洲体育官网地址").attr("alt", "188金宝慱亚洲体育官网地址"); }, 500); } }); wd.index = function() { if(!$("#c_portalResEbizads_banner-15889873499571493").length) { this.sub(); } // header $("#c_portalResnav_main-15732848872754102 .navLi").addClass("wd--nav"); $("#c_portalResPublic_codeContainer-15732848869219091 .lv_toptel").addClass("wd--header-tel"); var _sa = wd.scroll_ani(); _sa.add(".c_portalResProduct_category-01001 .swiper-slide"); _sa.add("#w_grid-1588924454533"); _sa.add("#c_portalResPublic_codeContainer-15947155556412602 .about-num li"); _sa.add("#w_grid-1588928899806"); _sa.add("#c_portalResPublic_codeContainer-15889333947206863"); _sa.add(".c_portalResPublic_websiteShare-01001"); _sa.init(); }; wd.sub = function() { $("#c_portalResnav_main-15966817969545034 .navLi").addClass("wd--nav"); $("#c_portalResPublic_codeContainer-15966817969431981 .lv_toptel").addClass("wd--nav"); $("#c_portalResEmploy_list-16067051850783962 .job-summry").each(function() { $(this).html("

" + $(this).html().replace(/\n/g, "

") + "

"); }); var _sa = wd.scroll_ani(); _sa.add(".c_portalResIntro_category-01001 .NavList_a1 li"); _sa.add(".c_portalResBreadcrumb_nav-01001 .p_breadcrumbList span, .c_portalResBreadcrumb_nav-01001 .p_breadcrumbList a, .c_portalResBreadcrumb_nav-01001 .p_breadcrumbList a .p_end"); _sa.add(".c_portalResBreadcrumb_nav-01001002 .p_breadcrumbList span, .c_portalResBreadcrumb_nav-01001002 .p_breadcrumbList a, .c_portalResBreadcrumb_nav-01001002 .p_breadcrumbList a .p_end"); _sa.add(".c_portalResIntro_detail-01001 .p_content .reset_style > div, .c_portalResIntro_detail-01001 .p_content .reset_style > p"); _sa.add("#c_portalResProduct_category-16038162791322823 .contentBox li"); _sa.add(".e_SideMajorStyleBox-001 .stylebox_top"); _sa.add("#c_portalResProduct_category-16038162791322823"); _sa.add("#w_grid-1605169934342"); _sa.add("#c_portalResProduct_list-15791660244892910 .proLi"); _sa.add("#c_portalResNews_category-15791603702205425 .NavList_a1 li"); _sa.add("#c_portalResNews_list-16038133617196536 .newList1"); _sa.add("#c_portalResNews_category-15966930109369290 .NavList_a1 li"); _sa.add("#c_portalResNews_list-15966935825156571 .new-list"); _sa.add("#w_grid-1596693579178 > div > .p_gridbox"); _sa.add(".c_portalResNews_detail-01001 .p_articles > p, .c_portalResNews_detail-01001 .p_articles > div"); _sa.add("#w_grid-1603815471568"); _sa.add("#w_grid-1603815471561"); _sa.add("#w_grid-1605153569707"); _sa.add("#c_portalResPublic_codeContainer-16051535698257976"); _sa.add("#w_grid-1579164493701"); _sa.add(".c_portalResProduct_list-01001008 .PhotoList_k1 li"); _sa.add("#c_portalResProduct_category-16146756881707916 .wd-item"); _sa.add("#c_portalResProduct_category-16146766752848696 .yjLink"); _sa.init(); }; wd.scroll_ani = function() { var window_height = $(window).height(); var body = $("body"); function handle() { var t = $(window).scrollTop(); var w = $(".w-scroll-ani:not(.scrolled)"); w.each(function(i) { var top = $(this).offset().top; if(top < (window_height + t - 100)) { setTimeout(function() { $(this).addClass("scrolled"); }.bind(this), i*100); } }); if(window_height + t + 200 >= body.height()) { $(".w-scroll-ani:not(.scrolled)").each(function(i) { var top = $(this).offset().top; if(top > (body.height() - window_height)) { setTimeout(function() { $(this).addClass("scrolled"); }.bind(this), i*100); } }); } } return { add:function(a) { $(a).addClass("w-scroll-ani"); return this.add; }, init:function() { this.add("div[id^='w_common_text-']"); this.add(".w_fimg-000:not('#w_fimg-1588148032942')"); this.add(".w_fbtn-001"); this.add(".w_ficon-001"); this.add(".w_fline-001"); this.add("div[class*='c_portalResProduct_detail']"); this.add(".c_portalResMessage_form-01001"); this.add(".c_portalResEbizads_banner-01001"); this.add(".c_portalResEbizads_banner-01001 .bannerTitle"); this.add(".c_portalResEbizads_banner-01001 .summry"); this.add(".c_portalResProduct_list-01001001 .PhotoList_k1 li"); this.add(".c_portalResnav_main-01001 .top-nav"); this.add(".c_portalResIntro_detail-01001"); this.add(".w_fimgbox-001"); this.add(".c_portalResNews_list-01001 .newList"); this.add(".c_portalResNews_detail-01001 .p_header"); this.add(".c_portalResNews_detail-01001 .p_dataSource"); this.add(".c_portalResNews_detail-01001 .p_summary"); this.add(".c_portalResNews_detail-01001 .p_articles"); this.add(".c_portalResNews_detail-01001 .p_PrevAndNext"); this.add(".c_portalResProduct_list-01001"); this.add(".c_portalResNews_list-01001 .p_articles"); this.add(".c_portalResEmploy_list-01001 .jobList"); this.add(".c_portalResProduct_list-01001 .p_Product"); this.add(".c_portalResSearch_total-01001"); this.add(".c_portalResPublic_websiteShare-01001 .iShare a"); this.add(".c_portalResEbizads_banner-01001 .ad-tit"); this.add(".c_portalResEbizads_banner-01001 .ad-line"); this.add(".c_portalResEbizads_banner-01001 .ad-sum"); this.add(".c_portalResPublic_codeContainer-01001"); $(window).scroll(function() { handle(); }); handle(); } }; }; wd.rightFloat = function() { var config = { email: "799082243@qq.com", tel: "028-65792773", message: "/contact.html" }; var right = $("
").addClass("wd-right-float"); var email = $("
").addClass("wd-item email").append('').append("
" + config.email + "
"); var phone = $("
").addClass("wd-item phone").append('').append("
" + config.tel + "
"); ;var message = $("
").addClass("wd-item message").append('').append("
点击留言
"); var top = $("
").addClass("wd-item top").append(''); right.append(email).append(phone).append(message).append(top); $("body").append(right); right.find(".wd-item").last().click(function() { $("html,body").animate({ scrollTop: 0 }, 1000); }); $(window).scroll(function() { if($(window).height() + $(window).scrollTop() + $(window).height() / 2 >= wd.body.height()) { right.addClass("wd-hide"); } else { right.removeClass("wd-hide"); } }); setTimeout(function() { right.addClass("wd-show"); }, 500); };