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

Merge branch 'dev/v4.9.23_yf' of qmx/jy into feature/v4.9.23

yangfeng 1 жил өмнө
parent
commit
32be7402a9

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

@@ -147,6 +147,9 @@ a.j-s-button:hover {
 #public-nav {
     height: unset;
 }
+#public-nav.relative{
+  position: relative;
+}
 .fixed-header {
     position: fixed;
     top: 0;

+ 5 - 0
src/web/staticres/public-pc/js/header-nav-mini.js

@@ -140,6 +140,11 @@ var headerNavMini = {
       $('.go-to-workspace').hide()
     }
     this.changeHeaderPlaceholder()
+    // 导航栏置顶or不置顶  登录:置顶  未登录:不置顶
+    var noStickMeta = document.querySelector('meta[name="cancel-nav-sticky"]')
+    if (noStickMeta) {
+      this.headerFixed(login)
+    }
   },
   changeMenuActive: function (name) {
     this.headerNav.find('[name='+name+']').addClass('active')

+ 29 - 5
src/web/staticres/tags/css/no-login-detail.css

@@ -147,15 +147,18 @@
   width: 100%;
   margin: 20px 0;
 }
-.no-login-detail .bid-banner > img{
+.no-login-detail .bid-banner > a{
+  width: 100%;
+  display: block;
+}
+.no-login-detail .bid-banner img{
   display: inline-block;
   width: 100%;
   max-height: 64px;
-  object-fit: contain;
+  /* object-fit: contain; */
   cursor: pointer;
+  border-radius: 4px;
 }
-
-
 .no-login-detail .bid-content {
   margin-top: 20px;
   padding: 32px;
@@ -472,4 +475,25 @@
 }
 .no-login-detail ul li{
   float: unset!important;
-}
+}
+
+
+.fixed-bottom-banner {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    display: flex;
+    justify-content: center;
+    width: 100%;
+    z-index: 999;
+}
+.advert-bottom-banner{
+    width: 100%;
+}
+.advert-bottom-banner img {
+    display: block;
+    object-fit: contain;
+    cursor: pointer;
+    width: 1920px;
+}

+ 1 - 0
src/web/templates/pc/newIndex.html

@@ -9,6 +9,7 @@
   <meta name="format-detection" content="telephone=no" />
   <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
   <meta name="renderer" content="webkit" >
+  <meta name="cancel-nav-sticky" content="no-login" />
   <!-- pnc.html是pcbottom.html的依赖 -->
   {{include "/common/pnc.html"}}
   <link rel="canonical" href="https://www.jianyu360.cn">

+ 49 - 2
src/web/templates/pc/tags/detail.html

@@ -89,9 +89,16 @@
               </div>
             </div>
           </div>
+          {{$ad_1:=(Ad "pc-nologin-detail-middle" -1 .Host)}}
+          {{if $ad_1}}
           <div class="bid-banner">
-            <img id="login-banner-btn" class="login-node" src='{{Msg "seo" "cdn"}}/tags/images/login-banner.png?v={{Msg "seo" "version"}}' alt="loginBanner" />
+            {{range $ad := $ad_1}}
+            <a target="_blank" {{if $ad.S_link}}href="{{$ad.S_link}}"{{end}}>
+              <img id="login-banner-btn" class="login-node" src='{{$ad.S_pic}}' alt="{{$ad.S_picalt}}" />
+            </a>
+            {{end}}
           </div>
+          {{end}}
           {{if .T.canRead}}
           <div class="bid-content">
             <!-- 非<拟建项目>、<采购意向>基本信息表格 -->
@@ -323,7 +330,16 @@
     </div>
   </div>
 
-  {{include "/pc/tags/template/bottom-banner.html"}}
+    {{$ad_bottom:=(Ad "pc-nologin-detail-bottom" -1 .Host)}}
+    {{if $ad_bottom}}
+    <div class="fixed-bottom-banner advert-bottom-banner">
+      {{range $ad := $ad_bottom}}
+      <a target="_blank" {{if $ad.S_link}}href="{{$ad.S_link}}"{{end}}>
+        <img id="login-advert-bottom-btn" class="login-node" src='{{$ad.S_pic}}' alt="{{$ad.S_picalt}}" />
+      </a>
+      {{end}}
+    </div>
+    {{end}}
 	{{include "/common/pcbottom.html"}}
 
 
@@ -354,6 +370,37 @@
       } catch (e) {
         console.warn(e)
       }
+      $('.login-node').on('click', function () {
+          try {
+              if (!loginflag) {
+                  openLoginDig(false, 'reload')
+              }
+          } catch (error) {
+              openLoginDig(false, 'reload')
+          }
+      })
+
+      var memberTimer = setInterval(function () {
+          clearInterval(memberTimer)
+          adBottomFn()
+      }, 2000)
+      function adBottomFn () {
+          var top1 = 0;
+          var top2 = 0;
+          var timer = null;
+          $(document).scroll(function(){
+              clearTimeout(timer)
+              timer = setTimeout(isScrollEnd, 1000);
+              top1 = document.documentElement.scrollTop || document.body.scrollTop;
+              $('.fixed-bottom-banner').fadeOut()
+          })
+          function isScrollEnd() {
+              top2 = document.documentElement.scrollTop || document.body.scrollTop;
+              if(top1 == top2){
+                  $('.fixed-bottom-banner').fadeIn()
+              }
+          }
+      }
     })
   </script>
   <!--百度统计start-->

+ 2 - 0
src/web/templates/pc/tags/index.html

@@ -6,6 +6,8 @@
     <meta name="renderer" content="webkit">
     <meta content="telephone=no" name="format-detection"/>
     <meta content="剑鱼标讯" theme="light" name="enable-header"/>
+    <!-- 未登录取消导航栏置顶效果meta标识 -->
+    <meta name="cancel-nav-sticky" content="no-login" />
     {{include "/common/pnc.html"}}
     <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet" />
     <link href='{{Msg "seo" "cdn"}}/pccss/index.css?v={{Msg "seo" "version"}}' rel="stylesheet" />