index.js 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. // 产品鼠标移入移出
  2. let fls = true
  3. $('#productHov').hover(function () {$("#product").show()},function () {
  4. setTimeout(function() {
  5. if(fls) {
  6. $("#product").hide()
  7. }
  8. }, 200)
  9. })
  10. $('#product').hover(function () {
  11. fls = false
  12. $("#product").show()
  13. },function () {
  14. fls = true
  15. $("#product").hide()
  16. })
  17. // 导航下划线
  18. $('.aus li').hover(function () {
  19. let i = $(this).index()
  20. $(".aus li").eq(i).addClass('tils')
  21. },function () {
  22. let i = $(this).index()
  23. $(".aus li").eq(i).removeClass('tils')
  24. })
  25. $('.auss li').hover(function () {
  26. let i = $(this).index()
  27. $(".auss li").eq(i).addClass('tils')
  28. },function () {
  29. let i = $(this).index()
  30. $(".auss li").eq(i).removeClass('tils')
  31. })
  32. // 智能系统管家模块的js效果
  33. let screenHeight = $(window).height()
  34. // 系统智能的高度
  35. let jiesaoTop = $('.jiesao').offset().top
  36. // 智能引擎的高度
  37. let znyqTop = $('.znyq').offset().top
  38. let fill = $('.fill').offset().top
  39. let tooltipsOffTop = $('#pricing').offset().top
  40. let filss = ''
  41. let tooltips = ''
  42. var devicewidth = document.documentElement.clientWidth
  43. if(document.documentElement.clientWidth < 1900) {
  44. var scale = devicewidth / 1920
  45. filss = fill * scale
  46. tooltips = tooltipsOffTop * scale
  47. } else {
  48. filss = fill
  49. tooltips = tooltipsOffTop
  50. }
  51. $(window).scroll(function () {
  52. // 当前滚动的高度
  53. let currentTop = $(window).scrollTop()
  54. if(currentTop < 2) {
  55. $('#all').removeClass('hanAll')
  56. $('#abc').addClass('abc')
  57. $("#loGo").attr("src", './image/logo.png')
  58. } else {
  59. $("#all").addClass("hanAll");
  60. $("#abc").removeClass("abc");
  61. $("#loGo").attr("src", './image/logo.jpg')
  62. }
  63. // 系统管理滚动计算
  64. if (currentTop > jiesaoTop && currentTop < (jiesaoTop + screenHeight)) {
  65. let jiesaoopacity = (currentTop - jiesaoTop) / screenHeight
  66. // let jiesaopadding = (1 - jiesaoopacity) * 300 + 'px'
  67. let jieMIngcs = jiesaoopacity > 0.8 ? jiesaoopacity : '0'
  68. // 文字加透明
  69. $('#manConDDp1').css({'opacity': jieMIngcs})
  70. $('#manConDDp2').css({'opacity': jieMIngcs})
  71. $('#manConDDp3').css({'opacity': jieMIngcs})
  72. $('#manConDDp4').css({'opacity': jieMIngcs})
  73. $('#manConDDp5').css({'opacity': jieMIngcs})
  74. $('#manConDDp6').css({'opacity': jieMIngcs})
  75. $('#manConDDp7').css({'opacity': jieMIngcs})
  76. // 偏移
  77. $('#manConDD1').css({'transform': `translate(0, ${(1 - jiesaoopacity) * 293}px)`})
  78. $('#manConDD2').css({'transform': `translate(-${(1 - jiesaoopacity) * 362}px, ${(1 - jiesaoopacity) * 123}px)`})
  79. $('#manConDD3').css({'transform': `translate(-${(1 - jiesaoopacity) * 362}px, -${(1 - jiesaoopacity) * 141}px)`})
  80. $('#manConDD4').css({'transform': `translate(-${(1 - jiesaoopacity) * 162}px, -${(1 - jiesaoopacity) * 339}px)`})
  81. $('#manConDD5').css({'transform': `translate(${(1 - jiesaoopacity) * 162}px, -${(1 - jiesaoopacity) * 339}px)`})
  82. $('#manConDD6').css({'transform': `translate(${(1 - jiesaoopacity) * 362}px, -${(1 - jiesaoopacity) * 141}px)`})
  83. $('#manConDD7').css({'transform': `translate(${(1 - jiesaoopacity) * 362}px, ${(1 - jiesaoopacity) * 123}px)`})
  84. }
  85. // 智能引擎滚动计算
  86. if(currentTop > znyqTop && currentTop < (znyqTop + screenHeight) && currentTop < 3000) {
  87. let znyqTopopacity = (2900 - currentTop)
  88. let znyqToppadding = (znyqTopopacity - 1) * 1.15 + 'px'
  89. $('#znyqH').css({'transform':'translate(0,'+znyqToppadding+')'})
  90. }
  91. if(currentTop > znyqTop && currentTop < (znyqTop + screenHeight + 800) && currentTop > 2900) {
  92. let znyqTopopacityVal = (currentTop - znyqTop) / (screenHeight + 800)
  93. // 550的
  94. let znyqToppaddingfives = (1 - znyqTopopacityVal) * 550 + 'px'
  95. // 500的
  96. let znyqToppaddingfive = (1 - znyqTopopacityVal) * 500 + 'px'
  97. // 400的
  98. let znyqToppaddingfour = (1 - znyqTopopacityVal) * 400 + 'px'
  99. // 300的
  100. let znyqToppaddingthree = (1 - znyqTopopacityVal) * 300 + 'px'
  101. if(znyqTopopacityVal < 0.2) znyqTopopacityVal = 0
  102. $('#selMou1').css({'opacity': znyqTopopacityVal, 'transform':'translate(-'+znyqToppaddingfive+',-'+ znyqToppaddingfive +')'})
  103. $('#selMou2').css({'opacity': znyqTopopacityVal, 'transform':'translate(-'+znyqToppaddingfour+',-'+ znyqToppaddingfour +')'})
  104. $('#selMou3').css({'opacity': znyqTopopacityVal, 'transform':'translate(-'+znyqToppaddingfive+','+ znyqToppaddingfive +')'})
  105. $('#selMou4').css({'opacity': znyqTopopacityVal, 'transform':'translate(-'+znyqToppaddingfour+','+ znyqToppaddingfour +')'})
  106. $('#selMour1').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingthree+',-'+ znyqToppaddingthree +')'})
  107. $('#selMour2').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfour+',-'+ znyqToppaddingfour +')'})
  108. $('#selMour3').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfive+',-'+ znyqToppaddingfive +')'})
  109. $('#selMour4').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfives+',-'+ znyqToppaddingfives +')'})
  110. $('#selMour5').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingthree+','+ znyqToppaddingthree +')'})
  111. $('#selMour6').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfour+','+ znyqToppaddingfour +')'})
  112. $('#selMour7').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfive+','+ znyqToppaddingfive +')'})
  113. $('#selMour8').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfives+','+ znyqToppaddingfives +')'})
  114. }
  115. // 加样式 (填报、审批、统计分分钟搞定)
  116. if(currentTop > filss - 300) {
  117. $('#fillCon').addClass('fillCons')
  118. }
  119. if(currentTop < filss - 400){
  120. $("#fillCon").removeClass("fillCons");
  121. }
  122. // 加样式 (产品定价)
  123. if(currentTop > tooltips - 500) {
  124. $('#tooltipTis').addClass('tooltipTisFillCons')
  125. }
  126. if(currentTop < tooltips - 800){
  127. $("#tooltipTis").removeClass("tooltipTisFillCons");
  128. }
  129. })
  130. // tab点击
  131. $(function() {
  132. $('#tablTabUl li').click(function() {
  133. let index = $(this).index()
  134. var arr = $('#tablTabUl li')
  135. for(var i in arr) {
  136. $('#tablTabUl li').eq(i).find('img').attr("src", './image/ions/'+ (+i + 1)+'.1.png')
  137. $('#tablTabUl li').removeClass('tabOn')
  138. }
  139. $(this).addClass("tabOn")
  140. $(this).find('img').attr("src", './image/ions/'+(+index + 1)+'.png')
  141. $('#finImg').attr("src", './image/gs'+(+index + 1)+'.jpg')
  142. })
  143. })
  144. // 客服hover
  145. $('#zhixun').hover(function () {
  146. $("#zhixun").show()
  147. $("#consultigImg").attr("src", './image/ions/kefu1.png')
  148. },function () {
  149. $("#zhixun").hide()
  150. $("#consultigImg").attr("src", './image/ions/kefu2.png')
  151. })
  152. $('#consulting').hover(function () {
  153. $("#zhixun").show()
  154. $("#consultigImg").attr("src", './image/ions/kefu1.png')
  155. },function () {
  156. $("#zhixun").hide()
  157. $("#consultigImg").attr("src", './image/ions/kefu2.png')
  158. })
  159. let nums = 0
  160. let mobiledistance = 0
  161. // 客户点击
  162. $(function() {
  163. kehuFlg()
  164. $('#kehuLeft').click(function() {
  165. if(nums > 0 && nums <= 5) {
  166. nums--
  167. zuoyouClick()
  168. }
  169. })
  170. $('#kehuRight').click(function() {
  171. if(nums < 5) {
  172. nums++
  173. zuoyouClick()
  174. }
  175. })
  176. })
  177. function zuoyouClick() {
  178. mobiledistance = '-' + (nums * 510) + 'px'
  179. $('.conImg').stop(true,false).animate({
  180. 'left': mobiledistance
  181. }, 400)
  182. kehuFlg()
  183. }
  184. function kehuFlg() {
  185. if(nums == 0) {
  186. $('#kehuLeft').find('img').attr("src", './image/ions/zuos.png')
  187. $('#kehuLeft').addClass("zhis")
  188. } else {
  189. $('#kehuLeft').find('img').attr("src", './image/ions/zuo.png')
  190. $('#kehuLeft').removeClass("zhis")
  191. }
  192. if(nums >= 5) {
  193. $('#kehuRight').find('img').attr("src", './image/ions/yous.png')
  194. $('#kehuRight').addClass("zhis")
  195. } else {
  196. $('#kehuRight').find('img').attr("src", './image/ions/you.png')
  197. $('#kehuRight').removeClass("zhis")
  198. }
  199. }