Selaa lähdekoodia

Merge branch 'hotfix/v4.8.31.1_s' of qmx/jy into hotfix/v4.8.31.1

zhangyuhan 2 vuotta sitten
vanhempi
commit
a513e83bdd

+ 3 - 3
src/web/staticres/public-pc/css/header-nav.css

@@ -49,7 +49,7 @@
 .advertising_position_index .one,
 .advertising_position_brand .one {
   width: 50%;
-  /* height: 80px; */
+   height: 80px;
   position: absolute;
   left: 0;
   top: 0;
@@ -58,8 +58,8 @@
 
 .advertising_position_index .two,
 .advertising_position_brand .two {
-  width: 52%;
-  /* height: 80px; */
+  width: 50%;
+  height: 80px;
   position: absolute;
   right: 0;
   top: 0;

+ 6 - 2
src/web/staticres/public-pc/js/header-nav.js

@@ -60,7 +60,7 @@ function trySelectNav (name) {
   try {
     // if(name == '解决方案') {
     //   name = '电信行业解决方案'
-    // } 
+    // }
     var activeDom = document.querySelector("#public-nav .jynav li .jynav-list span[name='"+ name +"']")
     if (activeDom) {
       console.log(activeDom)
@@ -70,7 +70,7 @@ function trySelectNav (name) {
       var activeLi = document.querySelector("#public-nav .jynav li[name='"+ name +"']")
       if(activeLi){
         activeLi.className += ' active'
-      } 
+      }
     }
     var newactiveDom = document.querySelector("#public-nav .jynav li .case-row-group a[name='"+ name +"']")
     if(newactiveDom){
@@ -350,6 +350,10 @@ fixScaleScroll()
 function fixScaleScroll () {
   $(window).on('scroll', function () {
     var scrollLeft = $('html').scrollLeft()
+    var hasAdOfTop = $(".advertising_position").children().length
     $('#public-nav .iner').css({ transform: 'translateX(-' + scrollLeft + 'px)' })
+    if (hasAdOfTop) {
+      $(".advertising_position").css({ transform: 'translateX(-' + scrollLeft + 'px)' })
+    }
   })
 }