소스 검색

Merge branch 'dev/v4.8.83_cyl' of qmx/jy into feature/v4.8.83

cuiyalong 1 년 전
부모
커밋
c8286a32d2
3개의 변경된 파일41개의 추가작업 그리고 11개의 파일을 삭제
  1. 24 0
      src/web/staticres/js/index/index_2023.12.js
  2. 8 8
      src/web/staticres/pccss/index_pc.css
  3. 9 3
      src/web/templates/pc/template/index/ent-service-module.html

+ 24 - 0
src/web/staticres/js/index/index_2023.12.js

@@ -153,6 +153,7 @@ var _page = {
     },
   },
   init: function () {
+    this.initHotSearchKeysCount()
     this.initEvents()
     this.initHotBuyerShortName()
     this.initHotIndustryTwoLine()
@@ -164,6 +165,26 @@ var _page = {
     this.initImportantGovTab()
     this.initHotIndustrySearch()
   },
+  initHotSearchKeysCount: function () {
+    // 超出盒子的元素隐藏
+    var container = $('.hot-key-list');
+    var childElements = container.find('.hot-key-item');
+    var containerWidth = container.width();
+    var totalWidth = 0;
+    var lastVisibleIndex = -1;
+    childElements.each(function(index) {
+      var elementWidth = $(this).outerWidth(true); // 包括外边距
+      totalWidth += elementWidth;
+      if (totalWidth > containerWidth) {
+        lastVisibleIndex = index - 1;
+        return false; // 结束循环
+      }
+    });
+    if (lastVisibleIndex >= 0) {
+      childElements.eq(lastVisibleIndex).nextAll().attr('data-overflow-hidden', '');
+      container.find('[data-overflow-hidden]').hide()
+    }
+  },
   initSearchEvents: function () {
     var _this = this
     // 切换筛选项
@@ -281,6 +302,9 @@ var _page = {
       // 获取第二行最后一个元素
       var $s = _page.getLine2LastDom($(this), $(this).find('li'))
       $s.attr('data-simple-hidden', '')
+      if ($s.find('a').text().length < 2) {
+        $s.prev().attr('data-simple-hidden', '')
+      }
       $s.nextAll(':not(.more)').attr('data-simple-hidden', '')
       $('.hot-industry [data-simple-hidden]').addClass('hidden')
     })

+ 8 - 8
src/web/staticres/pccss/index_pc.css

@@ -367,7 +367,7 @@
 .index-search-input-container {
     display: flex;
     align-items: center;
-    flex: 1;
+    width: 544px;
     padding-left: 40px;
     padding-right: 32px;
     border: 2px solid #2ABED1;
@@ -404,7 +404,7 @@
     z-index: 6;
     top: 38px;
     left: 0;
-    width: 549px;
+    width: 544px;
     background: #fff;
     box-shadow: 0 0 20px rgb(0, 0, 0, 0.1);
     border-radius: 8px;
@@ -457,7 +457,8 @@
 }
 .hot-key-list {
     display: flex;
-    max-width: 550px;
+    width: 534px;
+    overflow: hidden;
 }
 .hot-key-list .hot-key-item {
     margin-right: 12px;
@@ -972,16 +973,15 @@
     font-size: 12px;
     line-height: 22px;
 }
-
-.ent-service-module .service-desc-list .service-desc-button:not(:first-of-type) {
+.ent-service-module .service-desc-list li:not(:first-of-type) {
     margin-top: 12px;
 }
-.ent-service-module .service-desc-footer {
-    margin-top: 24px;
-}
 .ent-service-module .service-desc-list li {
     width: 100%;
 }
+.ent-service-module .service-desc-footer {
+    margin-top: 24px;
+}
 
 /* data-service-module */
 .data-service-module .service-desc-card {

+ 9 - 3
src/web/templates/pc/template/index/ent-service-module.html

@@ -12,9 +12,15 @@
         <main class="service-desc-main">
           <p class="service-desc-text">实现用户在平台上完成资讯、销售线索、销售就会、客户的全线跟踪处理。</p>
           <ul class="service-desc-list clearfix">
-            <li class="service-desc-button s-main">专属情报库</li>
-            <li class="service-desc-button s-main">客户管理</li>
-            <li class="service-desc-button s-main">数字看板</li>
+            <li>
+              <a class="service-desc-button s-main cms-link" href="/swordfish/frontPage/digitalMarketing/free/index" target="_blank">专属情报库</a>
+            </li>
+            <li>
+              <a class="service-desc-button s-main cms-link" href="/swordfish/frontPage/customanage/free/index" target="_blank">客户管理</a>
+            </li>
+            <li>
+              <a class="service-desc-button s-main cms-link" href="/swordfish/frontPage/digitalMarketing/free/index" target="_blank">数字看板</a>
+            </li>
           </ul>
         </main>
         <footer class="service-desc-footer">