Jelajahi Sumber

Merge remote-tracking branch 'origin/feature/v4.8.31' into feature/v4.8.31

wangkaiyue 2 tahun lalu
induk
melakukan
c8b1ecbfc8

File diff ditekan karena terlalu besar
+ 1 - 1
src/config.json


+ 30 - 3
src/jfw/front/pcIndex.go

@@ -37,8 +37,18 @@ type PcIndex struct {
 	searchResult  xweb.Mapper `xweb:"/list/(\\w+)/(\\w+).html"` //剑鱼标讯分类 地区结果列表
 }
 
+var hotKeyArr = []string{}
+
 func init() {
 	xweb.AddAction(&PcIndex{})
+	// 每隔5分钟更新一次随机词
+	go func() {
+		hotKeyArr = GetIndexHotKey()
+		ticker := time.NewTicker(300 * time.Second)
+		for range ticker.C {
+			hotKeyArr = GetIndexHotKey()
+		}
+	}()
 }
 
 func (this PcIndex) BrandIndex() error {
@@ -107,11 +117,10 @@ func (m *PcIndex) NewSordfish(flag string) error {
 			m.T["recommend"] = ContentRecommendation()
 			//推荐标讯专区
 			m.T["recommendBeacon"] = RecommendationBeacon()
-			m.T["hasLogin"] = m.GetSession("userId") != ""
+			m.T["hasLogin"] = util.ObjToString(m.GetSession("userId")) != ""
 			m.T["includedInfo"] = GetIncludedInfo()
-			// m.T["hotKey"] = HotKey()
 			m.T["newbids"] = NewIndexbids(m.Session(), m.Request)
-
+			m.T["hotkey"] = hotKeyArr
 			return m.Render("/pc/index.html", &m.T)
 		}
 	}
@@ -616,3 +625,21 @@ func InSeoContent(arr *[]map[string]interface{}) {
 		}
 	}
 }
+
+func GetIndexHotKey() []string {
+	pcIndexHotKey := util.ObjArrToStringArr(config.Sysconfig["pcIndexHotKey"].([]interface{}))
+	pcIndexHotKeyLimit := util.Int64All(config.Sysconfig["pcIndexHotKeyLimit"])
+	// 定义一个函数,用于从数组words中随机取出几个词
+	m := map[string]bool{}
+	for _, v := range pcIndexHotKey {
+		m[v] = true
+	}
+	result := []string{}
+	for key, _ := range m {
+		result = append(result, key)
+		if len(result) == int(pcIndexHotKeyLimit) {
+			break
+		}
+	}
+	return result
+}

+ 35 - 14
src/web/staticres/css/pc/index.css

@@ -427,10 +427,14 @@
 .hot-search .right-con {
   margin-left: 40px;
   width: 735px;
-  margin-top: 5px;
+  /* margin-top: 5px; */
   min-height: 54px;
+  display: flex;
+  align-items: center;
+}
+.hot-search .right-con .a_box{
+  margin-bottom: -10px;
 }
-
 .hot-search .right-con a {
   margin-right: 22px;
   font-size: 14px;
@@ -512,12 +516,12 @@
 }
 
 .hot-container .hot-banner .right {
+  max-width: 185px;
   display: flex;
   flex-direction: row;
   align-items: center;
   justify-content: flex-start;
   flex-wrap: wrap;
-  max-width: 183px;
   min-height: 54px;
   margin-left: 11px;
 }
@@ -574,6 +578,9 @@
   background-size: 100% 100%;
   cursor: pointer;
   overflow: hidden;
