// 顶部轮播大Banner图 $(function () { window.spm(window.isMobile() ? "288.2" : "288.0"); if ($(".getWhitePaperBtn").length) { $(".getWhitePaperBtn").click(() => { if (window.isMobile()) { window.spm("288.0.0.2"); window.open( window.location.origin + (window.isProd ? "" : "/home") + "/getLeadsForWhitePaper.html" ); } else { window.spm("288.0.0.0"); $("#getLeadsForWhitePaperModal").modal("show"); } }); } var indexSwiper = new Swiper(".index-swiper-container", { loop: true, autoplay: { delay: 5000, disableOnInteraction: false, }, pagination: { el: ".index-swiper-pagination", clickable: true, }, }); // 鼠标悬停,禁用自动滚动 var indexSwiperContainer = document.getElementsByClassName("banner_container"); if (indexSwiperContainer[0]) { indexSwiperContainer[0].onmouseenter = function () { indexSwiper.autoplay.stop(); }; indexSwiperContainer[0].onmouseleave = function () { indexSwiper.autoplay.start(); }; } }); // 听听来自不同企业角色的声音 $(function () { let enterpriseVoiceDataStopFlag = false; let curIndex = 2; let nextIndex = 2; var logoCls = ".enterprise-voice-logo-item"; var ctxCls = ".enterprise-voice-detail-ctx"; function enterpriseVoiceCtxImgChange(cur, next) { // if (enterpriseVoiceDataStopFlag) return; enterpriseVoiceDataStopFlag = true; if (isMobile()) { $(ctxCls).removeClass("active"); $(ctxCls).eq(next).addClass("active"); return; } $(ctxCls).removeClass("active").removeClass("move1").removeClass("move2"); $(ctxCls).eq(cur).addClass("active move1"); setTimeout(function () { $(ctxCls).removeClass("active move1"); $(ctxCls).eq(next).addClass("active move2"); }, 500); $(logoCls).removeClass("active"); $(logoCls).eq(next).addClass("active"); } // 点击左边的按钮 切换 window.enterpriseVoiceArrowLeft.onclick = function () { curIndex = nextIndex; nextIndex--; if (nextIndex === -1) { nextIndex = 4; } enterpriseVoiceCtxImgChange(curIndex, nextIndex); }; // 点击右边的按钮 切换 window.enterpriseVoiceArrowRight.onclick = function () { curIndex = nextIndex; nextIndex++; if (nextIndex === 6) { nextIndex = 0; } enterpriseVoiceCtxImgChange(curIndex, nextIndex); }; // 点击上面的标签 切换 $("#enterpriseVoiceLogo .enterprise-voice-logo-item img").click((e) => { curIndex = nextIndex; nextIndex = +e.currentTarget.dataset.index; enterpriseVoiceCtxImgChange(curIndex, nextIndex); }); }); // 曙爱家政服务最新咨询 $(function () { var firstMaxData; var lastNormalData; const nowDateTime = new Date().getTime(); var isProd = window.isProd; var url = window.reqHost; $.ajax({ url: `${url}/home/open/articleList?articleType=&industry=&pageSize=4&page=1×tamp=${nowDateTime}&signature=${SparkMD5.hash( nowDateTime + "5839606a1e964e5b8464539e7ca419cf" )}`, success: function (data1) { $.ajax({ url: "https://rlj-f2e-assets.oss-cn-hangzhou.aliyuncs.com/config/bba85132-47d6-4085-88e0-709764d26a06.json", success: function (data2) { firstMaxData = data2; lastNormalData = data1.result.articleList; window.theLatestInformationMax.innerHTML = `
${data2.articleTitle}
${data2.articleDesc}
`; window.theLatestInformationNormal.innerHTML = data1.result.articleList .map( (v, i) => `
${v.articleTitle}
${v.articleDesc}
` ) .join(""); $(".the-latest-information-item").click(function (e) { var index = e.currentTarget.dataset.index; var obj = firstMaxData; if (index !== undefined) { obj = lastNormalData[+index]; } location.href = isProd ? obj.publishUrl : obj.previewUrl; }); }, }); }, }); }); // 企业使用智能薪酬实现智能化薪酬管理-数字递增 $(function () { var once; $(window).scroll(numberAnime); // 金额三位间隔 const interval = (key) => { key += ""; let x = key.split("."); let x1 = x[0]; let x2 = x.length > 1 ? "." + x[1] : ""; let reg = /(\d+)(\d{3})/; while (reg.test(x1)) { x1 = x1.replace(reg, "$1" + "," + "$2"); // x2 = x2.replace(reg, '$1' + ',' + '$2'); } return (x1 || "").replace(/^\s*|\s*$/g, "") + x2; }; function numberAnime() { if ( $(window).scrollTop() > $(".compensation-management").offset().top - $(window).height() + 150 && !once ) { once = true; var dom1 = document.getElementsByClassName( "compensation-management-num" )[0]; anime({ targets: dom1, innerText: ["10000", "1400000"], easing: "linear", round: true, duration: 1500, update: function (a) { const value = a.animations[0] ? a.animations[0].currentValue : 0; const formattedNumber = interval(value); dom1.innerHTML = formattedNumber; }, }); } } numberAnime(); });