// 屏幕试图的高度 let screenHeight = $(window).height() // 智能随访 let collaborationTeamHight = $('#collaborationTeam').offset().top $(window).scroll(function () { // 当前滚动的高度 let currentTop = $(window).scrollTop() if(currentTop < 2) { $('#all').removeClass('hanAll') $('#abc').addClass('abc') $('#navigationBar').removeClass('white') $("#loGo").attr("src", './image/logo.png') } else { $("#all").addClass("hanAll"); $("#abc").removeClass("abc"); $("#navigationBar").addClass("white"); $("#loGo").attr("src", './image/logo.jpg') } // 智能随访滚动计算 if(currentTop > collaborationTeamHight && currentTop < (collaborationTeamHight + screenHeight)) { let teamOffset = (currentTop - collaborationTeamHight) / screenHeight console.log(teamOffset, '透明度') $('#collCentImg').css({'transform': `translate(0, ${(1 - teamOffset) * 250}px)`}) $('#collCentFonts').css({'opacity': teamOffset}) } }) // 导航下划线 $('.aus li').hover(function () { let i = $(this).index() $(".aus li").eq(i).addClass('tils') },function () { let i = $(this).index() $(".aus li").eq(i).removeClass('tils') }) $('.auss li').hover(function () { let i = $(this).index() $(".auss li").eq(i).addClass('tils') },function () { let i = $(this).index() $(".auss li").eq(i).removeClass('tils') }) // 客服hover $('#zhixun').hover(function () { $("#zhixun").show() $("#consultigImg").attr("src", './image/ions/kefu1.png') },function () { $("#zhixun").hide() $("#consultigImg").attr("src", './image/ions/kefu2.png') }) $('#consulting').hover(function () { $("#zhixun").show() $("#consultigImg").attr("src", './image/ions/kefu1.png') },function () { $("#zhixun").hide() $("#consultigImg").attr("src", './image/ions/kefu2.png') }) // 产品鼠标移入移出 let fls = true $('#productHov').hover(function () {$("#product").show()},function () { setTimeout(function() { if(fls) { $("#product").hide() } }, 200) }) $('#product').hover(function () { fls = false $("#product").show() },function () { fls = true $("#product").hide() }) // 轻松管理 $('#easyManBoxConCli .easyManBoxConCliOne').click(function () { let index = $(this).index() let arr = $('#easyManBoxConCli .easyManBoxConCliOne') if(index != '1' && index != '7') { for(let i in arr) { $('#easyManBoxConCli .easyManBoxConCliOne').removeClass('easyOn') } $(this).addClass("easyOn") $('#easyManBoxConImg').attr("src", './image/followup/qing'+(+index + 1)+'.png') } }) // 随访管家 $('#housekeeperConZuo .housekeeperConZuoLi').click(function () { let index = $(this).index() let arr = $('#housekeeperConZuo .housekeeperConZuoLi') for(let i in arr) { $('#housekeeperConZuo .housekeeperConZuoLi').removeClass('housekeeperOn') } $(this).addClass("housekeeperOn") $('#housekeeperrText').text($(this).text()) console.log(index) $('#housekConImg').attr("src", './image/followup/suifangs'+ index +'.png') })