瀏覽代碼

Merge remote-tracking branch 'origin/developer' into developerD

zhijiezhao 2 年之前
父節點
當前提交
d73421d387

+ 5 - 3
src/main/resources/static/css/article/article.css

@@ -158,7 +158,7 @@ dl,dd,dt{zoom:1}
 	.new-list .search-tip{ font-size: 16px; color: #333; font-weight: bold; position: relative;line-height: 32px}
 	.new-list .search-tip b{color:#E15616;font-weight:bold;}
 	.new-list .search-tip a{ color:#E15616; text-decoration: underline; }
-	.new-list .search-tip::after {content: ""; display: inline-block;/* position: absolute; left: 0;top: 50%; transform: translateY(-50%);*/ width: 30px; height: 30px; background: url(/img/base/icon-pointer-right.png) no-repeat center; background-size: 30px; height: 30px;
+	.new-list .search-tip.pointer::after {content: ""; display: inline-block;/* position: absolute; left: 0;top: 50%; transform: translateY(-50%);*/ width: 30px; height: 30px; background: url(/img/base/icon-pointer-right.png) no-repeat center; background-size: 30px; height: 30px;
 		-webkit-animation: ease pointerFlashing infinite 0.3s;
 		animation: ease pointerFlashing infinite 0.3s; -webkit-transform: rotateY(180deg); transform: rotateY(180deg);vertical-align: -8px;
 		-webkit-filter: invert(54%) sepia(57%) saturate(5587%) hue-rotate(352deg) brightness(90%) contrast(96%);filter: invert(54%) sepia(57%) saturate(5587%) hue-rotate(352deg) brightness(90%) contrast(96%);
@@ -186,7 +186,7 @@ dl,dd,dt{zoom:1}
 
 }
 @media screen and (max-width:768px){
-	body{height: 100vh;overflow-y: scroll;}
+	body{height: 100vh;overflow-y: scroll;position: relative;}
 	.header .logo,.header .home{display:none}
 	.mIcon:before{content:'';display:inline-block;font-size:0;background:url(/img/base/icon_m.png) no-repeat;background-size:100vw auto;transition:all .5s}
 	#scrollTop{display:none;position:fixed;right:0;;z-index:9999;bottom:4vw;}
@@ -221,7 +221,7 @@ dl,dd,dt{zoom:1}
 	.classify.search-tip{ font-size: 3.2vw; font-weight: bold; }
 	.classify.search-tip em{color:#E15616;font-weight:bold;}
 	.classify.search-tip a{ color:#E15616; text-decoration: underline; }
-	.classify.search-tip::after {content: ""; display: inline-block;width: 6.2vw; height: 6.2vw;
+	.classify.search-tip.pointer::after {content: ""; display: inline-block;width: 6.2vw; height: 6.2vw;
 		background: url(/img/base/icon-pointer-right.png) no-repeat center; background-size: 6.2vw 6.2vw;
 		-webkit-animation: ease pointerFlashing infinite 0.3s;
 		animation: ease pointerFlashing infinite 0.3s; -webkit-transform: rotateY(180deg); transform: rotateY(180deg);vertical-align: -1.6vw;
@@ -270,4 +270,6 @@ dl,dd,dt{zoom:1}
 	.classify{height:10vw;line-height:10vw;border-left:solid 4px #e15616;font-size:3.7vw;color:#333;padding:0 3vw;background:#fff}
 	.article .like{color: #e15616;cursor: pointer;display: block;height: 18.4vw;width: 18.4vw;line-height: 27.4vw;margin: 5vw auto;border-radius: 50%;background: #fef6f3;text-align: center;position: relative}
 	.article .like:before{ width: 8vw;height: 8vw;background-position: -14vw -78.4vw;vertical-align: middle;border-radius: 50%;position: absolute;top: 3.2vw}
+
+	.no-result{text-align: center;padding: 3.2vw 0;}
 }

+ 2 - 2
src/main/resources/static/js/article/list.js

@@ -162,8 +162,8 @@ var articleList = new Vue({
                 var scrollTop =  $(this).scrollTop();
                 var documentHeight = $(document).height();
                 var windowHeight = $(this).height() ;
-                if( scrollTop + windowHeight == documentHeight ){
-                    console.log("到底部了!");
+                // alert(scrollTop + windowHeight == documentHeight)
+                if( scrollTop + windowHeight + 100 > documentHeight ){
                     //此处是滚动条到底部时候触发的事件,在这里写要加载的数据,或者是拉动滚动条的操作
                     var totalPage = Math.ceil(_self.listRecord / _self.params.size)?Math.ceil(_self.listRecord / _self.params.size):1;
                     var next = _self.params.num+1;

+ 12 - 8
src/main/resources/templates/article/list.html

@@ -26,19 +26,23 @@
                     <input class="keyword" type="text" :value="params.keyword" placeholder="请输入关键词" />
                     <a class="searchBtn" href="javascript:void(0);">搜索</a>
                 </div>
-                <p v-if="isPC" class="result search-tip">
-                    <span>为你找到相关文章<b v-text="listRecord"></b>条,</span>
-                    <span>同时为您找到相关产品<b v-text="productRecord"></b>个</span>
-                    <a target="_blank" :href="'/product/list.html?keyword=' + params.keyword" v-if="listRecord > 0">点击前往</a>
+                <p v-if="isPC" class="result search-tip" :class="{pointer:productRecord && productRecord > 0}">
+                    <span>为你找到相关文章<b v-text="listRecord"></b>条<template v-if="productRecord && productRecord > 0">,</template></span>
+                    <template  v-if="productRecord && productRecord > 0">
+                        <span>同时为您找到相关产品<b v-text="productRecord"></b>个</span>
+                        <a target="_blank" :href="'/product/list.html?keyword=' + params.keyword" v-if="listRecord > 0">点击前往</a>
+                    </template>
                 </p>
             </div>
             <p v-else-if="params.labelId" class="classify biaoqian">
                 <em id="labelTxt"></em>相关的文章
             </p>
-            <p v-if="params.keyword && !isPC" class="classify search-tip">
-                <span>为你找到相关文章<em v-text="listRecord"></em>条,</span>
-                <span>同时为您找到相关产品<em v-text="listRecord"></em>个</span>
-                <a target="_blank" :href="'/product/list.html?keyword=' + params.keyword" v-if="listRecord > 0">点击前往</a>
+            <p v-if="params.keyword && !isPC" class="classify search-tip" :class="{pointer:productRecord && productRecord > 0}">
+                <span>为你找到相关文章<em v-text="listRecord"></em>条<template v-if="productRecord && productRecord > 0">,</template></span>
+                <template v-if="productRecord && productRecord > 0">
+                    <span>同时为您找到相关产品<em v-text="productRecord"></em>个</span>
+                    <a target="_blank" :href="'/product/list.html?keyword=' + params.keyword" v-if="listRecord > 0">点击前往</a>
+                </template>
             </p>
             <div v-if="listData.length>0" class="dataRousce">
                 <!--<div class="search-tip">为你找到相关文章59条,同时为您找到相关产品59条<a href="/">点击前往</a></div>-->