Эх сурвалжийг харах

Merge branch 'master' into hotfix/v4.8.27.4

lianbingjie 2 жил өмнө
parent
commit
7c6a752889

+ 1 - 1
src/web/staticres/brand/css/index.css

@@ -6,7 +6,7 @@
   display: block!important;
 }
 #public-nav{
-  /* height: 152px !important; */
+   height: 152px;
 }
 /* 结束 */
 /* 头部按钮 及文案 */

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

@@ -14,7 +14,7 @@
 
 .advertising_position {
   width: 100%;
-  /* height: 80px; */
+  height: 80px;
   display: none;
   cursor: pointer;
 }
@@ -33,16 +33,30 @@
   display: none;
 
 }
+.advertising_position .one img {
+  z-index: 1;
+  right: -18px;
+}
+.advertising_position .two img {
+  left: -18px;
+}
 .advertising_position .one img,
 .advertising_position .two img{
-  width: 100%;
+  position: absolute;
+  top: 0;
   height: 100%;
 }
 
+.advertising_position_index .one {
+  background-color: #1f5ef2;
+}
+.advertising_position_brand .one {
+  background-color: #480bdf;
+}
 .advertising_position_index .one,
 .advertising_position_brand .one {
   width: 50%;
-  /* height: 80px; */
+   height: 80px;
   position: absolute;
   left: 0;
   top: 0;
@@ -51,11 +65,12 @@
 
 .advertising_position_index .two,
 .advertising_position_brand .two {
-  width: 52%;
-  /* height: 80px; */
+  width: 50%;
+  height: 80px;
   position: absolute;
   right: 0;
   top: 0;
+  background-color: #ff8a1d;
 }
 
 .advertising_position_brand .one {}
@@ -128,11 +143,11 @@
   background-color: #E0E0E0;
 }
 .public-nav.light-bg-light-color .logo_box .logo_desc .nav-logo-line{
- 
+
   background-color: rgba(255, 255, 255, 0.4)!important;
 }
 .public-nav.light-bg-dark-color .logo_box .logo_desc .nav-logo-line{
- 
+
   background-color: #E0E0E0!important;
 }
 

+ 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)' })
+    }
   })
 }

+ 0 - 13
src/web/templates/pc/brand/index.html

@@ -520,19 +520,6 @@
     $('.pc-index-bottom .bottom-member-ad').unbind('click').click(function () {
       window.open(bottom_img[0].s_link)
     })
-    var imgheight = ($(window).width()*0.11)/2
-    // $('.advertising_position_index img').eq(0).height()
-    $('.jy-index').css({'padding-top':imgheight+'px'});
-      $('#public-nav').css({'height':(imgheight+72)+'px'});
-      $('.advertising_position_index').css({'height':imgheight+'px'});
-      $('.advertising_position_index a').css({'height':imgheight+'px'}); 
-    $(window).resize(function () {//当浏览器大小变化时
-      var imgheight = ($(window).width()*0.11)/2
-      $('.jy-index').css({'padding-top':imgheight+'px'});
-      $('#public-nav').css({'height':(imgheight+72)+'px'});
-      $('.advertising_position_index').css({'height':imgheight+'px'});
-      $('.advertising_position_index a').css({'height':imgheight+'px'}); 
-    })
   })
 </script>
 </html>

+ 0 - 13
src/web/templates/pc/index.html

@@ -852,19 +852,6 @@
         }
       }
     })
-    var imgheight = ($(window).width()*0.11)/2
-    // $('.advertising_position_brand img').eq(0).height()
-    $('.jy-index').css({'padding-top':imgheight+'px'});
-      $('#public-nav').css({'height':(imgheight+72)+'px'});
-      $('.advertising_position_brand').css({'height':imgheight+'px'});
-      $('.advertising_position_brand a').css({'height':imgheight+'px'}); 
-    $(window).resize(function () {//当浏览器大小变化时
-      var imgheight = ($(window).width()*0.11)/2 //根据比例计算图片宽度
-      $('.jy-index').css({'padding-top':imgheight+'px'});
-      $('#public-nav').css({'height':(imgheight+72)+'px'});
-      $('.advertising_position_brand').css({'height':imgheight+'px'});
-      $('.advertising_position_brand a').css({'height':imgheight+'px'}); 
-    })
   })
   // 弹窗(优化一下?)
   var times = new Date().getTime();