liting2017 6 years ago
parent
commit
9da7174ce6

BIN
img/Logo111.png


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "aft-portal",
-  "version": "1.0.1",
+  "version": "1.0.0",
   "description": "",
   "main": "index.js",
   "scripts": {

+ 1 - 7
src/css/inded.css

@@ -5,13 +5,7 @@ div.APP:hover>div.xialaewm{display:flex;}
 div.APP:hover{background-color: #fff;}*/
 
 .search-inp a.zaixian{right:150px;background-color: #1797E9;}
-.searchImg{position: absolute;top:10px;right:20px;z-index: 10;cursor: pointer;}
-
-
-
-
-
-
+.searchImg{position: absolute;top:7px;right:20px;z-index: 10;cursor: pointer;}
 .webkitDown{
     width: 12px;
     height: 8px;

+ 2 - 3
src/css/newMenu/achievement.css

@@ -111,6 +111,7 @@
 .achievementHot-list ul li div{
     overflow: hidden;
     width: 385px;
+    box-shadow: 0 0 4px #ccc;
 }
 .achievementHot-list .col-sm-4{
     padding: 0
@@ -127,8 +128,6 @@
     width: 273px;
     height: 112px;
     float: left;
-    border: 1px solid #ededed;
-    border-left: none;
 }
 .achievementHot-list ul li div div h4{
     font-weight: normal;
@@ -401,7 +400,7 @@ hr{
     font-size: 14px;
     color: #ff6600;
     border: 1px solid #ff6600;
-    line-height: 24px;
+    line-height: 21px;
     margin: 0 3px;
     overflow: hidden;
     text-overflow: ellipsis;

+ 2 - 2
src/css/newMenu/header.css

@@ -7,7 +7,7 @@
     border-bottom: 1px solid #eaeaea;
 }
 .logo{
-    height:90px;
+    height:70px;
 }
 .logo img{
     height: 100%;
@@ -110,7 +110,7 @@ div.APP:hover{background-color: #fff;}
 }
 .navHeader .logo {
 	float: left;
-    margin-top: -2px;
+    margin-top: 7px;
 }
 .carousel-indicators{
     bottom: 30px!important;

+ 1 - 1
src/css/newMenu/patent.css

@@ -128,7 +128,7 @@
 .secondMenu ul li{
     position: absolute;
     top: 0;
-    left: 200px;
+    left: 700px;
     z-index: 50;
     opacity: 0;
     transition: all .3s ease-in-out;

+ 8 - 2
src/css/newMenu/public.css

@@ -899,9 +899,9 @@ input:-webkit-autofill {
 }
 
 .pagination_box .inp button{
-	width: 50px;
+	width: 60px;
 	height: 34px;
-	line-height: 34px;
+	line-height: 32px;
 	text-align: center;
 	margin: 0 10px;	
 	vertical-align: middle;
@@ -910,4 +910,10 @@ input:-webkit-autofill {
 	border-radius: 5px;
 	margin-top: 0px;
 } 
+.pagination .pagePre a{
+	margin-right: 10px;
+}
+.pagination .pageNext a{
+	margin-left: 10px;
+}
 

+ 1 - 1
src/css/newMenu/serviceList.css

@@ -221,7 +221,7 @@
     transform: scale(1.001);
     box-shadow: 1px 1px 0 #f5f5f5, 2px 2px 0 #c9c9c9, 3px 3px 0 #bbb, 4px 4px 0 #b9b9b9, 5px 5px 0 #aaa,
     6px 6px 1px rgba(0, 0, 0, .1), 0 0 5px rgba(0, 0, 0, .1), 1px 1px 3px rgba(0, 0, 0, .3), 3px 3px 5px rgba(0, 0, 0, .2),
-    5px 5px 10px rgba(0, 0, 0, .25), 10px 10px 10px rgba(0, 0, 0, .2), 20px 20px 20px rgba(0, 0, 0, .15);
+    5px 5px 10px rgba(0, 0, 0, .23), 10px 10px 10px rgba(0, 0, 0, .2), 20px 20px 20px rgba(0, 0, 0, .15);
     transition: all .2s ease-in;
 }
 .achievementHot ul li:hover .txts h5{

+ 113 - 5
src/css/search.css

@@ -1,5 +1,6 @@
+
 body{background:linear-gradient(to top,#F2F7FB,#fff);}
-.cont{width:1200px;margin: 0 auto;border: 1px solid #EBEDEF;}
+.cont{width:1200px;margin: 0 auto;}
 .contone>h4{margin: 0;width:70%;height: 70px;display: inline-block;padding-left: 15px;padding-right: 30px;font-weight: normal;
 line-height: 70px;cursor: pointer;overflow: hidden;}
 .contone>p{margin: 0;width:30%;height: 70px;display: inline-block;padding-right: 15px;padding-right: 30px;overflow: hidden;}
@@ -11,7 +12,7 @@ display: flex;justify-content: space-between;background-color: #fff;}
 .title{width:1200px;margin:0 auto;height:50px;line-height: 50px;color:#707070;}
 .line1{overflow: hidden;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;}
 .key{width:300px;}
-.noLength{color:#4d4d4d;font-size: 18px;float:left;margin: 30px 0 0 10px;}
+.noLength{width: 550px;height:150px;margin: 50px auto 60px;background: url(../../img/all_null.png) no-repeat;background-size:100% 100%; }
 
 .pagination_box{clear: both;overflow: hidden; width: 1200px;
 margin: 0 auto;line-height: 74px;display: none;}
@@ -43,19 +44,126 @@ margin: 0 auto;line-height: 74px;display: none;}
 .pagination_box ul li a {
     color: #333
 }
-
 .pagination_box .pagination {
     float: right;
     margin-right: 20px;
 }
-
 .pagination_box .totalCount {
     float: right;
     display: inline-block;
     margin-right: 15px;
 }
+.indexSearch{
+    width: 635px;
+    height: 36px;
+    margin: 26px auto 45px;
+}
+.pagination_box .inp button{
+    line-height: 0;
+    margin-top: -5px;
+}
+.indexSearch .btn{
+    border-radius: 0;
+}
+.indexSearch .form-control{
+    border-radius: 0;
+}
+.indexSearch .search-inp{
+    clear: both;
+    width:640px;
+    height: 36px;
+    float: left;
+}
+.indexSearch>span{
+    width: 140px;
+    display: inline-block;
+    height: 36px;
+    text-align: center;
+    color: #fff;
+    background: #5cb85c;
+    font-size: 16px;
+    line-height: 36px;
+    float: right;
+    border-radius: 5px;
+    cursor: pointer;
+}
+.searchBtn{
+    width: 104px;
+    font-size: 18px;
+}
+.indexSearch .demandSearch{
+    width: 530px;
+    height: 36px;
+    line-height: 34px;
+    border-color: #bbd5e5;
+}
+.indexSearch .searchBtn{
+    height: 36px;
+    line-height: 22px;
+    background: #1697e9;
+    border: 1px solid #1697e9;
+    color: #ffffff;
+}
+.indexSearch .searchBtn img{
+    width: 25px;height: 24px;
+    vertical-align: top
+}
+.indexSearch .search-inp .input-group{
+    width: 530px;
+}
 
-
+/* 新开发搜索 */
+footer{
+    display: none;
+    }
+.cont ul li{
+    box-shadow: 0 0 4px #ccc;
+    width: 100%;
+    background: #fff;
+    padding-left: 20px;
+    border: 1px solid #f2f2f2;
+    margin-bottom: 17px;
+}
+.cont ul li h4{
+    width: 700px;
+    font-size: 18px;
+    color: #202020;
+    line-height: 50px;
+    height: 50px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    -o-text-overflow: ellipsis;
+}
+.cont ul li p{
+    width: 770px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    -o-text-overflow: ellipsis;
+    color: #707070;
+    font-size: 16px;
+    margin-bottom: 22px;
+}
+.cont ul li div {
+    margin-bottom: 18px;
+}
+.cont ul li div span:first-child{
+    display: inline-block;
+    margin-right: 114px;
+}
+.cont ul li div span{
+    color: #52b2ef;
+    font-size: 14px;
+    font-family: '宋体';
+}
+.cont h4 span{
+    color: #ff580e;
+}
+.cont ul li:hover{
+    cursor: pointer;
+    box-shadow: 0 0 20px #ccc;
+}
 
 
 

+ 38 - 0
src/js/dataDic.js

@@ -85,4 +85,42 @@ module.exports={
             key: "传媒"
         }
     ],  
+    searchType:[
+        {
+            value:'achievement',
+            key:'成果'
+        },
+        {
+            value:'demand',
+            key:'需求'
+        },
+        {
+            value:'patent',
+            key:'专利'
+        },
+        {
+            value:'policy',
+            key:'政策'
+        },
+        {
+            value:'jt_business_project',
+            key:'项目'
+        },
+        {
+            value:'expert',
+            key:'专家'
+        },
+        {
+            value:'adviser',
+            key:'顾问'
+        },
+        {
+            value:'news',
+            key:'新闻'
+        },
+        {
+            value:'',
+            key:''
+        }
+    ]
 }

+ 49 - 34
src/js/search.js

@@ -5,6 +5,7 @@ import '../css/newMenu/header.css';
 import '../css/search.css';
 import './public.js';
 import './jquery-2.1.0.js';
+import {getSearchType} from 'js/tools.js';
 
 $(function(){
 	//从地址栏中获取参数
@@ -15,10 +16,10 @@ $(function(){
 	}
 	var name=sessionStorage.getItem("name");
 	sessionStorage.removeItem("name");
-	var pageSize = 10,
-		thePageNo = 1,
+	var pageSize = 5,
+    thePageNo = 1,
 		thePageLength = 1,
-		noLength=`<div class="noLength">没有找到您搜索的内容...</div>`;
+		noLength=`<div class="noLength"></div>`;
 		init();
     function init() {
         pages();
@@ -26,6 +27,16 @@ $(function(){
         loadDate();
         $('.onSelect .preFirst').css('display', 'none')
         $('.onSelect .next').css('display', 'none')
+        search();
+    };
+    //当前页面搜
+    function search(){
+        $('.searchBtn').click(function(){
+            let val = $('.demandSearch').val();
+            name=val;
+            thePageNo=1;
+            loadDate();
+        })
     };
 	function loadDate(pageNo) {
 		$.ajax({
@@ -34,7 +45,7 @@ $(function(){
             url: globalConfig.context + "/portal/globalSearch",
             data: {
             	pageNo: pageNo || 1,
-            	pageSize: 10,
+            	pageSize: 5,
                 name:name
             },
             success: function (data) {
@@ -42,6 +53,7 @@ $(function(){
                     msg(data.error[0].message);
                 }else if(data.error==""){
                     var contHtml="";
+                    contHtml+='<ul>'
                     var dataList=data.data.list;
                     if(dataList.length){
                     	for(var a=0;a<dataList.length;a++){
@@ -75,17 +87,19 @@ $(function(){
                     				keyHtml=`${keyData[0]}`;
                     			}
                     		}
-                    		contHtml+=`<div class="contone">
-											<h4 class="line1">${titleHtml}</h4>
-											<p class="line1">
-												<span>关键字:</span>
-												<span class="key">${keyHtml}</span>
-											</p>
-											<input type="hidden" dataType="${dataList[a].fromTable}" dataId="${dataList[a].rowId}"/>
-										</div>`;
-                    	}
-                     $(".cont").html(contHtml);
-                     
+                            contHtml+=`<li>
+                                            <h4>${titleHtml}</h4>
+                                            <p>${dataList[a].summary?dataList[a].summary:'暂无'}</p>
+                                            <div>
+                                                <span>类型:${getSearchType(dataList[a].fromTable)}</span>
+                                                <span>关键字:${dataList[a].keyword?dataList[a].keyword:''}</span>
+                                            </div>
+                                            <input type="hidden" dataType="${dataList[a].fromTable}" dataId="${dataList[a].rowId}"/>
+                                        </li>`            
+                        }
+                    contHtml+='</ul>';
+                    $(".cont").html(contHtml);
+                    $('footer').show();
                     }else{
                     	$(".cont").html(noLength);
                     }
@@ -125,27 +139,28 @@ $(function(){
                 };
                 $('.pageNumber').remove();
                 $('.pagePre').after(pageArr.join(''));
+                jumpFun();
             }
          });
-	}
-	
-	
-	//标题点击事件
-	$(".cont").on("click","h4",function(){
-		var dataType=$(this).siblings("input").attr("dataType");
-		var dataId=$(this).siblings("input").attr("dataId");
-		switch(dataType){
-			case "achievement":window.open(globalConfig.context + `/portal/technologyTrading/achievementDetail.html?id=${dataId}`);break;//成果
-			case "demand":window.open(globalConfig.context + `/portal/technologyTrading/demandDetail.html?id=${dataId}`);break;//需求
-            case "patent":window.open(globalConfig.context + `/portal/service/patentDetail?id=${dataId}`);break;//专利
-            case "policy":window.open(globalConfig.context + `/portal/news/newsDetail?id=${dataId}&type=0`);break;//政策
-            case "jt_business_project":window.open(globalConfig.context + `/portal/service/serviceDetail?id=${dataId}`);break;//项目
-			case "news":window.open(globalConfig.context + `/portal/news/newsDetail?id=${dataId}`);break;//新闻
-			case "expert":window.open(globalConfig.context + `/portal/subscriberDetail?uid=${dataId}&type=1`);break;//专家
-			case "adviser":window.open(globalConfig.context + `/portal/adviser/adviserDetail?id=${dataId}`);break;//顾问
-			default :break;
-		}
-	})
+    }  
+    //标题点击事件
+    function jumpFun(){
+        $(".cont ul li").on("click",function(){
+            var dataType=$(this).children("input").attr("dataType");
+            var dataId=$(this).children("input").attr("dataId");
+            switch(dataType){
+                case "achievement":window.open(globalConfig.context + `/portal/technologyTrading/achievementDetail.html?id=${dataId}`);break;//成果
+                case "demand":window.open(globalConfig.context + `/portal/technologyTrading/demandDetail.html?id=${dataId}`);break;//需求
+                case "patent":window.open(globalConfig.context + `/portal/service/patentDetail?id=${dataId}`);break;//专利
+                case "policy":window.open(globalConfig.context + `/portal/news/newsDetail?id=${dataId}&type=0`);break;//政策
+                case "jt_business_project":window.open(globalConfig.context + `/portal/service/serviceDetail?id=${dataId}`);break;//项目
+                case "news":window.open(globalConfig.context + `/portal/news/newsDetail?id=${dataId}`);break;//新闻
+                case "expert":window.open(globalConfig.context + `/portal/subscriberDetail?uid=${dataId}&type=1`);break;//专家
+                case "adviser":window.open(globalConfig.context + `/portal/adviser/adviserDetail?id=${dataId}`);break;//顾问
+                default :break;
+            }
+        })
+    }
 	//f分页
     function pages() {
         $('.pagination').on('click', 'li', function (e) {

+ 1 - 0
src/js/thinkTank/policyList.js

@@ -236,6 +236,7 @@ $(function () {
 			dataList.type=val;
 			$(this).addClass('active').siblings().removeClass('active');
 			dataList.title='';
+			thePageNo=1;
 			$('.demandSearch').val('');
 			loadDate();
 		})

+ 22 - 3
src/js/tools.js

@@ -1,9 +1,28 @@
+import {
+    searchType
+} from 'js/dataDic.js';
+
 module.exports = {
-    message(text) {
+    //提示语封装
+    message:(text) =>{
         $('.message span').html(text);
-        $(".message").fadeToggle("slow");
+        $(".message").fadeToggle("slow").stop(true);
         setTimeout(function () {
-            $(".message").fadeOut()
+            $(".message").fadeOut();
         }, 3000);
+    },
+    //搜索数据类型
+    getSearchType:(e)=>{
+        let val='';
+        if(e){
+            searchType.map(item=>{
+                if(item.value==e){
+                    val=item.key
+                }
+            })
+        }else{
+            val='';
+        }
+        return val;
     }
 }

+ 4 - 4
template/index.html

@@ -685,7 +685,7 @@
 							<label for="pass">
 								<img src="../img/login_password.png" />
 							</label>
-							<input type="password" name="pass" id="Lo_pass" placeholder="请输入密码" />
+							<input type="password" autocomplete="off" name="pass" id="Lo_pass" placeholder="请输入密码" />
 						</div>
 						<div class="login_check">
 							<a href="">忘记密码?</a>
@@ -757,17 +757,17 @@
 						<div>
 							<label for="new_pass">
 								新密码:
-								<input type="text" name="type" id="new_pass" placeholder="请输入您的新密码..." />
+								<input type="text" name="type" autocomplete="off" id="new_pass" placeholder="请输入您的新密码..." />
 							</label>
 						</div>
 						<div>
 							<label for="new_pass_again">
 								确认密码:
-								<input type="text" name="type" id="new_pass_again" placeholder="请确认您的密码..." />
+								<input type="text" name="type" autocomplete="off" id="new_pass_again" placeholder="请确认您的密码..." />
 							</label>
 						</div>
 						<div class="fastener">
-							<input type="submit" class="new_password_sub" value="确认" />
+							<input type="submit" class="new_password_sub" value="确认" autocomplete="off"/>
 							<div class="fastener_right">
 								取消
 							</div>

+ 34 - 4
template/search.html

@@ -6,14 +6,44 @@
 		<!--<link rel="stylesheet" href="../src/css/search.css" />-->
 	</head>
 	<body>
-		 <div class="carousel">
+		 <!-- <div class="carousel">
 	        <img src="../img/patent/patent_banners.jpg" alt="First slide">
-	    </div>
+		</div> -->
+		<div class="indexSearch">
+			<div class="search-inp">
+				<div class="input-group">
+					<input type="text" class="form-control demandSearch" placeholder="请输入关键字">
+					<span class="input-group-btn">
+						<button class="btn btn-default searchBtn" type="button">
+							<img src="../img/newMenu/search-icon.jpg" alt=""> 搜索
+						</button>
+					</span>
+				</div>
+			</div>
+		</div>
 	    <div class="title">
 	    	为您找到下列符合条件的信息:
 	    </div>
 		<div class="cont">
-			<div class="contone">
+			<ul>
+				<li>
+					<h4>高企孵化</h4>
+					<p>高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化</p>
+					<div>
+						<span>类型:项目</span>
+						<span>关键字:高企 项目</span>
+					</div>
+				</li>
+				<li>
+					<h4>高企孵化</h4>
+					<p>高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化高企孵化</p>
+					<div>
+						<span>类型:项目</span>
+						<span>关键字:高企 项目</span>
+					</div>
+				</li>
+			</ul>
+			<!-- <div class="contone">
 				<h4>高企认定</h4>
 				<p>
 					<span>关键字:</span>
@@ -33,7 +63,7 @@
 					<span>关键字:</span>
 					<span>我肤色服务而非,复健科覅及,二个人股份</span>
 				</p>
-			</div>
+			</div> -->
 		</div>
 		<div class="pagination_box">
             <nav aria-label="Page navigation" class="clearfix">

+ 2 - 2
webpack.config.js

@@ -23,7 +23,7 @@ module.exports = (function () {
     let plugins = [
         new webpack.optimize.CommonsChunkPlugin({
             name: 'vendors',
-            minChunks: 4
+            minChunks: 10
         }),
         // new webpack.optimize.CommonsChunkPlugin({
         //     name: 'vendor',
@@ -458,7 +458,7 @@ module.exports = (function () {
             alias: {
                 'js': __dirname + '/src/js',
                 'css': __dirname + '/src/css',
-                'imgs': __dirname + '/img'
+                'imgs': __dirname + '/img',
             }
         },
         plugins: plugins,