Jelajahi Sumber

信息中心搜索结果优化,支持商品搜索跳转

喻文俊 3 tahun lalu
induk
melakukan
d11dd2e02d

+ 8 - 4
src/main/resources/static/css/article/article.css

@@ -79,7 +79,7 @@ dl,dd,dt{zoom:1}
 	.search .keyword:-moz-placeholder{color:#fff}
 	.search .keyword::-moz-placeholder{color:#fff}
 	.search .keyword:-ms-input-placeholder{color:#fff}
-	.content.sea-top{margin-top:110px}
+	/* .content.sea-top{margin-top:110px} */
 	.foot{width:100%;height:130px;background:#262626;margin-top:100px}
 	.footer{width:1190px;margin:0 auto;text-align:center;height: 130px;box-sizing: border-box;padding: 39px 0;}
 	.footer p{line-height: 30px;color: #FFFFFF;}
@@ -93,7 +93,7 @@ dl,dd,dt{zoom:1}
 	.bar a{color:#777;font-size:14px}
 	.classify.biaoqian{border-bottom:solid 1px #ededed}
 	.content{width:1190px;margin:0 auto;position:relative}
-	.content .mainData{float:left;width:860px}
+	.content .mainData{float:left;width: 860px;background:#ffffff;}
 	.content .new-list{width:100%;background:#ffffff;}
 	.content .row:nth-last-child(1){border-bottom:0}
 	.new-list .row{position:relative;display:table;width:800px;height:150px;margin:0 30px;padding:30px 0;border-bottom:solid 1px #ededed}
@@ -151,7 +151,9 @@ dl,dd,dt{zoom:1}
 	.new-list .serachBox .keyword{width:696px;height:50px;line-height:50px;padding-left:40px;border:1px solid #ddd;border-right:none;border-radius:12px 0 0 12px;color:#777;font-size:14px;background:url(/img/info/search1.png) no-repeat 10px 12px}
 	.new-list .serachBox .keyword:focus{border:1px solid #ddd;border-right:none;outline:medium}
 	.new-list .serachBox .searchBtn{position:absolute;top:0px;right:1px;display:block;width:100px;height:50px;line-height:50px;text-align:center;border-radius:0 12px 12px 0;color:#fff;background-color:#e15616;background-image:none;font-size:20px}
-	.new-list .search .result{font-size:14px;color:#333}
+	.new-list .search-tip{ font-size: 14px; }
+	.new-list .search-tip b{color:#E15616;font-weight:bold;}
+	.new-list .search-tip a{ color:#E15616; text-decoration: underline; }
 	.search .result b{color:#e15616}
 	.no-result{width:860px;height:500px;text-align:center;padding-top:100px}
 	.no-result .nofound{color:#333;font-size:18px;margin-top:20px}
@@ -207,7 +209,9 @@ dl,dd,dt{zoom:1}
 	/*.tip-bar{display: flex;justify-content: space-between;align-items: center;flex-direction: row-reverse}*/
 	.tip-bar{ padding: 2vw 0 }
 	.tip,.bar,.classify{height:6vw;line-height:6vw;font-size:3.1vw;overflow:hidden;color:#93979F;padding:0 2vw}
-	.classify em{color:#E15616;font-weight:bold;margin-right:1vw;font-size:3.7vw}
+	.classify.search-tip{ font-size: 3.2vw; }
+	.classify.search-tip em{color:#E15616;font-weight:bold;}
+	.classify.search-tip a{ color:#E15616; text-decoration: underline; }
 	.mainData{min-height:68vh}
 	.new-list{background:#FFF;}
 	.dataRousce{width:100%;background:#FFF;overflow:hidden}

+ 1 - 1
src/main/resources/templates/article/detail.html

@@ -15,7 +15,7 @@
 <!--导航栏-->
 <template th:replace="article/components/article-header"></template>
 <div class="tip-bar">
-    <div class="tip">提示:产品详情请到采美商城搜索</div>
+    <!--<div class="tip">提示:产品详情请到采美商城搜索</div>-->
     <!--面包屑-->
     <div class="bar">
         <a href="/" target="_blank">首页</a> &gt; <a  th:each="type: *{articleType}" th:if="${typeId}==${type.id}" th:text="${type.name}" href="javascript:void(0);" class="title newTitle"></a>&gt; 正文

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

@@ -11,7 +11,7 @@
 <!--导航栏-->
 <template th:replace="article/components/article-header"></template>
 <div class="tip-bar">
-    <div class="tip">提示:产品详情请到采美商城搜索</div>
+    <!--<div class="tip">提示:产品详情请到采美商城搜索</div> -->
     <!--面包屑-->
     <div th:if="${typeId}>0" class="bar">
         <a href="/" target="_blank">首页</a>&gt; <a  th:each="type: ${articleType}" th:if="${typeId}==${type.id}" th:text="${type.name}" href="javascript:void(0);" class="title newTitle"></a>
@@ -26,13 +26,22 @@
                     <input class="keyword" type="text" :value="params.keyword" placeholder="请输入关键词" />
                     <a class="searchBtn" href="javascript:void(0);">搜索</a>
                 </div>
-                <p v-if="isPC" class="result" v-html="'为您找到相关结果<b>'+listRecord+'</b>条'"></p>
+                <p v-if="isPC" class="result search-tip">
+                    <span>为你找到相关文章<b v-text="listRecord"></b>条,</span>
+                    <span>同时为您找到相关产品<b v-text="listRecord"></b>条</span>
+                    <a target="_blank" :href="'/product/list.html?keyword=' + params.keyword" v-if="listRecord > 0">点击前往</a>
+                </p>
             </div>
             <p v-else-if="params.labelId" class="classify biaoqian">
                 <em id="labelTxt"></em>相关的文章
             </p>
-            <p v-if="params.keyword && !isPC" class="classify" v-html="'为您找到相关结果<em>'+listRecord+'</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>
             <div v-if="listData.length>0" class="dataRousce">
+                <!--<div class="search-tip">为你找到相关文章59条,同时为您找到相关产品59条<a href="/">点击前往</a></div>-->
                 <div class="row" v-for="item in listData">
                     <div class="new-img">
                         <a :href="'/info/detail-'+item.id+'-1.html'" target="_blank">