Преглед на файлове

Merge branch 'feature/v4.8.0' of http://192.168.3.207:8080/qmx/jy into feature/v4.8.0

wenmenghao321 преди 2 години
родител
ревизия
5b227d59d2

+ 11 - 1
src/jfw/jyutil/classroomiInfo.go

@@ -322,13 +322,15 @@ func GetNextInfo(_id string, keyWord ...string) (lastId, nextId string) {
 	if doc == nil || len(*doc) == 0 {
 		return
 	}
+	//增加浏览次数
+	go Browsing(_id, util.IntAll((*doc)["i_viewnum"]))
 	commonQuery := map[string]interface{}{
 		"i_status": 1,
 		"releasetime": map[string]interface{}{
 			"$lt": time.Now().Unix(),
 		},
 	}
-	for _, t := range []string{"s_contenttype", "s_secondclassifytype", "s_threeclassifytype"} {
+	for _, t := range []string{"s_contenttype"} {
 		if tv, _ := (*doc)[t].(string); tv != "" {
 			commonQuery[t] = tv
 		}
@@ -338,6 +340,7 @@ func GetNextInfo(_id string, keyWord ...string) (lastId, nextId string) {
 			"$regex": keyWord[0],
 		}
 	}
+	log.Println("content上下文query:", commonQuery)
 	dataOn, ok := mongodb.Find("content", commonQuery, `{"releasetime":-1,"l_createdate":-1}`, `{"_id":1,"i_viewnum":1,releasetime":-1,"l_createdate":1}`, false, -1, -1)
 	if ok && dataOn != nil && len(*dataOn) > 0 {
 		for k, v := range *dataOn {
@@ -490,3 +493,10 @@ func PidColumn(id string) []Navigation {
 	return allColumn
 
 }
+
+func Browsing(id string, viewNum int) {
+	mongodb.UpdateById("content", id, map[string]interface{}{
+		"$set": map[string]interface{}{
+			"i_viewnum": viewNum + 1,
+		}})
+}

+ 1 - 1
src/web/staticres/frontRouter/pc/dataInterface/css/index.css

@@ -3,7 +3,7 @@
   margin: 0 auto;
 }
 .data-market-ad-bottom img{
-  max-height:80px;
+  max-height:88px;
   width: 100%;
   position: fixed;
   bottom: 0;

+ 3 - 0
src/web/staticres/site/page/helpCenter/css/feedback.css

@@ -8,6 +8,9 @@
   height: 100%;
   padding-top: 64px;
 }
+.page-feedback .feedback-container{
+  padding: 0 100px;
+}
 .page-feedback .feedback-title{
   padding: 48px 0 4px;
   font-size: 24px;

+ 7 - 2
src/web/staticres/site/page/industryInfo/css/industry_content.css

@@ -193,8 +193,13 @@
   font-size: 16px;
   color: #fff;
 }
-.btn_next>button:last-child{
-  margin-left: 52px;
+.btn_next .before_btn {
+  margin-right: 52px;
+}
+.btn_next .before_btn.only_btn{
+  margin-right: 0;
+}
+.btn_next .next_btn{
   color: #686868;
   background: #fff;
   border: 1px solid #E0E0E0;

+ 0 - 0
src/web/templates/dataMarket/customExport/Index.html → src/web/templates/dataMarket/customExport/index.html


+ 23 - 16
src/web/templates/dataMarket/dataInterface/index.html

@@ -92,7 +92,7 @@
     </section>
   </section>
   {{range $k,$v:=Ad "jy-pc-dataInterface-bottom" -1 .Host}}
-  <div class="data-market-ad-bottom">
+  <div class="data-market-ad-bottom" onClick="isAdJump({{ $v }})">
     <img src="{{Msg "seo" "cdn"}}{{$v.S_pic}}" alt="">
   </div>
   {{end}}
@@ -160,23 +160,30 @@
     });
   };
   function windowScrollFn () {
-    // 底部横幅固定
-    var stickyFooter = $('.data-market-ad-bottom');
-    // 吸底
-    // 如果距离底部
-    var bottomFooter = $('.j-bottom');
-    var ob = { top: 0 };
-    if (bottomFooter.length) {
-      ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect();
-    }
-    // bottom出现在视口
-    var bottom = window.innerHeight - ob.top;
-    if (bottom > 0 && ob.top !== 0) {
-      stickyFooter.css({ bottom: parseInt(bottom) });
-    } else {
-      stickyFooter.css({ bottom: 0 });
+    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;
+      // console.log("滚动中")
+      $('.data-market-ad-bottom').fadeOut()
+    })
+    function isScrollEnd() {
+      top2 = document.documentElement.scrollTop || document.body.scrollTop;
+      if(top1 == top2 && (window.memberStatus <= 0 || !window.memberStatus)){
+        // console.log('滚动结束了')
+        $('.data-market-ad-bottom').fadeIn()
+      }
     }
   };
+  // 广告位跳转链接
+  function isAdJump(item){
+    if(item.s_link){
+      window.open(item.s_link)
+    }
+  }
 </script>
 </body>
 </html>

+ 1 - 1
src/web/templates/site/page/helpCenter/feedback.html

@@ -20,7 +20,7 @@
 		{{include "/common/pchead.html"}}
 
 		<section class="page-feedback">
-      <div class="w1200">
+      <div class="w1200 feedback-container">
         <h1 class="feedback-title">意见反馈</h1>
         <div class="feedback-form">
           <div class="f-item">

+ 0 - 2
src/web/templates/site/page/jySchool/strategy.html

@@ -12,7 +12,6 @@
   {{include "/common/pnc.html"}}
   <link rel="stylesheet" type="text/css" href='{{Msg "seo" "cdn"}}/pccss/reset_pc.css?v={{Msg "seo" "version"}}' />
   <link rel="stylesheet" type="text/css" href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' />
-  <link href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet" />
   <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   <link href='{{Msg "seo" "cdn"}}/site/page/jySchool/css/introduction.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   </head>
@@ -68,7 +67,6 @@
     </section>
   </body>
   <script type="text/javascript" src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}'></script>
-  <script src="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/index.js"></script>
   <script>
     haslogin({{.T.logid}})
   </script>

+ 6 - 6
src/web/templates/site/page/jyblogdetail.html

@@ -90,8 +90,8 @@
             <div class="jyb_ddetail">{{.T.data.s_content}}</div>
           </div>
           <div class="btn_next">
-            {{if .T.lastId}}<button  onclick="window.location.href='/jySite/{{.T.lastId}}.html'" >上一篇</button>{{end}}
-            {{if .T.nextId}}<button  onclick="window.location.href='/jySite/{{.T.nextId}}.html'" >下一篇</button>{{end}}
+            {{if .T.lastId}}<button class="before_btn"  onclick="window.location.href='/jySite/{{.T.lastId}}.html'" >上一篇</button>{{end}}
+            {{if .T.nextId}}<button class="next_btn"  onclick="window.location.href='/jySite/{{.T.nextId}}.html'" >下一篇</button>{{end}}
           </div>
         </div>
         <div class="recommend_title">
@@ -118,10 +118,6 @@
         {{end}}
       </article>
       <aside>
-        <script script type="text/javascript">
-          var pCode ={{.T.pCode}}
-          alert(pCode)
-        </script>
         {{include "/site/common/slide-leave-info.html"}}
         <div class="real_time_info_module" style="margin-top:40px;">
           <div class="module_title">
@@ -319,6 +315,10 @@
       }
     });
     }
+    var nextId = {{.T.nextId}}
+    if (nextId == '') {
+      $('.before_btn').addClass('only_btn')
+    }
   })
 
 </script>