+  max-width: 100%;
+    color: #fff;
+    
 }
 
 .jy-index-product .svip-product {
@@ -604,7 +611,7 @@
 .jy-index-product .p-link {
   position: absolute;
   top: 24px;
-  display: none;
+  /* display: none; */
   padding-right: 32px;
   /* background: url(/images/index/link-arrow.png) 60px center no-repeat; */
   background: url(/images/index/link-arrow-light.png) 60px center no-repeat;
@@ -623,7 +630,9 @@
 }
 
 .jy-index-product .main-product-item .p-name {
+  text-shadow: 0px 2px 2px rgba(46, 46, 47, 0.25);
   color: #fff;
+  padding-top: 96px;
   transition: All 0.4s ease-in-out;
   -webkit-transition: All 0.4s ease-in-out;
   -moz-transition: All 0.4s ease-in-out;
@@ -631,6 +640,7 @@
 }
 
 .jy-index-product .other-product-item .p-name {
+  text-shadow: 0px 2px 2px rgba(46, 46, 47, 0.25);
   /* color: #1D1D1D; */
   color: #fff;
   transition: All 0.4s ease-in-out;
@@ -640,10 +650,16 @@
 }
 
 .jy-index-product .p-detail {
+  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
   /* display: none; */
   margin-top: 100px;
   max-width: 262px;
   text-align: justify;
+  max-width: 440px;
+  margin-top: 8px;
+  font-size: 14px;
+  color: #fff;
+  line-height: 20px;
   transition: All 0.4s ease-in-out;
   -webkit-transition: All 0.4s ease-in-out;
   -moz-transition: All 0.4s ease-in-out;
@@ -652,14 +668,19 @@
 
 .jy-index-product .other-product-item:hover {
   /* position: relative; */
-  display: inline-block;
-  /* margin: 0px; */
+  /* display: inline-block;
   max-width: 100%;
   color: #fff;
-  overflow: hidden;
+  overflow: hidden; */
 }
-
-.jy-index-product .main-product-item:hover .p-link {
+.jy-index-product .product-item {
+  border-radius: 5px;
+  
+}
+.jy-index-product .product-item:hover {
+  box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.25);
+}
+.jy-index-product .main-product-item .p-link {
   display: block;
   color: #fff;
   padding-right: 32px;
@@ -671,11 +692,11 @@
   -o-transition: All 0.8s ease-in-out;
 }
 
-.jy-index-product .main-product-item:hover .p-name {
+.jy-index-product .main-product-item .p-name {
   padding-top: 96px;
 }
 
-.jy-index-product .main-product-item:hover .p-detail {
+.jy-index-product .main-product-item .p-detail {
   max-width: 440px;
   margin-top: 8px;
   font-size: 14px;
@@ -683,7 +704,7 @@
   line-height: 20px;
 }
 
-.jy-index-product .other-product-item:hover .p-link {
+.jy-index-product .other-product-item .p-link {
   display: block;
   transition: All 0.8s ease-in-out;
   -webkit-transition: All 0.8s ease-in-out;
@@ -691,11 +712,11 @@
   -o-transition: All 0.8s ease-in-out;
 }
 
-.jy-index-product .other-product-item:hover .p-name {
+.jy-index-product .other-product-item .p-name {
   padding-top: 116px;
 }
 
-.jy-index-product .other-product-item:hover .p-detail {
+.jy-index-product .other-product-item .p-detail {
   max-width: 258px;
   line-height: 20px;
   margin-top: 8px;

TEMPAT SAMPAH
src/web/staticres/images/index/dt-bg.png


TEMPAT SAMPAH
src/web/staticres/images/index/new/Insight5.png


+ 1 - 0
src/web/staticres/public-pc/css/pc-bottom.css

@@ -157,6 +157,7 @@
   left: initial;
   right: 1px;
   transition: all 0.75s;
+  filter: drop-shadow(0px 0px 20px rgba(8, 31, 38, 0.12));
 }
 
 

+ 1 - 1
src/web/templates/common/pchead.html

@@ -248,7 +248,7 @@ $("#bidLogin .login-dig-input-box [name='verify_entname']").on('input', function
 })
 /* E-企业联想 */
 })
-function golink (type){
+function navbtnGolink (type){
   if(type == 'index'){
     // location.href = '/'
     window.open('/')

+ 14 - 21
src/web/templates/pc/index.html

@@ -61,23 +61,12 @@
         <div class="hot-search">
           <div class="left-tit">热门搜索</div>
           <div class="right-con">
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=信息化&searchvalue=&selectType=title">信息化</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=软件&searchvalue=&selectType=title">软件</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=网络安全&searchvalue=&selectType=title">网络安全</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=监控&searchvalue=&selectType=title">监控</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=安防&searchvalue=&selectType=title">安防</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=服务器&searchvalue=&selectType=title">服务器</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=弱电&searchvalue=&selectType=title">弱电</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=智能化&searchvalue=&selectType=title">智能化</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=数据中心&searchvalue=&selectType=title">数据中心</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=大数据&searchvalue=&selectType=title">大数据</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=信息安全&searchvalue=&selectType=title">信息安全</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=计算机&searchvalue=&selectType=title">计算机</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=云计算&searchvalue=&selectType=title">云计算</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=物联网&searchvalue=&selectType=title">物联网</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=物业管理&searchvalue=&selectType=title">物业管理</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=视频监控&searchvalue=&selectType=title">视频监控</a>
-            <a href="{{if .T.hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords=物业服务&searchvalue=&selectType=title">物业服务</a>
+            <div class="a_box">
+            {{$hasLogin := .T.hasLogin}}
+            {{range $i,$v := .T.hotkey}}
+              <a href="{{if  $hasLogin}}/page_workDesktop/work-bench/page?link={{end}}/jylab/supsearch/index.html?keywords={{$v}}&searchvalue=&selectType=title">{{$v}}</a>
+            {{end}}
+            </div>
           </div>
         </div>
        </div>
@@ -134,7 +123,7 @@
         </div>
         <!-- 独家行业洞察区域 -->
         <div class="jy-index-product CfadeInUp">
-          <h3 class="module-title">独家行业洞察</h3>
+          <h3 class="module-title">核心功能推荐</h3>
           <div class="w1200 product-container">
             <div class="other-product">
               <div class="product-item other-product-item buyer-product" data-href="/front/subscribe.html">
@@ -159,10 +148,10 @@
                 <div class="p-name">市场洞察</div>
                 <div class="p-detail">针对目标市场、区域进行市场分析、定制市场分析报告,精准分析客户、竞对、市场 ,帮助市场决策和拓展。</div>
               </div>
-              <div class="product-item main-product-item bigmember-product"  data-href="http://clpages.cn/yxtsjgwyxy">
+              <div class="product-item main-product-item bigmember-product"  data-href="/front/dataMarket/index">
                 <div class="p-link">了解详情</div>
-                <div class="p-name">医械行业版</div>
-                <div class="p-detail">面向医械领域的行业专版,汇集专业数据帮助医械厂商、经销商拓展优质经销商渠道、拓展合作关系,掌握市场格局和趋势。</div>
+                <div class="p-name"> 数据市场</div>
+                <div class="p-detail">数据开放共享与交易流通平台,为企业提供全面数据支持!支持数据自助下载、数据定制。</div>
               </div>
             </div>
           </div>
@@ -312,7 +301,11 @@
           <div class="item-one">
             <div class="item-header">
               <span>{{if gt ( len $v.Name ) 6}} {{if $v.Name }}{{ index (slice $v.Name 0 6) }}<i>{{ index (slice $v.Name 6 ) }}</i>{{end}} {{end}}</span>
+              {{if $hasLogin}}
+              <a href="/page_workDesktop/work-bench/page?link={{$v.Url}}" target="_blank" class="more">查看更多</a>
+              {{else}}
               <a href="{{$v.Url}}" target="_blank" class="more">查看更多</a>
+              {{end}}
             </div>
             <ul>
               {{range $n,$m := $v.Data}}

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini