followup.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. // 屏幕试图的高度
  2. let screenHeight = $(window).height()
  3. // 智能随访
  4. let collaborationTeamHight = $('#collaborationTeam').offset().top
  5. $(window).scroll(function () {
  6. // 当前滚动的高度
  7. let currentTop = $(window).scrollTop()
  8. if(currentTop < 2) {
  9. $('#all').removeClass('hanAll')
  10. $('#abc').addClass('abc')
  11. $('#navigationBar').removeClass('white')
  12. } else {
  13. $("#all").addClass("hanAll");
  14. $("#abc").removeClass("abc");
  15. $("#navigationBar").addClass("white");
  16. }
  17. // 智能随访滚动计算
  18. if(currentTop > collaborationTeamHight && currentTop < (collaborationTeamHight + screenHeight)) {
  19. let teamOffset = (currentTop - collaborationTeamHight) / screenHeight
  20. console.log(teamOffset, '透明度')
  21. $('#collCentImg').css({'transform': `translate(0, ${(1 - teamOffset) * 250}px)`})
  22. $('#collCentFonts').css({'opacity': teamOffset})
  23. }
  24. })
  25. // 导航下划线
  26. $('.aus li').hover(function () {
  27. let i = $(this).index()
  28. $(".aus li").eq(i).addClass('tils')
  29. },function () {
  30. let i = $(this).index()
  31. $(".aus li").eq(i).removeClass('tils')
  32. })
  33. $('.auss li').hover(function () {
  34. let i = $(this).index()
  35. $(".auss li").eq(i).addClass('tils')
  36. },function () {
  37. let i = $(this).index()
  38. $(".auss li").eq(i).removeClass('tils')
  39. })
  40. // 客服hover
  41. $('#zhixun').hover(function () {
  42. $("#zhixun").show()
  43. $("#consultigImg").attr("src", './image/ions/kefu1.png')
  44. },function () {
  45. $("#zhixun").hide()
  46. $("#consultigImg").attr("src", './image/ions/kefu2.png')
  47. })
  48. $('#consulting').hover(function () {
  49. $("#zhixun").show()
  50. $("#consultigImg").attr("src", './image/ions/kefu1.png')
  51. },function () {
  52. $("#zhixun").hide()
  53. $("#consultigImg").attr("src", './image/ions/kefu2.png')
  54. })
  55. // 产品鼠标移入移出
  56. let fls = true
  57. $('#productHov').hover(function () {$("#product").show()},function () {
  58. setTimeout(function() {
  59. if(fls) {
  60. $("#product").hide()
  61. }
  62. }, 200)
  63. })
  64. $('#product').hover(function () {
  65. fls = false
  66. $("#product").show()
  67. },function () {
  68. fls = true
  69. $("#product").hide()
  70. })
  71. // 轻松管理
  72. $('#easyManBoxConCli .easyManBoxConCliOne').click(function () {
  73. let index = $(this).index()
  74. let arr = $('#easyManBoxConCli .easyManBoxConCliOne')
  75. if(index != '1' && index != '7') {
  76. for(let i in arr) {
  77. $('#easyManBoxConCli .easyManBoxConCliOne').removeClass('easyOn')
  78. }
  79. $(this).addClass("easyOn")
  80. $('#easyManBoxConImg').attr("src", './image/followup/qing'+(+index + 1)+'.png')
  81. }
  82. })
  83. // 随访管家
  84. $('#housekeeperConZuo .housekeeperConZuoLi').click(function () {
  85. let index = $(this).index()
  86. let arr = $('#housekeeperConZuo .housekeeperConZuoLi')
  87. for(let i in arr) {
  88. $('#housekeeperConZuo .housekeeperConZuoLi').removeClass('housekeeperOn')
  89. }
  90. $(this).addClass("housekeeperOn")
  91. $('#housekeeperrText').text($(this).text())
  92. console.log(index)
  93. $('#housekConImg').attr("src", './image/followup/suifangs'+ index +'.png')
  94. })